@Override public void readFields(DataInput in) throws IOException { reduce1 = WritableUtils.readWritableObject(in, null); reduce2 = WritableUtils.readWritableObject(in, null); } }
@Override public void readFields(DataInput input) throws IOException { computationClass = WritableUtils.readClass(input); incomingMessageClasses = WritableUtils.readWritableObject(input, conf); outgoingMessageClasses = WritableUtils.readWritableObject(input, conf); }
@Override public void readFields(DataInput in) throws IOException { fixedSize = in.readInt(); elementReduceOp = WritableUtils.readWritableObject(in, null); init(); }
@Override public void readFields(DataInput in) throws IOException { fixedSize = in.readInt(); typeOps = TypeOpsUtils.readTypeOps(in); elementReduceOp = WritableUtils.readWritableObject(in, null); init(); } }
@Override public void readFields(DataInput in) throws IOException { reducedMap.clear(); broadcastMap.clear(); reducerMap.clear(); int numReducers = in.readInt(); for (int i = 0; i < numReducers; i++) { String name = in.readUTF(); Reducer<Object, Writable> reducer = new Reducer<>(); reducer.readFields(in, conf); reducerMap.put(name, reducer); } int numBroadcast = in.readInt(); for (int i = 0; i < numBroadcast; i++) { String name = in.readUTF(); Writable value = WritableUtils.readWritableObject(in, conf); broadcastMap.put(name, value); } } }
@Override public void readFields(DataInput in) throws IOException { reduceOp = WritableUtils.readWritableObject(in, null); value = reduceOp.createInitialValue(); value.readFields(in); }
/** * Deserialize the fields of this object from <code>in</code>. * * <p>For efficiency, implementations should attempt to re-use storage in the * existing object where possible.</p> * * @param in <code>DataInput</code> to deseriablize this object from. * @param conf Configuration * @throws IOException */ public void readFields(DataInput in, ImmutableClassesGiraphConfiguration conf) throws IOException { reduceOp = WritableUtils.readWritableObject(in, conf); currentValue = createInitialValue(); currentValue.readFields(in); } }
@Override public void readFields(DataInput in) throws IOException { keyTypeOps = TypeOpsUtils.readTypeOps(in); typeOps = TypeOpsUtils.readTypeOps(in); elementReduceOp = WritableUtils.readWritableObject(in, null); init(); } }
@Override public void doRequest(ServerData serverData) { DataInput input = getDataInput(); AllAggregatorServerData aggregatorData = serverData.getAllAggregatorData(); try { int num = input.readInt(); for (int i = 0; i < num; i++) { String name = input.readUTF(); GlobalCommType type = GlobalCommType.values()[input.readByte()]; Writable value = WritableUtils.readWritableObject(input, conf); if (type == GlobalCommType.SPECIAL_COUNT) { aggregatorData.receivedRequestCountFromWorker( ((LongWritable) value).get(), getSenderTaskId()); } else { aggregatorData.receiveValueFromMaster(name, type, value); } } } catch (IOException e) { throw new IllegalStateException("doRequest: " + "IOException occurred while processing request", e); } aggregatorData.receivedRequestFromWorker(); }
String name = input.readUTF(); GlobalCommType type = GlobalCommType.values()[input.readByte()]; Writable value = WritableUtils.readWritableObject(input, conf); if (type == GlobalCommType.SPECIAL_COUNT) { aggregatorData.receivedRequestCountFromMaster(