本文整理汇总了Java中io.pravega.connectors.flink.PravegaEventRouter类的典型用法代码示例。如果您正苦于以下问题:Java PravegaEventRouter类的具体用法?Java PravegaEventRouter怎么用?Java PravegaEventRouter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PravegaEventRouter类属于io.pravega.connectors.flink包,在下文中一共展示了PravegaEventRouter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newExactlyOnceWriter
import io.pravega.connectors.flink.PravegaEventRouter; //导入依赖的package包/类
public <T extends Serializable> FlinkPravegaWriter<T> newExactlyOnceWriter(final StreamId stream,
final SerializationSchema<T> serializationSchema,
final PravegaEventRouter<T> router) {
FlinkPravegaWriter writer = new FlinkPravegaWriter<T>(getControllerUri(), stream.getScope(), stream.getName(), serializationSchema, router);
writer.setPravegaWriterMode(PravegaWriterMode.EXACTLY_ONCE);
return writer;
}
示例2: newWriter
import io.pravega.connectors.flink.PravegaEventRouter; //导入依赖的package包/类
/**
* Constructs a new writer using stream/scope name from job parameters.
*
* @param stream Stream to read from.
* @param serializationSchema The implementation for serializing every event into pravega's storage format.
* @param router The implementation to extract the partition key from the event.
* @param <T> Type for events on this stream.
*/
public <T extends Serializable> FlinkPravegaWriter<T> newWriter(final StreamId stream,
final SerializationSchema<T> serializationSchema,
final PravegaEventRouter<T> router) {
return new FlinkPravegaWriter<>(getControllerUri(), stream.getScope(), stream.getName(),
serializationSchema, router);
}
示例3: PravegaEventRouterKeySelector
import io.pravega.connectors.flink.PravegaEventRouter; //导入依赖的package包/类
/**
* Creates a new key selector.
*
* @param eventRouter the event router to use.
*/
public PravegaEventRouterKeySelector(PravegaEventRouter<T> eventRouter) {
this.eventRouter = Preconditions.checkNotNull(eventRouter);
}