private static EmrActivityState GetState(JobFlowDetail jobFlowDetail) { JobFlowExecutionState latestState = jobFlowDetail.ExecutionStatusDetail.State; if (latestState == JobFlowExecutionState.COMPLETED || latestState == JobFlowExecutionState.WAITING || latestState == JobFlowExecutionState.TERMINATED) { return(EmrJobStateChecker.GetStateFromLastStep(jobFlowDetail)); } else if (latestState == JobFlowExecutionState.FAILED) { return(EmrActivityState.Failed); } else { return(EmrActivityState.Running); } }
/// <summary> /// Instantiates JobFlowExecutionStatusDetail with the parameterized properties /// </summary> /// <param name="state">The state of the job flow.</param> /// <param name="creationDateTime">The creation date and time of the job flow.</param> public JobFlowExecutionStatusDetail(JobFlowExecutionState state, DateTime creationDateTime) { _state = state; _creationDateTime = creationDateTime; }