@Override public void write(DataOutputView out) throws IOException { super.write(out); TypeSerializerSerializationUtil.writeSerializersAndConfigsWithResilience(out, nestedSerializersAndConfigs); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); out.writeUTF(serializationFormatIdentifier); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); // write only the classname to avoid Java serialization out.writeUTF(typeClass.getName()); }
@Override public final void writeSnapshot(DataOutputView out) throws IOException { checkState(serializer != null, "the prior serializer has not been set on this"); // write the snapshot for a non-updated serializer. // this mimics the previous behavior where the TypeSerializer was // Java-serialized, for backwards compatibility TypeSerializerSerializationUtil.writeSerializer(out, serializer); // now delegate to the snapshots own writing code write(out); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); out.writeInt(val); out.writeUTF(msg); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); out.writeUTF(serializationFormatIdentifier); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); // write only the classname to avoid Java serialization out.writeUTF(typeClass.getName()); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); TypeSerializerSerializationUtil.writeSerializersAndConfigsWithResilience(out, nestedSerializersAndConfigs); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); out.writeUTF(schemaString); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); out.writeUTF(coderName); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); // write only the classname to avoid Java serialization out.writeUTF(typeClass.getName()); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); out.writeUTF(serializationFormatIdentifier); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); TypeSerializerSerializationUtil.writeSerializersAndConfigsWithResilience(out, nestedSerializersAndConfigs); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); out.writeUTF(coderName); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); out.writeUTF(coderName); }
@Override public void write(DataOutputView out) throws IOException { super.write(out); // config snapshot class, so that we can re-instantiate the // correct type of config snapshot instance when deserializing out.writeUTF(serializerConfigSnapshot.getClass().getName()); // the actual configuration parameters serializerConfigSnapshot.write(out); }
@Override public final void writeSnapshot(DataOutputView out) throws IOException { checkState(serializer != null, "the prior serializer has not been set on this"); // write the snapshot for a non-updated serializer. // this mimics the previous behavior where the TypeSerializer was // Java-serialized, for backwards compatibility TypeSerializerSerializationUtil.writeSerializer(out, serializer); // now delegate to the snapshots own writing code write(out); }
private void testWriteAndReadConfigSnapshot(Coder<String> coder) throws IOException { CoderTypeSerializer<String> serializer = new CoderTypeSerializer<>(coder); TypeSerializerConfigSnapshot writtenSnapshot = serializer.snapshotConfiguration(); ComparatorTestBase.TestOutputView outView = new ComparatorTestBase.TestOutputView(); writtenSnapshot.write(outView); TypeSerializerConfigSnapshot readSnapshot = new CoderTypeSerializerConfigSnapshot<>(); readSnapshot.read(outView.getInputView()); assertThat(readSnapshot, is(writtenSnapshot)); } }
private void testWriteAndReadConfigSnapshot(Coder<String> coder) throws IOException { CoderTypeSerializer<String> serializer = new CoderTypeSerializer<>(coder); TypeSerializerConfigSnapshot writtenSnapshot = serializer.snapshotConfiguration(); ComparatorTestBase.TestOutputView outView = new ComparatorTestBase.TestOutputView(); writtenSnapshot.write(outView); TypeSerializerConfigSnapshot readSnapshot = new CoderTypeSerializerConfigSnapshot<>(); readSnapshot.read(outView.getInputView()); assertThat(readSnapshot, is(writtenSnapshot)); } }
private void testWriteAndReadConfigSnapshot(Coder<String> coder) throws IOException { CoderTypeSerializer<String> serializer = new CoderTypeSerializer<>(coder); TypeSerializerConfigSnapshot writtenSnapshot = serializer.snapshotConfiguration(); ComparatorTestBase.TestOutputView outView = new ComparatorTestBase.TestOutputView(); writtenSnapshot.write(outView); TypeSerializerConfigSnapshot readSnapshot = new CoderTypeSerializerConfigSnapshot<>(); readSnapshot.read(outView.getInputView()); assertThat(readSnapshot, is(writtenSnapshot)); } }