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

Public Member Functions

public default_table_name ()
 
public default_insertion_method ()
 
public object_class ()
 
public default_overflow_limit ()
 
public String job_status_cast ()
 
public AnalysisJob fetch_by_analysis_id_and_input_id ()
 
public class_specific_execute ()
 
public Reference store_jobs_and_adjust_counters ()
 
public store_a_semaphored_group_of_jobs ()
 
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_all_unfinished_jobs_with_no_roles ()
 
public fetch_by_url_query ()
 
public fetch_job_counts_hashed_by_status ()
 
public semaphore_job_by_id ()
 
public unsemaphore_job_by_id ()
 
public prelock_semaphore_for_update ()
 
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_claimed_jobs_from_role ()
 
public release_undone_jobs_from_role ()
 
public release_and_age_job ()
 
public gc_dataflow ()
 
public reset_jobs_for_analysis_id ()
 
public unblock_jobs_for_analysis_id ()
 
public discard_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 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

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.

Definition at line 22 of file AnalysisJobAdaptor.pm.

Member Function Documentation

◆ balance_semaphores()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::balance_semaphores ( )
  Description: Reset all semaphore_counts to the numbers of unDONE semaphoring jobs.
 
Code:
click to view

◆ check_in_job()

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

◆ class_specific_execute()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::class_specific_execute ( )

Undocumented method

Code:
click to view

◆ default_insertion_method()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::default_insertion_method ( )

Undocumented method

Code:
click to view

◆ default_overflow_limit()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::default_overflow_limit ( )

Undocumented method

Code:
click to view

◆ default_table_name()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::default_table_name ( )

Undocumented method

Code:
click to view

◆ discard_jobs_for_analysis_id()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::discard_jobs_for_analysis_id ( )
  Arg [1]    : list-ref of int $analysis_id
  Arg [2]    : filter status
  Description: Resets all $input_status jobs of the matching analyses to DONE.
               Semaphores are updated accordingly.
  Caller     : beekeeper.pl and guiHive
 
Code:
click to view

◆ fetch_all_by_analysis_id_status()

public Reference Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_all_by_analysis_id_status ( )
  Arg [1]    : (optional) listref $list_of_analyses
  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( $list_of_analyses, '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

◆ fetch_all_incomplete_jobs_by_role_id()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_all_incomplete_jobs_by_role_id ( )

Undocumented method

Code:
click to view

◆ fetch_all_unfinished_jobs_with_no_roles()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_all_unfinished_jobs_with_no_roles ( )

Undocumented method

Code:
click to view

◆ fetch_by_analysis_id_and_input_id()

public AnalysisJob Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_by_analysis_id_and_input_id ( )
  Arg [1]    : Integer $analysis_id
  Arg [2]    : String $input_id
  Example    :
$funnel_job = $job_adaptor->fetch_by_analysis_id_and_input_id( $funnel_job->analysis->dbID, $funnel_job->input_id);
  Description: Attempts to find the job by contents, then makes another attempt if the input_id is expected to have overflown into analysis_data
  Returntype : AnalysisJob object
 
Code:
click to view

◆ fetch_by_url_query()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_by_url_query ( )

Undocumented method

Code:
click to view

◆ fetch_input_ids_for_job_ids()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_input_ids_for_job_ids ( )

Undocumented method

Code:
click to view

◆ fetch_job_counts_hashed_by_status()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_job_counts_hashed_by_status ( )

Undocumented method

Code:
click to view

◆ fetch_some_by_analysis_id_limit()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_some_by_analysis_id_limit ( )

Undocumented method

Code:
click to view

◆ gc_dataflow()

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

◆ grab_jobs_for_role()

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

◆ job_status_cast()

public String Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::job_status_cast ( )
  Example     :
$job_adaptor->job_status_cast();
  Description : Changes the type of the expression to the type of the
                job-status ENUM.
                This is needed for CASE expressions in PostgreSQL which
                otherwise default to returning a string.
  Returntype  : String
  Exceptions  : none
 
Code:
click to view

◆ object_class()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::object_class ( )

Undocumented method

Code:
click to view

◆ prelock_semaphore_for_update()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::prelock_semaphore_for_update ( )

Undocumented method

Code:
click to view

◆ release_and_age_job()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::release_and_age_job ( )

Undocumented method

Code:
click to view

◆ release_claimed_jobs_from_role()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::release_claimed_jobs_from_role ( )

Undocumented method

Code:
click to view

◆ release_undone_jobs_from_role()

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' (see the $ALL_STATUSES_OF_RUNNING_JOBS variable)
               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

◆ reset_jobs_for_analysis_id()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::reset_jobs_for_analysis_id ( )
  Arg [1]    : arrayref of Analyses
  Arg [2]    : arrayref of job statuses $input_statuses
  Description: Resets all the jobs of the selected analyses that have one of the
               required statuses to 'READY' and their retry_count to 0.
               Semaphores are updated accordingly.
  Caller     : beekeeper.pl and guiHive
 
Code:
click to view

◆ reset_or_grab_job_by_dbID()

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

◆ semaphore_job_by_id()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::semaphore_job_by_id ( )

Undocumented method

Code:
click to view

◆ store_a_semaphored_group_of_jobs()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::store_a_semaphored_group_of_jobs ( )
  Arg [1]    : Bio::EnsEMBL::Hive::AnalysisJob $funnel_job
  Arg [2]    : arrayref of Bio::EnsEMBL::Hive::AnalysisJob $fan_jobs
  Arg [3]    : (optional) Bio::EnsEMBL::Hive::AnalysisJob $emitting_job
  Arg [4]    : (optional) boolean $no_leeching
  Example    :
my ($funnel_semaphore_id, $funnel_job_id, @fan_job_ids) = $job_adaptor->store_a_semaphored_group_of_jobs( $funnel_job, $fan_jobs, $emitting_job );
  Description: Attempts to store a semaphored group of jobs, returns a list of successfully stored job_ids
  Returntype : ($funnel_semaphore_id, $funnel_job_id, @fan_job_ids)
 
Code:
click to view

◆ store_jobs_and_adjust_counters()

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
  Arg [3]    : (optional) Int $emitting_job_id
  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

◆ store_out_files()

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

◆ unblock_jobs_for_analysis_id()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::unblock_jobs_for_analysis_id ( )
  Arg [1]    : list-ref of int $analysis_id
  Description: Sets all the SEMAPHORED jobs of the given analyses to READY and also unblocks their upstream semaphores
  Caller     : beekeeper.pl and guiHive
 
Code:
click to view

◆ unsemaphore_job_by_id()

public Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::unsemaphore_job_by_id ( )

Undocumented method

Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::Hive::DBSQL::DataflowRuleAdaptor::branch_name_2_code
public branch_name_2_code()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_by_analysis_id_and_input_id
public AnalysisJob fetch_by_analysis_id_and_input_id()
Bio::EnsEMBL::Hive::Storable::dbID
public Int dbID()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_all_unfinished_jobs_with_no_roles
public fetch_all_unfinished_jobs_with_no_roles()
map
public map()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::class_specific_execute
public class_specific_execute()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::reset_or_grab_job_by_dbID
public Bio::EnsEMBL::Hive::AnalysisJob reset_or_grab_job_by_dbID()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::store_out_files
public store_out_files()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_input_ids_for_job_ids
public fetch_input_ids_for_job_ids()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_by_url_query
public fetch_by_url_query()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_some_by_analysis_id_limit
public fetch_some_by_analysis_id_limit()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::prelock_semaphore_for_update
public prelock_semaphore_for_update()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::job_status_cast
public String job_status_cast()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::object_class
public object_class()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::check_in_job
public check_in_job()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::default_overflow_limit
public default_overflow_limit()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::discard_jobs_for_analysis_id
public discard_jobs_for_analysis_id()
Bio::EnsEMBL::Hive::Semaphore
Definition: Semaphore.pm:13
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::grab_jobs_for_role
public grab_jobs_for_role()
Bio::EnsEMBL::Hive::DBSQL::BaseAdaptor::AUTOLOAD
public AUTOLOAD()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::gc_dataflow
public gc_dataflow()
Bio::EnsEMBL::Hive::Storable::new
public Bio::EnsEMBL::Hive::Storable new()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::store_jobs_and_adjust_counters
public Reference store_jobs_and_adjust_counters()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_all_incomplete_jobs_by_role_id
public fetch_all_incomplete_jobs_by_role_id()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::semaphore_job_by_id
public semaphore_job_by_id()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_all_by_analysis_id_status
public Reference fetch_all_by_analysis_id_status()
run
public run()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::reset_jobs_for_analysis_id
public reset_jobs_for_analysis_id()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::default_insertion_method
public default_insertion_method()
Bio::EnsEMBL::Hive::DBSQL::BaseAdaptor::dbc
public dbc()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::release_claimed_jobs_from_role
public release_claimed_jobs_from_role()
Bio::EnsEMBL::Hive::DBSQL::BaseAdaptor::db
public db()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::default_table_name
public default_table_name()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::release_undone_jobs_from_role
public release_undone_jobs_from_role()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::store_a_semaphored_group_of_jobs
public store_a_semaphored_group_of_jobs()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::release_and_age_job
public release_and_age_job()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::unsemaphore_job_by_id
public unsemaphore_job_by_id()
Bio::EnsEMBL::Hive::DBSQL::BaseAdaptor::prepare
public prepare()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::fetch_job_counts_hashed_by_status
public fetch_job_counts_hashed_by_status()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::balance_semaphores
public balance_semaphores()
Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor::unblock_jobs_for_analysis_id
public unblock_jobs_for_analysis_id()