hodor 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.gitmodules +3 -0
  4. data/.rspec +2 -0
  5. data/.ruby-gemset +1 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +5 -0
  8. data/Gemfile +4 -0
  9. data/Guardfile +11 -0
  10. data/README.md +105 -0
  11. data/Rakefile +105 -0
  12. data/bin/hodor +18 -0
  13. data/hodor.gemspec +47 -0
  14. data/lib/config/log4r_config.xml +35 -0
  15. data/lib/hodor.rb +83 -0
  16. data/lib/hodor/api/hdfs.rb +222 -0
  17. data/lib/hodor/api/oozie.rb +215 -0
  18. data/lib/hodor/api/oozie/action.rb +52 -0
  19. data/lib/hodor/api/oozie/bundle.rb +27 -0
  20. data/lib/hodor/api/oozie/coordinator.rb +53 -0
  21. data/lib/hodor/api/oozie/hadoop_job.rb +29 -0
  22. data/lib/hodor/api/oozie/job.rb +192 -0
  23. data/lib/hodor/api/oozie/materialization.rb +56 -0
  24. data/lib/hodor/api/oozie/query.rb +115 -0
  25. data/lib/hodor/api/oozie/session.rb +170 -0
  26. data/lib/hodor/api/oozie/workflow.rb +58 -0
  27. data/lib/hodor/cli.rb +146 -0
  28. data/lib/hodor/command.rb +164 -0
  29. data/lib/hodor/configuration.rb +80 -0
  30. data/lib/hodor/environment.rb +437 -0
  31. data/lib/hodor/ui/table.rb +130 -0
  32. data/lib/hodor/version.rb +3 -0
  33. data/lib/tasks/hdfs.thor +138 -0
  34. data/lib/tasks/master.thor +61 -0
  35. data/lib/tasks/oozie.thor +399 -0
  36. data/lib/tasks/sandbox.thor +87 -0
  37. data/spec/integration/api/oozie/action_spec.rb +69 -0
  38. data/spec/integration/api/oozie/bundle_spec.rb +33 -0
  39. data/spec/integration/api/oozie/coordinator_spec.rb +66 -0
  40. data/spec/integration/api/oozie/hadoop_job_spec.rb +29 -0
  41. data/spec/integration/api/oozie/job_spec.rb +15 -0
  42. data/spec/integration/api/oozie/materialization_spec.rb +66 -0
  43. data/spec/integration/api/oozie/query_spec.rb +43 -0
  44. data/spec/integration/api/oozie/session_spec.rb +18 -0
  45. data/spec/integration/api/oozie/workflow_spec.rb +65 -0
  46. data/spec/integration/api/oozie_spec.rb +198 -0
  47. data/spec/integration/fixtures/api/running_coordinators/req_resp_00.memo +6 -0
  48. data/spec/integration/fixtures/api/sample_action/req_resp_00.memo +5 -0
  49. data/spec/integration/fixtures/api/sample_action/req_resp_01.memo +7 -0
  50. data/spec/integration/fixtures/api/sample_bundle/req_resp_00.memo +6 -0
  51. data/spec/integration/fixtures/api/sample_coordinator/req_resp_00.memo +5 -0
  52. data/spec/integration/fixtures/api/sample_materialization/req_resp_00.memo +5 -0
  53. data/spec/integration/fixtures/api/sample_materialization/req_resp_01.memo +7 -0
  54. data/spec/integration/fixtures/api/sample_workflow/req_resp_00.memo +5 -0
  55. data/spec/spec_helper.rb +92 -0
  56. data/spec/support/d_v_r.rb +125 -0
  57. data/spec/support/hodor_api.rb +15 -0
  58. data/spec/unit/hodor/api/hdfs_spec.rb +63 -0
  59. data/spec/unit/hodor/api/oozie_spec.rb +32 -0
  60. data/spec/unit/hodor/environment_spec.rb +52 -0
  61. data/topics/hdfs/corresponding_paths.txt +31 -0
  62. data/topics/hdfs/overview.txt +10 -0
  63. data/topics/master/clusters.yml.txt +36 -0
  64. data/topics/master/overview.txt +17 -0
  65. data/topics/oozie/blocking_coordinators.txt +46 -0
  66. data/topics/oozie/composing_job_properties.txt +68 -0
  67. data/topics/oozie/display_job.txt +52 -0
  68. data/topics/oozie/driver_scenarios.txt +42 -0
  69. data/topics/oozie/inspecting_jobs.txt +59 -0
  70. data/topics/oozie/jobs.yml.txt +185 -0
  71. data/topics/oozie/overview.txt +43 -0
  72. data/topics/oozie/workers_and_drivers.txt +40 -0
  73. metadata +455 -0
@@ -0,0 +1,198 @@
1
+ module Hodor
2
+ describe Oozie do
3
+ describe 'Required Public Interface' do
4
+ subject { Hodor::Oozie }
5
+
6
+ # Public methods
7
+ it { should respond_to? :job_by_id }
8
+ it { should respond_to? :job_by_path }
9
+ it { should respond_to? :change_job }
10
+ it { should respond_to? :compose_job_file }
11
+ it { should respond_to? :run_job }
12
+ end
13
+
14
+ context 'when running an Oozie job' do
15
+
16
+ subject(:oozie) { Hodor::Oozie }
17
+ subject(:env) { Hodor::Environment.instance }
18
+
19
+ context 'missing jobs.yml file' do
20
+
21
+ before(:each) do
22
+ use_settings hdfs_root: '/', hdfs_user: 'hdfs'
23
+ use_pwd 'drivers/testbench', true
24
+ end
25
+
26
+ it 'should fail if no jobs.yml file exists' do
27
+ allow(File).to receive(:exists?).once.with('jobs.yml') { |arg| false }
28
+ expect {
29
+ oozie.run_job('job_does_not_exist')
30
+ }.to raise_error { |ex|
31
+ expect(ex.message).to match(/No jobs.yml file exists/)
32
+ }
33
+ end
34
+ end
35
+
36
+ context 'and all required files are accessible' do
37
+ let(:no_op_job_params) { %Q[
38
+ valid_job:
39
+ deploy: no_op
40
+ properties: |
41
+ startTime=2015-10-02T11:02Z
42
+ endTime=2016-10-21T12:45Z
43
+ ] }
44
+ before(:each) do
45
+ allow(File).to receive(:exists?).at_least(:once).and_wrap_original do |original, *args|
46
+ if (args[0] =~ /jobs.yml$/)
47
+ true
48
+ else
49
+ original.call(*args)
50
+ end
51
+ end
52
+ use_pwd 'drivers/testbench'
53
+ end
54
+
55
+ subject(:env) { Hodor::Environment.instance }
56
+
57
+ it 'should fail with useful error message if bad job id is specified' do
58
+ expect(Hodor::Environment.instance).to receive(:yml_load).once
59
+ .with(/drivers\/testbench\/jobs\.yml/).and_call_original
60
+
61
+ allow(File).to receive(:read).at_least(:once)
62
+ .and_wrap_original do |original, *args|
63
+ if (args[0] =~ /jobs.yml$/)
64
+ %Q[
65
+ valid_job:
66
+ deploy: nosuch_worker
67
+ properties: |
68
+ startTime=2015-10-02T11:02Z
69
+ endTime=2016-10-21T12:45Z
70
+ ]
71
+ else
72
+ original.call(*args)
73
+ end
74
+ end
75
+
76
+ expect {
77
+ oozie.run_job 'nosuch_job'
78
+ }.to raise_error { |ex|
79
+ expect(ex.message).to match(/Job 'nosuch_job' was not defined in jobs.yml/)
80
+ }
81
+ end
82
+
83
+ context 'and a valid job id is specified' do
84
+
85
+ before(:each) do
86
+ use_settings hdfs_root: '/', hdfs_user: 'hdfs',
87
+ ssh_host: 'sample_domain.com', ssh_user: 'job_user'
88
+ use_pwd 'drivers/testbench', true
89
+ end
90
+
91
+ it 'should build the expected runjob file' do
92
+ expect(Hodor::Environment.instance).to receive(:yml_load).once
93
+ .with(/drivers\/testbench\/jobs\.yml/).and_call_original
94
+
95
+ allow(File).to receive(:read).at_least(:once)
96
+ .and_wrap_original do |original, *args|
97
+ if (args[0] =~ /jobs.yml$/)
98
+ %Q[
99
+ ^valid_job:
100
+ deploy: noop
101
+ properties: |
102
+ startTime=<dynamic>
103
+ endTime=<dynamic>
104
+ ]
105
+ else
106
+ original.call(*args)
107
+ end
108
+ end
109
+
110
+ expect(oozie).to receive(:compose_job_file).once.and_wrap_original do |original, *args|
111
+ propfile = original.call(*args)
112
+ expect(propfile).to match(/test_repo\/drivers\/testbench\/.tmp\/runjob.properties$/)
113
+ contents = File.open(propfile, 'rb') { |f| f.read }
114
+ expect(contents).to match(/shared_jars_dir=\/shared\/jars/)
115
+ expect(contents).to match(/startTime=\<dynamic\>/)
116
+ expect(contents).to match(/oozie\.coord\.application\.path=\$\{CWD\}/)
117
+ expect(contents).to match(/queueName\=default/)
118
+ end
119
+
120
+ expect(env).to receive(:deploy_tmp_file).once { }
121
+ expect(env).to receive(:ssh).once { }
122
+
123
+ expect {
124
+ oozie.run_job
125
+ }.not_to raise_error
126
+ end
127
+
128
+ it 'should deploy and run the Oozie job' do
129
+ expect(Hodor::Environment.instance).to receive(:yml_load).once
130
+ .with(/drivers\/testbench\/jobs\.yml/).and_call_original
131
+
132
+ allow(File).to receive(:read).at_least(:once)
133
+ .and_wrap_original do |original, *args|
134
+ if (args[0] =~ /jobs\.yml$/)
135
+ no_op_job_params
136
+ else
137
+ original.call(*args)
138
+ end
139
+ end
140
+
141
+ expect(oozie).to receive(:compose_job_file).once.and_call_original
142
+ expect(env).to receive(:run_local).once
143
+ .with(/scp.*drivers\/testbench\/.tmp\/runjob.properties\sjob_user\@sample_domain.*:\/tmp\/runjob.*properties.*/,
144
+ { echo: true, echo_cmd: true }) { }
145
+ expect(env).to receive(:run_local).once.with(/oozie\sjob.*\/tmp\/runjob.*properties.*-run$/,
146
+ { echo: true, echo_cmd: true, ssh: true }) { }
147
+ expect {
148
+ oozie.run_job 'valid_job'
149
+ }.not_to raise_error
150
+ end
151
+
152
+ context 'dry_run option is set to true' do
153
+ it 'generates properties file but should not deploy and run the Oozie job' do
154
+ expect(Hodor::Environment.instance).to receive(:yml_load).once
155
+ .with(/drivers\/testbench\/jobs\.yml/).and_call_original
156
+
157
+ allow(File).to receive(:read).at_least(:once)
158
+ .and_wrap_original do |original, *args|
159
+ if (args[0] =~ /jobs\.yml$/)
160
+ no_op_job_params
161
+ else
162
+ original.call(*args)
163
+ end
164
+ end
165
+
166
+ expect(oozie).to receive(:compose_job_file).once.and_call_original
167
+ expect(env).not_to receive(:run_local)
168
+ expect {
169
+ oozie.run_job('valid_job', true)
170
+ }.not_to raise_error
171
+ end
172
+ end
173
+
174
+ context 'dry_run option is set to true and file prefix included' do
175
+ let(:prefix) { 'zywxqrts_pre_' }
176
+ it 'generates properties file with prefix appended but does not deploy and run the Oozie job' do
177
+ expect(Hodor::Environment.instance).to receive(:yml_load).once
178
+ .with(/drivers\/testbench\/jobs\.yml/).and_call_original
179
+
180
+ allow(File).to receive(:read).at_least(:once)
181
+ .and_wrap_original do |original, *args|
182
+ if (args[0] =~ /jobs\.yml$/)
183
+ no_op_job_params
184
+ else
185
+ original.call(*args)
186
+ end
187
+ end
188
+
189
+ expect(oozie).to receive(:compose_job_file).once.with(nil, prefix).and_call_original
190
+ expect(env).not_to receive(:run_local)
191
+ expect(oozie.run_job('valid_job', true, prefix)).to match(prefix)
192
+ end
193
+ end
194
+ end
195
+ end
196
+ end
197
+ end
198
+ end
@@ -0,0 +1,6 @@
1
+ # api - Call Stack Signature:
2
+ # search_jobs()@lib/hodor/api/oozie/session.rb:39
3
+ # initialize()@lib/hodor/api/oozie/query.rb:56
4
+ # new()@spec/integration/api/oozie/query_spec.rb:29
5
+ # block (3 levels) in <module:Oozie>()@spec/integration/api/oozie/query_spec.rb:29
6
+ {"total":4,"coordinatorjobs":[{"total":0,"pauseTime":null,"coordJobName":"example_workflows\/hourly_master_hourly_incremental-C","coordJobPath":"hdfs:\/\/sample_domain.com:8020\/pipeline\/runbook\/scenarios\/hourly\/incremental\/coordinator.xml","timeZone":"UTC","frequency":"60","conf":null,"endTime":"Fri, 26 Oct 2018 19:45:00 GMT","executionPolicy":"FIFO","startTime":"Wed, 28 Oct 2015 17:26:00 GMT","timeUnit":"MINUTE","concurrency":1,"coordJobId":"0028001-151002103648730-oozie-oozi-C","lastAction":"Thu, 29 Oct 2015 21:26:00 GMT","status":"RUNNING","acl":null,"mat_throttling":0,"timeOut":30,"nextMaterializedTime":"Thu, 29 Oct 2015 21:26:00 GMT","bundleId":null,"toString":"Coordinator application id[0028001-151002103648730-oozie-oozi-C] status[RUNNING]","coordExternalId":null,"group":null,"user":"job_user","consoleUrl":null,"actions":[]},{"total":0,"pauseTime":null,"coordJobName":"driver_example_workflows_master_workflow.xml_C","coordJobPath":"hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily\/example_workflows_coordinator.xml","timeZone":"America\/New_York","frequency":"1","conf":null,"endTime":"Tue, 31 Dec 2030 10:25:00 GMT","executionPolicy":"FIFO","startTime":"Sat, 10 Oct 2015 10:15:00 GMT","timeUnit":"DAY","concurrency":1,"coordJobId":"0010055-151002103648730-oozie-oozi-C","lastAction":"Fri, 30 Oct 2015 10:15:00 GMT","status":"RUNNING","acl":null,"mat_throttling":0,"timeOut":1441,"nextMaterializedTime":"Fri, 30 Oct 2015 10:15:00 GMT","bundleId":null,"toString":"Coordinator application id[0010055-151002103648730-oozie-oozi-C] status[RUNNING]","coordExternalId":null,"group":null,"user":"job_user","consoleUrl":null,"actions":[]},{"total":0,"pauseTime":null,"coordJobName":"third_party_fact_table_C","coordJobPath":"hdfs:\/\/sample_domain.com:8020\/pipeline\/third_party\/fact_table","timeZone":"America\/New_York","frequency":"1","conf":null,"endTime":"Thu, 31 Dec 2020 10:10:00 GMT","executionPolicy":"FIFO","startTime":"Sat, 04 Jul 2015 10:10:00 GMT","timeUnit":"DAY","concurrency":1,"coordJobId":"0004729-150629212824266-oozie-oozi-C","lastAction":"Fri, 30 Oct 2015 10:10:00 GMT","status":"RUNNING","acl":null,"mat_throttling":0,"timeOut":1441,"nextMaterializedTime":"Fri, 30 Oct 2015 10:10:00 GMT","bundleId":null,"toString":"Coordinator application id[0004729-150629212824266-oozie-oozi-C] status[RUNNING]","coordExternalId":null,"group":null,"user":"job_user","consoleUrl":null,"actions":[]},{"total":0,"pauseTime":null,"coordJobName":"content_performance_new","coordJobPath":"hdfs:\/\/sample_domain.com:8020\/user\/hue\/oozie\/workspaces\/_guest_-oozie-2994-1434982253.34","timeZone":"America\/Los_Angeles","frequency":"1","conf":null,"endTime":"Wed, 12 Jun 2019 13:42:00 GMT","executionPolicy":"FIFO","startTime":"Thu, 11 Jun 2015 13:42:00 GMT","timeUnit":"DAY","concurrency":1,"coordJobId":"0011845-150619220714310-oozie-oozi-C","lastAction":"Fri, 30 Oct 2015 13:42:00 GMT","status":"RUNNING","acl":null,"mat_throttling":0,"timeOut":3600,"nextMaterializedTime":"Fri, 30 Oct 2015 13:42:00 GMT","bundleId":null,"toString":"Coordinator application id[0011845-150619220714310-oozie-oozi-C] status[RUNNING]","coordExternalId":null,"group":null,"user":"guest","consoleUrl":null,"actions":[]}],"len":51,"offset":1}
@@ -0,0 +1,5 @@
1
+ # api - Call Stack Signature:
2
+ # get_job_state()@lib/hodor/api/oozie/session.rb:45
3
+ # job_by_id()@lib/hodor/api/oozie.rb:34
4
+ # block (3 levels) in <module:Oozie>()@spec/integration/api/oozie/action_spec.rb:51
5
+ {"errorMessage":null,"status":"OK","stats":null,"data":null,"transition":"end","externalStatus":"SUCCEEDED","cred":"null","conf":"<sub-workflow xmlns=\"uri:oozie:workflow:0.5\">\r\n <app-path>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/workers\/data_source\/business<\/app-path>\r\n <propagate-configuration \/>\r\n <configuration>\r\n <property>\r\n <name>TIME_SHIFT<\/name>\r\n <value>05<\/value>\r\n <\/property>\r\n <\/configuration>\r\n<\/sub-workflow>","type":"sub-workflow","endTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalId":"0025062-151002103648730-oozie-oozi-W","id":"0025060-151002103648730-oozie-oozi-W@run_worker","startTime":"Sun, 25 Oct 2015 08:00:11 GMT","externalChildIDs":null,"name":"run_worker","errorCode":null,"trackerUri":"local","retries":0,"toString":"Action name[run_worker] status[OK]","consoleUrl":"http:\/\/sample_domain.com:11000\/oozie?job=0025062-151002103648730-oozie-oozi-W"}
@@ -0,0 +1,7 @@
1
+ # api - Call Stack Signature:
2
+ # get_job_state()@lib/hodor/api/oozie/session.rb:45
3
+ # job_by_id()@lib/hodor/api/oozie.rb:34
4
+ # expand()@lib/hodor/api/oozie/action.rb:49
5
+ # children()@lib/hodor/api/oozie/job.rb:44
6
+ # block (3 levels) in <module:Oozie>()@spec/integration/api/oozie/action_spec.rb:52
7
+ {"appPath":"hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/workers\/data_source\/business","acl":null,"status":"SUCCEEDED","createdTime":"Sun, 25 Oct 2015 08:00:11 GMT","conf":"<configuration>\r\n <property>\r\n <name>DAY1<\/name>\r\n <value>25<\/value>\r\n <\/property>\r\n <property>\r\n <name>DAY_WEEK_AGO<\/name>\r\n <value>19<\/value>\r\n <\/property>\r\n <property>\r\n <name>mapreduce.job.user.name<\/name>\r\n <value>job_user<\/value>\r\n <\/property>\r\n <property>\r\n <name>YEAR<\/name>\r\n <value>2015<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.rerun.failnodes<\/name>\r\n <value>true<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.application.lib<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/user\/oozie\/share\/lib\/lib_20150611161322<\/value>\r\n <\/property>\r\n <property>\r\n <name>endTime<\/name>\r\n <value>2015-12-23T08:10Z<\/value>\r\n <\/property>\r\n <property>\r\n <name>workers<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/workers<\/value>\r\n <\/property>\r\n <property>\r\n <name>startTime<\/name>\r\n <value>2015-10-23T08:00Z<\/value>\r\n <\/property>\r\n <property>\r\n <name>PWD<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily<\/value>\r\n <\/property>\r\n <property>\r\n <name>DAY<\/name>\r\n <value>24<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATA_DATE<\/name>\r\n <value>2015-10-24<\/value>\r\n <\/property>\r\n <property>\r\n <name>worker_tier<\/name>\r\n <value>3<\/value>\r\n <\/property>\r\n <property>\r\n <name>workflow_type<\/name>\r\n <value>worker<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.use.system.libpath<\/name>\r\n <value>true<\/value>\r\n <\/property>\r\n <property>\r\n <name>concurrency<\/name>\r\n <value>1<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.external.id<\/name>\r\n <value>0025060-151002103648730-oozie-oozi-W@run_worker@0<\/value>\r\n <\/property>\r\n <property>\r\n <name>MONTH<\/name>\r\n <value>10<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla3_email<\/name>\r\n <value>real3@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.workflow.notification.url<\/name>\r\n <value>http:\/\/sample_domain.com:11000\/oozie\/callback?id=0025060-151002103648730-oozie-oozi-W@run_worker&amp;status=$status<\/value>\r\n <\/property>\r\n <property>\r\n <name>error_email_dl<\/name>\r\n <value>no_one@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>default_shell_path<\/name>\r\n <value>\/usr\/local\/bin:\/bin:\/usr\/bin:\/usr\/local\/sbin:\/usr\/sbin:\/sbin<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_device<\/name>\r\n <value>uap-clj.udf.hive.generic.Device<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATESTAMP<\/name>\r\n <value>20151024<\/value>\r\n <\/property>\r\n <property>\r\n <name>do_redshift<\/name>\r\n <value>false<\/value>\r\n <\/property>\r\n <property>\r\n <name>sleep_time_2<\/name>\r\n <value>300<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_browser<\/name>\r\n <value>uap-clj.udf.hive.generic.Browser<\/value>\r\n <\/property>\r\n <property>\r\n <name>subflows<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/runbook\/subflows<\/value>\r\n <\/property>\r\n <property>\r\n <name>user.name<\/name>\r\n <value>job_user<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla2_email<\/name>\r\n <value>real2@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.libpath<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/user\/oozie\/share\/lib<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla1_email<\/name>\r\n <value>real1@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.action.subworkflow.depth<\/name>\r\n <value>1<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_host<\/name>\r\n <value>targ_db.us-east-1.rds.amazonaws.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>DOW<\/name>\r\n <value>Sun<\/value>\r\n <\/property>\r\n <property>\r\n <name>sleep_time_1<\/name>\r\n <value>60<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.application.path<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/workers\/data_source\/business<\/value>\r\n <\/property>\r\n <property>\r\n <name>drivers<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.coord.application.path<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily\/example_workflows_coordinator.xml<\/value>\r\n <\/property>\r\n <property>\r\n <name>app_path<\/name>\r\n <value>data_source\/business<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_jar<\/name>\r\n <value>uap-clj-hiveudf-1.0.0-standalone.jar<\/value>\r\n <\/property>\r\n <property>\r\n <name>timeZone<\/name>\r\n <value>America\/New_York<\/value>\r\n <\/property>\r\n <property>\r\n <name>MONTH1<\/name>\r\n <value>10<\/value>\r\n <\/property>\r\n <property>\r\n <name>MONTH_WEEK_AGO<\/name>\r\n <value>10<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozieLibPath<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/user\/oozie\/share\/lib<\/value>\r\n <\/property>\r\n <property>\r\n <name>brickhouse_jar<\/name>\r\n <value>brickhouse-0.7.1-SNAPSHOT.jar<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_pw<\/name>\r\n <value>XXXXXXXXX<\/value>\r\n <\/property>\r\n <property>\r\n <name>fill_type<\/name>\r\n <value>incremental<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATA_SOURCE<\/name>\r\n <value>example<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.parent.id<\/name>\r\n <value>0025060-151002103648730-oozie-oozi-W<\/value>\r\n <\/property>\r\n <property>\r\n <name>queueName<\/name>\r\n <value>default<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_un<\/name>\r\n <value>warehouse<\/value>\r\n <\/property>\r\n <property>\r\n <name>TIME_SHIFT<\/name>\r\n <value>05<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie_url<\/name>\r\n <value>http:\/\/sample_domain.com:11000\/oozie\/<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_os<\/name>\r\n <value>uap-clj.udf.hive.generic.OS<\/value>\r\n <\/property>\r\n <property>\r\n <name>bh_collect<\/name>\r\n <value>brickhouse.udf.collect.CollectUDAF<\/value>\r\n <\/property>\r\n <property>\r\n <name>bh_flatten<\/name>\r\n <value>brickhouse.udf.collect.ArrayFlattenUDF<\/value>\r\n <\/property>\r\n <property>\r\n <name>utils<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/utils<\/value>\r\n <\/property>\r\n <property>\r\n <name>pipeline<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline<\/value>\r\n <\/property>\r\n <property>\r\n <name>YEAR_WEEK_AGO<\/name>\r\n <value>2015<\/value>\r\n <\/property>\r\n <property>\r\n <name>do_rdbms<\/name>\r\n <value>true<\/value>\r\n <\/property>\r\n <property>\r\n <name>YEAR1<\/name>\r\n <value>2015<\/value>\r\n <\/property>\r\n <property>\r\n <name>nameNode<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020<\/value>\r\n <\/property>\r\n <property>\r\n <name>TIMESTAMP<\/name>\r\n <value>2015-10-25T07:59Z<\/value>\r\n <\/property>\r\n <property>\r\n <name>timeout<\/name>\r\n <value>1441<\/value>\r\n <\/property>\r\n <property>\r\n <name>jobTracker<\/name>\r\n <value>tracker_url.sh:8050<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_port<\/name>\r\n <value>3306<\/value>\r\n <\/property>\r\n<\/configuration>","lastModTime":"Sun, 25 Oct 2015 08:02:21 GMT","run":0,"endTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalId":"0025060-151002103648730-oozie-oozi-W@run_worker@0","appName":"example_business_W","id":"0025062-151002103648730-oozie-oozi-W","startTime":"Sun, 25 Oct 2015 08:00:11 GMT","parentId":"0025060-151002103648730-oozie-oozi-W","toString":"Workflow id[0025062-151002103648730-oozie-oozi-W] status[SUCCEEDED]","group":null,"consoleUrl":"http:\/\/sample_domain.com:11000\/oozie?job=0025062-151002103648730-oozie-oozi-W","user":"job_user","actions":[{"errorMessage":null,"status":"OK","stats":null,"data":null,"transition":"data_workflow","externalStatus":"OK","cred":"null","conf":"","type":":START:","endTime":"Sun, 25 Oct 2015 08:00:11 GMT","externalId":"-","id":"0025062-151002103648730-oozie-oozi-W@:start:","startTime":"Sun, 25 Oct 2015 08:00:11 GMT","externalChildIDs":null,"name":":start:","errorCode":null,"trackerUri":"-","retries":0,"toString":"Action name[:start:] status[OK]","consoleUrl":"-"},{"errorMessage":null,"status":"OK","stats":null,"data":"#\n#Sun Oct 25 08:02:21 UTC 2015\nhadoopJobs=job_1443733596356_100667,job_1443733596356_100671,job_1443733596356_100675\n","transition":"end","externalStatus":"SUCCEEDED","cred":"null","conf":"<hive xmlns=\"uri:oozie:hive-action:0.2\">\r\n <job-tracker>tracker_url.sh:8050<\/job-tracker>\r\n <name-node>hdfs:\/\/sample_domain.com:8020<\/name-node>\r\n <job-xml>hdfs:\/\/sample_domain.com:8020\/pipeline\/config\/hive\/hive-site.xml<\/job-xml>\r\n <configuration>\r\n <property>\r\n <name>YEAR<\/name>\r\n <value>2015<\/value>\r\n <\/property>\r\n <property>\r\n <name>MONTH<\/name>\r\n <value>10<\/value>\r\n <\/property>\r\n <property>\r\n <name>DAY<\/name>\r\n <value>24<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATESTAMP<\/name>\r\n <value>20151024<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATA_SOURCE<\/name>\r\n <value>example<\/value>\r\n <\/property>\r\n <property>\r\n <name>BROWSER<\/name>\r\n <value>uap-clj.udf.hive.generic.Browser<\/value>\r\n <\/property>\r\n <property>\r\n <name>OS<\/name>\r\n <value>uap-clj.udf.hive.generic.OS<\/value>\r\n <\/property>\r\n <property>\r\n <name>DEVICE<\/name>\r\n <value>uap-clj.udf.hive.generic.Device<\/value>\r\n <\/property>\r\n <property>\r\n <name>mapred.reduce.tasks<\/name>\r\n <value>25<\/value>\r\n <\/property>\r\n <\/configuration>\r\n <script>business.hql<\/script>\r\n <file>hdfs:\/\/sample_domain.com:8020\/shared\/jars\/commons-codec-1.8.jar#commons-codec-1.8.jar<\/file>\r\n <file>hdfs:\/\/sample_domain.com:8020\/shared\/jars\/uap-clj-hiveudf-1.0.0-standalone.jar#uap-clj-standalone.jar<\/file>\r\n<\/hive>","type":"hive","endTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalId":"job_1443733596356_100665","id":"0025062-151002103648730-oozie-oozi-W@data_workflow","startTime":"Sun, 25 Oct 2015 08:00:11 GMT","externalChildIDs":"job_1443733596356_100667,job_1443733596356_100671,job_1443733596356_100675","name":"data_workflow","errorCode":null,"trackerUri":"tracker_url.sh:8050","retries":0,"toString":"Action name[data_workflow] status[OK]","consoleUrl":"http:\/\/tracker_url.sh:8088\/proxy\/application_1443733596356_100665\/"},{"errorMessage":null,"status":"OK","stats":null,"data":null,"transition":null,"externalStatus":"OK","cred":"null","conf":"","type":":END:","endTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalId":"-","id":"0025062-151002103648730-oozie-oozi-W@end","startTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalChildIDs":null,"name":"end","errorCode":null,"trackerUri":"-","retries":0,"toString":"Action name[end] status[OK]","consoleUrl":"-"}]}
@@ -0,0 +1,6 @@
1
+ # api - Call Stack Signature:
2
+ # get_job_state()@lib/hodor/api/oozie/session.rb:45
3
+ # job_by_id()@lib/hodor/api/oozie.rb:34
4
+ # block (4 levels) in <module:Oozie>()@spec/integration/api/oozie/bundle_spec.rb:31
5
+ # block (3 levels) in <module:Oozie>()@spec/integration/api/oozie/bundle_spec.rb:30
6
+ <html><head><title>Apache Tomcat/6.0.41 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 400 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The request sent by the client was syntactically incorrect.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.41</h3></body></html>
@@ -0,0 +1,5 @@
1
+ # api - Call Stack Signature:
2
+ # get_job_state()@lib/hodor/api/oozie/session.rb:45
3
+ # job_by_id()@lib/hodor/api/oozie.rb:34
4
+ # block (3 levels) in <module:Oozie>()@spec/integration/api/oozie/coordinator_spec.rb:52
5
+ {"total":6,"pauseTime":null,"coordJobName":"worker_data_source\/business_C","coordJobPath":"hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily\/example_workflows_coordinator.xml","timeZone":"America\/New_York","frequency":"1","conf":"<configuration>\r\n <property>\r\n <name>oozie.coord.application.path<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily\/example_workflows_coordinator.xml<\/value>\r\n <\/property>\r\n <property>\r\n <name>app_path<\/name>\r\n <value>data_source\/business<\/value>\r\n <\/property>\r\n <property>\r\n <name>mapreduce.job.user.name<\/name>\r\n <value>job_user<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.rerun.failnodes<\/name>\r\n <value>true<\/value>\r\n <\/property>\r\n <property>\r\n <name>timeZone<\/name>\r\n <value>America\/New_York<\/value>\r\n <\/property>\r\n <property>\r\n <name>endTime<\/name>\r\n <value>2015-12-23T08:10Z<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozieLibPath<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/user\/oozie\/share\/lib<\/value>\r\n <\/property>\r\n <property>\r\n <name>PWD<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily<\/value>\r\n <\/property>\r\n <property>\r\n <name>startTime<\/name>\r\n <value>2015-10-23T08:00Z<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_pw<\/name>\r\n <value>XXXXXXXXX<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATA_SOURCE<\/name>\r\n <value>example<\/value>\r\n <\/property>\r\n <property>\r\n <name>worker_tier<\/name>\r\n <value>3<\/value>\r\n <\/property>\r\n <property>\r\n <name>workflow_type<\/name>\r\n <value>worker<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.use.system.libpath<\/name>\r\n <value>true<\/value>\r\n <\/property>\r\n <property>\r\n <name>concurrency<\/name>\r\n <value>1<\/value>\r\n <\/property>\r\n <property>\r\n <name>queueName<\/name>\r\n <value>default<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_un<\/name>\r\n <value>warehouse<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla3_email<\/name>\r\n <value>real3@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>default_shell_path<\/name>\r\n <value>\/usr\/local\/bin:\/bin:\/usr\/bin:\/usr\/local\/sbin:\/usr\/sbin:\/sbin<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie_url<\/name>\r\n <value>http:\/\/sample_domain.com:11000\/oozie\/<\/value>\r\n <\/property>\r\n <property>\r\n <name>user.name<\/name>\r\n <value>job_user<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla2_email<\/name>\r\n <value>real2@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>pipeline<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.libpath<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/user\/oozie\/share\/lib<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla1_email<\/name>\r\n <value>real1@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>nameNode<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_host<\/name>\r\n <value>targ_db.us-east-1.rds.amazonaws.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>timeout<\/name>\r\n <value>1441<\/value>\r\n <\/property>\r\n <property>\r\n <name>jobTracker<\/name>\r\n <value>tracker_url.sh:8050<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_port<\/name>\r\n <value>3306<\/value>\r\n <\/property>\r\n<\/configuration>","endTime":"Wed, 23 Dec 2015 08:10:00 GMT","executionPolicy":"FIFO","startTime":"Fri, 23 Oct 2015 08:00:00 GMT","timeUnit":"DAY","concurrency":1,"coordJobId":"0023753-151002103648730-oozie-oozi-C","lastAction":"Thu, 29 Oct 2015 08:00:00 GMT","status":"KILLED","acl":null,"mat_throttling":12,"timeOut":1441,"nextMaterializedTime":"Thu, 29 Oct 2015 08:00:00 GMT","bundleId":null,"toString":"Coordinator application id[0023753-151002103648730-oozie-oozi-C] status[KILLED]","coordExternalId":null,"group":null,"user":"job_user","consoleUrl":null,"actions":[{"errorMessage":null,"lastModifiedTime":"Fri, 23 Oct 2015 18:24:46 GMT","createdTime":"Fri, 23 Oct 2015 18:12:37 GMT","status":"SUCCEEDED","pushMissingDependencies":null,"externalStatus":null,"type":null,"nominalTime":"Fri, 23 Oct 2015 08:00:00 GMT","externalId":"0023754-151002103648730-oozie-oozi-W","id":"0023753-151002103648730-oozie-oozi-C@1","createdConf":null,"missingDependencies":"","runConf":null,"actionNumber":1,"errorCode":null,"trackerUri":null,"toString":"CoordinatorAction name[0023753-151002103648730-oozie-oozi-C@1] status[SUCCEEDED]","coordJobId":"0023753-151002103648730-oozie-oozi-C","consoleUrl":null},{"errorMessage":null,"lastModifiedTime":"Sat, 24 Oct 2015 08:02:23 GMT","createdTime":"Sat, 24 Oct 2015 07:59:21 GMT","status":"SUCCEEDED","pushMissingDependencies":null,"externalStatus":null,"type":null,"nominalTime":"Sat, 24 Oct 2015 08:00:00 GMT","externalId":"0024210-151002103648730-oozie-oozi-W","id":"0023753-151002103648730-oozie-oozi-C@2","createdConf":null,"missingDependencies":"","runConf":null,"actionNumber":2,"errorCode":null,"trackerUri":null,"toString":"CoordinatorAction name[0023753-151002103648730-oozie-oozi-C@2] status[SUCCEEDED]","coordJobId":"0023753-151002103648730-oozie-oozi-C","consoleUrl":null},{"errorMessage":null,"lastModifiedTime":"Sun, 25 Oct 2015 08:02:21 GMT","createdTime":"Sun, 25 Oct 2015 07:59:27 GMT","status":"SUCCEEDED","pushMissingDependencies":null,"externalStatus":null,"type":null,"nominalTime":"Sun, 25 Oct 2015 08:00:00 GMT","externalId":"0025060-151002103648730-oozie-oozi-W","id":"0023753-151002103648730-oozie-oozi-C@3","createdConf":null,"missingDependencies":"","runConf":null,"actionNumber":3,"errorCode":null,"trackerUri":null,"toString":"CoordinatorAction name[0023753-151002103648730-oozie-oozi-C@3] status[SUCCEEDED]","coordJobId":"0023753-151002103648730-oozie-oozi-C","consoleUrl":null},{"errorMessage":null,"lastModifiedTime":"Mon, 26 Oct 2015 08:02:17 GMT","createdTime":"Mon, 26 Oct 2015 07:59:34 GMT","status":"SUCCEEDED","pushMissingDependencies":null,"externalStatus":null,"type":null,"nominalTime":"Mon, 26 Oct 2015 08:00:00 GMT","externalId":"0025918-151002103648730-oozie-oozi-W","id":"0023753-151002103648730-oozie-oozi-C@4","createdConf":null,"missingDependencies":"","runConf":null,"actionNumber":4,"errorCode":null,"trackerUri":null,"toString":"CoordinatorAction name[0023753-151002103648730-oozie-oozi-C@4] status[SUCCEEDED]","coordJobId":"0023753-151002103648730-oozie-oozi-C","consoleUrl":null},{"errorMessage":null,"lastModifiedTime":"Tue, 27 Oct 2015 08:02:36 GMT","createdTime":"Tue, 27 Oct 2015 07:59:48 GMT","status":"SUCCEEDED","pushMissingDependencies":null,"externalStatus":null,"type":null,"nominalTime":"Tue, 27 Oct 2015 08:00:00 GMT","externalId":"0026764-151002103648730-oozie-oozi-W","id":"0023753-151002103648730-oozie-oozi-C@5","createdConf":null,"missingDependencies":"","runConf":null,"actionNumber":5,"errorCode":null,"trackerUri":null,"toString":"CoordinatorAction name[0023753-151002103648730-oozie-oozi-C@5] status[SUCCEEDED]","coordJobId":"0023753-151002103648730-oozie-oozi-C","consoleUrl":null},{"errorMessage":null,"lastModifiedTime":"Wed, 28 Oct 2015 08:02:23 GMT","createdTime":"Wed, 28 Oct 2015 07:59:06 GMT","status":"SUCCEEDED","pushMissingDependencies":null,"externalStatus":null,"type":null,"nominalTime":"Wed, 28 Oct 2015 08:00:00 GMT","externalId":"0027653-151002103648730-oozie-oozi-W","id":"0023753-151002103648730-oozie-oozi-C@6","createdConf":null,"missingDependencies":"","runConf":null,"actionNumber":6,"errorCode":null,"trackerUri":null,"toString":"CoordinatorAction name[0023753-151002103648730-oozie-oozi-C@6] status[SUCCEEDED]","coordJobId":"0023753-151002103648730-oozie-oozi-C","consoleUrl":null}]}
@@ -0,0 +1,5 @@
1
+ # api - Call Stack Signature:
2
+ # get_job_state()@lib/hodor/api/oozie/session.rb:45
3
+ # job_by_id()@lib/hodor/api/oozie.rb:34
4
+ # block (3 levels) in <module:Oozie>()@spec/integration/api/oozie/materialization_spec.rb:52
5
+ {"errorMessage":null,"lastModifiedTime":"Sun, 25 Oct 2015 08:02:21 GMT","createdTime":"Sun, 25 Oct 2015 07:59:27 GMT","status":"SUCCEEDED","pushMissingDependencies":null,"externalStatus":null,"type":null,"nominalTime":"Sun, 25 Oct 2015 08:00:00 GMT","externalId":"0025060-151002103648730-oozie-oozi-W","id":"0023753-151002103648730-oozie-oozi-C@3","createdConf":null,"missingDependencies":"","runConf":null,"actionNumber":3,"errorCode":null,"trackerUri":null,"toString":"CoordinatorAction name[0023753-151002103648730-oozie-oozi-C@3] status[SUCCEEDED]","coordJobId":"0023753-151002103648730-oozie-oozi-C","consoleUrl":null}
@@ -0,0 +1,7 @@
1
+ # api - Call Stack Signature:
2
+ # get_job_state()@lib/hodor/api/oozie/session.rb:45
3
+ # job_by_id()@lib/hodor/api/oozie.rb:34
4
+ # expand()@lib/hodor/api/oozie/materialization.rb:48
5
+ # children()@lib/hodor/api/oozie/job.rb:44
6
+ # block (3 levels) in <module:Oozie>()@spec/integration/api/oozie/materialization_spec.rb:53
7
+ {"appPath":"hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily\/example_workflows_parameters.xml","acl":null,"status":"SUCCEEDED","createdTime":"Sun, 25 Oct 2015 08:00:00 GMT","conf":"<configuration>\r\n <property>\r\n <name>DAY1<\/name>\r\n <value>25<\/value>\r\n <\/property>\r\n <property>\r\n <name>DAY_WEEK_AGO<\/name>\r\n <value>19<\/value>\r\n <\/property>\r\n <property>\r\n <name>mapreduce.job.user.name<\/name>\r\n <value>job_user<\/value>\r\n <\/property>\r\n <property>\r\n <name>YEAR<\/name>\r\n <value>2015<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.rerun.failnodes<\/name>\r\n <value>true<\/value>\r\n <\/property>\r\n <property>\r\n <name>endTime<\/name>\r\n <value>2015-12-23T08:10Z<\/value>\r\n <\/property>\r\n <property>\r\n <name>workers<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/workers<\/value>\r\n <\/property>\r\n <property>\r\n <name>startTime<\/name>\r\n <value>2015-10-23T08:00Z<\/value>\r\n <\/property>\r\n <property>\r\n <name>PWD<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily<\/value>\r\n <\/property>\r\n <property>\r\n <name>DAY<\/name>\r\n <value>24<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATA_DATE<\/name>\r\n <value>2015-10-24<\/value>\r\n <\/property>\r\n <property>\r\n <name>worker_tier<\/name>\r\n <value>3<\/value>\r\n <\/property>\r\n <property>\r\n <name>workflow_type<\/name>\r\n <value>worker<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.use.system.libpath<\/name>\r\n <value>true<\/value>\r\n <\/property>\r\n <property>\r\n <name>concurrency<\/name>\r\n <value>1<\/value>\r\n <\/property>\r\n <property>\r\n <name>MONTH<\/name>\r\n <value>10<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla3_email<\/name>\r\n <value>real3@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>error_email_dl<\/name>\r\n <value>no_one@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>default_shell_path<\/name>\r\n <value>\/usr\/local\/bin:\/bin:\/usr\/bin:\/usr\/local\/sbin:\/usr\/sbin:\/sbin<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_device<\/name>\r\n <value>uap-clj.udf.hive.generic.Device<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATESTAMP<\/name>\r\n <value>20151024<\/value>\r\n <\/property>\r\n <property>\r\n <name>do_redshift<\/name>\r\n <value>false<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_browser<\/name>\r\n <value>uap-clj.udf.hive.generic.Browser<\/value>\r\n <\/property>\r\n <property>\r\n <name>sleep_time_2<\/name>\r\n <value>300<\/value>\r\n <\/property>\r\n <property>\r\n <name>subflows<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/runbook\/subflows<\/value>\r\n <\/property>\r\n <property>\r\n <name>user.name<\/name>\r\n <value>job_user<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla2_email<\/name>\r\n <value>real2@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.libpath<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/user\/oozie\/share\/lib<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla1_email<\/name>\r\n <value>real1@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_host<\/name>\r\n <value>targ_db.us-east-1.rds.amazonaws.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>DOW<\/name>\r\n <value>Sun<\/value>\r\n <\/property>\r\n <property>\r\n <name>sleep_time_1<\/name>\r\n <value>60<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.application.path<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily\/example_workflows_parameters.xml<\/value>\r\n <\/property>\r\n <property>\r\n <name>drivers<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.coord.application.path<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily\/example_workflows_coordinator.xml<\/value>\r\n <\/property>\r\n <property>\r\n <name>app_path<\/name>\r\n <value>data_source\/business<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_jar<\/name>\r\n <value>uap-clj-hiveudf-1.0.0-standalone.jar<\/value>\r\n <\/property>\r\n <property>\r\n <name>timeZone<\/name>\r\n <value>America\/New_York<\/value>\r\n <\/property>\r\n <property>\r\n <name>MONTH1<\/name>\r\n <value>10<\/value>\r\n <\/property>\r\n <property>\r\n <name>MONTH_WEEK_AGO<\/name>\r\n <value>10<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozieLibPath<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/user\/oozie\/share\/lib<\/value>\r\n <\/property>\r\n <property>\r\n <name>brickhouse_jar<\/name>\r\n <value>brickhouse-0.7.1-SNAPSHOT.jar<\/value>\r\n <\/property>\r\n <property>\r\n <name>fill_type<\/name>\r\n <value>incremental<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_pw<\/name>\r\n <value>XXXXXXXXX<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATA_SOURCE<\/name>\r\n <value>example<\/value>\r\n <\/property>\r\n <property>\r\n <name>queueName<\/name>\r\n <value>default<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_un<\/name>\r\n <value>warehouse<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie_url<\/name>\r\n <value>http:\/\/sample_domain.com:11000\/oozie\/<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_os<\/name>\r\n <value>uap-clj.udf.hive.generic.OS<\/value>\r\n <\/property>\r\n <property>\r\n <name>bh_collect<\/name>\r\n <value>brickhouse.udf.collect.CollectUDAF<\/value>\r\n <\/property>\r\n <property>\r\n <name>bh_flatten<\/name>\r\n <value>brickhouse.udf.collect.ArrayFlattenUDF<\/value>\r\n <\/property>\r\n <property>\r\n <name>utils<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/utils<\/value>\r\n <\/property>\r\n <property>\r\n <name>pipeline<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline<\/value>\r\n <\/property>\r\n <property>\r\n <name>YEAR_WEEK_AGO<\/name>\r\n <value>2015<\/value>\r\n <\/property>\r\n <property>\r\n <name>do_rdbms<\/name>\r\n <value>true<\/value>\r\n <\/property>\r\n <property>\r\n <name>YEAR1<\/name>\r\n <value>2015<\/value>\r\n <\/property>\r\n <property>\r\n <name>nameNode<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020<\/value>\r\n <\/property>\r\n <property>\r\n <name>TIMESTAMP<\/name>\r\n <value>2015-10-25T07:59Z<\/value>\r\n <\/property>\r\n <property>\r\n <name>timeout<\/name>\r\n <value>1441<\/value>\r\n <\/property>\r\n <property>\r\n <name>jobTracker<\/name>\r\n <value>tracker_url.sh:8050<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_port<\/name>\r\n <value>3306<\/value>\r\n <\/property>\r\n<\/configuration>","lastModTime":"Sun, 25 Oct 2015 08:02:21 GMT","run":0,"endTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalId":null,"appName":"worker_data_source\/business_parameters_W","id":"0025060-151002103648730-oozie-oozi-W","startTime":"Sun, 25 Oct 2015 08:00:00 GMT","parentId":"0023753-151002103648730-oozie-oozi-C@3","toString":"Workflow id[0025060-151002103648730-oozie-oozi-W] status[SUCCEEDED]","group":null,"consoleUrl":"http:\/\/sample_domain.com:11000\/oozie?job=0025060-151002103648730-oozie-oozi-W","user":"job_user","actions":[{"errorMessage":null,"status":"OK","stats":null,"data":null,"transition":"get_time_shift","externalStatus":"OK","cred":"null","conf":"","type":":START:","endTime":"Sun, 25 Oct 2015 08:00:00 GMT","externalId":"-","id":"0025060-151002103648730-oozie-oozi-W@:start:","startTime":"Sun, 25 Oct 2015 08:00:00 GMT","externalChildIDs":null,"name":":start:","errorCode":null,"trackerUri":"-","retries":0,"toString":"Action name[:start:] status[OK]","consoleUrl":"-"},{"errorMessage":null,"status":"OK","stats":null,"data":"#\n#Sun Oct 25 08:00:11 UTC 2015\nconcat('time_shift=',timeshift)\ntime_shift=05\n","transition":"worker_or_driver","externalStatus":"SUCCEEDED","cred":"null","conf":"<shell xmlns=\"uri:oozie:shell-action:0.1\">\r\n <job-tracker>tracker_url.sh:8050<\/job-tracker>\r\n <name-node>hdfs:\/\/sample_domain.com:8020<\/name-node>\r\n <job-xml>hdfs:\/\/sample_domain.com:8020\/pipeline\/config\/hive\/hive-site.xml<\/job-xml>\r\n <exec>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/utils\/get_time_shift.sh<\/exec>\r\n <env-var>PATH=\/usr\/local\/bin:\/bin:\/usr\/bin:\/usr\/local\/sbin:\/usr\/sbin:\/sbin<\/env-var>\r\n <env-var>MYSQL_HOST=targ_db.us-east-1.rds.amazonaws.com<\/env-var>\r\n <env-var>MYSQL_PORT=3306<\/env-var>\r\n <env-var>MYSQL_UN=warehouse<\/env-var>\r\n <env-var>MYSQL_PW=XXXXXXXXX<\/env-var>\r\n <env-var>YMD=2015-10-24<\/env-var>\r\n <file>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/utils\/get_time_shift.sh#get_time_shift.sh<\/file>\r\n <capture-output \/>\r\n<\/shell>","type":"shell","endTime":"Sun, 25 Oct 2015 08:00:11 GMT","externalId":"job_1443733596356_100663","id":"0025060-151002103648730-oozie-oozi-W@get_time_shift","startTime":"Sun, 25 Oct 2015 08:00:00 GMT","externalChildIDs":null,"name":"get_time_shift","errorCode":null,"trackerUri":"tracker_url.sh:8050","retries":0,"toString":"Action name[get_time_shift] status[OK]","consoleUrl":"http:\/\/tracker_url.sh:8088\/proxy\/application_1443733596356_100663\/"},{"errorMessage":null,"status":"OK","stats":null,"data":null,"transition":"end","externalStatus":"SUCCEEDED","cred":"null","conf":"<sub-workflow xmlns=\"uri:oozie:workflow:0.5\">\r\n <app-path>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/workers\/data_source\/business<\/app-path>\r\n <propagate-configuration \/>\r\n <configuration>\r\n <property>\r\n <name>TIME_SHIFT<\/name>\r\n <value>05<\/value>\r\n <\/property>\r\n <\/configuration>\r\n<\/sub-workflow>","type":"sub-workflow","endTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalId":"0025062-151002103648730-oozie-oozi-W","id":"0025060-151002103648730-oozie-oozi-W@run_worker","startTime":"Sun, 25 Oct 2015 08:00:11 GMT","externalChildIDs":null,"name":"run_worker","errorCode":null,"trackerUri":"local","retries":0,"toString":"Action name[run_worker] status[OK]","consoleUrl":"http:\/\/sample_domain.com:11000\/oozie?job=0025062-151002103648730-oozie-oozi-W"},{"errorMessage":null,"status":"OK","stats":null,"data":null,"transition":"run_worker","externalStatus":"run_worker","cred":"null","conf":"<switch xmlns=\"uri:oozie:workflow:0.5\">\r\n <case to=\"run_worker\">true<\/case>\r\n <case to=\"run_driver\">false<\/case>\r\n <default to=\"kill\" \/>\r\n<\/switch>","type":"switch","endTime":"Sun, 25 Oct 2015 08:00:11 GMT","externalId":"-","id":"0025060-151002103648730-oozie-oozi-W@worker_or_driver","startTime":"Sun, 25 Oct 2015 08:00:11 GMT","externalChildIDs":null,"name":"worker_or_driver","errorCode":null,"trackerUri":"-","retries":0,"toString":"Action name[worker_or_driver] status[OK]","consoleUrl":"-"},{"errorMessage":null,"status":"OK","stats":null,"data":null,"transition":null,"externalStatus":"OK","cred":"null","conf":"","type":":END:","endTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalId":"-","id":"0025060-151002103648730-oozie-oozi-W@end","startTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalChildIDs":null,"name":"end","errorCode":null,"trackerUri":"-","retries":0,"toString":"Action name[end] status[OK]","consoleUrl":"-"}]}
@@ -0,0 +1,5 @@
1
+ # api - Call Stack Signature:
2
+ # get_job_state()@lib/hodor/api/oozie/session.rb:45
3
+ # job_by_id()@lib/hodor/api/oozie.rb:34
4
+ # block (3 levels) in <module:Oozie>()@spec/integration/api/oozie/workflow_spec.rb:46
5
+ {"appPath":"hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/workers\/data_source\/business","acl":null,"status":"SUCCEEDED","createdTime":"Sun, 25 Oct 2015 08:00:11 GMT","conf":"<configuration>\r\n <property>\r\n <name>DAY1<\/name>\r\n <value>25<\/value>\r\n <\/property>\r\n <property>\r\n <name>DAY_WEEK_AGO<\/name>\r\n <value>19<\/value>\r\n <\/property>\r\n <property>\r\n <name>mapreduce.job.user.name<\/name>\r\n <value>job_user<\/value>\r\n <\/property>\r\n <property>\r\n <name>YEAR<\/name>\r\n <value>2015<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.rerun.failnodes<\/name>\r\n <value>true<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.application.lib<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/user\/oozie\/share\/lib\/lib_20150611161322<\/value>\r\n <\/property>\r\n <property>\r\n <name>endTime<\/name>\r\n <value>2015-12-23T08:10Z<\/value>\r\n <\/property>\r\n <property>\r\n <name>workers<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/workers<\/value>\r\n <\/property>\r\n <property>\r\n <name>startTime<\/name>\r\n <value>2015-10-23T08:00Z<\/value>\r\n <\/property>\r\n <property>\r\n <name>PWD<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily<\/value>\r\n <\/property>\r\n <property>\r\n <name>DAY<\/name>\r\n <value>24<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATA_DATE<\/name>\r\n <value>2015-10-24<\/value>\r\n <\/property>\r\n <property>\r\n <name>worker_tier<\/name>\r\n <value>3<\/value>\r\n <\/property>\r\n <property>\r\n <name>workflow_type<\/name>\r\n <value>worker<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.use.system.libpath<\/name>\r\n <value>true<\/value>\r\n <\/property>\r\n <property>\r\n <name>concurrency<\/name>\r\n <value>1<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.external.id<\/name>\r\n <value>0025060-151002103648730-oozie-oozi-W@run_worker@0<\/value>\r\n <\/property>\r\n <property>\r\n <name>MONTH<\/name>\r\n <value>10<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla3_email<\/name>\r\n <value>real3@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.workflow.notification.url<\/name>\r\n <value>http:\/\/sample_domain.com:11000\/oozie\/callback?id=0025060-151002103648730-oozie-oozi-W@run_worker&amp;status=$status<\/value>\r\n <\/property>\r\n <property>\r\n <name>error_email_dl<\/name>\r\n <value>no_one@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>default_shell_path<\/name>\r\n <value>\/usr\/local\/bin:\/bin:\/usr\/bin:\/usr\/local\/sbin:\/usr\/sbin:\/sbin<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_device<\/name>\r\n <value>uap-clj.udf.hive.generic.Device<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATESTAMP<\/name>\r\n <value>20151024<\/value>\r\n <\/property>\r\n <property>\r\n <name>do_redshift<\/name>\r\n <value>false<\/value>\r\n <\/property>\r\n <property>\r\n <name>sleep_time_2<\/name>\r\n <value>300<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_browser<\/name>\r\n <value>uap-clj.udf.hive.generic.Browser<\/value>\r\n <\/property>\r\n <property>\r\n <name>subflows<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/runbook\/subflows<\/value>\r\n <\/property>\r\n <property>\r\n <name>user.name<\/name>\r\n <value>job_user<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla2_email<\/name>\r\n <value>real2@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.libpath<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/user\/oozie\/share\/lib<\/value>\r\n <\/property>\r\n <property>\r\n <name>sla1_email<\/name>\r\n <value>real1@sample_domain.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.action.subworkflow.depth<\/name>\r\n <value>1<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_host<\/name>\r\n <value>targ_db.us-east-1.rds.amazonaws.com<\/value>\r\n <\/property>\r\n <property>\r\n <name>DOW<\/name>\r\n <value>Sun<\/value>\r\n <\/property>\r\n <property>\r\n <name>sleep_time_1<\/name>\r\n <value>60<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.application.path<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/workers\/data_source\/business<\/value>\r\n <\/property>\r\n <property>\r\n <name>drivers<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.coord.application.path<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/drivers\/daily\/example_workflows_coordinator.xml<\/value>\r\n <\/property>\r\n <property>\r\n <name>app_path<\/name>\r\n <value>data_source\/business<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_jar<\/name>\r\n <value>uap-clj-hiveudf-1.0.0-standalone.jar<\/value>\r\n <\/property>\r\n <property>\r\n <name>timeZone<\/name>\r\n <value>America\/New_York<\/value>\r\n <\/property>\r\n <property>\r\n <name>MONTH1<\/name>\r\n <value>10<\/value>\r\n <\/property>\r\n <property>\r\n <name>MONTH_WEEK_AGO<\/name>\r\n <value>10<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozieLibPath<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/user\/oozie\/share\/lib<\/value>\r\n <\/property>\r\n <property>\r\n <name>brickhouse_jar<\/name>\r\n <value>brickhouse-0.7.1-SNAPSHOT.jar<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_pw<\/name>\r\n <value>XXXXXXXXX<\/value>\r\n <\/property>\r\n <property>\r\n <name>fill_type<\/name>\r\n <value>incremental<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATA_SOURCE<\/name>\r\n <value>example<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie.wf.parent.id<\/name>\r\n <value>0025060-151002103648730-oozie-oozi-W<\/value>\r\n <\/property>\r\n <property>\r\n <name>queueName<\/name>\r\n <value>default<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_un<\/name>\r\n <value>warehouse<\/value>\r\n <\/property>\r\n <property>\r\n <name>TIME_SHIFT<\/name>\r\n <value>05<\/value>\r\n <\/property>\r\n <property>\r\n <name>oozie_url<\/name>\r\n <value>http:\/\/sample_domain.com:11000\/oozie\/<\/value>\r\n <\/property>\r\n <property>\r\n <name>useragent_os<\/name>\r\n <value>uap-clj.udf.hive.generic.OS<\/value>\r\n <\/property>\r\n <property>\r\n <name>bh_collect<\/name>\r\n <value>brickhouse.udf.collect.CollectUDAF<\/value>\r\n <\/property>\r\n <property>\r\n <name>bh_flatten<\/name>\r\n <value>brickhouse.udf.collect.ArrayFlattenUDF<\/value>\r\n <\/property>\r\n <property>\r\n <name>utils<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline\/example_workflows\/utils<\/value>\r\n <\/property>\r\n <property>\r\n <name>pipeline<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020\/pipeline<\/value>\r\n <\/property>\r\n <property>\r\n <name>YEAR_WEEK_AGO<\/name>\r\n <value>2015<\/value>\r\n <\/property>\r\n <property>\r\n <name>do_rdbms<\/name>\r\n <value>true<\/value>\r\n <\/property>\r\n <property>\r\n <name>YEAR1<\/name>\r\n <value>2015<\/value>\r\n <\/property>\r\n <property>\r\n <name>nameNode<\/name>\r\n <value>hdfs:\/\/sample_domain.com:8020<\/value>\r\n <\/property>\r\n <property>\r\n <name>TIMESTAMP<\/name>\r\n <value>2015-10-25T07:59Z<\/value>\r\n <\/property>\r\n <property>\r\n <name>timeout<\/name>\r\n <value>1441<\/value>\r\n <\/property>\r\n <property>\r\n <name>jobTracker<\/name>\r\n <value>tracker_url.sh:8050<\/value>\r\n <\/property>\r\n <property>\r\n <name>rdbms_port<\/name>\r\n <value>3306<\/value>\r\n <\/property>\r\n<\/configuration>","lastModTime":"Sun, 25 Oct 2015 08:02:21 GMT","run":0,"endTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalId":"0025060-151002103648730-oozie-oozi-W@run_worker@0","appName":"example_business_W","id":"0025062-151002103648730-oozie-oozi-W","startTime":"Sun, 25 Oct 2015 08:00:11 GMT","parentId":"0025060-151002103648730-oozie-oozi-W","toString":"Workflow id[0025062-151002103648730-oozie-oozi-W] status[SUCCEEDED]","group":null,"consoleUrl":"http:\/\/sample_domain.com:11000\/oozie?job=0025062-151002103648730-oozie-oozi-W","user":"job_user","actions":[{"errorMessage":null,"status":"OK","stats":null,"data":null,"transition":"data_workflow","externalStatus":"OK","cred":"null","conf":"","type":":START:","endTime":"Sun, 25 Oct 2015 08:00:11 GMT","externalId":"-","id":"0025062-151002103648730-oozie-oozi-W@:start:","startTime":"Sun, 25 Oct 2015 08:00:11 GMT","externalChildIDs":null,"name":":start:","errorCode":null,"trackerUri":"-","retries":0,"toString":"Action name[:start:] status[OK]","consoleUrl":"-"},{"errorMessage":null,"status":"OK","stats":null,"data":"#\n#Sun Oct 25 08:02:21 UTC 2015\nhadoopJobs=job_1443733596356_100667,job_1443733596356_100671,job_1443733596356_100675\n","transition":"end","externalStatus":"SUCCEEDED","cred":"null","conf":"<hive xmlns=\"uri:oozie:hive-action:0.2\">\r\n <job-tracker>tracker_url.sh:8050<\/job-tracker>\r\n <name-node>hdfs:\/\/sample_domain.com:8020<\/name-node>\r\n <job-xml>hdfs:\/\/sample_domain.com:8020\/pipeline\/config\/hive\/hive-site.xml<\/job-xml>\r\n <configuration>\r\n <property>\r\n <name>YEAR<\/name>\r\n <value>2015<\/value>\r\n <\/property>\r\n <property>\r\n <name>MONTH<\/name>\r\n <value>10<\/value>\r\n <\/property>\r\n <property>\r\n <name>DAY<\/name>\r\n <value>24<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATESTAMP<\/name>\r\n <value>20151024<\/value>\r\n <\/property>\r\n <property>\r\n <name>DATA_SOURCE<\/name>\r\n <value>example<\/value>\r\n <\/property>\r\n <property>\r\n <name>BROWSER<\/name>\r\n <value>uap-clj.udf.hive.generic.Browser<\/value>\r\n <\/property>\r\n <property>\r\n <name>OS<\/name>\r\n <value>uap-clj.udf.hive.generic.OS<\/value>\r\n <\/property>\r\n <property>\r\n <name>DEVICE<\/name>\r\n <value>uap-clj.udf.hive.generic.Device<\/value>\r\n <\/property>\r\n <property>\r\n <name>mapred.reduce.tasks<\/name>\r\n <value>25<\/value>\r\n <\/property>\r\n <\/configuration>\r\n <script>business.hql<\/script>\r\n <file>hdfs:\/\/sample_domain.com:8020\/shared\/jars\/commons-codec-1.8.jar#commons-codec-1.8.jar<\/file>\r\n <file>hdfs:\/\/sample_domain.com:8020\/shared\/jars\/uap-clj-hiveudf-1.0.0-standalone.jar#uap-clj-standalone.jar<\/file>\r\n<\/hive>","type":"hive","endTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalId":"job_1443733596356_100665","id":"0025062-151002103648730-oozie-oozi-W@data_workflow","startTime":"Sun, 25 Oct 2015 08:00:11 GMT","externalChildIDs":"job_1443733596356_100667,job_1443733596356_100671,job_1443733596356_100675","name":"data_workflow","errorCode":null,"trackerUri":"tracker_url.sh:8050","retries":0,"toString":"Action name[data_workflow] status[OK]","consoleUrl":"http:\/\/tracker_url.sh:8088\/proxy\/application_1443733596356_100665\/"},{"errorMessage":null,"status":"OK","stats":null,"data":null,"transition":null,"externalStatus":"OK","cred":"null","conf":"","type":":END:","endTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalId":"-","id":"0025062-151002103648730-oozie-oozi-W@end","startTime":"Sun, 25 Oct 2015 08:02:21 GMT","externalChildIDs":null,"name":"end","errorCode":null,"trackerUri":"-","retries":0,"toString":"Action name[end] status[OK]","consoleUrl":"-"}]}
@@ -0,0 +1,92 @@
1
+ require 'simplecov'
2
+
3
+ SimpleCov.start do
4
+ add_filter "spec\/"
5
+ add_group "Hodor", "lib\/hodor"
6
+ minimum_coverage 18
7
+ maximum_coverage_drop 5
8
+ refuse_coverage_drop
9
+ end
10
+
11
+ require 'bundler/setup'
12
+ Bundler.setup
13
+
14
+ require 'pry'
15
+ require 'hodor'
16
+ require 'wrong/adapters/rspec'
17
+ require 'support/d_v_r'
18
+ require 'support/hodor_api'
19
+
20
+ RSpec.configure do |config|
21
+ config.expect_with :rspec do |expectations|
22
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
23
+ expectations.syntax = :expect
24
+ end
25
+
26
+ config.mock_with :rspec do |mocks|
27
+ mocks.verify_partial_doubles = true
28
+ end
29
+
30
+ config.before(:suite) {
31
+ begin
32
+ Module.const_get("Hodor::Environment")
33
+ rescue NameError
34
+ # Do nothing
35
+ else
36
+ Hodor::Environment.send(:define_method, 'root') {
37
+ File.join(File.dirname(__FILE__), "test_repo")
38
+ }
39
+ Hodor::Environment.send(:define_method, 'hadoop_env') {
40
+ 'rspec'
41
+ }
42
+ Hodor::Environment.send(:define_method, 'logger_id') {
43
+ 'RspecLogger'
44
+ }
45
+ end
46
+ }
47
+
48
+ end
49
+
50
+ def use_settings(settings)
51
+ Hodor::Environment.instance.reset
52
+ allow(Hodor::Environment.instance).to receive(:yml_load).
53
+ once.with("config/clusters.yml") do |arg|
54
+ { rspec: settings }
55
+ end
56
+ end
57
+
58
+ def use_pwd(subdir, chdir=true)
59
+ new_pwd = File.join(File.dirname(__FILE__), "test_repo", subdir)
60
+ if (chdir)
61
+ Dir.chdir new_pwd
62
+ else
63
+ allow(FileUtils).to receive(:pwd).at_least(:once) {
64
+ new_pwd
65
+ }
66
+ end
67
+ end
68
+
69
+
70
+
71
+ def show job
72
+ table = ::Hodor::Table.new(job)
73
+ puts table.properties
74
+ puts table.children
75
+ end
76
+
77
+ def require_thor(task)
78
+ require 'hodor/cli'
79
+ load File.expand_path("../../lib/tasks/#{task}.thor", __FILE__)
80
+ end
81
+
82
+ require 'hodor/ui/table'
83
+ require "hodor/api/oozie/job"
84
+ require "hodor/api/oozie/query"
85
+ require "hodor/api/oozie/session"
86
+ require "hodor/api/oozie/bundle"
87
+ require "hodor/api/oozie/coordinator"
88
+ require "hodor/api/oozie/materialization"
89
+ require "hodor/api/oozie/workflow"
90
+ require "hodor/api/oozie/action"
91
+ require "hodor/api/oozie/hadoop_job"
92
+ require 'hodor/api/oozie'
@@ -0,0 +1,125 @@
1
+
2
+ class RSpec::Mocks::MessageExpectation
3
+ def and_mimic_original(dvr)
4
+ and_wrap_original do |original, *args|
5
+ if dvr.recording?
6
+ dvr.record(original.call(*args))
7
+ else
8
+ dvr.playback
9
+ end
10
+ end
11
+ end
12
+ end
13
+
14
+ class DVR
15
+
16
+ attr_accessor :playback_stdout
17
+
18
+ def initialize(example)
19
+
20
+ if example.methods.include?(:scenario)
21
+ @mode = :playback
22
+ @scenario = example.scenario
23
+ end
24
+
25
+ if example.methods.include?(:record)
26
+ @mode = :record
27
+ @scenario = example.record
28
+ end
29
+
30
+ if example.methods.include?(:playback)
31
+ @mode = :playback
32
+ @scenario = example.playback
33
+ end
34
+ @callno = 0
35
+ @playback_stdout = false
36
+ end
37
+
38
+ def recording?
39
+ @mode == :record
40
+ end
41
+
42
+ # Return the fixture data associated with a numbered request/response.
43
+ def playback
44
+ calling_module, call_stack = select_call_stack
45
+ fix_file = File.join(root_dir, 'spec', 'integration', 'fixtures', calling_module,
46
+ @scenario.to_s, "req_resp_#{"%02d" % @callno}.memo")
47
+ @callno += 1
48
+ output = File.open(fix_file).inject("") do |memo, line|
49
+ memo << line unless line.start_with?('#')
50
+ memo
51
+ end
52
+
53
+ puts output if playback_stdout
54
+ output
55
+ end
56
+
57
+ # Use a proxy to intercept the RESTful API call or SSH command line and grab the
58
+ # actual response from the live call. Then save this artifact as a fixture. A
59
+ # header/comment is added to this fixture to indicate the code path that led
60
+ # to the creation of the current fixture.
61
+ def record response
62
+ calling_module, call_stack = select_call_stack
63
+ fix_file = File.join(root_dir, 'spec', 'integration', 'fixtures', calling_module,
64
+ @scenario.to_s, "req_resp_#{"%02d" % @callno}.memo")
65
+ @callno += 1
66
+ FileUtils.mkdir_p(File.dirname(fix_file))
67
+ File.open(fix_file, 'w') { |f|
68
+ f.puts("# #{calling_module} - Call Stack Signature:")
69
+ call_stack.each { |code_path| f.puts(code_path) }
70
+ f.puts(response)
71
+ response
72
+ }
73
+ puts response if playback_stdout
74
+ response
75
+ end
76
+
77
+ private
78
+
79
+ def root_dir
80
+ @root ||= File.expand_path( File.join('..', '..'), File.dirname(__FILE__) )
81
+ end
82
+
83
+ # This function both selects which stack frames are relevant to display
84
+ # in the header, and formats the stack frames it selects. Only the stack
85
+ # frames in "my code" are selected and formatted. For brevity, stack
86
+ # frames occurring in gems are omitted.
87
+ def format_stack_frame(frame)
88
+ if frame.path.start_with?(root_dir)
89
+ path = frame.path[root_dir.length+1..-1]
90
+ "#\t#{frame.label}()@#{path}:#{frame.lineno}"
91
+ else
92
+ nil
93
+ end
94
+ end
95
+
96
+ def calling_spec_module(call_stack)
97
+ if call_stack.length > 0
98
+ call_stack.each { |frame|
99
+ if frame =~ /spec\/integration\//
100
+ caller_match = frame.match(/spec\/integration\/(\w+)\//)
101
+ if !caller_match.nil?
102
+ caller_captures = caller_match.captures
103
+ return caller_captures.length > 0 ? caller_captures[0] : nil
104
+ end
105
+ end
106
+ }
107
+ end
108
+ nil
109
+ end
110
+
111
+ def select_call_stack
112
+ call_stack = []
113
+ caller_locations.each_with_index { |frame, index|
114
+ code_path = format_stack_frame(frame)
115
+ call_stack << code_path if code_path
116
+ }
117
+ scrubbed_call_stack = call_stack.drop_while { |frame|
118
+ frame.include?('spec/support/d_v_r.rb')
119
+ }
120
+ return calling_spec_module(scrubbed_call_stack), scrubbed_call_stack
121
+ end
122
+
123
+ end
124
+
125
+