Project

ruboozie

0.01
No commit activity in last 3 years
No release in over 3 years
Apache Oozie [http://incubator.apache.org/oozie/] is a workflow engine for Apache MapReduce jobs. This wrapper lets you submit jobs and stuff from any ruby project
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme
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