oozie-client 0.0.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -18,14 +18,20 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- oozie = OozieClient.new "http://OOZIE_URL"
22
- job = oozie.jobs.create workflow_properties
23
- job.start
24
- job.info
25
- ...
26
- oozie.jobs[oozie_id].info
27
- oozie.jobs.first
28
- ...
21
+ Create Client
22
+
23
+ oozie = OozieClient.new "http://OOZIE_URL"
24
+
25
+ Create Workflow
26
+
27
+ workflow = oozie.jobs.create {prop1 => value1, prop2 => value2, etc}
28
+
29
+ workflow.start
30
+ workflow.info
31
+
32
+ oozie.jobs[oozie_id].info
33
+ oozie.jobs.first
34
+
29
35
 
30
36
  ## Contributing
31
37
 
@@ -42,9 +42,9 @@ class OozieClient
42
42
  JobCollection.new(options)
43
43
  end
44
44
 
45
- def each &block
45
+ def each
46
46
  result = JSON.parse jobs_url.get
47
- result['workflows'].each &block
47
+ result['workflows'].each { |wf| yield self[wf['id']] }
48
48
  end
49
49
 
50
50
  end
@@ -29,15 +29,15 @@ class OozieClient
29
29
  end
30
30
 
31
31
  def info
32
- JSON.parse job_url.put({'params' => {'show' => 'info'}})
32
+ JSON.parse job_url.get({'params' => {'show' => 'info'}})
33
33
  end
34
34
 
35
35
  def definition
36
- job_url.put({'params' => {'show' => 'definition'}})
36
+ job_url.get({'params' => {'show' => 'definition'}})
37
37
  end
38
38
 
39
39
  def log
40
- job_url.put({'params' => {'show' => 'log'}})
40
+ job_url.get({'params' => {'show' => 'log'}})
41
41
  end
42
42
 
43
43
  end
@@ -1,3 +1,3 @@
1
1
  class OozieClient
2
- VERSION = "0.0.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oozie-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: