Beispiel #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());
        }
Beispiel #2
0
 public virtual void TestTaskIDBadType()
 {
     MRApps.ToTaskID("task_0_0000_x_000000");
 }
Beispiel #3
0
 public virtual void TestTaskIDShort()
 {
     MRApps.ToTaskID("task_0_0000_m");
 }