flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializer.java
/**
	 * Utility method that takes lists of registered types and their serializers, and resolve
	 * them into a single list such that the result will resemble the final registration
	 * result in Kryo.
	 */
Utility method that takes lists of registered types and their serializers, and resolve
them into a single list such that the result will resemble the final registration
result in Kryo.
Utility method that takes lists of registered types and their serializers and resolve them into a single list such that the result will resemble the final registration result in Kryo .
private static LinkedHashMap<String, KryoRegistration> buildKryoRegistrations(
			Class<?> serializedType,
			LinkedHashSet<Class<?>> registeredTypes,
			LinkedHashMap<Class<?>, Class<? extends Serializer<?>>> registeredTypesWithSerializerClasses,
			LinkedHashMap<Class<?>, ExecutionConfig.SerializableSerializer<?>> registeredTypesWithSerializers) {
		final LinkedHashMap<String, KryoRegistration> kryoRegistrations = new LinkedHashMap<>();
		kryoRegistrations.put(serializedType.getName(), new KryoRegistration(serializedType));
		for (Class<?> registeredType : checkNotNull(registeredTypes)) {
			kryoRegistrations.put(registeredType.getName(), new KryoRegistration(registeredType));
		}
		for (Map.Entry<Class<?>, Class<? extends Serializer<?>>> registeredTypeWithSerializerClassEntry :
				checkNotNull(registeredTypesWithSerializerClasses).entrySet()) {
			kryoRegistrations.put(
					registeredTypeWithSerializerClassEntry.getKey().getName(),
					new KryoRegistration(
							registeredTypeWithSerializerClassEntry.getKey(),
							registeredTypeWithSerializerClassEntry.getValue()));
		}
		for (Map.Entry<Class<?>, ExecutionConfig.SerializableSerializer<?>> registeredTypeWithSerializerEntry :
				checkNotNull(registeredTypesWithSerializers).entrySet()) {
			kryoRegistrations.put(
					registeredTypeWithSerializerEntry.getKey().getName(),
					new KryoRegistration(
							registeredTypeWithSerializerEntry.getKey(),
							registeredTypeWithSerializerEntry.getValue()));
		}
		AvroUtils.getAvroUtils().addAvroGenericDataArrayRegistration(kryoRegistrations);
		return kryoRegistrations;
	}
private static LinkedHashMap < String , KryoRegistration > buildKryoRegistrations ( Class < ? > serializedType , LinkedHashSet < Class < ? > > registeredTypes , LinkedHashMap < Class < ? > , Class < ? extends Serializer < ? > > > registeredTypesWithSerializerClasses , LinkedHashMap < Class < ? > , ExecutionConfig . SerializableSerializer < ? > > registeredTypesWithSerializers ) { final LinkedHashMap < String , KryoRegistration > kryoRegistrations = new LinkedHashMap < > ( ) ; kryoRegistrations . put ( serializedType . getName ( ) , new KryoRegistration ( serializedType ) ) ; for ( Class < ? > registeredType : checkNotNull ( registeredTypes ) ) { kryoRegistrations . put ( registeredType . getName ( ) , new KryoRegistration ( registeredType ) ) ; } for ( Map . Entry < Class < ? > , Class < ? extends Serializer < ? > > > registeredTypeWithSerializerClassEntry : checkNotNull ( registeredTypesWithSerializerClasses ) . entrySet ( ) ) { kryoRegistrations . put ( registeredTypeWithSerializerClassEntry . getKey ( ) . getName ( ) , new KryoRegistration ( registeredTypeWithSerializerClassEntry . getKey ( ) , registeredTypeWithSerializerClassEntry . getValue ( ) ) ) ; } for ( Map . Entry < Class < ? > , ExecutionConfig . SerializableSerializer < ? > > registeredTypeWithSerializerEntry : checkNotNull ( registeredTypesWithSerializers ) . entrySet ( ) ) { kryoRegistrations . put ( registeredTypeWithSerializerEntry . getKey ( ) . getName ( ) , new KryoRegistration ( registeredTypeWithSerializerEntry . getKey ( ) , registeredTypeWithSerializerEntry . getValue ( ) ) ) ; } AvroUtils . getAvroUtils ( ) . addAvroGenericDataArrayRegistration ( kryoRegistrations ) ; return kryoRegistrations ; }
Utility method that takes lists of registered types and their serializers, and resolve
 them into a single list such that the result will resemble the final registration
 result in Kryo.
Utility method that takes lists of registered types and their serializers and resolve them into a single list such that the result will resemble the final registration result in Kryo .
// add Avro support if flink-avro is available; a dummy otherwise