Does Id.Program define uniqueness of a program?

Description

In the javadoc of Id.Program class, it says:
"Program is global unique if used within context of namespace and application."

However, in AppConfigurer, we do allow multiple programs with the same programId to be added to the application (they just have to be different programType).
If ProgramType of an application is used to define the uniqueness of a program, then the javadoc of Id.Program class is incorrect. Otherwise, a restriction should be put in the DefaultAppConfigurer to not allow multiple programs of same programId, but different types.

If indeed Id.Program uniquely identifies a program, then the scheduler API can be simplified significantly (remove programType) from the api and the implementation.

Release Notes

None

Activity

Show:

Ali Anwar May 20, 2015 at 2:00 AM

Id.Program class now has ProgramType as a field, and so it does uniquely identify the uniqueness of a program.
The javadoc is now consistent.

As of:
commit fe7093031a2646976567892d7fb277508dc57106
of
https://github.com/caskdata/cdap/pull/1869

Ali Anwar January 20, 2015 at 10:43 PM

Most likely it is the case that Id.Program does not uniquely identify a program (and it is simply the case that the javadoc on Id.Program needs to be updated).

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Affects versions

Components

Priority

Created January 20, 2015 at 10:21 PM
Updated May 20, 2015 at 2:00 AM
Resolved May 20, 2015 at 2:00 AM