I am learning the Oozie REST API and having trouble getting filters to work.

In particular, I have two user cases:
1) I want is to query for coordinator jobs that are in a certain state,
such as "RUNNING"
2) I want to get the info for a particular coordinator job based on its name

My attempts so far have all failed.  I can limit the output to just
coordinator jobs, but trying to limit or filter further doesn't work.

I am using Oozie version: 3.3.2


*Examples*

All of these requests return the exact same data:

curl -o coord.out1.json $OOZIE_URL/v1/jobs?jobtype=coord
curl -o coord.out2.json $OOZIE_URL/v1/jobs?jobtype=coord
&filter=status%3Drunning
curl -o coord.out3.json $OOZIE_URL/v1/jobs?jobtype=coord
&filter=status%3DRUNNING
curl -o coord.out4.json $OOZIE_URL/v1/jobs?jobtype=coord
&filter=status%3DKILLED
curl -o coord.out5.json $OOZIE_URL/v1/jobs?jobtype=coord&status=RUNNING
curl -o coord.out6.json $OOZIE_URL/v1/jobs?jobtype=coord&filter=coordJobName
%3Dunify-datamart-build-for-testgroup
curl -o coord.out7.json $OOZIE_URL/v1/jobs?jobtype=coord&filter=coordJobName
%3Dunify
curl -o coord.out8.json $OOZIE_URL/v1/jobs?jobtype=coord&coordJobName=unify-
datamart-build-for-testgroup


The all return return 423 lines of json (when expanded).  It does only
return coordinatorJobs, but it returns all jobs and all statuses.

Interestingly, this one returns an error that "request sent by the client
was syntactically incorrect"

$ curl -o coord.out3.json $OOZIE_URL/v1/jobs?filter=status%3Drunning&jobtype
=coord

Please help me figure out how to use filters properly.  There is very
limited documentation available on the web about how to do this.

Thank you,

-Michael

Reply via email to