@Override public Counters getCounters() { TaskReportProtoOrBuilder p = viaProto ? proto : builder; if (this.counters != null) { return this.counters; } if (!p.hasCounters()) { return null; } this.counters = convertFromProtoFormat(p.getCounters()); return this.counters; }
@Override public TaskId getTaskId() { TaskReportProtoOrBuilder p = viaProto ? proto : builder; if (this.taskId != null) { return this.taskId; } if (!p.hasTaskId()) { return null; } this.taskId = convertFromProtoFormat(p.getTaskId()); return this.taskId; }
@Override public TaskState getTaskState() { TaskReportProtoOrBuilder p = viaProto ? proto : builder; if (!p.hasTaskState()) { return null; } return convertFromProtoFormat(p.getTaskState()); }
private void initRunningAttempts() { if (this.runningAttempts != null) { return; } TaskReportProtoOrBuilder p = viaProto ? proto : builder; List<TaskAttemptIdProto> list = p.getRunningAttemptsList(); this.runningAttempts = new ArrayList<TaskAttemptId>(); for (TaskAttemptIdProto c : list) { this.runningAttempts.add(convertFromProtoFormat(c)); } }
@Override public TaskAttemptId getSuccessfulAttempt() { TaskReportProtoOrBuilder p = viaProto ? proto : builder; if (this.successfulAttemptId != null) { return this.successfulAttemptId; } if (!p.hasSuccessfulAttempt()) { return null; } this.successfulAttemptId = convertFromProtoFormat(p.getSuccessfulAttempt()); return this.successfulAttemptId; }
private void initDiagnostics() { if (this.diagnostics != null) { return; } TaskReportProtoOrBuilder p = viaProto ? proto : builder; List<String> list = p.getDiagnosticsList(); this.diagnostics = new ArrayList<String>(); for (String c : list) { this.diagnostics.add(c); } }
@Override public Counters getCounters() { TaskReportProtoOrBuilder p = viaProto ? proto : builder; convertRawCountersToCounters(); if (this.counters != null) { return this.counters; } if (!p.hasCounters()) { return null; } this.counters = convertFromProtoFormat(p.getCounters()); return this.counters; }