ensembl-hive  2.6
Bio::EnsEMBL::Hive::Worker Class Reference
+ Inheritance diagram for Bio::EnsEMBL::Hive::Worker:

Public Member Functions

public refresh_tolerance_seconds ()
 
public worker_error_threshold ()
 
public init ()
 
public meadow_type ()
 
public meadow_name ()
 
public meadow_host ()
 
public meadow_user ()
 
public process_id ()
 
public work_done ()
 
public status ()
 
public beekeeper_id ()
 
public when_submitted ()
 
public seconds_since_when_submitted ()
 
public when_born ()
 
public when_checked_in ()
 
public when_seen ()
 
public when_died ()
 
public cause_of_death ()
 
public String log_dir ()
 
public String temp_directory_name ()
 
public current_role ()
 
public debug ()
 
public execute_writes ()
 
public special_batch ()
 
public perform_cleanup ()
 
public retry_throwing_jobs ()
 
public can_respecialize ()
 
public Int life_span ()
 
public lifespan_stopwatch ()
 
public life_span_limit_reached ()
 
public Hive::Limiter job_limiter ()
 
public more_work_done ()
 
public prev_job_error ()
 
public runnable_object ()
 
public get_stdout_redirector ()
 
public get_stderr_redirector ()
 
public worker_say ()
 
public toString ()
 
public void run ()
 
public specialize_and_compile_wrapper ()
 
public compile_runnable ()
 
public handle_compilation_failure ()
 
public run_one_batch ()
 
public set_and_update_status ()
 
public enter_status ()
 
public start_job_output_redirection ()
 
public stop_job_output_redirection ()
 
public check_analysis_for_exclusion ()
 
public set_log_directory_name ()
 
public set_temp_directory_name ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Hive::Storable
public Bio::EnsEMBL::Hive::Storable new ()
 
public Int dbID ()
 
public Bio::EnsEMBL::Hive::DBSQL::BaseAdaptor adaptor ()
 
public DESTROY ()
 
public AUTOLOAD ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Hive::Cacheable
public hive_pipeline ()
 
public is_local_to ()
 
public count_local_and_remote_objects ()
 
public relative_display_name ()
 
public relative_url ()
 
public display_name ()
 
public unikey ()
 

Detailed Description

Description

    Object which encapsulates the details of how to find jobs, how to run those
    jobs, and then check the rules to create the next jobs in the chain.
    Essentially knows where to find data, how to process data, and where to
    put it when it is done (put in next persons INBOX) so the next Worker
    in the chain can find data to work on.

    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 relevant configuration information from the database, 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 database of the next analysis.
    It repeats this cycle until it has lived its lifetime or until there are no
    more jobs left to process.
    The lifetime limit is a safety limit to prevent these from 'infecting'
    a system and sitting on a compute node for longer than is socially exceptable.
    This is primarily needed on compute resources like an LSF system where jobs
    are not preempted and run until they are done.

    The Queens primary job is to create Workers to get the work down.
    As part of this, she is also responsible for summarizing the status of the
    analyses by querying the jobs, summarizing, and updating the
    analysis_stats table.  From this she is also responsible for monitoring and
    'unblocking' analyses via the analysis_ctrl_rules.
    The Queen is also responsible for freeing 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 workers which died
    unexpectantly so that she can free the dead workers unfinished jobs.

Definition at line 53 of file Worker.pm.

Member Function Documentation

◆ beekeeper_id()

public Bio::EnsEMBL::Hive::Worker::beekeeper_id ( )

Undocumented method

Code:
click to view

◆ can_respecialize()

public Bio::EnsEMBL::Hive::Worker::can_respecialize ( )

Undocumented method

Code:
click to view

◆ cause_of_death()

public Bio::EnsEMBL::Hive::Worker::cause_of_death ( )

Undocumented method

Code:
click to view

◆ check_analysis_for_exclusion()

public Bio::EnsEMBL::Hive::Worker::check_analysis_for_exclusion ( )

Undocumented method

Code:
click to view

◆ compile_runnable()

public Bio::EnsEMBL::Hive::Worker::compile_runnable ( )

Undocumented method

Code:
click to view

◆ current_role()

public Bio::EnsEMBL::Hive::Worker::current_role ( )

Undocumented method

Code:
click to view

◆ debug()

public Bio::EnsEMBL::Hive::Worker::debug ( )

Undocumented method

Code:
click to view

◆ enter_status()

public Bio::EnsEMBL::Hive::Worker::enter_status ( )

Undocumented method

Code:
click to view

◆ execute_writes()

public Bio::EnsEMBL::Hive::Worker::execute_writes ( )

Undocumented method

Code:
click to view

◆ get_stderr_redirector()

public Bio::EnsEMBL::Hive::Worker::get_stderr_redirector ( )

Undocumented method

Code:
click to view

◆ get_stdout_redirector()

public Bio::EnsEMBL::Hive::Worker::get_stdout_redirector ( )

Undocumented method

Code:
click to view

◆ handle_compilation_failure()

public Bio::EnsEMBL::Hive::Worker::handle_compilation_failure ( )

Undocumented method

Code:
click to view

◆ init()

public Bio::EnsEMBL::Hive::Worker::init ( )

Undocumented method

Code:
click to view

◆ job_limiter()

public Hive::Limiter Bio::EnsEMBL::Hive::Worker::job_limiter ( )
  Title   :   job_limiter
  Arg [1] :   (optional) integer $value
  Usage   :   $limiter_obj = $self->job_limiter;
              $self->job_limiter($new_value);
  Description: The maximum number of jobs to be done by the Worker can be limited by the given number.
               A worker 'dies' when either the 'life_span' or 'job_limit' is exceeded.
  DefaultValue : undef (relies on life_span to limit life of worker)
  Returntype : Hive::Limiter object
 
Code:
click to view

◆ life_span()

public Int Bio::EnsEMBL::Hive::Worker::life_span ( )
  Arg [1] : (optional) integer $value (in seconds)
  Title   :   life_span
  Usage   :   $value = $self->life_span;
              $self->life_span($new_value);
  Description: Defines the maximum time a worker can live for. Workers are always
               allowed to complete the jobs they get, but whether they can
               do multiple rounds of work is limited by their life_span
  DefaultValue : 3600 (60 minutes)
  Returntype : integer scalar
 
Code:
click to view

◆ life_span_limit_reached()

public Bio::EnsEMBL::Hive::Worker::life_span_limit_reached ( )

Undocumented method

Code:
click to view

◆ lifespan_stopwatch()

public Bio::EnsEMBL::Hive::Worker::lifespan_stopwatch ( )

Undocumented method

Code:
click to view

◆ log_dir()

public String Bio::EnsEMBL::Hive::Worker::log_dir ( )
  Arg [1] : (optional) string directory path
  Title   : log_dir
  Usage   : $worker_log_dir = $self->log_dir;
            $self->log_dir($worker_log_dir);
  Description: Storable getter/setter attribute for the directory where STDOUT and STRERR of the worker will be redirected to.
               In this directory each job will have its own .out and .err files.
  Returntype : string
 
Code:
click to view

◆ meadow_host()

public Bio::EnsEMBL::Hive::Worker::meadow_host ( )

Undocumented method

Code:
click to view

◆ meadow_name()

public Bio::EnsEMBL::Hive::Worker::meadow_name ( )

Undocumented method

Code:
click to view

◆ meadow_type()

public Bio::EnsEMBL::Hive::Worker::meadow_type ( )

Undocumented method

Code:
click to view

◆ meadow_user()

public Bio::EnsEMBL::Hive::Worker::meadow_user ( )

Undocumented method

Code:
click to view

◆ more_work_done()

public Bio::EnsEMBL::Hive::Worker::more_work_done ( )

Undocumented method

Code:
click to view

◆ perform_cleanup()

public Bio::EnsEMBL::Hive::Worker::perform_cleanup ( )

Undocumented method

Code:
click to view

◆ prev_job_error()

public Bio::EnsEMBL::Hive::Worker::prev_job_error ( )

Undocumented method

Code:
click to view

◆ process_id()

public Bio::EnsEMBL::Hive::Worker::process_id ( )

Undocumented method

Code:
click to view

◆ refresh_tolerance_seconds()

public Bio::EnsEMBL::Hive::Worker::refresh_tolerance_seconds ( )

Undocumented method

Code:
click to view

◆ retry_throwing_jobs()

public Bio::EnsEMBL::Hive::Worker::retry_throwing_jobs ( )

Undocumented method

Code:
click to view

◆ run()

public void Bio::EnsEMBL::Hive::Worker::run ( )
  Title   :   run
  Usage   :   $worker->run;
  Description: 
    This is a self looping autonomous function to process jobs.
    First all STDOUT/STDERR is rediected, then looping commences.
    Looping consists of 
      1) claiming jobs,
      2) processing those jobs through an instance of the 'module class' of 
         the analysis asigned to this worker,  
      3) updating the job, analysis_stats, and hive tables to track the 
         progress of the job, the analysis and this worker.
    Looping stops when any one of these are met:
      1) there is no more jobs to process 
      2) job_limit is reached
      3) life_span has been reached.
  Returntype : none
 
Code:
click to view

◆ run_one_batch()

public Bio::EnsEMBL::Hive::Worker::run_one_batch ( )

Undocumented method

Code:
click to view

◆ runnable_object()

public Bio::EnsEMBL::Hive::Worker::runnable_object ( )

Undocumented method

Code:
click to view

◆ seconds_since_when_submitted()

public Bio::EnsEMBL::Hive::Worker::seconds_since_when_submitted ( )

Undocumented method

Code:
click to view

◆ set_and_update_status()

public Bio::EnsEMBL::Hive::Worker::set_and_update_status ( )

Undocumented method

Code:
click to view

◆ set_log_directory_name()

public Bio::EnsEMBL::Hive::Worker::set_log_directory_name ( )

Undocumented method

Code:
click to view

◆ set_temp_directory_name()

public Bio::EnsEMBL::Hive::Worker::set_temp_directory_name ( )
  Title       : set_temp_directory_name
  Description : Generates and sets the name of a temporary directory suitable for this worker.
                It will be under the base directory requested by $base_temp_dir, or the standard
                location otherwise (as advised by File::Spec), and includes worker attributes
                to make the path unique.
 
Code:
click to view

◆ special_batch()

public Bio::EnsEMBL::Hive::Worker::special_batch ( )

Undocumented method

Code:
click to view

◆ specialize_and_compile_wrapper()

public Bio::EnsEMBL::Hive::Worker::specialize_and_compile_wrapper ( )

Undocumented method

Code:
click to view

◆ start_job_output_redirection()

public Bio::EnsEMBL::Hive::Worker::start_job_output_redirection ( )

Undocumented method

Code:
click to view

◆ status()

public Bio::EnsEMBL::Hive::Worker::status ( )

Undocumented method

Code:
click to view

◆ stop_job_output_redirection()

public Bio::EnsEMBL::Hive::Worker::stop_job_output_redirection ( )

Undocumented method

Code:
click to view

◆ temp_directory_name()

public String Bio::EnsEMBL::Hive::Worker::temp_directory_name ( )
  Arg [1] : (optional) string directory path
  Title   : temp_directory_name
  Usage   : $worker_tmp_dir = $self->temp_directory_name;
            $self->temp_directory_name($worker_tmp_dir);
  Description: Storable getter/setter attribute for the directory where jobs can store temporary data.
  Returntype : string
 
Code:
click to view

◆ toString()

public Bio::EnsEMBL::Hive::Worker::toString ( )

Undocumented method

Code:
click to view

◆ when_born()

public Bio::EnsEMBL::Hive::Worker::when_born ( )

Undocumented method

Code:
click to view

◆ when_checked_in()

public Bio::EnsEMBL::Hive::Worker::when_checked_in ( )

Undocumented method

Code:
click to view

◆ when_died()

public Bio::EnsEMBL::Hive::Worker::when_died ( )

Undocumented method

Code:
click to view

◆ when_seen()

public Bio::EnsEMBL::Hive::Worker::when_seen ( )

Undocumented method

Code:
click to view

◆ when_submitted()

public Bio::EnsEMBL::Hive::Worker::when_submitted ( )

Undocumented method

Code:
click to view

◆ work_done()

public Bio::EnsEMBL::Hive::Worker::work_done ( )

Undocumented method

Code:
click to view

◆ worker_error_threshold()

public Bio::EnsEMBL::Hive::Worker::worker_error_threshold ( )

Undocumented method

Code:
click to view

◆ worker_say()

public Bio::EnsEMBL::Hive::Worker::worker_say ( )

Undocumented method

Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::Hive::Worker::check_analysis_for_exclusion
public check_analysis_for_exclusion()
Bio::EnsEMBL::Hive::Limiter::new
public new()
Bio::EnsEMBL::Hive::Worker::runnable_object
public runnable_object()
Bio::EnsEMBL::Hive::Worker::cause_of_death
public cause_of_death()
Bio::EnsEMBL::Hive::Worker::when_born
public when_born()
Bio::EnsEMBL::Hive::Worker::perform_cleanup
public perform_cleanup()
Bio::EnsEMBL::Hive::Worker::compile_runnable
public compile_runnable()
Bio::EnsEMBL::Hive::Worker::start_job_output_redirection
public start_job_output_redirection()
Bio::EnsEMBL::Hive::Worker::toString
public toString()
Bio::EnsEMBL::Hive::Worker::life_span
public Int life_span()
Bio::EnsEMBL::Hive::Worker::when_checked_in
public when_checked_in()
Bio::EnsEMBL::Hive::Process::warning
public warning()
Bio::EnsEMBL::Hive::Utils::RedirectStack::new
public new()
Bio::EnsEMBL::Hive::Worker::set_temp_directory_name
public set_temp_directory_name()
Bio::EnsEMBL::Hive::Worker::worker_error_threshold
public worker_error_threshold()
Bio::EnsEMBL::Hive::Worker::run_one_batch
public run_one_batch()
Bio::EnsEMBL::Hive::Worker::log_dir
public String log_dir()
Bio::EnsEMBL::Hive::Worker::refresh_tolerance_seconds
public refresh_tolerance_seconds()
Bio::EnsEMBL::Hive::Worker::seconds_since_when_submitted
public seconds_since_when_submitted()
Bio::EnsEMBL::Hive::Worker::execute_writes
public execute_writes()
Bio::EnsEMBL::Hive::Worker::worker_say
public worker_say()
Bio::EnsEMBL::Hive::Worker::lifespan_stopwatch
public lifespan_stopwatch()
Bio::EnsEMBL::Hive::Limiter
Definition: Limiter.pm:10
Bio::EnsEMBL::Hive::Worker::prev_job_error
public prev_job_error()
Bio::EnsEMBL::Hive::Worker::debug
public debug()
Bio::EnsEMBL::Hive::Worker::set_and_update_status
public set_and_update_status()
Bio::EnsEMBL::Hive::AnalysisStats::min_batch_time
public min_batch_time()
Bio::EnsEMBL::Hive::Worker::meadow_host
public meadow_host()
Bio::EnsEMBL::Hive::Utils::RedirectStack
Definition: RedirectStack.pm:14
Bio::EnsEMBL::Hive::Worker::when_died
public when_died()
Bio::EnsEMBL::Hive::Worker::work_done
public work_done()
Bio::EnsEMBL::Hive::Worker::get_stderr_redirector
public get_stderr_redirector()
Bio::EnsEMBL::Hive::Worker::can_respecialize
public can_respecialize()
Bio::EnsEMBL::Hive::Worker::set_log_directory_name
public set_log_directory_name()
Bio::EnsEMBL::Hive::Worker::stop_job_output_redirection
public stop_job_output_redirection()
Bio::EnsEMBL::Hive::Worker::status
public status()
Bio::EnsEMBL::Hive::Worker::meadow_user
public meadow_user()
Bio::EnsEMBL::Hive::Utils::Stopwatch
Definition: Stopwatch.pm:33
Bio::EnsEMBL::Hive::Worker::meadow_name
public meadow_name()
Bio::EnsEMBL::Hive::Worker::retry_throwing_jobs
public retry_throwing_jobs()
Bio::EnsEMBL::Hive::Worker::beekeeper_id
public beekeeper_id()
Bio::EnsEMBL::Hive::Worker::meadow_type
public meadow_type()
Bio::EnsEMBL::Hive::Worker::when_seen
public when_seen()
Bio::EnsEMBL::Hive::Worker::specialize_and_compile_wrapper
public specialize_and_compile_wrapper()
Bio::EnsEMBL::Hive::Worker::enter_status
public enter_status()
Bio::EnsEMBL::Hive::Worker::temp_directory_name
public String temp_directory_name()
Bio::EnsEMBL::Hive::Worker::run
public void run()
Bio::EnsEMBL::Hive::Worker::more_work_done
public more_work_done()
Bio::EnsEMBL::Hive::Utils::Stopwatch::new
public new()
Bio::EnsEMBL::Hive::Worker::current_role
public current_role()
Bio::EnsEMBL::Hive::Worker::handle_compilation_failure
public handle_compilation_failure()
Bio::EnsEMBL::Hive::Worker::special_batch
public special_batch()
Bio::EnsEMBL::Hive::Worker::life_span_limit_reached
public life_span_limit_reached()
Bio::EnsEMBL::Hive::Worker::job_limiter
public Hive::Limiter job_limiter()
Bio::EnsEMBL::Hive::Worker::get_stdout_redirector
public get_stdout_redirector()
Bio::EnsEMBL::Hive::Worker::when_submitted
public when_submitted()
Bio::EnsEMBL::Hive::Worker::process_id
public process_id()
Bio::EnsEMBL::Hive::Worker::init
public init()