@Override public void read(DataInputView in) throws IOException { this.value = in.readShort(); }
@Override public Short deserialize(DataInputView source) throws IOException { return source.readShort(); }
@Override public short[] deserialize(DataInputView source) throws IOException { final int len = source.readInt(); short[] array = new short[len]; for (int i = 0; i < len; i++) { array[i] = source.readShort(); } return array; }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeShort(source.readShort()); }
@Override public void read(DataInputView in) throws IOException { this.value = in.readShort(); }
@Override public void copy(DataInputView source, DataOutputView target) throws IOException { target.writeShort(source.readShort()); }
@Override public int compareSerialized(DataInputView firstSource, DataInputView secondSource) throws IOException { int firstCount = firstSource.readInt(); int secondCount = secondSource.readInt(); int minCount = Math.min(firstCount, secondCount); while (minCount-- > 0) { short firstValue = firstSource.readShort(); short secondValue = secondSource.readShort(); int cmp = Short.compare(firstValue, secondValue); if (cmp != 0) { return ascendingComparison ? cmp : -cmp; } } int cmp = Integer.compare(firstCount, secondCount); return ascendingComparison ? cmp : -cmp; }
@Override public void read(DataInputView in) throws IOException { position = in.readInt(); mark = 0; ensureCapacity(position); for (int i = 0; i < position; i++) { data[i] = in.readShort(); } }
@Override public FlinkKafkaProducer.KafkaTransactionState deserialize(DataInputView source) throws IOException { String transactionalId = null; if (source.readBoolean()) { transactionalId = source.readUTF(); } long producerId = source.readLong(); short epoch = source.readShort(); return new FlinkKafkaProducer.KafkaTransactionState(transactionalId, producerId, epoch, null); }
@Override public KafkaTransactionState deserialize(DataInputView source) throws IOException { String transactionalId = null; if (source.readBoolean()) { transactionalId = source.readUTF(); } long producerId = source.readLong(); short epoch = source.readShort(); return new KafkaTransactionState(transactionalId, producerId, epoch, null); }
@Override public void copy( DataInputView source, DataOutputView target) throws IOException { boolean hasTransactionalId = source.readBoolean(); target.writeBoolean(hasTransactionalId); if (hasTransactionalId) { target.writeUTF(source.readUTF()); } target.writeLong(source.readLong()); target.writeShort(source.readShort()); }
@Override public void copy( DataInputView source, DataOutputView target) throws IOException { boolean hasTransactionalId = source.readBoolean(); target.writeBoolean(hasTransactionalId); if (hasTransactionalId) { target.writeUTF(source.readUTF()); } target.writeLong(source.readLong()); target.writeShort(source.readShort()); }
@Override public short[] deserialize(DataInputView source) throws IOException { final int len = source.readInt(); short[] array = new short[len]; for (int i = 0; i < len; i++) { array[i] = source.readShort(); } return array; }
@Override public short[] deserialize(DataInputView source) throws IOException { final int len = source.readInt(); short[] array = new short[len]; for (int i = 0; i < len; i++) { array[i] = source.readShort(); } return array; }
@Override public void read(DataInputView in) throws IOException { super.read(in); int numKvStates = in.readShort(); stateMetaInfoSnapshots = new ArrayList<>(numKvStates); for (int i = 0; i < numKvStates; i++) { stateMetaInfoSnapshots.add( OperatorBackendStateMetaInfoSnapshotReaderWriters .getReaderForVersion(getReadVersion(), userCodeClassLoader) .readStateMetaInfo(in)); } }
@Override public KafkaTransactionState deserialize(DataInputView source) throws IOException { String transactionalId = null; if (source.readBoolean()) { transactionalId = source.readUTF(); } long producerId = source.readLong(); short epoch = source.readShort(); return new KafkaTransactionState(transactionalId, producerId, epoch, null); }
@Override public void copy( DataInputView source, DataOutputView target) throws IOException { boolean hasTransactionalId = source.readBoolean(); target.writeBoolean(hasTransactionalId); if (hasTransactionalId) { target.writeUTF(source.readUTF()); } target.writeLong(source.readLong()); target.writeShort(source.readShort()); }