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 "server" (it will have to be stopped manually when the "client" is done):
19 beekeeper.pl -url $SERVER_HIVE_URL -keep_alive
21 # run the "client" (it will exit by itself):
22 beekeeper.pl -url $CLIENT_HIVE_URL -loop
26 This is the
"server" PipeConfig file of a special two-part version of the
long multiplication example pipeline.
27 Please make sure you FULLY understand how the LongMult_conf works before trying
this one.
29 We have split the original LongMult_conf into two parts, the
"client" and the
"server" that can be used to initialize
30 two separate Hive pipeline databases.
32 The
"client" kept
'take_apart' and
'add_together' analyses and the
'final_result' table, but the
'part_multpily' analysis
33 has been outsourced into the
"server" which also maintains its local
'intermediate_result' table.
35 There are 3 links between the pipelines, all established from the
"client" side (the
"server" doesn
't know about them) :
36 1. The "client" seeds the "server" via a cross-database dataflow rule ('take_b_apart
'#2 -> 'part_multiply)
37 2. The
"client" waits
for the
'part_multiply' analysis to complete on the
"server" via an analysis_ctrl_rule
38 3. The
"client" reads the data from the
'intermediate_result' table of the
"server"
42 See the NOTICE file distributed with
this work
for additional information
43 regarding copyright ownership.
45 Licensed under the Apache License, Version 2.0 (the
"License"); you may not use
this file except in compliance with the License.
46 You may obtain a copy of the License at
50 Unless required by applicable law or agreed to in writing, software distributed under the License
51 is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52 See the License
for the specific language governing permissions and limitations under the License.
56 Please subscribe to the Hive mailing list: http:
61 package Bio::EnsEMBL::Hive::Examples::LongMult::PipeConfig::LongMultWfServer_conf;
66 use base (
'Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf'); # All Hive databases configuration files should inherit from HiveGeneric, directly or indirectly
69 sub pipeline_create_commands {
72 @{$self->SUPER::pipeline_create_commands}, # inheriting database and hive tables
' creation
74 # additional tables needed for long multiplication pipeline's operation:
75 $self->db_cmd(
'CREATE TABLE intermediate_result (a_multiplier varchar(255) NOT NULL, digit char(1) NOT NULL, partial_product varchar(255) NOT NULL, PRIMARY KEY (a_multiplier, digit))'),
80 sub pipeline_wide_parameters {
83 %{$self->SUPER::pipeline_wide_parameters}, # here we inherit anything from the base
class
90 sub pipeline_analyses {
93 { -logic_name =>
'part_multiply',
94 -module =>
'Bio::EnsEMBL::Hive::Examples::LongMult::RunnableDB::PartMultiply',
95 -analysis_capacity => 4, # use per-analysis limiter
98 '?table_name=intermediate_result' => INPUT_PLUS( {
'partial_product' =>
'#product#' } ),