public static TaskAttemptId ToYarn(TaskAttemptID id) { TaskAttemptId taskAttemptId = recordFactory.NewRecordInstance <TaskAttemptId>(); taskAttemptId.SetTaskId(ToYarn(id.GetTaskID())); taskAttemptId.SetId(id.GetId()); return(taskAttemptId); }
/// <summary>Downgrade a new TaskAttemptID to an old one</summary> /// <param name="old">the new id</param> /// <returns>either old or a new TaskAttemptID constructed to match old</returns> public static Org.Apache.Hadoop.Mapred.TaskAttemptID Downgrade(Org.Apache.Hadoop.Mapreduce.TaskAttemptID old) { if (old is Org.Apache.Hadoop.Mapred.TaskAttemptID) { return((Org.Apache.Hadoop.Mapred.TaskAttemptID)old); } else { return(new Org.Apache.Hadoop.Mapred.TaskAttemptID(TaskID.Downgrade(old.GetTaskID( )), old.GetId())); } }