code: public void write(DataOutput out) throws IOException {
      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.size());
        TaskAttemptID t[] = new TaskAttemptID[0];
        t = runningAttempts.toArray(t);
        for (int i = 0; i < t.length; i++) {
          t[i].write(out);
        }
      } else if (currentStatus == TIPStatus.COMPLETE) {
        successfulAttempt.write(out);
      }
    }
docs: ////////////////////////////////////////////