////////////////////////////////////////////// // Writable ////////////////////////////////////////////// /// <exception cref="System.IO.IOException"/> public virtual void Write(DataOutput @out) { taskid.Write(@out); @out.WriteFloat(progress); Text.WriteString(@out, state); @out.WriteLong(startTime); @out.WriteLong(finishTime); WritableUtils.WriteStringArray(@out, diagnostics); counters.Write(@out); WritableUtils.WriteEnum(@out, currentStatus); if (currentStatus == TIPStatus.Running) { WritableUtils.WriteVInt(@out, runningAttempts.Count); TaskAttemptID[] t = new TaskAttemptID[0]; t = Sharpen.Collections.ToArray(runningAttempts, t); for (int i = 0; i < t.Length; i++) { t[i].Write(@out); } } else { if (currentStatus == TIPStatus.Complete) { successfulAttempt.Write(@out); } } }
/// <exception cref="System.IO.IOException"/> public override void Write(DataOutput @out) { base.Write(@out); taskId.Write(@out); }