本文整理匯總了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);
}