public class FlinkStreamPartitioner<T>
extends org.apache.flink.streaming.runtime.partitioner.StreamPartitioner<T>
StreamPartitioner
which wraps a ChannelComputer
.Constructor and Description |
---|
FlinkStreamPartitioner(ChannelComputer<T> channelComputer) |
Modifier and Type | Method and Description |
---|---|
org.apache.flink.streaming.runtime.partitioner.StreamPartitioner<T> |
copy() |
org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper |
getDownstreamSubtaskStateMapper() |
boolean |
isPointwise() |
static <T> org.apache.flink.streaming.api.datastream.DataStream<T> |
partition(org.apache.flink.streaming.api.datastream.DataStream<T> input,
ChannelComputer<T> channelComputer,
Integer parallelism) |
static <T> org.apache.flink.streaming.api.datastream.DataStream<T> |
rebalance(org.apache.flink.streaming.api.datastream.DataStream<T> input,
Integer parallelism) |
int |
selectChannel(org.apache.flink.runtime.plugable.SerializationDelegate<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<T>> record) |
void |
setup(int numberOfChannels) |
String |
toString() |
public FlinkStreamPartitioner(ChannelComputer<T> channelComputer)
public void setup(int numberOfChannels)
setup
in interface org.apache.flink.runtime.io.network.api.writer.ChannelSelector<org.apache.flink.runtime.plugable.SerializationDelegate<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<T>>>
setup
in class org.apache.flink.streaming.runtime.partitioner.StreamPartitioner<T>
public int selectChannel(org.apache.flink.runtime.plugable.SerializationDelegate<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<T>> record)
public org.apache.flink.streaming.runtime.partitioner.StreamPartitioner<T> copy()
copy
in class org.apache.flink.streaming.runtime.partitioner.StreamPartitioner<T>
public org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper getDownstreamSubtaskStateMapper()
getDownstreamSubtaskStateMapper
in class org.apache.flink.streaming.runtime.partitioner.StreamPartitioner<T>
public boolean isPointwise()
isPointwise
in class org.apache.flink.streaming.runtime.partitioner.StreamPartitioner<T>
public static <T> org.apache.flink.streaming.api.datastream.DataStream<T> partition(org.apache.flink.streaming.api.datastream.DataStream<T> input, ChannelComputer<T> channelComputer, Integer parallelism)
public static <T> org.apache.flink.streaming.api.datastream.DataStream<T> rebalance(org.apache.flink.streaming.api.datastream.DataStream<T> input, Integer parallelism)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.