public void setLocalityCounter(DAGCounter localityCounter) { if (!localitySet.get()) { localitySet.set(true); if (counters == null) { counters = new TezCounters(); } if (localityCounter != null) { counters.findCounter(localityCounter).increment(1); // TODO Maybe validate that the correct value is being set. } } }
@Override public void readFields(DataInput in) throws IOException { progress = in.readFloat(); if (in.readBoolean()) { tezCounters = new TezCounters(); tezCounters.readFields(in); } if (in.readBoolean()) { statistics = new TaskStatistics(); statistics.readFields(in); } }
@Override public void write(DataOutput out) throws IOException { out.writeFloat(progress); if (tezCounters != null) { out.writeBoolean(true); tezCounters.write(out); } else { out.writeBoolean(false); } if (statistics != null) { out.writeBoolean(true); statistics.write(out); } else { out.writeBoolean(false); } }
@Override public String toString() { return "dagId=" + dagID + ", startTime=" + startTime + ", finishTime=" + finishTime + ", timeTaken=" + (finishTime - startTime) + ", status=" + state.name() + ", diagnostics=" + diagnostics + ", counters=" + ((tezCounters == null) ? "null" : (tezCounters.toString().replaceAll("\\n", ", ").replaceAll("\\s+", " "))); }
@Override public String toString() { return "vertexName=" + vertexName + ", taskId=" + taskID + ", startTime=" + startTime + ", finishTime=" + finishTime + ", timeTaken=" + (finishTime - startTime) + ", status=" + state.name() + ", successfulAttemptID=" + (successfulAttemptID == null ? "null" : successfulAttemptID.toString()) + ", diagnostics=" + diagnostics + ", counters=" + (tezCounters == null ? "null" : tezCounters.toString().replaceAll("\\n", ", ").replaceAll("\\s+", " ")); }