@Override
 public void fromProtoStream(InputStream inputStream) throws IOException {
   TaskAttemptStartedProto proto = TaskAttemptStartedProto.parseDelimitedFrom(inputStream);
   if (proto == null) {
     throw new IOException("No data found in stream");
   }
   fromProto(proto);
 }
 public void fromProto(TaskAttemptStartedProto proto) {
   this.taskAttemptId = TezTaskAttemptID.fromString(proto.getTaskAttemptId());
   this.launchTime = proto.getStartTime();
   this.containerId = ConverterUtils.toContainerId(proto.getContainerId());
   this.nodeId = ConverterUtils.toNodeId(proto.getNodeId());
   this.creationTime = proto.getCreationTime();
   this.allocationTime = proto.getAllocationTime();
   if (proto.hasCreationCausalTA()) {
     this.creationCausalTA = TezTaskAttemptID.fromString(proto.getCreationCausalTA());
   }
 }
 public TaskAttemptStartedProto toProto() {
   TaskAttemptStartedProto.Builder builder = TaskAttemptStartedProto.newBuilder();
   builder
       .setTaskAttemptId(taskAttemptId.toString())
       .setStartTime(launchTime)
       .setContainerId(containerId.toString())
       .setNodeId(nodeId.toString())
       .setCreationTime(creationTime)
       .setAllocationTime(allocationTime);
   if (creationCausalTA != null) {
     builder.setCreationCausalTA(creationCausalTA.toString());
   }
   return builder.build();
 }