This probably doesnt need to consider isSession but does need to consider IDLE state
- if (EnumSet.of(DAGAppMasterState.NEW, DAGAppMasterState.INITED,
- DAGAppMasterState.RUNNING).contains(appMaster.state)) {
+ if (!appMaster.isSession() &&
+ EnumSet.of(DAGAppMasterState.NEW, DAGAppMasterState.INITED,
+ DAGAppMasterState.RUNNING).contains(appMaster.state))
How about, if state is not ERROR, then we set state = SUCCEEDED in session.shutdownAM(). Then Scheduler does not need to know about sessions and thus needs no change.
Orthogonally, close() sounds better to me than shutdownAM() for a session.
I agree we can create DAGContext object in a separate jira. Can you please open one?
Minor
Initialize with others of same kind?
+ this.dagCounter = new AtomicInteger(0);
Jira???
Killed DAGs ?
+ if (finishEvt.getDAGState().equals(DAGState.SUCCEEDED)) {
+ successfulDAGs.incrementAndGet();
+ } else {
+ failedDAGs.incrementAndGet();
+ }
bikassaha Review please?