Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
b213bd15
Commit
b213bd15
authored
Jul 16, 2004
by
Jessica Severin
Browse files
added failed_job_count to analysis_stats to track as a distinct value
parent
1c30321e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
7 deletions
+17
-7
modules/Bio/EnsEMBL/Hive/AnalysisStats.pm
modules/Bio/EnsEMBL/Hive/AnalysisStats.pm
+10
-3
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisStatsAdaptor.pm
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisStatsAdaptor.pm
+3
-0
modules/Bio/EnsEMBL/Hive/Queen.pm
modules/Bio/EnsEMBL/Hive/Queen.pm
+3
-4
sql/tables.sql
sql/tables.sql
+1
-0
No files found.
modules/Bio/EnsEMBL/Hive/AnalysisStats.pm
View file @
b213bd15
...
...
@@ -100,6 +100,13 @@ sub done_job_count {
return
$self
->
{'
_done_job_count
'};
}
sub
failed_job_count
{
my
$self
=
shift
;
$self
->
{'
_failed_job_count
'}
=
shift
if
(
@
_
);
$self
->
{'
_failed_job_count
'}
=
0
unless
(
defined
(
$self
->
{'
_failed_job_count
'}));
return
$self
->
{'
_failed_job_count
'};
}
sub
num_required_workers
{
my
$self
=
shift
;
$self
->
{'
_num_required_workers
'}
=
shift
if
(
@
_
);
...
...
@@ -117,7 +124,7 @@ sub determine_status {
if
(
$self
->
status
ne
'
BLOCKED
')
{
if
(
$self
->
done_job_count
>
0
and
$self
->
total_job_count
==
$self
->
done_job_count
)
{
$self
->
total_job_count
==
$self
->
done_job_count
+
$self
->
failed_job_count
)
{
$self
->
status
('
DONE
');
}
if
(
$self
->
total_job_count
==
$self
->
unclaimed_job_count
)
{
...
...
@@ -135,11 +142,11 @@ sub print_stats {
my
$self
=
shift
;
#printf("STATS %20s(%3d) %11s jobs(%7d:t,%7d:q,%7d:d) %5d:batchsize %5d:hiveCapacity %5d:neededWorkers (synched %d secs ago)\n",
printf
("
STATS %20s(%3d) %12s jobs(t=%d,q=%d,d=%d) batchsize=%d hiveCapacity=%d neededWorkers=%d (synched %d secs ago)
\n
",
printf
("
STATS %20s(%3d) %12s jobs(t=%d,q=%d,d=%d
,f=%d
) batchsize=%d hiveCapacity=%d neededWorkers=%d (synched %d secs ago)
\n
",
$self
->
get_analysis
->
logic_name
,
$self
->
analysis_id
,
$self
->
status
,
$self
->
total_job_count
,
$self
->
unclaimed_job_count
,
$self
->
done_job_count
,
$self
->
total_job_count
,
$self
->
unclaimed_job_count
,
$self
->
done_job_count
,
$self
->
failed_job_count
,
$self
->
batch_size
,
$self
->
hive_capacity
(),
$self
->
num_required_workers
,
$self
->
seconds_since_last_update
);
}
...
...
modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisStatsAdaptor.pm
View file @
b213bd15
...
...
@@ -129,6 +129,7 @@ sub update {
$sql
.=
"
,total_job_count=
"
.
$stats
->
total_job_count
();
$sql
.=
"
,unclaimed_job_count=
"
.
$stats
->
unclaimed_job_count
();
$sql
.=
"
,done_job_count=
"
.
$stats
->
done_job_count
();
$sql
.=
"
,failed_job_count=
"
.
$stats
->
failed_job_count
();
$sql
.=
"
,num_required_workers=
"
.
$stats
->
num_required_workers
();
$sql
.=
"
,last_update=NOW()
";
$sql
.=
"
WHERE analysis_id='
"
.
$stats
->
analysis_id
.
"
'
";
...
...
@@ -256,6 +257,7 @@ sub _columns {
ast
.
total_job_count
ast
.
unclaimed_job_count
ast
.
done_job_count
ast
.
failed_job_count
ast
.
num_required_workers
ast
.
last_update
);
...
...
@@ -281,6 +283,7 @@ sub _objs_from_sth {
$analStats
->
total_job_count
(
$column
{'
total_job_count
'});
$analStats
->
unclaimed_job_count
(
$column
{'
unclaimed_job_count
'});
$analStats
->
done_job_count
(
$column
{'
done_job_count
'});
$analStats
->
failed_job_count
(
$column
{'
failed_job_count
'});
$analStats
->
num_required_workers
(
$column
{'
num_required_workers
'});
$analStats
->
seconds_since_last_update
(
$column
{'
seconds_since_last_update
'});
$analStats
->
adaptor
(
$self
);
...
...
modules/Bio/EnsEMBL/Hive/Queen.pm
View file @
b213bd15
...
...
@@ -214,6 +214,7 @@ sub update_analysis_stats {
$analysisStats
->
total_job_count
(
0
);
$analysisStats
->
unclaimed_job_count
(
0
);
$analysisStats
->
done_job_count
(
0
);
$analysisStats
->
failed_job_count
(
0
);
$analysisStats
->
num_required_workers
(
0
);
}
...
...
@@ -229,10 +230,8 @@ sub update_analysis_stats {
}
$analysisStats
->
num_required_workers
(
$numWorkers
);
}
if
((
$status
eq
'
DONE
')
or
(
$status
eq
'
FAILED
'))
{
$count
+=
$analysisStats
->
done_job_count
();
$analysisStats
->
done_job_count
(
$count
);
}
if
(
$status
eq
'
DONE
')
{
$analysisStats
->
done_job_count
(
$count
);
}
if
(
$status
eq
'
FAILED
')
{
$analysisStats
->
failed_job_count
(
$count
);
}
}
$analysisStats
->
determine_status
()
->
update
()
if
(
$analysisStats
);
$sth
->
finish
;
...
...
sql/tables.sql
View file @
b213bd15
...
...
@@ -213,6 +213,7 @@ CREATE TABLE analysis_stats (
total_job_count
int
(
10
)
NOT
NULL
,
unclaimed_job_count
int
(
10
)
NOT
NULL
,
done_job_count
int
(
10
)
NOT
NULL
,
failed_job_count
int
(
10
)
NOT
NULL
,
num_required_workers
int
(
10
)
NOT
NULL
,
last_update
timestamp
NOT
NULL
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment