Hive.pm 3.8 KB
Newer Older
1 2 3
=pod 

=head1 NAME
Leo Gordon's avatar
pod fix  
Leo Gordon committed
4

5
    Bio::EnsEMBL::Hive
6 7

=head1 DESCRIPTION
Leo Gordon's avatar
pod fix  
Leo Gordon committed
8

9 10 11 12 13 14 15 16 17 18 19 20 21 22
  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's done (put in next person's 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
23
  work, creates the next layer of job entries by interfacing to
24 25 26 27 28 29 30 31 32 33 34
  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 Queen's 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
35
  analyses by querying the jobs, summarizing, and updating the
36 37 38 39 40 41 42 43 44 45 46
  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.

47
=head1 LICENSE
Leo Gordon's avatar
pod fix  
Leo Gordon committed
48

49
    Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Matthieu Muffato's avatar
Matthieu Muffato committed
50
    Copyright [2016-2018] EMBL-European Bioinformatics Institute
51 52 53

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
54

55
         http://www.apache.org/licenses/LICENSE-2.0
Leo Gordon's avatar
pod fix  
Leo Gordon committed
56

57 58 59 60 61 62
    Unless required by applicable law or agreed to in writing, software distributed under the License
    is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and limitations under the License.

=head1 CONTACT

63
  Please subscribe to the Hive mailing list:  http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users  to discuss Hive-related questions or to be notified of our updates
64 65 66 67 68 69 70 71

=cut

use strict;
use Sys::Hostname;
use Bio::EnsEMBL::Utils::Argument;
use Bio::EnsEMBL::Utils::Exception;

72
use Bio::EnsEMBL::Hive::DBSQL::DBAdaptor;
73 74 75 76 77
use Bio::EnsEMBL::Hive::DBSQL::AnalysisJobAdaptor;
use Bio::EnsEMBL::Hive::DBSQL::AnalysisStatsAdaptor;
use Bio::EnsEMBL::Hive::DBSQL::DataflowRuleAdaptor;
use Bio::EnsEMBL::Hive::DBSQL::AnalysisCtrlRuleAdaptor;
use Bio::EnsEMBL::Hive::DBSQL::AnalysisDataAdaptor;
78
use Bio::EnsEMBL::Hive::Analysis;
79 80 81 82 83 84
use Bio::EnsEMBL::Hive::Extensions;
use Bio::EnsEMBL::Hive::Queen;
use Bio::EnsEMBL::Hive::URLFactory;

1;