org.apache.flink.streaming.runtime.partitioner.KeyGroupStreamPartitioner Java Examples
The following examples show how to use
org.apache.flink.streaming.runtime.partitioner.KeyGroupStreamPartitioner.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KeyedStream.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
/** * Creates a new {@link KeyedStream} using the given {@link KeySelector} * to partition operator state by key. * * @param dataStream * Base stream of data * @param keySelector * Function for determining state partitions */ public KeyedStream(DataStream<T> dataStream, KeySelector<T, KEY> keySelector, TypeInformation<KEY> keyType) { this( dataStream, new PartitionTransformation<>( dataStream.getTransformation(), new KeyGroupStreamPartitioner<>(keySelector, StreamGraphGenerator.DEFAULT_LOWER_BOUND_MAX_PARALLELISM)), keySelector, keyType); }
Example #2
Source File: DataStreamTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
private static boolean isPartitioned(List<StreamEdge> edges) { boolean result = true; for (StreamEdge edge: edges) { if (!(edge.getPartitioner() instanceof KeyGroupStreamPartitioner)) { result = false; } } return result; }
Example #3
Source File: KeyedStream.java From flink with Apache License 2.0 | 5 votes |
/** * Creates a new {@link KeyedStream} using the given {@link KeySelector} * to partition operator state by key. * * @param dataStream * Base stream of data * @param keySelector * Function for determining state partitions */ public KeyedStream(DataStream<T> dataStream, KeySelector<T, KEY> keySelector, TypeInformation<KEY> keyType) { this( dataStream, new PartitionTransformation<>( dataStream.getTransformation(), new KeyGroupStreamPartitioner<>(keySelector, StreamGraphGenerator.DEFAULT_LOWER_BOUND_MAX_PARALLELISM)), keySelector, keyType); }
Example #4
Source File: DataStreamTest.java From flink with Apache License 2.0 | 5 votes |
private static boolean isPartitioned(List<StreamEdge> edges) { boolean result = true; for (StreamEdge edge: edges) { if (!(edge.getPartitioner() instanceof KeyGroupStreamPartitioner)) { result = false; } } return result; }
Example #5
Source File: KeyedStream.java From flink with Apache License 2.0 | 5 votes |
/** * Creates a new {@link KeyedStream} using the given {@link KeySelector} * to partition operator state by key. * * @param dataStream * Base stream of data * @param keySelector * Function for determining state partitions */ public KeyedStream(DataStream<T> dataStream, KeySelector<T, KEY> keySelector, TypeInformation<KEY> keyType) { this( dataStream, new PartitionTransformation<>( dataStream.getTransformation(), new KeyGroupStreamPartitioner<>(keySelector, StreamGraphGenerator.DEFAULT_LOWER_BOUND_MAX_PARALLELISM)), keySelector, keyType); }
Example #6
Source File: DataStreamTest.java From flink with Apache License 2.0 | 5 votes |
private static boolean isPartitioned(List<StreamEdge> edges) { boolean result = true; for (StreamEdge edge: edges) { if (!(edge.getPartitioner() instanceof KeyGroupStreamPartitioner)) { result = false; } } return result; }