本文整理汇总了Java中org.apache.flink.api.common.ExecutionConfig.SerializableSerializer方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionConfig.SerializableSerializer方法的具体用法?Java ExecutionConfig.SerializableSerializer怎么用?Java ExecutionConfig.SerializableSerializer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.flink.api.common.ExecutionConfig
的用法示例。
在下文中一共展示了ExecutionConfig.SerializableSerializer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildKryoRegistrations
import org.apache.flink.api.common.ExecutionConfig; //导入方法依赖的package包/类
/**
* 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()));
}
// add Avro support if flink-avro is available; a dummy otherwise
AvroUtils.getAvroUtils().addAvroGenericDataArrayRegistration(kryoRegistrations);
return kryoRegistrations;
}
示例2: KryoRegistration
import org.apache.flink.api.common.ExecutionConfig; //导入方法依赖的package包/类
public KryoRegistration(
Class<?> registeredClass,
ExecutionConfig.SerializableSerializer<? extends Serializer<?>> serializableSerializerInstance) {
this.registeredClass = Preconditions.checkNotNull(registeredClass);
this.serializerClass = null;
this.serializableSerializerInstance = Preconditions.checkNotNull(serializableSerializerInstance);
this.serializerDefinitionType = SerializerDefinitionType.INSTANCE;
}
示例3: getSerializableSerializerInstance
import org.apache.flink.api.common.ExecutionConfig; //导入方法依赖的package包/类
@Nullable
public ExecutionConfig.SerializableSerializer<? extends Serializer<?>> getSerializableSerializerInstance() {
return serializableSerializerInstance;
}