Ejemplo n.º 1
0
        public virtual void TestToTaskID()
        {
            TaskId tid = MRApps.ToTaskID("task_1_2_r_3");

            NUnit.Framework.Assert.AreEqual(1, tid.GetJobId().GetAppId().GetClusterTimestamp(
                                                ));
            NUnit.Framework.Assert.AreEqual(2, tid.GetJobId().GetAppId().GetId());
            NUnit.Framework.Assert.AreEqual(2, tid.GetJobId().GetId());
            NUnit.Framework.Assert.AreEqual(TaskType.Reduce, tid.GetTaskType());
            NUnit.Framework.Assert.AreEqual(3, tid.GetId());
            tid = MRApps.ToTaskID("task_1_2_m_3");
            NUnit.Framework.Assert.AreEqual(TaskType.Map, tid.GetTaskType());
        }
Ejemplo n.º 2
0
 public static TaskID FromYarn(TaskId id)
 {
     return(new TaskID(FromYarn(id.GetJobId()), FromYarn(id.GetTaskType()), id.GetId()
                       ));
 }