Support dotted job types in Savanna
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.
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.
All code that compares Job.type in savanna-api will be reviewed to ensure proper handling of job subtypes.
Blueprint information
- Status:
- Complete
- Approver:
- Sergey Lukjanov
- Priority:
- Medium
- Drafter:
- Trevor McKay
- Direction:
- Approved
- Assignee:
- Trevor McKay
- Definition:
- Approved
- Series goal:
- Accepted for icehouse
- Implementation:
- Implemented
- Milestone target:
- 2014.1
- Started by
- Sergey Lukjanov
- Completed by
- Sergey Lukjanov
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Add utilities for supporting dotted job types
Addressed by: https:/
Add support for dotted job types