WinkerDu opened a new pull request #325:
URL: https://github.com/apache/incubator-livy/pull/325


   ## What changes were proposed in this pull request?
   
   yarnClient.getApplicationReport(appId) would return 2 states below:
   
   1. YarnApplicationState (short as yarnState)
   2. FinalApplicationStatus (short as finalState)
   
   These 2 states may switch sequentially in practice, means (yarnState, 
finalState) as
   (RUNNING, SUCCEEDED) would switch to (FINISHED, SUCCEEDED) finally.
   For now, (yarnState, finalState)  as (RUNNING, SUCCEEDED) would be 
identified as `FAILED` state combination
   
   This PR introduce new logic to map yarn state combination as bellow:
   
   1. yarnState as NEW、NEW_SAVING、SUBMITTED、ACCEPTED would be identified as 
`STARTING`
   2. yarnState as RUNNING would be identified as `RUNNING`
   3. other yarnState and finalState combinations would be identified to rules:
   - (FAILED, FAILED) -> `FAILED`
   - (KILLED, KILLED) -> `KILLED`
   - (FINISHED, SUCCEEDED) -> `FINISHED`
   - any other combination -> `FAILED`
   
   ## How was this patch tested?
   
   added UT.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to