/// <exception cref="System.IO.IOException"/>
 public virtual void ReadFields(DataInput @in)
 {
     reset  = @in.ReadBoolean();
     events = new TaskCompletionEvent[@in.ReadInt()];
     for (int i = 0; i < events.Length; ++i)
     {
         events[i] = new TaskCompletionEvent();
         events[i].ReadFields(@in);
     }
 }
        /// <summary>test deprecated methods of TaskCompletionEvent</summary>
        public virtual void TestTaskCompletionEvent()
        {
            TaskAttemptID       taid     = new TaskAttemptID("001", 1, TaskType.Reduce, 2, 3);
            TaskCompletionEvent template = new TaskCompletionEvent(12, taid, 13, true, TaskCompletionEvent.Status
                                                                   .Succeeded, "httptracker");
            TaskCompletionEvent testEl = TaskCompletionEvent.Downgrade(template);

            testEl.SetTaskAttemptId(taid);
            testEl.SetTaskTrackerHttp("httpTracker");
            testEl.SetTaskId("attempt_001_0001_m_000002_04");
            NUnit.Framework.Assert.AreEqual("attempt_001_0001_m_000002_4", testEl.GetTaskId()
                                            );
            testEl.SetTaskStatus(TaskCompletionEvent.Status.Obsolete);
            NUnit.Framework.Assert.AreEqual(TaskCompletionEvent.Status.Obsolete.ToString(), testEl
                                            .GetStatus().ToString());
            testEl.SetTaskRunTime(20);
            NUnit.Framework.Assert.AreEqual(testEl.GetTaskRunTime(), 20);
            testEl.SetEventId(16);
            NUnit.Framework.Assert.AreEqual(testEl.GetEventId(), 16);
        }