@Override public void writeFields(DataOutput output) throws IOException { super.writeFields(output); output.writeUTF(nodeId); output.writeInt(taskProfiles.size()); for (Entry<TaskAttemptId, TaskProfile> entry : taskProfiles.entrySet()) { entry.getKey().writeFields(output); entry.getValue().writeFields(output); } } }
public static void serialize(OutputStream out, Object object) throws Exception { NotifyTaskCompleteFunction fn = (NotifyTaskCompleteFunction) object; DataOutputStream dos = new DataOutputStream(out); fn.jobId.writeFields(dos); dos.writeUTF(fn.nodeId); fn.taskId.writeFields(dos); fn.statistics.writeFields(dos); } }
@Override public void writeFields(DataOutput output) throws IOException { taId.writeFields(output); output.writeInt(nPartitions); output.writeInt(nInputPartitions == null ? -1 : nInputPartitions.length); if (nInputPartitions != null) { for (int i = 0; i < nInputPartitions.length; i++) { output.writeInt(nInputPartitions[i]); } } output.writeInt(nOutputPartitions == null ? -1 : nOutputPartitions.length); if (nOutputPartitions != null) { for (int i = 0; i < nOutputPartitions.length; i++) { output.writeInt(nOutputPartitions[i]); } } output.writeInt(inputPartitionLocations == null ? -1 : inputPartitionLocations.length); if (inputPartitionLocations != null) { for (int i = 0; i < inputPartitionLocations.length; i++) { if (inputPartitionLocations[i] != null) { output.writeInt(inputPartitionLocations[i].length); for (int j = 0; j < inputPartitionLocations[i].length; j++) { inputPartitionLocations[i][j].writeFields(output); } } else { output.writeInt(-1); } } } }
@Override public void writeFields(DataOutput output) throws IOException { super.writeFields(output); taskAttemptId.writeFields(output); output.writeInt(partitionSendProfile.size()); for (Entry<PartitionId, PartitionProfile> entry : partitionSendProfile.entrySet()) { entry.getKey().writeFields(output); entry.getValue().writeFields(output); } statsCollector.writeFields(output); } }