Class: OozieClient::OozieJob
- Inherits:
-
Object
- Object
- OozieClient::OozieJob
- Includes:
- Base
- Defined in:
- lib/oozie-client/oozie_job.rb
Instance Attribute Summary collapse
-
#oozie_id ⇒ Object
readonly
Returns the value of attribute oozie_id.
Instance Method Summary collapse
- #definition ⇒ Object
- #info ⇒ Object
-
#initialize(oozie_id, options) ⇒ OozieJob
constructor
A new instance of OozieJob.
- #kill ⇒ Object
- #log ⇒ Object
- #rerun(properties, params = {}) ⇒ Object
- #resume ⇒ Object
- #start ⇒ Object
- #suspend ⇒ Object
Methods included from Base
Constructor Details
#initialize(oozie_id, options) ⇒ OozieJob
Returns a new instance of OozieJob.
7 8 9 10 |
# File 'lib/oozie-client/oozie_job.rb', line 7 def initialize oozie_id, @oozie_id = oozie_id super() end |
Instance Attribute Details
#oozie_id ⇒ Object (readonly)
Returns the value of attribute oozie_id.
5 6 7 |
# File 'lib/oozie-client/oozie_job.rb', line 5 def oozie_id @oozie_id end |
Instance Method Details
#definition ⇒ Object
35 36 37 |
# File 'lib/oozie-client/oozie_job.rb', line 35 def definition job_url.get({'params' => {'show' => 'definition'}}) end |
#info ⇒ Object
31 32 33 |
# File 'lib/oozie-client/oozie_job.rb', line 31 def info JSON.parse job_url.get({'params' => {'show' => 'info'}}) end |
#kill ⇒ Object
22 23 24 |
# File 'lib/oozie-client/oozie_job.rb', line 22 def kill job_url.put('', {'params' => {'action' => 'kill'}}) end |
#log ⇒ Object
39 40 41 |
# File 'lib/oozie-client/oozie_job.rb', line 39 def log job_url.get({'params' => {'show' => 'log'}}) end |
#rerun(properties, params = {}) ⇒ Object
27 28 29 |
# File 'lib/oozie-client/oozie_job.rb', line 27 def rerun(properties, params={}) job_url.put(properties_to_conf_xml(properties), {'params' => {'action' => 'rerun'}.merge(params)}) end |
#resume ⇒ Object
19 20 21 |
# File 'lib/oozie-client/oozie_job.rb', line 19 def resume job_url.put('', {'params' => {'action' => 'resume'}}) end |
#start ⇒ Object
12 13 14 |
# File 'lib/oozie-client/oozie_job.rb', line 12 def start job_url.put('', {'params' => {'action' => 'start'}}) end |
#suspend ⇒ Object
16 17 18 |
# File 'lib/oozie-client/oozie_job.rb', line 16 def suspend job_url.put('', {'params' => {'action' => 'suspend'}}) end |