/** write the int value */ static void writeInt(int value, DataOutputStream out) throws IOException { IntWritable uInt = TL_DATA.get().U_INT; uInt.set(value); uInt.write(out); }
@Override public void write(DataOutput out) throws IOException { yearMonth.write(out); day.write(out); temperature.write(out); }
@Override public void write(DataOutput out) throws IOException { oldKey.write(out); priority.write(out); }
/** write the int value */ static void writeInt(int value, DataOutputStream out) throws IOException { IntWritable uInt = TL_DATA.get().U_INT; uInt.set(value); uInt.write(out); }
@Override public void write(DataOutput out) throws IOException { first.write(out); second.write(out); } @Override
/** write the int value */ static void writeInt(int value, DataOutputStream out) throws IOException { IntWritable uInt = TL_DATA.get().U_INT; uInt.set(value); uInt.write(out); }
@Override public void write(DataOutput out) throws IOException { first.write(out); second.write(out); } @Override
@Override public void write(DataOutput out) throws IOException { id.write(out); name.write(out); }
@Override public void write(DataOutput out) throws IOException { pointCoordinates.write(out); clusterId.write(out); }
public void write(DataOutput dataOutput) throws IOException { key.write(dataOutput); partition.write(dataOutput); }
public void write(DataOutput arg0) throws IOException { reducerNum.write(arg0); matItem.write(arg0); }
@Override public void write(DataOutput out) throws IOException { out.writeByte(this.flag); if (isVertexMessage()) { // we don't need to write the classes because the other side has the same // classes for the two entities. vertexId.write(out); out.writeInt(numOfValues); out.writeInt(byteBuffer.size()); out.write(byteBuffer.toByteArray()); } else if (isMapMessage()) { map.write(out); } else if (isVerticesSizeMessage()) { integerMessage.write(out); } else if (isPartitioningMessage()) { out.writeInt(numOfValues); out.writeInt(byteBuffer.size()); out.write(byteBuffer.toByteArray()); } else { vertexId.write(out); } }
@Override public void write(DataOutput out) throws IOException { out.writeByte(this.flag); if (isVertexMessage()) { // we don't need to write the classes because the other side has the same // classes for the two entities. vertexId.write(out); out.writeInt(numOfValues); out.writeInt(byteBuffer.size()); out.write(byteBuffer.toByteArray()); } else if (isMapMessage()) { map.write(out); } else if (isVerticesSizeMessage()) { integerMessage.write(out); } else if (isPartitioningMessage()) { out.writeInt(numOfValues); out.writeInt(byteBuffer.size()); out.write(byteBuffer.toByteArray()); } else { vertexId.write(out); } }
protected void writeAnnotation(Annotation annot, DataOutput out, List<String> atypes) throws IOException { int typePos = atypes.indexOf(annot.getType()); IntWritable intStringPool = new IntWritable(typePos); intStringPool.write(out); WritableUtils.writeVLong(out, annot.getStart()); WritableUtils.writeVLong(out, annot.getEnd()); out.writeInt(annot.getFeatureNum()); if (annot.getFeatures() != null) { Iterator<String> featNameIter = annot.getFeatures().keySet() .iterator(); while (featNameIter.hasNext()) { String fname = featNameIter.next(); int fnamePos = atypes.indexOf(fname); intStringPool.set(fnamePos); intStringPool.write(out); WritableUtils.writeString(out, annot.getFeatures().get(fname)); } } }
@Override public void write(final DataOutput out) throws IOException { EventType.write(out); Geometry.write(out); DetailGeometry.write(out); MissionUUID.write(out); MissionName.write(out); MissionNumFrames.write(out); TrackNumber.write(out); TrackUUID.write(out); DetailLongitude.write(out); DetailElevation.write(out); PixelRow.write(out); PixelColumn.write(out); FrameNumber.write(out); MotionEvent.write(out); ObjectClass.write(out); ObjectClassConf.write(out); ObjectClassRel.write(out);
n.write(out); bytes.write(out);
public class MyDataType implements WritableComparable<MyDataType> { private Text name; private IntWritable age; @Override public void readFields(DataInput in) throws IOException { name.readFields(in); age.readFields(in); } @Override public void write(DataOutput out) throws IOException { name.write(out); age.write(out); } @Override public int compareTo(MyDataType o) { int nameCompare = name.compareTo(o.name); if(nameCompare != 0) { return nameCompare; } else { return age.compareTo(o.age); } } }
public void write(DataOutput out) throws IOException { new Text(context.getSplitId()).write(out); double[] u = context.getUInitial(); new IntWritable(u.length).write(out); for (double e : u) { new DoubleWritable(e).write(out); } double[] x = context.getXInitial(); new IntWritable(x.length).write(out); for (double e : x) { new DoubleWritable(e).write(out); } double[] z = context.getZInitial(); new IntWritable(z.length).write(out); for (double e : z) { new DoubleWritable(e).write(out); } new DoubleWritable(context.getRho()).write(out); new DoubleWritable(context.getLambdaValue()).write(out); new DoubleWritable(context.getPrimalObjectiveValue()).write(out); new DoubleWritable(context.getRNorm()).write(out); new DoubleWritable(context.getSNorm()).write(out); } }