public TaskFinishedProto toProto() { TaskFinishedProto.Builder builder = TaskFinishedProto.newBuilder(); builder.setTaskId(taskID.toString()).setState(state.ordinal()).setFinishTime(finishTime); if (diagnostics != null) { builder.setDiagnostics(diagnostics); } if (tezCounters != null) { builder.setCounters(DagTypeConverters.convertTezCountersToProto(tezCounters)); } if (successfulAttemptID != null) { builder.setSuccessfulTaskAttemptId(successfulAttemptID.toString()); } return builder.build(); }
public DAGFinishedProto toProto() { DAGFinishedProto.Builder builder = DAGFinishedProto.newBuilder(); builder.setDagId(dagID.toString()).setState(state.ordinal()).setFinishTime(finishTime); if (diagnostics != null) { builder.setDiagnostics(diagnostics); } if (tezCounters != null) { builder.setCounters(DagTypeConverters.convertTezCountersToProto(tezCounters)); } return builder.build(); }