Issues with Id.*, ProgramType, and ElementType (cdap-cli)
- Id.*
- toString() is inconsistent
- JSON serialization is inconsistent (since sometimes we use NamespacedIdCodec and sometimes we don't)
- Doesn't look pretty in JSON form due to heavy nesting
- Needs lots of extra code to implement JSON codec (NamespacedIdCodec)
- Id.Program vs Id.Flow: two classes that do the same thing
- Constructing an Id.* is requires repetition
- ProgramType
- Inconsistent in JSON form compared to other CDAP entities (using "Flow", "Mapreduce", etc. form instead of "flow", "mapreduce", etc. form to maintain backwards-compatibility)
- SchedulableProgramType duplicates ProgramType
- ElementType
- Only in cdap-cli
- Doesn't cover every type of entity
Proposal