ensembl-hive  2.5
Bio::EnsEMBL::Hive::Queen Class Reference
+ Inheritance diagram for Bio::EnsEMBL::Hive::Queen:

Public Member Functions

public default_table_name ()
 
public default_input_column_mapping ()
 
public do_not_update_columns ()
 
public object_class ()
 
public Bio::EnsEMBL::Hive::Worker create_new_worker ()
 
public specialize_worker ()
 
public register_worker_death ()
 
public cached_resource_mapping ()
 
public registered_workers_attributes ()
 
public get_submitted_worker_counts_by_meadow_type_rc_name_for_meadow_user ()
 
public check_for_dead_workers ()
 
public find_previous_worker_incarnations ()
 
public fetch_preregistered_worker ()
 
public check_in_worker ()
 
public void reset_job_by_dbID_and_sync ()
 
public fetch_overdue_workers ()
 
public synchronize_hive ()
 
public Boolean safe_synchronize_AnalysisStats ()
 
public synchronize_AnalysisStats ()
 
public check_nothing_to_run_but_semaphored ()
 
public print_status_and_return_reasons_to_exit ()
 
public register_all_workers_dead ()
 
public interval_workers_with_unknown_usage ()
 
public store_resource_usage ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Hive::DBSQL::ObjectAdaptor
public object_class ()
 
public slicer ()
 
public objectify ()
 
public mark_stored ()
 
public keys_to_columns ()
 
public The refresh ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Hive::DBSQL::BaseAdaptor
public default_table_name ()
 
public default_insertion_method ()
 
public default_overflow_limit ()
 
public default_input_column_mapping ()
 
public do_not_update_columns ()
 
public new ()
 
public db ()
 
public dbc ()
 
public prepare ()
 
public overflow_limit ()
 
public input_column_mapping ()
 
public table_name ()
 
public insertion_method ()
 
public column_set ()
 
public primary_key ()
 
public updatable_column_list ()
 
public autoinc_id ()
 
protected _table_info_loader ()
 
public count_all ()
 
public fetch_all ()
 
public primary_key_constraint ()
 
public fetch_by_dbID ()
 
public remove_all ()
 
public remove ()
 
public update ()
 
public store_or_update_one ()
 
public check_object_present_in_db_by_content ()
 
public class_specific_execute ()
 
public store ()
 
protected _multi_column_filter ()
 
public DESTROY ()
 
public AUTOLOAD ()
 

Detailed Description

Description

    The Queen of the Hive based job control system is responsible to 'birthing' the
    correct number of workers of the right type so that they can find jobs to do.
    It will also free up jobs of Workers that died unexpectantly so that other workers
    can claim them to do.

    Hive based processing is a concept based on a more controlled version
    of an autonomous agent type system.  Each worker is not told what to do
    (like a centralized control system - like the current pipeline system)
    but rather queries a central database for jobs (give me jobs).

    Each worker is linked to an analysis_id, registers its self on creation
    into the Hive, creates a RunnableDB instance of the Analysis->module,
    gets $analysis->batch_size jobs from the job table, does its work,
    creates the next layer of job entries by interfacing to
    the DataflowRuleAdaptor to determine the analyses it needs to pass its
    output data to and creates jobs on the next analysis database.
    It repeats this cycle until it has lived its lifetime or until there are no
    more jobs left.
    The lifetime limit is just a safety limit to prevent these from 'infecting'
    a system.

    The Queens job is to simply birth Workers of the correct analysis_id to get the
    work down.  The only other thing the Queen does is free up jobs that were
    claimed by Workers that died unexpectantly so that other workers can take
    over the work.

    The Beekeeper is in charge of interfacing between the Queen and a compute resource
    or 'compute farm'.  Its job is to query Queens if they need any workers and to
    send the requested number of workers to open machines via the runWorker.pl script.
    It is also responsible for interfacing with the Queen to identify worker which died
    unexpectantly.

Definition at line 47 of file Queen.pm.

Member Function Documentation

◆ cached_resource_mapping()

public Bio::EnsEMBL::Hive::Queen::cached_resource_mapping ( )

Undocumented method

Code:
click to view

◆ check_for_dead_workers()

public Bio::EnsEMBL::Hive::Queen::check_for_dead_workers ( )

Undocumented method

Code:
click to view

◆ check_in_worker()

public Bio::EnsEMBL::Hive::Queen::check_in_worker ( )

Undocumented method

Code:
click to view

◆ check_nothing_to_run_but_semaphored()

public Bio::EnsEMBL::Hive::Queen::check_nothing_to_run_but_semaphored ( )
  Arg [1]    : $list_of_analyses
  Example    :
$self->check_nothing_to_run_but_semaphored( [ $analysis_A, $analysis_B ] );
  Description: Counts the number of immediately runnable jobs in the given analyses.
  Exceptions : none
  Caller     : Scheduler
 
Code:
click to view

◆ create_new_worker()

public Bio::EnsEMBL::Hive::Worker Bio::EnsEMBL::Hive::Queen::create_new_worker ( )
  Description: Creates an entry in the worker table,
               populates some non-storable attributes
               and returns a Worker object based on that insert.
               This guarantees that each worker registered in this Queen's hive is properly registered.
  Returntype : Bio::EnsEMBL::Hive::Worker
  Caller     : runWorker.pl
 
Code:
click to view

◆ default_input_column_mapping()

public Bio::EnsEMBL::Hive::Queen::default_input_column_mapping ( )

Undocumented method

Code:
click to view

◆ default_table_name()

public Bio::EnsEMBL::Hive::Queen::default_table_name ( )

Undocumented method

Code:
click to view

◆ do_not_update_columns()

public Bio::EnsEMBL::Hive::Queen::do_not_update_columns ( )

Undocumented method

Code:
click to view

◆ fetch_overdue_workers()

public Bio::EnsEMBL::Hive::Queen::fetch_overdue_workers ( )

Undocumented method

Code:
click to view

◆ fetch_preregistered_worker()

public Bio::EnsEMBL::Hive::Queen::fetch_preregistered_worker ( )

Undocumented method

Code:
click to view

◆ find_previous_worker_incarnations()

public Bio::EnsEMBL::Hive::Queen::find_previous_worker_incarnations ( )

Undocumented method

Code:
click to view

◆ get_submitted_worker_counts_by_meadow_type_rc_name_for_meadow_user()

public Bio::EnsEMBL::Hive::Queen::get_submitted_worker_counts_by_meadow_type_rc_name_for_meadow_user ( )

Undocumented method

Code:
click to view

◆ interval_workers_with_unknown_usage()

public Bio::EnsEMBL::Hive::Queen::interval_workers_with_unknown_usage ( )

Undocumented method

Code:
click to view

◆ object_class()

public Bio::EnsEMBL::Hive::Queen::object_class ( )

Undocumented method

Code:
click to view

◆ print_status_and_return_reasons_to_exit()

public Bio::EnsEMBL::Hive::Queen::print_status_and_return_reasons_to_exit ( )
  Arg [1]    : $list_of_analyses
  Arg [2]    : $debug
  Example    :
my $reasons_to_exit = $queen->print_status_and_return_reasons_to_exit( [ $analysis_A, $analysis_B ] );
: foreach my $reason_to_exit (@$reasons_to_exit) {
: my $exit_message = $reason_to_exit->{'message'};
: my $exit_status = $reason_to_exit->{'exit_status'};
  Description: Runs through all analyses in the given list, reports failed analyses, and computes some totals.
             : It returns a list of exit messages and status codes. Each element of the list is a hashref,
             : with the exit message keyed by 'message' and the status code keyed by 'exit_status'
             :
             : Possible status codes are:
             :   'JOB_FAILED'
             :   'ANALYSIS_FAILED'
             :   'NO_WORK'
             :
             : If $debug is set, the list will contain all analyses. Otherwise, empty and done analyses
             : will not be listed
  Exceptions : none
  Caller     : beekeeper.pl
 
Code:
click to view

◆ register_all_workers_dead()

public Bio::EnsEMBL::Hive::Queen::register_all_workers_dead ( )
  Example    :
$queen->register_all_workers_dead();
  Description: Registers all workers dead
  Exceptions : none
  Caller     : beekeeper.pl
 
Code:
click to view

◆ register_worker_death()

public Bio::EnsEMBL::Hive::Queen::register_worker_death ( )

Undocumented method

Code:
click to view

◆ registered_workers_attributes()

public Bio::EnsEMBL::Hive::Queen::registered_workers_attributes ( )

Undocumented method

Code:
click to view

◆ reset_job_by_dbID_and_sync()

public void Bio::EnsEMBL::Hive::Queen::reset_job_by_dbID_and_sync ( )
  Arg [1]: int $job_id
  Example: 
    my $job = $queen->reset_job_by_dbID_and_sync($job_id);
  Description: 
    For the specified job_id it will fetch just that job, 
    reset it completely as if it has never run, and return it.  
    Specifying a specific job bypasses the safety checks, 
    thus multiple workers could be running the 
    same job simultaneously (use only for debugging).
  Returntype : none
  Exceptions :
  Caller     : beekeeper.pl
 
Code:
click to view

◆ safe_synchronize_AnalysisStats()

public Boolean Bio::EnsEMBL::Hive::Queen::safe_synchronize_AnalysisStats ( )
  Arg [1]    : Bio::EnsEMBL::Hive::AnalysisStats object
  Example    :
$self->safe_synchronize_AnalysisStats($stats);
  Description: Prewrapper around synchronize_AnalysisStats that does
               checks and grabs sync_lock before proceeding with sync.
               Used by distributed worker sync system to avoid contention.
               Returns 1 on success and 0 if the lock could not have been obtained,
               and so no sync was attempted.
  Returntype : boolean
  Caller     : general
 
Code:
click to view

◆ specialize_worker()

public Bio::EnsEMBL::Hive::Queen::specialize_worker ( )
  Description: If analysis_id or logic_name is specified it will try to specialize the Worker into this analysis.
               If not specified the Queen will analyze the hive and pick the most suitable analysis.
  Caller     : Bio::EnsEMBL::Hive::Worker
 
Code:
click to view

◆ store_resource_usage()

public Bio::EnsEMBL::Hive::Queen::store_resource_usage ( )

Undocumented method

Code:
click to view

◆ synchronize_AnalysisStats()

public Bio::EnsEMBL::Hive::Queen::synchronize_AnalysisStats ( )
  Arg [1]    : Bio::EnsEMBL::Hive::AnalysisStats object
  Example    :
$self->synchronize_AnalysisStats( $stats );
  Description: Queries the job and worker tables to get summary counts
               and rebuilds the AnalysisStats object.
               Then updates the analysis_stats table with the new summary info.
  Exceptions : none
  Caller     : general
 
Code:
click to view

◆ synchronize_hive()

public Bio::EnsEMBL::Hive::Queen::synchronize_hive ( )
  Arg [1]    : $list_of_analyses
  Example    :
$queen->synchronize_hive( [ $analysis_A, $analysis_B ] );
  Description: Runs through all analyses in the given list and synchronizes
              the analysis_stats summary with the states in the job and worker tables.
              Then follows by checking all the blocking rules and blocks/unblocks analyses as needed.
  Exceptions : none
  Caller     : general
 
Code:
click to view

The documentation for this class was generated from the following file: