ensembl-hive  2.1
 All Classes Namespaces Files Functions Pages
Bio::EnsEMBL::Hive::RunnableDB::FailureTest Class Reference
+ Inheritance diagram for Bio::EnsEMBL::Hive::RunnableDB::FailureTest:
+ Collaboration diagram for Bio::EnsEMBL::Hive::RunnableDB::FailureTest:

Public Member Functions

public param_defaults ()
 
public pre_cleanup ()
 
public fetch_input ()
 
public run ()
 
public write_output ()
 
public post_cleanup ()
 
public dangerous_math ()
 
public grab_memory ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Hive::Process
public new ()
 
public life_cycle ()
 
public say_with_header ()
 
public enter_status ()
 
public warning ()
 
public strict_hash_format ()
 
public param_defaults ()
 
public fetch_input ()
 
public run ()
 
public write_output ()
 
public Bio::EnsEMBL::Hive::Worker worker ()
 
public Boolean execute_writes ()
 
public
Bio::EnsEMBL::Hive::DBSQL::DBAdaptor 
db ()
 
public
Bio::EnsEMBL::Hive::DBSQL::DBConnection 
dbc ()
 
public
Bio::EnsEMBL::Hive::DBSQL::DBConnection 
data_dbc ()
 
public
Bio::EnsEMBL::Hive::AnalysisJob 
input_job ()
 
public input_id ()
 
public param ()
 
public param_required ()
 
public param_is_defined ()
 
public param_substitute ()
 
public dataflow_output_id ()
 
public throw ()
 
public complete_early ()
 
public Int debug ()
 
public worker_temp_directory ()
 
public worker_temp_directory_name ()
 
public cleanup_worker_temp_directory ()
 

Detailed Description

Synopsis

This is a RunnableDB module that implements Bio::EnsEMBL::Hive::Process interface
and is ran by Workers during the execution of eHive pipelines.
It is not generally supposed to be instantiated and used outside of this framework.
Please refer to Bio::EnsEMBL::Hive::Process documentation to understand the basics of the RunnableDB interface.
Please refer to Bio::EnsEMBL::Hive::PipeConfig::* pipeline configuration files to understand how to configure pipelines.

Description

    This RunnableDB module is used to test failure of jobs in the hive system.

    It is intended for development/training purposes only.

    Available parameters:

        param('value'):         is essentially your job's number.
                                If you are intending to create 100 jobs, let the param('value') take consecutive values from 1 to 100.

        param('divisor'):       defines the failure rate for this particular analysis. If the modulo (value % divisor) is 0, the job will fail.
                                For example, if param('divisor')==5, jobs with 5, 10, 15, 20, 25,... param('value') will fail.

        param('state'):         defines the state in which the jobs of this analysis may be failing.

        param('lethal_after'):  makes jobs' failures lethal when 'value' is greater than this parameter

        param('time_FETCH_INPUT'):  time in seconds that the job will spend sleeping in FETCH_INPUT state.

        param('time_RUN'):          time in seconds that the job will spend sleeping in RUN state.

        param('time_WRITE_OUTPUT'): time in seconds that the job will spend sleeping in WRITE_OUTPUT state.

Member Function Documentation

public Bio::EnsEMBL::Hive::RunnableDB::FailureTest::dangerous_math ( )
    Description: an internal subroutine that will first sleep for some predefined time,
                 and then either return or crash if $value is an integral multiple of $divisor.
 
Code:
click to view
public Bio::EnsEMBL::Hive::RunnableDB::FailureTest::fetch_input ( )
    Description : Implements fetch_input() interface method of Bio::EnsEMBL::Hive::Process that is used to read in parameters and load data.
                  Here it only calls dangerous_math() subroutine.
 
Code:
click to view
public Bio::EnsEMBL::Hive::RunnableDB::FailureTest::grab_memory ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Hive::RunnableDB::FailureTest::param_defaults ( )
    Description : Implements param_defaults() interface method of Bio::EnsEMBL::Hive::Process that defines module defaults for parameters.
 
Code:
click to view
public Bio::EnsEMBL::Hive::RunnableDB::FailureTest::post_cleanup ( )
    Title   :  post_cleanup
    Function:  sublcass can implement functions related to cleaning up after running one job
               (destroying non-trivial data structures in memory).
                Here we just define it to see when the job gets into this state.
 
Code:
click to view
public Bio::EnsEMBL::Hive::RunnableDB::FailureTest::pre_cleanup ( )
    Title   :  pre_cleanup
    Function:  sublcass can implement functions related to cleaning up the database/filesystem after the previous unsuccessful run.
                Here we just define it to see when the job gets into this state.
 
Code:
click to view
public Bio::EnsEMBL::Hive::RunnableDB::FailureTest::run ( )
    Description : Implements run() interface method of Bio::EnsEMBL::Hive::Process that is used to perform the main bulk of the job (minus input and output).
                  Here it only calls dangerous_math() subroutine.
 
Code:
click to view
public Bio::EnsEMBL::Hive::RunnableDB::FailureTest::write_output ( )
    Description : Implements write_output() interface method of Bio::EnsEMBL::Hive::Process that is used to deal with job's output after the execution.
                  Here it only calls dangerous_math() subroutine.
 
Code:
click to view

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