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

The following examples show how to use org.apache.flink.api.java.typeutils.runtime.kryo.KryoPojosForMigrationTests.DogKryoSerializer. These examples are extracted from open source projects. 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 Project: Flink-CEPplus   Source File: KryoSerializerSnapshotTest.java    License: 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 Project: Flink-CEPplus   Source File: KryoSerializerSnapshotTest.java    License: 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 Project: flink   Source File: KryoSerializerSnapshotTest.java    License: 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 Project: flink   Source File: KryoSerializerSnapshotTest.java    License: 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 Project: flink   Source File: KryoSerializerSnapshotTest.java    License: 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 Project: flink   Source File: KryoSerializerSnapshotTest.java    License: 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());
}