@Override public void write(DataOutput out) throws IOException { final byte[] segmentsBytes = HadoopDruidIndexerConfig.JSON_MAPPER.writeValueAsBytes(segments); out.writeInt(segmentsBytes.length); out.write(segmentsBytes); out.writeInt(locations.length); for (String location : locations) { out.writeUTF(location); } }
@Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(SUCCESS); output.writeByte(type); Marshaller marshaller = prepareForMarshalling(output); marshaller.writeObject(response); marshaller.finish(); } });
protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut) throws IOException { dataOut.writeBoolean(data != null); if (data != null) { dataOut.writeInt(data.length); dataOut.write(data); } }
out.writeInt(size); if (pool[j].equals(nameKey)) { if (poolSize < 256) { out.writeByte(j); } else { out.writeShort(j); out.writeBoolean(iTailZone != null); if (iTailZone != null) { iTailZone.writeTo(out);
protected void tightMarshalByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs) throws IOException { if (bs.readBoolean()) { dataOut.writeInt(data.length); dataOut.write(data); } }
@Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(SUCCESS); output.writeByte(BOOLEAN); output.writeBoolean(response); } });
@Override public void toDelta(DataOutput out) throws IOException { // Write whether to apply the changes to another DS if necessary out.writeBoolean(this.applyRemotely); // Write the events DataSerializer.writeArrayList((ArrayList) this.eventQueue, out); out.writeLong(this.lastAccessedTime); out.writeInt(this.maxInactiveInterval); }
@Override public void toData(DataOutput out) throws IOException { super.toData(out); out.writeByte(this.responseCode); out.writeUTF(this.serviceName); DataSerializer.writeObject(this.objectName, out); out.writeLong(this.leaseExpireTime); DataSerializer.writeObject(this.keyIfFailed, out); out.writeInt(this.lockId); out.writeInt(this.dlsSerialNumber); }
@Override public void write(DataOutput dataOutput) throws IOException { dataOutput.writeLong(timestamp); dataOutput.writeInt(partition); dataOutput.writeLong(offset); dataOutput.writeInt(value.length); dataOutput.write(value); if (recordKey != null) { dataOutput.writeInt(recordKey.length); dataOutput.write(recordKey); } else { dataOutput.writeInt(-1); } }
@Override public void write(DataOutput output) throws IOException { output.writeByte(inResponseTo ^ RESPONSE_MASK); output.writeInt(correlationId); output.writeByte(FAILURE); output.writeByte(EXCEPTION); Marshaller marshaller = prepareForMarshalling(output); marshaller.writeObject(e); marshaller.finish(); } });
protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut) throws IOException { dataOut.writeBoolean(data != null); if (data != null) { dataOut.writeInt(data.length); dataOut.write(data); } }
out.writeInt(size); if (pool[j].equals(nameKey)) { if (poolSize < 256) { out.writeByte(j); } else { out.writeShort(j); out.writeBoolean(iTailZone != null); if (iTailZone != null) { iTailZone.writeTo(out);