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

Public Member Functions

public default_table_name ()
 
public object_class ()
 
public default_overflow_limit ()
 
public Reference store_jobs_and_adjust_counters ()
 
public Reference fetch_all_by_analysis_id_status ()
 
public fetch_some_by_analysis_id_limit ()
 
public fetch_all_incomplete_jobs_by_role_id ()
 
public fetch_by_url_query ()
 
public fetch_job_counts_hashed_by_status ()
 
public decrease_semaphore_count_for_jobid ()
 
public increase_semaphore_count_for_jobid ()
 
public check_in_job ()
 
public store_out_files ()
 
public
Bio::EnsEMBL::Hive::AnalysisJob 
reset_or_grab_job_by_dbID ()
 
public grab_jobs_for_role ()
 
public release_undone_jobs_from_role ()
 
public release_and_age_job ()
 
public gc_dataflow ()
 
public reset_jobs_for_analysis_id ()
 
public balance_semaphores ()
 
public fetch_input_ids_for_job_ids ()
 
- 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 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 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 store ()
 
public DESTROY ()
 
public AUTOLOAD ()
 

Detailed Description

Synopsis

$analysisJobAdaptor = $db_adaptor->get_AnalysisJobAdaptor;
$analysisJobAdaptor = $analysisJob->adaptor;

Description

    Module to encapsulate all db access for persistent class AnalysisJob.
    There should be just one per application and database connection.

Member Function Documentation

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::balance_semaphores ( )
  Description: Reset all semaphore_counts to the numbers of unDONE semaphoring jobs.
 
Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::check_in_job ( )
  Arg [1]    : $analysis_id
  Example    :
  Description: updates the job.status in the database
  Returntype : 
  Exceptions :
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::decrease_semaphore_count_for_jobid ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::default_overflow_limit ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::default_table_name ( )

Undocumented method

Code:
click to view
public Reference Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_all_by_analysis_id_status ( )
  Arg [1]    : (optional) int $analysis_id
  Arg [2]    : (optional) string $status
  Arg [3]    : (optional) int $retry_at_least
  Example    :
$all_failed_jobs = $adaptor->fetch_all_by_analysis_id_status(undef, 'FAILED');
$analysis_done_jobs = $adaptor->fetch_all_by_analysis_id_status($analysis->dbID, 'DONE');
  Description: Returns a list of all jobs filtered by given analysis_id (if specified) and given status (if specified).
  Returntype : reference to list of Bio::EnsEMBL::Hive::AnalysisJob objects
 
Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_all_incomplete_jobs_by_role_id ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_by_url_query ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_input_ids_for_job_ids ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_job_counts_hashed_by_status ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_some_by_analysis_id_limit ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::gc_dataflow ( )
    Description:    perform automatic dataflow from a dead job that overused resources if a corresponding dataflow rule was provided
                    Should only be called once during garbage collection phase, when the job is definitely 'abandoned' and not being worked on.
 
Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::grab_jobs_for_role ( )
  Arg [1]           : Bio::EnsEMBL::Hive::Role object $role
  Arg [2]           : int $how_many_this_role
  Example: 
    my $jobs  = $job_adaptor->grab_jobs_for_role( $role, $how_many );
  Description: 
    For the specified Role, it will search available jobs, 
    and using the how_many_this_batch parameter, claim/fetch that
    number of jobs, and then return them.
  Returntype : 
    reference to array of Bio::EnsEMBL::Hive::AnalysisJob objects
  Caller     : Bio::EnsEMBL::Hive::Worker::run
 
Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::increase_semaphore_count_for_jobid ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::object_class ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::release_and_age_job ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::release_undone_jobs_from_role ( )
  Arg [1]    : Bio::EnsEMBL::Hive::Role object
  Arg [2]    : optional message to be recorded in 'job_message' table
  Example    :
  Description: If a Worker has died some of its jobs need to be reset back to 'READY'
               so they can be rerun.
               Jobs in state CLAIMED as simply reset back to READY.
               If jobs was 'in progress' (PRE_CLEANUP, FETCH_INPUT, RUN, WRITE_OUTPUT, POST_CLEANUP) 
               the retry_count is increased and the status set back to READY.
               If the retry_count >= $max_retry_count (3 by default) the job is set
               to 'FAILED' and not rerun again.
  Exceptions : $role must be defined
  Caller     : Bio::EnsEMBL::Hive::Queen
 
Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::reset_jobs_for_analysis_id ( )
  Arg [1]    : int $analysis_id
  Arg [2]    : bool $all (false by default)
  Description: Resets either all FAILED jobs of an analysis (default)
                or ALL jobs of an analysis to 'READY' and their retry_count to 0.
  Caller     : beekeeper.pl
 
Code:
click to view
public Bio::EnsEMBL::Hive::AnalysisJob Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::reset_or_grab_job_by_dbID ( )
  Arg [1]    : int $job_id
  Arg [2]    : int $role_id (optional)
  Description: resets a job to to 'READY' (if no $role_id given) or directly to 'CLAIMED' so it can be run again, and fetches it.
               NB: Will also reset a previously 'SEMAPHORED' job to READY.
               The retry_count will be set to 1 for previously run jobs (partially or wholly) to trigger PRE_CLEANUP for them,
               but will not change retry_count if a job has never *really* started.
  Returntype : Bio::EnsEMBL::Hive::AnalysisJob or undef
 
Code:
click to view
public Reference Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::store_jobs_and_adjust_counters ( )
  Arg [1]    : arrayref of Bio::EnsEMBL::Hive::AnalysisJob $jobs_to_store
  Arg [2]    : (optional) boolean $push_new_semaphore
  Example    :
my @output_job_ids = @{ $job_adaptor->store_jobs_and_adjust_counters( \@jobs_to_store ) };
  Description: Attempts to store a list of jobs, returns an arrayref of successfully stored job_ids
  Returntype : Reference to list of job_dbIDs
 
Code:
click to view
public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::store_out_files ( )
  Arg [1]    : Bio::EnsEMBL::Hive::AnalysisJob $job
  Example    :
  Description: update locations of log files, if present
  Returntype : 
  Exceptions :
  Caller     : Bio::EnsEMBL::Hive::Worker
 
Code:
click to view

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