internal CompletedTaskAttempt(TaskId taskId, JobHistoryParser.TaskAttemptInfo attemptInfo ) { this.attemptInfo = attemptInfo; this.attemptId = TypeConverter.ToYarn(attemptInfo.GetAttemptId()); if (attemptInfo.GetTaskStatus() != null) { this.state = TaskAttemptState.ValueOf(attemptInfo.GetTaskStatus()); } else { this.state = TaskAttemptState.Killed; localDiagMessage = "Attmpt state missing from History : marked as KILLED"; diagnostics.AddItem(localDiagMessage); } if (attemptInfo.GetError() != null) { diagnostics.AddItem(attemptInfo.GetError()); } }
public static TaskAttemptState ConvertFromProtoFormat(MRProtos.TaskAttemptStateProto e) { return(TaskAttemptState.ValueOf(e.ToString().Replace(TaskAttemptStatePrefix, string.Empty ))); }