org.apache.flink.api.java.typeutils.runtime.kryo.KryoPojosForMigrationTests.DogKryoSerializer Java Examples

The following examples show how to use org.apache.flink.api.java.typeutils.runtime.kryo.KryoPojosForMigrationTests.DogKryoSerializer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KryoSerializerSnapshotTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Test
public void addingTypesIsCompatibleAfterReconfiguration() {
	oldConfig.registerKryoType(Animal.class);

	newConfig.registerKryoType(Animal.class);
	newConfig.registerTypeWithKryoSerializer(Dog.class, DogKryoSerializer.class);

	assertThat(resolveKryoCompatibility(oldConfig, newConfig),
		isCompatibleWithReconfiguredSerializer());
}
 
Example #2
Source File: KryoSerializerSnapshotTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Test
public void replacingKryoSerializersIsCompatibleAsIs() {
	oldConfig.registerKryoType(Animal.class);
	oldConfig.registerTypeWithKryoSerializer(Dog.class, DogKryoSerializer.class);

	newConfig.registerKryoType(Animal.class);
	newConfig.registerTypeWithKryoSerializer(Dog.class, DogV2KryoSerializer.class);

	// it is compatible as is, since Kryo does not expose compatibility API with KryoSerializers
	// so we can not know if DogKryoSerializer is compatible with DogV2KryoSerializer
	assertThat(resolveKryoCompatibility(oldConfig, newConfig),
		isCompatibleAsIs());
}
 
Example #3
Source File: KryoSerializerSnapshotTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test
public void addingTypesIsCompatibleAfterReconfiguration() {
	oldConfig.registerKryoType(Animal.class);

	newConfig.registerKryoType(Animal.class);
	newConfig.registerTypeWithKryoSerializer(Dog.class, DogKryoSerializer.class);

	assertThat(resolveKryoCompatibility(oldConfig, newConfig),
		isCompatibleWithReconfiguredSerializer());
}
 
Example #4
Source File: KryoSerializerSnapshotTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test
public void replacingKryoSerializersIsCompatibleAsIs() {
	oldConfig.registerKryoType(Animal.class);
	oldConfig.registerTypeWithKryoSerializer(Dog.class, DogKryoSerializer.class);

	newConfig.registerKryoType(Animal.class);
	newConfig.registerTypeWithKryoSerializer(Dog.class, DogV2KryoSerializer.class);

	// it is compatible as is, since Kryo does not expose compatibility API with KryoSerializers
	// so we can not know if DogKryoSerializer is compatible with DogV2KryoSerializer
	assertThat(resolveKryoCompatibility(oldConfig, newConfig),
		isCompatibleAsIs());
}
 
Example #5
Source File: KryoSerializerSnapshotTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test
public void addingTypesIsCompatibleAfterReconfiguration() {
	oldConfig.registerKryoType(Animal.class);

	newConfig.registerKryoType(Animal.class);
	newConfig.registerTypeWithKryoSerializer(Dog.class, DogKryoSerializer.class);

	assertThat(resolveKryoCompatibility(oldConfig, newConfig),
		isCompatibleWithReconfiguredSerializer());
}
 
Example #6
Source File: KryoSerializerSnapshotTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Test
public void replacingKryoSerializersIsCompatibleAsIs() {
	oldConfig.registerKryoType(Animal.class);
	oldConfig.registerTypeWithKryoSerializer(Dog.class, DogKryoSerializer.class);

	newConfig.registerKryoType(Animal.class);
	newConfig.registerTypeWithKryoSerializer(Dog.class, DogV2KryoSerializer.class);

	// it is compatible as is, since Kryo does not expose compatibility API with KryoSerializers
	// so we can not know if DogKryoSerializer is compatible with DogV2KryoSerializer
	assertThat(resolveKryoCompatibility(oldConfig, newConfig),
		isCompatibleAsIs());
}