tengine_job 0.6.13 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -20
- data/Gemfile.lock +70 -72
- data/README.rdoc +2 -2
- data/bin/create_indexes_for_tengine_job +18 -0
- data/lib/tengine/job/connectable.rb +4 -4
- data/lib/tengine/job/drivers/job_execution_driver.rb +2 -2
- data/lib/tengine/job/drivers/jobnet_control_driver.rb +3 -3
- data/lib/tengine/job/drivers/schedule_driver.rb +12 -12
- data/lib/tengine/job/edge.rb +2 -2
- data/lib/tengine/job/expansion.rb +1 -1
- data/lib/tengine/job/jobnet.rb +12 -2
- data/lib/tengine/job/jobnet_actual.rb +29 -0
- data/lib/tengine/job/root_jobnet_actual.rb +20 -1
- data/lib/tengine/job/root_jobnet_template.rb +4 -4
- data/lib/tengine/job/signal.rb +1 -1
- data/lib/tengine/job/vertex.rb +10 -1
- metadata +130 -126
- data/.document +0 -5
- data/.rspec +0 -1
- data/Rakefile +0 -42
- data/VERSION +0 -1
- data/spec/fixtures/rjn_0001_simple_jobnet_builder.rb +0 -42
- data/spec/fixtures/rjn_0002_simple_parallel_jobnet_builder.rb +0 -42
- data/spec/fixtures/rjn_0003_fork_join_jobnet_builder.rb +0 -61
- data/spec/fixtures/rjn_0004_parallel_jobnet_with_finally_fixture.rb +0 -62
- data/spec/fixtures/rjn_0005_retry_two_layer_fixture.rb +0 -153
- data/spec/fixtures/rjn_0008_expansion_fixture.rb +0 -32
- data/spec/fixtures/rjn_0009_tree_sequential_jobnet_builder.rb +0 -174
- data/spec/fixtures/rjn_0010_2jobs_and_1job_parallel_jobnet_builder.rb +0 -39
- data/spec/fixtures/rjn_0011_nested_fork_jobnet_builder.rb +0 -96
- data/spec/fixtures/rjn_0012_nested_and_finally_builder.rb +0 -157
- data/spec/fixtures/rjn_1004_hadoop_job_in_jobnet_fixture.rb +0 -105
- data/spec/fixtures/rjn_means_root_jobnet +0 -0
- data/spec/fixtures/test_credential_fixture.rb +0 -12
- data/spec/fixtures/test_server_fixture.rb +0 -28
- data/spec/mongoid.yml +0 -35
- data/spec/spec_helper.rb +0 -58
- data/spec/sshd/.gitignore +0 -1
- data/spec/sshd/id_rsa +0 -51
- data/spec/sshd/id_rsa.pub +0 -1
- data/spec/sshd/ssh_host_rsa_key +0 -51
- data/spec/sshd/ssh_host_rsa_key.pub +0 -1
- data/spec/sshd/sshd_config +0 -10
- data/spec/sshd/sshd_config.erb +0 -11
- data/spec/sshd/tengine_job_test.sh +0 -6
- data/spec/support/jobnet_fixture_builder.rb +0 -145
- data/spec/support/mongo_index_key_log.rb +0 -91
- data/spec/tengine/job/category_spec.rb +0 -193
- data/spec/tengine/job/connectable_spec.rb +0 -94
- data/spec/tengine/job/drivers/job_controll_driver/connection_error_spec.rb +0 -236
- data/spec/tengine/job/drivers/job_controll_driver/duplicated_job_start_spec.rb +0 -302
- data/spec/tengine/job/drivers/job_controll_driver/expansion_spec.rb +0 -120
- data/spec/tengine/job/drivers/job_controll_driver/stop_spec.rb +0 -159
- data/spec/tengine/job/drivers/job_controll_driver_spec.rb +0 -740
- data/spec/tengine/job/drivers/job_execution_driver_spec.rb +0 -138
- data/spec/tengine/job/drivers/jobnet_control_driver/nested_and_finally_spec.rb +0 -472
- data/spec/tengine/job/drivers/jobnet_control_driver/nested_jobnet_spec.rb +0 -231
- data/spec/tengine/job/drivers/jobnet_control_driver/stop_jobnet_spec.rb +0 -202
- data/spec/tengine/job/drivers/jobnet_control_driver_spec.rb +0 -608
- data/spec/tengine/job/drivers/schedule_driver_spec.rb +0 -241
- data/spec/tengine/job/dsl_binder_spec.rb +0 -36
- data/spec/tengine/job/dsl_loader_spec.rb +0 -437
- data/spec/tengine/job/dsls/0013_hadoop_job_run.rb +0 -29
- data/spec/tengine/job/dsls/0014_join_and_join.rb +0 -19
- data/spec/tengine/job/dsls/0015_fork_and_fork.rb +0 -18
- data/spec/tengine/job/dsls/0016_complex_fork_and_join.rb +0 -20
- data/spec/tengine/job/dsls/0017_finally.rb +0 -15
- data/spec/tengine/job/dsls/0018_expansion.rb +0 -23
- data/spec/tengine/job/dsls/0019_execute_job_on_event.rb +0 -16
- data/spec/tengine/job/dsls/0020_duplicated_jobnet_name.rb +0 -16
- data/spec/tengine/job/dsls/0021_caption.rb +0 -13
- data/spec/tengine/job/dsls/1060_test_dir1/1060_test_dir2/0013_hadoop_job_run.rb +0 -29
- data/spec/tengine/job/dsls/2003_expansion/expansion_5.rb +0 -11
- data/spec/tengine/job/dsls/VERSION +0 -1
- data/spec/tengine/job/dynamic_env_spec.rb +0 -95
- data/spec/tengine/job/edge_spec.rb +0 -241
- data/spec/tengine/job/element_selector_notation_spec.rb +0 -354
- data/spec/tengine/job/examples_spec.rb +0 -62
- data/spec/tengine/job/execution_spec.rb +0 -100
- data/spec/tengine/job/expansion_spec.rb +0 -116
- data/spec/tengine/job/hadoop_job_run_spec.rb +0 -65
- data/spec/tengine/job/job_spec.rb +0 -4
- data/spec/tengine/job/jobnet/1015_complecated_jobnet_spec.rb +0 -72
- data/spec/tengine/job/jobnet_actual_spec.rb +0 -175
- data/spec/tengine/job/jobnet_spec.rb +0 -399
- data/spec/tengine/job/jobnet_template_spec.rb +0 -240
- data/spec/tengine/job/killing_spec.rb +0 -91
- data/spec/tengine/job/reset_spec.rb +0 -958
- data/spec/tengine/job/reset_spec/4056_1_dump.txt +0 -1
- data/spec/tengine/job/root_jobnet_actual_spec.rb +0 -89
- data/spec/tengine/job/root_jobnet_template_spec.rb +0 -248
- data/spec/tengine/job/script_executable_spec.rb +0 -132
- data/spec/tengine/job/stoppable_spec.rb +0 -176
- data/spec/tengine/job/vertex_spec.rb +0 -25
- data/spec/tengine_job_spec.rb +0 -4
- data/tengine_job.gemspec +0 -198
- data/tmp/log/.gitignore +0 -1
@@ -1,105 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
|
3
|
-
require File.expand_path('test_credential_fixture', File.dirname(__FILE__))
|
4
|
-
require File.expand_path('test_server_fixture', File.dirname(__FILE__))
|
5
|
-
|
6
|
-
# 以下のジョブネットについてテンプレートジョブネットや
|
7
|
-
# 実行用ジョブネットを扱うフィクスチャ生成のためのクラスです。
|
8
|
-
#
|
9
|
-
# [rjn1004]
|
10
|
-
# (S1)--e1-->(job1)--e2-->[hadoop_job_run1]--e3-->(job2)--e4-->(E1)
|
11
|
-
#
|
12
|
-
# [hadoop_job_run1]
|
13
|
-
# (S2)--e5-->[hadoop_job1]--e6-->[hadoop_job2]--e7-->(E2)
|
14
|
-
#
|
15
|
-
# [hadoop_job1]
|
16
|
-
# |--e9--->(Map)------e11-->|
|
17
|
-
# (S3)--e8-->[F1] [J1]--e13-->(E3)
|
18
|
-
# |--e10-->(Reduce) --e12-->|
|
19
|
-
#
|
20
|
-
# [hadoop_job2]
|
21
|
-
# |--e15-->(Map)------e17-->|
|
22
|
-
# (S4)--e14-->[F2] [J2]--e19-->(E4)
|
23
|
-
# |--e16-->(Reduce) --e18-->|
|
24
|
-
|
25
|
-
class Rjn1004HadoopJobInJobnetFixture < JobnetFixtureBuilder
|
26
|
-
include TestCredentialFixture
|
27
|
-
include TestServerFixture
|
28
|
-
|
29
|
-
DSL = <<-EOS
|
30
|
-
require 'tengine_job'
|
31
|
-
|
32
|
-
jobnet("jobnet1004", :instance_name => "test_server1", :credential_name => "test_credential1") do
|
33
|
-
auto_sequence
|
34
|
-
job("job1", "$HOME/import_hdfs.sh")
|
35
|
-
hadoop_job_run("hadoop_job_run1", "Hadoopジョブ1", "$HOME/hadoop_job_run.sh") do
|
36
|
-
hadoop_job("hadoop_job1")
|
37
|
-
hadoop_job("hadoop_job2")
|
38
|
-
end
|
39
|
-
job("job2", "$HOME/export_hdfs.sh")
|
40
|
-
end
|
41
|
-
EOS
|
42
|
-
|
43
|
-
def create(options = {})
|
44
|
-
root = new_root_jobnet("rjn1004", {
|
45
|
-
:server_name => test_server1.name,
|
46
|
-
:credential_name => test_credential1.name
|
47
|
-
}.update(options || { }))
|
48
|
-
root.children << new_start
|
49
|
-
root.children << new_script("job1", :script => "$HOME/import_hdfs.sh")
|
50
|
-
root.children << new_jobnet("hadoop_job_run1", :jobnet_type_key => :hadoop_job_run,
|
51
|
-
:description => "Hadoopジョブ1", :script => "$HOME/hadoop_job_run.sh")
|
52
|
-
root.children << new_script("job2", :script => "$HOME/export_hdfs.sh")
|
53
|
-
root.children << new_end
|
54
|
-
root.build_sequencial_edges
|
55
|
-
self[:e1] = root.edges[0]
|
56
|
-
self[:e2] = root.edges[1]
|
57
|
-
self[:e3] = root.edges[2]
|
58
|
-
self[:e4] = root.edges[3]
|
59
|
-
|
60
|
-
self[:hadoop_job_run1].tap do |hadoop_job_run1|
|
61
|
-
hadoop_job_run1.children << new_start
|
62
|
-
hadoop_job_run1.children << new_jobnet("hadoop_job1", :jobnet_type_key => :hadoop_job)
|
63
|
-
hadoop_job_run1.children << new_jobnet("hadoop_job2", :jobnet_type_key => :hadoop_job)
|
64
|
-
hadoop_job_run1.children << new_end
|
65
|
-
hadoop_job_run1.build_sequencial_edges
|
66
|
-
self[:e5] = hadoop_job_run1.edges[0]
|
67
|
-
self[:e6] = hadoop_job_run1.edges[1]
|
68
|
-
self[:e7] = hadoop_job_run1.edges[2]
|
69
|
-
|
70
|
-
|
71
|
-
self[:hadoop_job1].tap do |hadoop_job1|
|
72
|
-
hadoop_job1.children << new_start
|
73
|
-
hadoop_job1.children << new_fork
|
74
|
-
hadoop_job1.children << new_jobnet("Map", :jobnet_type_key => :map_phase)
|
75
|
-
hadoop_job1.children << new_jobnet("Reduce", :jobnet_type_key => :reduce_phase)
|
76
|
-
hadoop_job1.children << new_join
|
77
|
-
hadoop_job1.children << new_end
|
78
|
-
hadoop_job1.edges << new_edge(:S3, :F1)
|
79
|
-
hadoop_job1.edges << new_edge(:F1, :Map )
|
80
|
-
hadoop_job1.edges << new_edge(:F1, :Reduce)
|
81
|
-
hadoop_job1.edges << new_edge(:Map , :J1)
|
82
|
-
hadoop_job1.edges << new_edge(:Reduce, :J1)
|
83
|
-
hadoop_job1.edges << new_edge(:J1, :E3)
|
84
|
-
end
|
85
|
-
|
86
|
-
self[:hadoop_job2].tap do |hadoop_job1|
|
87
|
-
hadoop_job1.children << new_start
|
88
|
-
hadoop_job1.children << new_fork
|
89
|
-
hadoop_job1.children << new_jobnet("Map", :jobnet_type_key => :map_phase)
|
90
|
-
hadoop_job1.children << new_jobnet("Reduce", :jobnet_type_key => :reduce_phase)
|
91
|
-
hadoop_job1.children << new_join
|
92
|
-
hadoop_job1.children << new_end
|
93
|
-
hadoop_job1.edges << new_edge(:S4, :F2)
|
94
|
-
hadoop_job1.edges << new_edge(:F2, :Map )
|
95
|
-
hadoop_job1.edges << new_edge(:F2, :Reduce)
|
96
|
-
hadoop_job1.edges << new_edge(:Map , :J2)
|
97
|
-
hadoop_job1.edges << new_edge(:Reduce, :J2)
|
98
|
-
hadoop_job1.edges << new_edge(:J2, :E4)
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
root.save!
|
103
|
-
root
|
104
|
-
end
|
105
|
-
end
|
File without changes
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module TestCredentialFixture
|
2
|
-
module_function
|
3
|
-
|
4
|
-
def test_credential1
|
5
|
-
Tengine::Resource::Credential.find_or_create_by(
|
6
|
-
:name => "test_credential1",
|
7
|
-
:auth_type_key => :ssh_password,
|
8
|
-
:auth_values => { :username => "goku", :password => "dragonball"}
|
9
|
-
)
|
10
|
-
end
|
11
|
-
|
12
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
module TestServerFixture
|
2
|
-
module_function
|
3
|
-
|
4
|
-
def test_server1
|
5
|
-
Tengine::Resource::PhysicalServer.find_or_create_by(
|
6
|
-
:name => "test_server1",
|
7
|
-
:provided_id => "test_server1",
|
8
|
-
:properties => {},
|
9
|
-
:addresses => {
|
10
|
-
:private_dns_name => "localhost",
|
11
|
-
# :private_ip_address => "127.0.0.1"
|
12
|
-
}
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_server2
|
17
|
-
Tengine::Resource::PhysicalServer.find_or_create_by(
|
18
|
-
:name => "test_server2",
|
19
|
-
:provided_id => "test_server2",
|
20
|
-
:properties => {},
|
21
|
-
:addresses => {
|
22
|
-
:private_dns_name => "test_server2",
|
23
|
-
:private_ip_address => "192.168.1.2"
|
24
|
-
}
|
25
|
-
)
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
data/spec/mongoid.yml
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
defaults: &defaults
|
2
|
-
# mongoid defaults for configurable settings
|
3
|
-
# autocreate_indexes: false
|
4
|
-
# allow_dynamic_fields: true
|
5
|
-
# include_root_in_json: false
|
6
|
-
# parameterize_keys: true
|
7
|
-
persist_in_safe_mode: true
|
8
|
-
# raise_not_found_error: true
|
9
|
-
# reconnect_time: 3
|
10
|
-
logger: false
|
11
|
-
|
12
|
-
development:
|
13
|
-
<<: *defaults
|
14
|
-
host: localhost
|
15
|
-
database: tengine_job_development
|
16
|
-
|
17
|
-
test:
|
18
|
-
<<: *defaults
|
19
|
-
host: localhost
|
20
|
-
database: tengine_job_test
|
21
|
-
autocreate_indexes: true
|
22
|
-
|
23
|
-
# set these environment variables on your prod server
|
24
|
-
production:
|
25
|
-
<<: *defaults
|
26
|
-
host: <%= ENV['MONGOID_HOST'] %>
|
27
|
-
port: <%= ENV['MONGOID_PORT'] %>
|
28
|
-
username: <%= ENV['MONGOID_USERNAME'] %>
|
29
|
-
password: <%= ENV['MONGOID_PASSWORD'] %>
|
30
|
-
database: <%= ENV['MONGOID_DATABASE'] %>
|
31
|
-
# slaves:
|
32
|
-
# - host: slave1.local
|
33
|
-
# port: 27018
|
34
|
-
# - host: slave2.local
|
35
|
-
# port: 27019
|
data/spec/spec_helper.rb
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
ENV["RACK_ENV"] ||= "test" # Mongoid.load!で参照しています
|
3
|
-
|
4
|
-
require 'simplecov'
|
5
|
-
SimpleCov.start if ENV["COVERAGE"]
|
6
|
-
|
7
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
8
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
9
|
-
require 'rspec'
|
10
|
-
require 'factory_girl'
|
11
|
-
|
12
|
-
require 'tengine_job'
|
13
|
-
require 'mongoid'
|
14
|
-
Mongoid.load!(File.expand_path('mongoid.yml', File.dirname(__FILE__)))
|
15
|
-
Mongoid.database.connection.drop_database(Mongoid.database.name)
|
16
|
-
|
17
|
-
gem_names = ["tengine_core", "tengine_resource"]
|
18
|
-
gem_names.each{|f| require f}
|
19
|
-
|
20
|
-
base_dirs = gem_names.map{|gem_name| Gem.loaded_specs[gem_name].gem_dir}
|
21
|
-
# base_dirs += [File.expand_path("..", File.dirname(__FILE__))]
|
22
|
-
base_dirs += [File.expand_path(".")]
|
23
|
-
base_dirs.each do |dir_path|
|
24
|
-
# fixtures/以下のファイルがsupport以下のファイルに依存していることがあるので、
|
25
|
-
# あえて2回検索しています
|
26
|
-
Dir["#{dir_path}/spec/support/**/*.rb"].each {|f| require f}
|
27
|
-
Dir["#{dir_path}/spec/fixtures/**/*.rb"].each {|f| require f}
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
Tengine::Core::MethodTraceable.disabled = true
|
32
|
-
require 'logger'
|
33
|
-
log_path = File.expand_path("../tmp/log/test.log", File.dirname(__FILE__))
|
34
|
-
Tengine.logger = Logger.new(log_path)
|
35
|
-
Tengine.logger.level = Logger::DEBUG
|
36
|
-
Tengine::Core.stdout_logger = Tengine.logger
|
37
|
-
Tengine::Core.stderr_logger = Tengine.logger
|
38
|
-
# Tengine::Core.stdout_logger = Logger.new(log_path)
|
39
|
-
# Tengine::Core.stdout_logger.level = Logger::DEBUG
|
40
|
-
# Tengine::Core.stderr_logger = Logger.new(log_path)
|
41
|
-
# Tengine::Core.stderr_logger.level = Logger::DEBUG
|
42
|
-
|
43
|
-
Tengine::Core::Kernel.event_exception_reporter = :raise_all
|
44
|
-
|
45
|
-
Tengine::Core::Config::Core::Tengined.default_cache_drivers = true
|
46
|
-
|
47
|
-
RSpec.configure do |config|
|
48
|
-
config.include Factory::Syntax::Methods
|
49
|
-
|
50
|
-
config.before(:all) do
|
51
|
-
unless Tengine::Core::Setting.first(:conditions => {:name => "dsl_version"})
|
52
|
-
Tengine::Core::Setting.create!(:name => "dsl_version", :value => "1234567890")
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
end
|
57
|
-
|
58
|
-
Dir["#{File.expand_path('factories', File.dirname(__FILE__))}/**/*.rb"].each {|f| require f}
|
data/spec/sshd/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
/sshd.pid
|
data/spec/sshd/id_rsa
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
-----BEGIN RSA PRIVATE KEY-----
|
2
|
-
MIIJJgIBAAKCAgEA4f7DPhFU/rWePj9PIAiHArgBVXq+g1fWYjtQj2CldoMn+lL4
|
3
|
-
TU5J8rNRYBc5NaG4G8iyEn5iHMBIH4BFod5Nhs6XCdlMfhps3ndX8Md71OcwTacV
|
4
|
-
ucoXaEO3i6mN6an6KfDCjIBHLORfRuLWt33E+0220gRT7NIgads5bV7P9/1uUsli
|
5
|
-
aDFMH36+NTDZI4IYFmtLrIo9c0UD2FDRNaZLlh/ANsrRxbZkQs/yOkOP7/XCSi7E
|
6
|
-
D1UenBj3TKrk2NfDKTlga1Vj3+24dSqkM3uWd2MzVCM3Umm+pxFvpf/hgtD4TZFg
|
7
|
-
baUEblaU2v2RRaxrItNV1dtw17DSHWBfIlXNpWGcHmt1lbEKH5zFiZSp9Vf9o+Ay
|
8
|
-
UVPUjI05kmyw+90eYfUeNrkJB7KMyhwaWLk4R6/Fmz103NvaCSnxgp6U3M/mIblb
|
9
|
-
Cz+lKOdTALWBzGV8UsTO6XWwHY8vRZyeibXVBYNgPBXb1YRnqFufl0z+j7lXrsPI
|
10
|
-
wYxHEf55PC6xpCIpyr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
|
|
1
|
-
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEA1VmHE0WvJgj82+ltiOXtJ86yf8HHUHq1agt/PXl8/E0Ayl69VXft0p0837oxjlQNZZxPV+Zf/gI1X5NyB/x0+Kn4T/CJ1ubMQ8COpX7J3h/uA/DBljjWizLkh4x5WqztQ7HIEgt2zKDV+qaiJOO7l8IYnIT7Iq7ArFUyms+nAHuc/VzOFErUD0njHjfiVLq9fzJuvjaIMHV0tX3tXlA6mv7LAz1qphxaiKj50OGXpSXDQrTLEYQW+5/WruXhQ3gj46IcgVaBeKMD/D6dO4vg81Z0kbgylJvnXZBqugqnLXzOJmz0tMfJx6ZjGDJ5EHl2mUEQmPoeOKy6Xsni2T2TFiAQebSLjhRyDdDPKiSUx5sNo76qPKSpBJJOAfeDV288K9mo7KdZ+fHoyoy77HPgUnXUcpig5KdKpfaYxFL2f6gHZKk30s+6y3Iwz3WmZ3R7iCkQwjc2x9xcbTRBjFuYuMFTyX3Qo5Yg2h8RBTgz9O8LaCdb0girct8BIbZUA0SL8pQZg7xTQNL6isDbOMHo34L1NpljgidVnZflPLQ5iyGPsLMcnai4DM37ORNbkSOPHcefoRfJNFWyryrzpiVh6u/cIw4UYRnAbq6yBwhIFNoJkAwXSaZyNdVEKhCXIdSvXh2hH9g+2zEREppCRaoPWLG8jjYUzUWiJMfRVxFYNK8= tengine job test sshd host rsa key
|
data/spec/sshd/sshd_config
DELETED
data/spec/sshd/sshd_config.erb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Port <%= @port %>
|
2
|
-
AddressFamily any
|
3
|
-
Protocol 2
|
4
|
-
|
5
|
-
PermitRootLogin no
|
6
|
-
StrictModes yes
|
7
|
-
PubkeyAuthentication yes
|
8
|
-
PasswordAuthentication no
|
9
|
-
PermitEmptyPasswords no
|
10
|
-
AuthorizedKeysFile <%= File.expand_path("id_rsa.pub", ssh_dir) %>
|
11
|
-
PidFile <%= File.expand_path("sshd.pid", ssh_dir) %>
|
@@ -1,145 +0,0 @@
|
|
1
|
-
class JobnetFixtureBuilder
|
2
|
-
def initialize
|
3
|
-
reset
|
4
|
-
end
|
5
|
-
|
6
|
-
def reset
|
7
|
-
@instances = {}
|
8
|
-
@start_count = 0
|
9
|
-
@end_count = 0
|
10
|
-
@fork_count = 0
|
11
|
-
@join_count = 0
|
12
|
-
@edge_count = 0
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
def [](instance_name)
|
17
|
-
@instances[instance_name.to_sym]
|
18
|
-
end
|
19
|
-
|
20
|
-
def []=(instance_name, instance)
|
21
|
-
@instances[instance_name.to_sym] = instance
|
22
|
-
end
|
23
|
-
|
24
|
-
def create_template(options = {})
|
25
|
-
reset
|
26
|
-
@mode = :template
|
27
|
-
create(options)
|
28
|
-
end
|
29
|
-
|
30
|
-
def create_actual(options = {})
|
31
|
-
template = create_template
|
32
|
-
reset
|
33
|
-
@mode = :actual
|
34
|
-
options = (options || {}).update(:template => template)
|
35
|
-
create(options)
|
36
|
-
end
|
37
|
-
|
38
|
-
def context
|
39
|
-
self
|
40
|
-
end
|
41
|
-
|
42
|
-
def vertex(vertex_name)
|
43
|
-
cached = self[vertex_name.to_sym]
|
44
|
-
raise ArgumentError, "no vertex found for #{vertex_name.inspect}" unless cached
|
45
|
-
self[:root].vertex(cached.id)
|
46
|
-
end
|
47
|
-
|
48
|
-
def edge(edge_name)
|
49
|
-
cached = self[edge_name.to_sym]
|
50
|
-
raise ArgumentError, "no edge found for #{edge_name.inspect}" unless cached
|
51
|
-
self[:root].edge(cached.id)
|
52
|
-
end
|
53
|
-
|
54
|
-
def create(options = {})
|
55
|
-
raise NotImplementedError, "You must use inherited class of FixtureBuilder"
|
56
|
-
end
|
57
|
-
|
58
|
-
MODE_AND_METHOD_TO_CLASS = {
|
59
|
-
[:template, :root_jobnet] => Tengine::Job::RootJobnetTemplate,
|
60
|
-
[:actual , :root_jobnet] => Tengine::Job::RootJobnetActual ,
|
61
|
-
[:template, :jobnet ] => Tengine::Job::JobnetTemplate ,
|
62
|
-
[:actual , :jobnet ] => Tengine::Job::JobnetActual ,
|
63
|
-
[:template, :script ] => Tengine::Job::JobnetTemplate ,
|
64
|
-
[:actual , :script ] => Tengine::Job::JobnetActual ,
|
65
|
-
[:template, :finally ] => Tengine::Job::JobnetTemplate ,
|
66
|
-
[:actual , :finally ] => Tengine::Job::JobnetActual ,
|
67
|
-
}.freeze
|
68
|
-
|
69
|
-
%w[root_jobnet jobnet script].each do |method_name|
|
70
|
-
root_assign = method_name =~ /^root_/ ? "@instances[:root] = result" : ""
|
71
|
-
|
72
|
-
class_eval(<<-EOS)
|
73
|
-
def new_#{method_name}(name, attrs = {}, &block)
|
74
|
-
attrs[:name] = name.to_s
|
75
|
-
klass = MODE_AND_METHOD_TO_CLASS[ [@mode, :#{method_name}] ]
|
76
|
-
if klass == Tengine::Job::RootJobnetTemplate
|
77
|
-
attrs[:dsl_version] ||= Tengine::Core::Setting.dsl_version
|
78
|
-
end
|
79
|
-
result = klass.new(attrs, &block)
|
80
|
-
@instances[name.to_sym] = result
|
81
|
-
#{root_assign}
|
82
|
-
result
|
83
|
-
end
|
84
|
-
EOS
|
85
|
-
end
|
86
|
-
|
87
|
-
def new_finally
|
88
|
-
klass = MODE_AND_METHOD_TO_CLASS[ [@mode, :finally] ]
|
89
|
-
result = klass.new(:name => "finally", :jobnet_type_key => :finally)
|
90
|
-
result
|
91
|
-
end
|
92
|
-
|
93
|
-
def new_expansion(name, attrs = {}, &block)
|
94
|
-
raise "expansion can be used only as template" unless @mode == :template
|
95
|
-
result = Tengine::Job::Expansion.new({:name => name}.update(attrs || {}))
|
96
|
-
@instances[name.to_sym] = result
|
97
|
-
result
|
98
|
-
end
|
99
|
-
|
100
|
-
|
101
|
-
ABBREVIATES = {
|
102
|
-
'start' => 'S',
|
103
|
-
'end' => 'E',
|
104
|
-
'fork' => 'F',
|
105
|
-
'join' => 'J',
|
106
|
-
}.freeze
|
107
|
-
|
108
|
-
%w[start end fork join].each do |method_name|
|
109
|
-
class_eval(<<-EOS)
|
110
|
-
def new_#{method_name}(attrs = {}, &block)
|
111
|
-
klass = Tengine::Job::#{method_name.camelcase}
|
112
|
-
result = klass.new(attrs, &block)
|
113
|
-
register_#{method_name}(result)
|
114
|
-
end
|
115
|
-
|
116
|
-
def register_#{method_name}(result)
|
117
|
-
@#{method_name}_count += 1
|
118
|
-
name = ABBREVIATES["#{method_name}"] + @#{method_name}_count.to_s
|
119
|
-
@instances[name.to_sym] = result
|
120
|
-
result
|
121
|
-
end
|
122
|
-
EOS
|
123
|
-
end
|
124
|
-
|
125
|
-
def new_edge(origin, dest)
|
126
|
-
origin_vertex = origin.is_a?(Symbol) ? self[origin] : origin
|
127
|
-
dest_vertex = dest .is_a?(Symbol) ? self[dest ] : dest
|
128
|
-
raise "no origin vertex found: #{origin.inspect}" unless origin_vertex
|
129
|
-
raise "no dest vertex found: #{dest.inspect }" unless dest_vertex
|
130
|
-
result = Tengine::Job::Edge.new(:origin_id => origin_vertex.id, :destination_id => dest_vertex.id)
|
131
|
-
remember_edge(result)
|
132
|
-
end
|
133
|
-
|
134
|
-
def remember_edge(edge)
|
135
|
-
@edge_count += 1
|
136
|
-
name = "e#{@edge_count}"
|
137
|
-
@instances[name.to_sym] = edge
|
138
|
-
edge
|
139
|
-
end
|
140
|
-
|
141
|
-
def check_edge_count(expected)
|
142
|
-
raise "edge count error: expected #{expected} but #{@edge_count}" unless @edge_count == expected
|
143
|
-
end
|
144
|
-
|
145
|
-
end
|