Support dotted job types in Savanna

Registered by Trevor McKay

Savanna needs a simple mechanism for supporting job type variants like streaming MapReduce while preserving as much as possible the correlation between job types and Oozie action types.

Additionally, we would like to avoid API changes that affect the savanna client and record structure changes that force database migrations when a viable alternative exists. To that end, Savanna should support dotted job types such as MapReduce.Streaming.

A utility method should be added that extracts type and subtype from a Job.type value. It should always return both. If a Job.type value does not indicate a subtype, an empty string should be returned for subtype. If a Job.type value contains multiple "." characters, the split should be done on the first "." character. If multiple levels of subtypes are supported at some point in the future (unlikely but maybe) then the method can be called iteratively to do additional splits.

A utility method should also be added to handle comparison of Job.type values against a list of values. Strict comparisons should be the default. Non-strict comparisons should be an option, so that a Job.type value that contains a subtype indicator will match on type. For example, a Job.type value "MapReduce.Streaming" should match a list containing "MapReduce" if non-strict comparisons are in effect. The inverse should not be true, that is a Job.type value "MapReduce" should not match a list containing "MapReduce.Streaming" even if non-strict comparisons are in effect.

All code that compares Job.type in savanna-api will be reviewed to ensure proper handling of job subtypes.

Blueprint information

Sergey Lukjanov
Trevor McKay
Trevor McKay
Series goal:
Accepted for icehouse
Milestone target:
milestone icon 2014.1
Started by
Sergey Lukjanov
Completed by
Sergey Lukjanov

Related branches



Gerrit topic:,topic:bp/edp-dotted-job-types,n,z

Addressed by:
    Add utilities for supporting dotted job types

Addressed by:
    Add support for dotted job types


Work Items

This blueprint contains Public information 
Everyone can see this information.