9 # initialize the "server" database first and note its URL - you will need it to initialize the "client" later:
12 # initialize the "client" database by plugging the server's URL:
15 # optionally also seed it with your specific values:
16 seed_pipeline.pl -url $CLIENT_HIVE_URL -logic_name take_b_apart -input_id
'{ "a_multiplier" => "12345678", "b_multiplier" => "3359559666" }'
18 # run the first analysis of the "Client" in order to seed the first jobs into the "Server" pipeline
19 runWorker.pl -url $CLIENT_HIVE_URL
21 # run the "Server" (it will exit when all its jobs are done)
22 beekeeper.pl -url $SERVER_HIVE_URL -loop_until NO_WORK
24 # run the "Client" (it will exit when all its jobs are done)
25 beekeeper.pl -url $CLIENT_HIVE_URL -loop_until NO_WORK
29 This is the
"Client" PipeConfig file of a special two-part version of the
long multiplication example pipeline.
30 Please make sure you FULLY understand how the LongMult_conf works before trying
this one.
32 We have split the original LongMult_conf into two parts, the
"Client" and the
"Server" that can be used to initialize
33 two separate Hive pipeline databases.
35 The
"Client" kept all the original analyses and the
'final_result' table, but prefers to delegate some of the jobs on the
"Server" side.
36 So the
"Server" has its own
'part_multiply' to
do some of the multiplication work, and its own
'add_together' and the
'final_result'
37 table to
do some of the
final additions.
39 The link between the pipelines is established via the -server_url command line flag that is passed to the Client database.
40 Thanks to the support of cross-database semaphores we no longer need to depend on
static tables, and use cross-database accumulators
41 for returning the data, whether from a local or a remote fan (in
this example we have a mix).
46 See the NOTICE file distributed with
this work
for additional information
47 regarding copyright ownership.
49 Licensed under the Apache License, Version 2.0 (the
"License"); you may not use
this file except in compliance with the License.
50 You may obtain a copy of the License at
54 Unless required by applicable law or agreed to in writing, software distributed under the License
55 is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
56 See the License
for the specific language governing permissions and limitations under the License.
60 Please subscribe to the Hive mailing list: http:
65 package Bio::EnsEMBL::Hive::Examples::LongMult::PipeConfig::LongMultServer_conf;
70 use base (
'Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf'); # All Hive databases configuration files should inherit from HiveGeneric, directly or indirectly
72 sub pipeline_create_commands {
75 @{$self->SUPER::pipeline_create_commands}, # inheriting database and hive tables
' creation
77 # additional tables needed for long multiplication pipeline's operation:
78 $self->db_cmd(
'CREATE TABLE final_result (a_multiplier varchar(40) NOT NULL, b_multiplier varchar(40) NOT NULL, result varchar(80) NOT NULL, PRIMARY KEY (a_multiplier, b_multiplier))'),
83 sub pipeline_wide_parameters {
86 %{$self->SUPER::pipeline_wide_parameters}, # here we inherit anything from the base
class
93 sub pipeline_analyses {
96 # the "Server"-side fan analysis (performs multiplication by higher digits)
97 { -logic_name =>
'part_multiply',
98 -module =>
'Bio::EnsEMBL::Hive::Examples::LongMult::RunnableDB::PartMultiply',
99 -analysis_capacity => 4, # use per-analysis limiter
101 1 =>
'?accu_name=partial_product&accu_address={digit}&accu_input_variable=product',
105 # the "Server"-side funnel:
106 { -logic_name =>
'add_together',
107 -module =>
'Bio::EnsEMBL::Hive::Examples::LongMult::RunnableDB::AddTogether',
109 1 =>
'?table_name=final_result',