forked from rathboma/ruboozie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
48 lines (34 loc) · 1.17 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Ruboozie
========
A ruby library for Apache Oozie.
Author
======
This was extracted from https://github.com/dguttman/oozie-web-ui
Full credit goes to @dguttman for most of the initial code in this project.
Features
=======
- tested against oozie 2.x from CDH3u3
- list jobs
- query a specific job
- submit a job [workflow/coordinator]
- cancel, start, and otherwise modify a job
- Real models for the classes, not just hashes.
- hopefully sensible error messages [still needs work]
Meh
======
- currently other params for job listing is not supported
- some error messages don't come through properly in the response headers, so in that case it uses the response body [html], not ideal but better than nothing.
Example
=======
OozieApi.setup("http://localhost:11000/oozie")
properties = {'user.name' => 'matthew',
'oozie.wf.application.path' => 'hdfs:///workflows/hello_world/workflow.xml'}
job = OozieApi.submit_job(properties, :action => :start)
puts job.id
puts job.status
while !job.finished?
job = job.reload #creates a new object
sleep(1)
end
puts job.failed? ? "FAILED" : "COMPLETED"
Copyright (c) 2010 @dguttman, @rathboma, released under the MIT license