@Override public void serialize( FlinkKafkaProducer.KafkaTransactionState record, DataOutputView target) throws IOException { if (record.transactionalId == null) { target.writeBoolean(false); } else { target.writeBoolean(true); target.writeUTF(record.transactionalId); } target.writeLong(record.producerId); target.writeShort(record.epoch); }
public static void writeVariableIntBytes( int value, DataOutputView keySerializationDateDataOutputView) throws IOException { do { keySerializationDateDataOutputView.writeByte(value); value >>>= 8; } while (value != 0); }
@Override public void write(DataOutputView out) throws IOException { out.writeInt(position); for (int i = 0; i < position; i++) { out.writeShort(data[i]); } }
@Override public void serialize(boolean[] record, DataOutputView target) throws IOException { if (record == null) { throw new IllegalArgumentException("The record must not be null."); } final int len = record.length; target.writeInt(len); for (int i = 0; i < len; i++) { target.writeBoolean(record[i]); } }
@Override public void write(DataOutputView out) throws IOException { out.writeUTF(this.prefix); this.backingConfig.write(out); }
@Override public void serialize(T record, DataOutputView target) throws IOException { if (record == null) { target.writeBoolean(true); target.write(padding); } else { target.writeBoolean(false); originalSerializer.serialize(record, target); } }
@Override public void serialize(Boolean record, DataOutputView target) throws IOException { target.writeBoolean(record); }
@Override public void write(DataOutputView out) throws IOException { out.writeShort(this.value); }
@Override public void write(DataOutputView out) throws IOException { out.writeDouble(diff); out.writeDouble(rank); out.writeDouble(danglingRank); out.writeLong(numDanglingVertices); out.writeLong(numVertices); out.writeLong(edges); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); // write the compression format used to write each key-group out.writeBoolean(usingKeyGroupCompression); TypeSerializerSnapshotSerializationUtil.writeSerializerSnapshot(out, keySerializerConfigSnapshot, keySerializer); // write individual registered keyed state metainfos out.writeShort(stateMetaInfoSnapshots.size()); for (StateMetaInfoSnapshot metaInfoSnapshot : stateMetaInfoSnapshots) { StateMetaInfoSnapshotReadersWriters.getWriter().writeStateMetaInfoSnapshot(metaInfoSnapshot, out); } }
@Override public void serialize(short[] record, DataOutputView target) throws IOException { if (record == null) { throw new IllegalArgumentException("The record must not be null."); } final int len = record.length; target.writeInt(len); for (int i = 0; i < len; i++) { target.writeShort(record[i]); } }
@Override public void serialize(C[] value, DataOutputView target) throws IOException { target.writeInt(value.length); for (int i = 0; i < value.length; i++) { C val = value[i]; if (val == null) { target.writeBoolean(false); } else { target.writeBoolean(true); componentSerializer.serialize(val, target); } } }