This document describes the tables that make up the Hive schema. Tables are grouped into categories, and the purpose of each table is explained.
You can toggle the display of individual columns using [Show/Hide columns] buttons.
This table keeps several important hive-specific pipeline-wide key-value pairs such as hive_sql_schema_version, hive_use_triggers and hive_pipeline_name.
This table contains a simple hash between pipeline_wide_parameter names and their values. The same data used to live in 'meta' table until both the schema and the API were finally separated from Ensembl Core.
Each Analysis is a node of the pipeline diagram. It acts both as a "class" to which Jobs belong (and inherit from it certain properties) and as a "container" for them (Jobs of an Analysis can be blocking all Jobs of another Analysis).
Column
Type
Default value
Description
Index
analysis_id
INTEGER
-
a unique ID that is also a foreign key to most of the other tables
logic_name
VARCHAR(255)
-
the name of the Analysis object
unique key: logic_name_idx
module
VARCHAR(255)
NULL
the Perl module name that runs this Analysis
parameters
TEXT
NULL
a stingified hash of parameters common to all jobs of the Analysis
resource_class_id
INTEGER
-
link to the resource_class table
failed_job_tolerance
INTEGER
0
% of tolerated failed Jobs
max_retry_count
INTEGER
3
how many times a job of this Analysis will be retried (unless there is no point)
can_be_empty
SMALLINT
0
if TRUE, this Analysis will not be blocking if/while it doesn't have any jobs
priority
SMALLINT
0
an Analysis with higher priority will be more likely chosen on Worker's specialization
meadow_type
VARCHAR(255)
NULL
if defined, forces this Analysis to be run only on the given Meadow
analysis_capacity
INTEGER
NULL
if defined, limits the number of Workers of this particular Analysis that are allowed to run in parallel
Parallel table to analysis_base which provides high level statistics on the state of an analysis and it's jobs. Used to provide a fast overview, and to provide final approval of 'DONE' which is used by the blocking rules to determine when to unblock other analyses. Also provides
Column
Type
Default value
Description
Index
analysis_id
INTEGER
-
foreign-keyed to the corresponding analysis_base entry
primary key
batch_size
INTEGER
1
how many jobs are claimed in one claiming operation before Worker starts executing them
hive_capacity
INTEGER
NULL
a reciprocal limiter on the number of Workers running at the same time (dependent on Workers of other Analyses)
Extension of simple_rule design except that goal(to) is now in extended URL format e.g. mysql://ensadmin:@ecs2:3361/compara_hive_test?analysis.logic_name='blast_NCBI34' (full network address of an analysis). The only requirement is that there are rows in the job, analysis, dataflow_rule, and worker tables so that the following join works on the same database WHERE analysis.analysis_id = dataflow_rule.from_analysis_id AND analysis.analysis_id = job.analysis_id AND analysis.analysis_id = worker.analysis_id These are the rules used to create entries in the job table where the input_id (control data) is passed from one analysis to the next to define work. The analysis table will be extended so that it can specify different read and write databases, with the default being the database the analysis is on
Column
Type
Default value
Description
Index
dataflow_rule_id
INTEGER
-
internal ID
from_analysis_id
INTEGER
-
foreign key to analysis table analysis_id
unique: key
branch_code
INTEGER
1
branch_code of the fan
unique: key
funnel_dataflow_rule_id
INTEGER
NULL
dataflow_rule_id of the semaphored funnel (is NULL by default, which means dataflow is not semaphored)
unique: key
to_analysis_url
VARCHAR(255)
''
foreign key to net distributed analysis logic_name reference
unique: key
input_id_template
TEXT
NULL
a template for generating a new input_id (not necessarily a hashref) in this dataflow; if undefined is kept original
These rules define a higher level of control. These rules are used to turn whole anlysis nodes on/off (READY/BLOCKED). If any of the condition_analyses are not 'DONE' the ctrled_analysis is set to BLOCKED. When all conditions become 'DONE' then ctrled_analysis is set to READY The workers switch the analysis.status to 'WORKING' and 'DONE'. But any moment if a condition goes false, the analysis is reset to BLOCKED.
The job is the heart of this system. It is the kiosk or blackboard where workers find things to do and then post work for other works to do. These jobs are created prior to work being done, are claimed by workers, are updated as the work is done, with a final update on completion.
For testing/debugging purposes both STDOUT and STDERR streams of each Job can be redirected into a separate log file. This table holds filesystem paths to one or both of those files. There is max one entry per job_id and retry.
A generic blob-storage hash. Currently the only legitimate use of this table is "overflow" of job.input_ids: when they grow longer than 254 characters the real data is stored in analysis_data instead, and the input_id contains the corresponding analysis_data_id.
Entries of this table correspond to Worker objects of the API. Workers are created by inserting into this table so that there is only one instance of a Worker object in the database. As Workers live and do work, they update this table, and when they die they update again.
Column
Type
Default value
Description
Index
worker_id
INTEGER
-
unique ID of the Worker
meadow_type
VARCHAR(255)
-
type of the Meadow it is running on
key: meadow_process
meadow_name
VARCHAR(255)
-
name of the Meadow it is running on (for 'LOCAL' type is the same as host)
key: meadow_process
host
VARCHAR(255)
-
execution host name
process_id
VARCHAR(255)
-
identifies the Worker process on the Meadow (for 'LOCAL' is the OS PID)
key: meadow_process
resource_class_id
INTEGER
NULL
links to Worker's resource class
work_done
INTEGER
0
how many jobs the Worker has completed successfully
Entries of this table correspond to Role objects of the API. When a Worker specializes, it acquires a Role, which is a temporary link between the Worker and a resource-compatible Analysis.
Column
Type
Default value
Description
Index
role_id
INTEGER
-
unique ID of the Role
worker_id
INTEGER
-
the specialized Worker
key: worker
analysis_id
INTEGER
-
the Analysis into which the Worker specialized
key: analysis
when_started
TIMESTAMP
CURRENT_TIMESTAMP
when this Role started
when_finished
TIMESTAMP
NULL
when this Role finished. NULL may either indicate it is still running or was killed by an external force.
When a Job or a job-less Worker (job_id=NULL) throws a "die" message for any reason, the message is recorded in this table. It may or may not indicate that the job was unsuccessful via is_error flag. Also $self->warning("...") messages are recorded with is_error=0.
Column
Type
Default value
Description
Index
log_message_id
INTEGER
-
an autoincremented primary id of the message
job_id
INTEGER
NULL
the id of the job that threw the message (or NULL if it was outside of a message)
key: job_id
role_id
INTEGER
NULL
the 'current' role
worker_id
INTEGER
NULL
the 'current' worker
key: worker_id
time
TIMESTAMP
CURRENT_TIMESTAMP
when the message was thrown
retry
INTEGER
NULL
retry_count of the job when the message was thrown (or NULL if no job)