> On June 30, 2016, 4:12 a.m., Amareshwari Sriramadasu wrote: > > lens-server/src/main/java/org/apache/lens/server/scheduler/state/SchedulerJobInstanceState.java, > > line 15 > > <https://reviews.apache.org/r/49391/diff/1/?file=1433169#file1433169line15> > > > > STATE should be part of lens-api as it should be readable by client as > > well. Enums are already added by earlier patch, lets use them. > > Ajay Yadava wrote: > That will effectively mean moving the entire statemachine to lens-api. Do > we really want to do that? > > Amareshwari Sriramadasu wrote: > hmm, I understand. Then clients cannot access enum values? can access the > state value only as string? > > If there any way we can separate them? Can you look at QueryStatus? > > Ajay Yadava wrote: > I understand what you are saying, will change the implementation to that. > However, python client(or any other language client) will still not be able > to use these enums :)
@Amareshwari Sriramadasu - Without turning the entire state transitions into ugly nested switch statements and moving the transition logic into api, this is what is possible so that both client and the server can access the same state enums. Another option is to put it exactly like QueryStatus. Let me know if you feel that will be a better solution. I am keeping the issue open in the meantime. - Ajay ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/49391/#review140106 ----------------------------------------------------------- On July 1, 2016, 12:29 p.m., Ajay Yadava wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/49391/ > ----------------------------------------------------------- > > (Updated July 1, 2016, 12:29 p.m.) > > > Review request for lens. > > > Repository: lens > > > Description > ------- > > State Machine for Jobs and Job instances. > > > Diffs > ----- > > lens-api/src/main/java/org/apache/lens/api/scheduler/SchedulerJobInfo.java > 0561834 > > lens-api/src/main/java/org/apache/lens/api/scheduler/SchedulerJobInstanceInfo.java > cb0d938 > > lens-api/src/main/java/org/apache/lens/api/scheduler/SchedulerJobInstanceState.java > c66add6 > > lens-api/src/main/java/org/apache/lens/api/scheduler/SchedulerJobInstanceStatus.java > PRE-CREATION > lens-api/src/main/java/org/apache/lens/api/scheduler/SchedulerJobState.java > 82c55c8 > > lens-api/src/main/java/org/apache/lens/api/scheduler/SchedulerJobStatus.java > PRE-CREATION > > lens-server-api/src/main/java/org/apache/lens/server/api/scheduler/SchedulerService.java > 700a255 > > lens-server/src/main/java/org/apache/lens/server/scheduler/SchedulerDAO.java > 8179fef > > lens-server/src/main/java/org/apache/lens/server/scheduler/exception/InvalidStateTransitionException.java > PRE-CREATION > > lens-server/src/main/java/org/apache/lens/server/scheduler/state/SchedulerJobInstanceState.java > PRE-CREATION > > lens-server/src/main/java/org/apache/lens/server/scheduler/state/SchedulerJobState.java > PRE-CREATION > > lens-server/src/main/java/org/apache/lens/server/scheduler/state/StateMachine.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/49391/diff/ > > > Testing > ------- > > > Thanks, > > Ajay Yadava > >
