Modifier and Type | Method and Description |
---|---|
KeySelector<T,K> |
Keys.SelectorFunctionKeys.getKeyExtractor() |
Constructor and Description |
---|
SelectorFunctionKeys(KeySelector<T,K> keyExtractor,
TypeInformation<T> inputType,
TypeInformation<K> keyType) |
Modifier and Type | Method and Description |
---|---|
<K> DistinctOperator<T> |
DataSet.distinct(KeySelector<T,K> keyExtractor)
Returns a distinct set of a
DataSet using a KeySelector function. |
<K> UnsortedGrouping<T> |
DataSet.groupBy(KeySelector<T,K> keyExtractor)
Groups a
DataSet using a KeySelector function. |
<K extends Comparable<K>> |
DataSet.partitionByHash(KeySelector<T,K> keyExtractor)
Partitions a DataSet using the specified KeySelector.
|
<K extends Comparable<K>> |
DataSet.partitionByRange(KeySelector<T,K> keyExtractor)
Range-partitions a DataSet using the specified KeySelector.
|
<K extends Comparable<K>> |
DataSet.partitionCustom(Partitioner<K> partitioner,
KeySelector<T,K> keyExtractor)
Partitions a DataSet on the key returned by the selector, using a custom partitioner.
|
<K> SortPartitionOperator<T> |
DataSet.sortPartition(KeySelector<T,K> keyExtractor,
Order order)
Locally sorts the partitions of the DataSet on the extracted key in the specified order.
|
Modifier and Type | Class and Description |
---|---|
class |
NullByteKeySelector<T>
Used as a dummy
KeySelector to allow using keyed operators for non-keyed use cases. |
Modifier and Type | Method and Description |
---|---|
<K> CoGroupOperator.CoGroupOperatorSets.CoGroupOperatorSetsPredicate.CoGroupOperatorWithoutFunction |
CoGroupOperator.CoGroupOperatorSets.CoGroupOperatorSetsPredicate.equalTo(KeySelector<I2,K> keyExtractor)
Continues a CoGroup transformation and defines a
KeySelector function for the
second co-grouped DataSet . |
<K> JoinOperator.DefaultJoin<I1,I2> |
JoinOperator.JoinOperatorSets.JoinOperatorSetsPredicate.equalTo(KeySelector<I2,K> keySelector)
Continues a Join transformation and defines a
KeySelector function for the
second join DataSet . |
<K> SortedGrouping<T> |
UnsortedGrouping.sortGroup(KeySelector<T,K> keySelector,
Order order)
Sorts elements within a group on a key extracted by the specified
KeySelector in the specified Order . |
<K> SortPartitionOperator<T> |
SortPartitionOperator.sortPartition(KeySelector<T,K> keyExtractor,
Order order) |
<K> CoGroupOperator.CoGroupOperatorSets.CoGroupOperatorSetsPredicate |
CoGroupOperator.CoGroupOperatorSets.where(KeySelector<I1,K> keyExtractor)
Continues a CoGroup transformation and defines a
KeySelector function for the
first co-grouped DataSet . |
<K> JoinOperator.JoinOperatorSets.JoinOperatorSetsPredicate |
JoinOperator.JoinOperatorSets.where(KeySelector<I1,K> keySelector)
Continues a Join transformation and defines a
KeySelector function for the first join
DataSet . |
Modifier and Type | Method and Description |
---|---|
<K> JoinFunctionAssigner<I1,I2> |
JoinOperatorSetsBase.JoinOperatorSetsPredicateBase.equalTo(KeySelector<I2,K> keySelector)
Continues a Join transformation and defines a
KeySelector function for the second
join DataSet . |
<K> JoinOperatorSetsBase.JoinOperatorSetsPredicateBase |
JoinOperatorSetsBase.where(KeySelector<I1,K> keySelector)
Continues a Join transformation and defines a
KeySelector function for the first join
DataSet . |
Constructor and Description |
---|
KeyExtractingMapper(KeySelector<T,K> keySelector) |
TwoKeyExtractingMapper(KeySelector<T,K1> keySelector1,
KeySelector<T,K2> keySelector2) |
TwoKeyExtractingMapper(KeySelector<T,K1> keySelector1,
KeySelector<T,K2> keySelector2) |
Modifier and Type | Method and Description |
---|---|
static <IN,OUT> TypeInformation<OUT> |
TypeExtractor.getKeySelectorTypes(KeySelector<IN,OUT> selectorInterface,
TypeInformation<IN> inType) |
static <IN,OUT> TypeInformation<OUT> |
TypeExtractor.getKeySelectorTypes(KeySelector<IN,OUT> selectorInterface,
TypeInformation<IN> inType,
String functionName,
boolean allowMissing) |
Modifier and Type | Method and Description |
---|---|
static <T,K extends Comparable<K>> |
DataSetUtils.partitionByRange(DataSet<T> input,
DataDistribution distribution,
KeySelector<T,K> keyExtractor)
Range-partitions a DataSet using the specified key selector function.
|
Modifier and Type | Method and Description |
---|---|
<K> KeyedOperatorTransformation<K,T> |
OneInputOperatorTransformation.keyBy(KeySelector<T,K> keySelector)
It creates a new
KeyedOperatorTransformation that uses the provided key for
partitioning its operator states. |
<K> KeyedOperatorTransformation<K,T> |
OneInputOperatorTransformation.keyBy(KeySelector<T,K> keySelector,
TypeInformation<K> keyType)
It creates a new
KeyedOperatorTransformation that uses the provided key with explicit
type information for partitioning its operator states. |
Modifier and Type | Class and Description |
---|---|
class |
HashSelector<IN>
A wrapper around a
KeySelector that returns the Object.hashCode() of the returned
key. |
Constructor and Description |
---|
HashSelector(KeySelector<IN,?> keySelector) |
Modifier and Type | Method and Description |
---|---|
KeySelector<T,KEY> |
KeyedStream.getKeySelector()
Gets the key selector that can get the key by which the stream if partitioned from the
elements.
|
Modifier and Type | Method and Description |
---|---|
CoGroupedStreams.Where.EqualTo |
CoGroupedStreams.Where.equalTo(KeySelector<T2,KEY> keySelector)
Specifies a
KeySelector for elements from the second input. |
JoinedStreams.Where.EqualTo |
JoinedStreams.Where.equalTo(KeySelector<T2,KEY> keySelector)
Specifies a
KeySelector for elements from the second input. |
CoGroupedStreams.Where.EqualTo |
CoGroupedStreams.Where.equalTo(KeySelector<T2,KEY> keySelector,
TypeInformation<KEY> keyType)
Specifies a
KeySelector for elements from the second input with explicit type
information for the key type. |
JoinedStreams.Where.EqualTo |
JoinedStreams.Where.equalTo(KeySelector<T2,KEY> keySelector,
TypeInformation<KEY> keyType)
Specifies a
KeySelector for elements from the second input with explicit type
information for the key type. |
<KEY> ConnectedStreams<I,F> |
IterativeStream.ConnectedIterativeStreams.keyBy(KeySelector<I,KEY> keySelector1,
KeySelector<F,KEY> keySelector2) |
<KEY> ConnectedStreams<I,F> |
IterativeStream.ConnectedIterativeStreams.keyBy(KeySelector<I,KEY> keySelector1,
KeySelector<F,KEY> keySelector2) |
<KEY> ConnectedStreams<I,F> |
IterativeStream.ConnectedIterativeStreams.keyBy(KeySelector<I,KEY> keySelector1,
KeySelector<F,KEY> keySelector2,
TypeInformation<KEY> keyType) |
<KEY> ConnectedStreams<I,F> |
IterativeStream.ConnectedIterativeStreams.keyBy(KeySelector<I,KEY> keySelector1,
KeySelector<F,KEY> keySelector2,
TypeInformation<KEY> keyType) |
<KEY> ConnectedStreams<IN1,IN2> |
ConnectedStreams.keyBy(KeySelector<IN1,KEY> keySelector1,
KeySelector<IN2,KEY> keySelector2)
KeyBy operation for connected data stream.
|
<KEY> ConnectedStreams<IN1,IN2> |
ConnectedStreams.keyBy(KeySelector<IN1,KEY> keySelector1,
KeySelector<IN2,KEY> keySelector2)
KeyBy operation for connected data stream.
|
<KEY> ConnectedStreams<IN1,IN2> |
ConnectedStreams.keyBy(KeySelector<IN1,KEY> keySelector1,
KeySelector<IN2,KEY> keySelector2,
TypeInformation<KEY> keyType)
KeyBy operation for connected data stream.
|
<KEY> ConnectedStreams<IN1,IN2> |
ConnectedStreams.keyBy(KeySelector<IN1,KEY> keySelector1,
KeySelector<IN2,KEY> keySelector2,
TypeInformation<KEY> keyType)
KeyBy operation for connected data stream.
|
<K> KeyedStream<T,K> |
DataStream.keyBy(KeySelector<T,K> key)
It creates a new
KeyedStream that uses the provided key for partitioning its operator
states. |
<K> KeyedStream<T,K> |
DataStream.keyBy(KeySelector<T,K> key,
TypeInformation<K> keyType)
It creates a new
KeyedStream that uses the provided key with explicit type
information for partitioning its operator states. |
<K> DataStream<T> |
DataStream.partitionCustom(Partitioner<K> partitioner,
KeySelector<T,K> keySelector)
Partitions a DataStream on the key returned by the selector, using a custom partitioner.
|
static <T,K> KeyedStream<T,K> |
DataStreamUtils.reinterpretAsKeyedStream(DataStream<T> stream,
KeySelector<T,K> keySelector)
|
static <T,K> KeyedStream<T,K> |
DataStreamUtils.reinterpretAsKeyedStream(DataStream<T> stream,
KeySelector<T,K> keySelector,
TypeInformation<K> typeInfo)
|
<KEY> CoGroupedStreams.Where<KEY> |
CoGroupedStreams.where(KeySelector<T1,KEY> keySelector)
Specifies a
KeySelector for elements from the first input. |
<KEY> JoinedStreams.Where<KEY> |
JoinedStreams.where(KeySelector<T1,KEY> keySelector)
Specifies a
KeySelector for elements from the first input. |
<KEY> CoGroupedStreams.Where<KEY> |
CoGroupedStreams.where(KeySelector<T1,KEY> keySelector,
TypeInformation<KEY> keyType)
Specifies a
KeySelector for elements from the first input with explicit type
information. |
<KEY> JoinedStreams.Where<KEY> |
JoinedStreams.where(KeySelector<T1,KEY> keySelector,
TypeInformation<KEY> keyType)
Specifies a
KeySelector for elements from the first input with explicit type
information for the key type. |
Modifier and Type | Class and Description |
---|---|
class |
KeyByKeySelector
KeyByKeySelector is responsible for extracting the first field of the input row as key. |
class |
PartitionCustomKeySelector
The
PartitionCustomKeySelector will return the first field of the input row value. |
Modifier and Type | Method and Description |
---|---|
<IN,K extends Serializable> |
StreamConfig.getStatePartitioner(int input,
ClassLoader cl) |
KeySelector<?,?>[] |
StreamNode.getStatePartitioners() |
Modifier and Type | Method and Description |
---|---|
void |
StreamGraph.setOneInputStateKey(Integer vertexID,
KeySelector<?,?> keySelector,
TypeSerializer<?> keySerializer) |
void |
StreamConfig.setStatePartitioner(int input,
KeySelector<?,?> partitioner) |
void |
StreamNode.setStatePartitioners(KeySelector<?,?>... statePartitioners) |
void |
StreamGraph.setTwoInputStateKey(Integer vertexID,
KeySelector<?,?> keySelector1,
KeySelector<?,?> keySelector2,
TypeSerializer<?> keySerializer) |
void |
StreamGraph.setTwoInputStateKey(Integer vertexID,
KeySelector<?,?> keySelector1,
KeySelector<?,?> keySelector2,
TypeSerializer<?> keySerializer) |
Modifier and Type | Method and Description |
---|---|
void |
StreamGraph.setMultipleInputStateKey(Integer vertexID,
List<KeySelector<?,?>> keySelectors,
TypeSerializer<?> keySerializer) |
Modifier and Type | Field and Description |
---|---|
protected KeySelector<?,?> |
AbstractInput.stateKeySelector
KeySelector for extracting a key from an element being processed. |
Modifier and Type | Method and Description |
---|---|
protected <T> void |
AbstractStreamOperatorV2.internalSetKeyContextElement(StreamRecord<T> record,
KeySelector<T,?> selector) |
Modifier and Type | Method and Description |
---|---|
static <K> MultiInputSortingDataInput.SelectableSortingInputs |
MultiInputSortingDataInput.wrapInputs(AbstractInvokable containingTask,
StreamTaskInput<Object>[] sortingInputs,
KeySelector<Object,K>[] keySelectors,
TypeSerializer<Object>[] inputSerializers,
TypeSerializer<K> keySerializer,
StreamTaskInput<Object>[] passThroughInputs,
MemoryManager memoryManager,
IOManager ioManager,
boolean objectReuse,
double managedMemoryFraction,
Configuration jobConfiguration) |
Constructor and Description |
---|
SortingDataInput(StreamTaskInput<T> wrappedInput,
TypeSerializer<T> typeSerializer,
TypeSerializer<K> keySerializer,
KeySelector<T,K> keySelector,
MemoryManager memoryManager,
IOManager ioManager,
boolean objectReuse,
double managedMemoryFraction,
Configuration jobConfiguration,
AbstractInvokable containingTask) |
Modifier and Type | Method and Description |
---|---|
KeySelector<IN1,KEY> |
KeyedBroadcastStateTransformation.getKeySelector() |
KeySelector<IN,K> |
ReduceTransformation.getKeySelector() |
KeySelector<IN,?> |
OneInputTransformation.getStateKeySelector()
Returns the
KeySelector that must be used for partitioning keyed state in this
Operation. |
KeySelector<T,?> |
LegacySinkTransformation.getStateKeySelector()
Returns the
KeySelector that must be used for partitioning keyed state in this Sink. |
KeySelector<IN1,?> |
TwoInputTransformation.getStateKeySelector1()
Returns the
KeySelector that must be used for partitioning keyed state in this
Operation for the first input. |
KeySelector<IN2,?> |
TwoInputTransformation.getStateKeySelector2()
Returns the
KeySelector that must be used for partitioning keyed state in this
Operation for the second input. |
Modifier and Type | Method and Description |
---|---|
List<KeySelector<?,?>> |
KeyedMultipleInputTransformation.getStateKeySelectors() |
Modifier and Type | Method and Description |
---|---|
KeyedMultipleInputTransformation<OUT> |
KeyedMultipleInputTransformation.addInput(Transformation<?> input,
KeySelector<?,?> keySelector) |
void |
OneInputTransformation.setStateKeySelector(KeySelector<IN,?> stateKeySelector)
Sets the
KeySelector that must be used for partitioning keyed state of this
operation. |
void |
LegacySinkTransformation.setStateKeySelector(KeySelector<T,?> stateKeySelector)
Sets the
KeySelector that must be used for partitioning keyed state of this Sink. |
void |
TwoInputTransformation.setStateKeySelectors(KeySelector<IN1,?> stateKeySelector1,
KeySelector<IN2,?> stateKeySelector2)
Sets the
KeySelectors that must be used for partitioning keyed state of
this transformation. |
void |
TwoInputTransformation.setStateKeySelectors(KeySelector<IN1,?> stateKeySelector1,
KeySelector<IN2,?> stateKeySelector2)
Sets the
KeySelectors that must be used for partitioning keyed state of
this transformation. |
Constructor and Description |
---|
KeyedBroadcastStateTransformation(String name,
Transformation<IN1> inputStream,
Transformation<IN2> broadcastStream,
KeyedBroadcastProcessFunction<KEY,IN1,IN2,OUT> userFunction,
List<MapStateDescriptor<?,?>> broadcastStateDescriptors,
TypeInformation<KEY> keyType,
KeySelector<IN1,KEY> keySelector,
TypeInformation<OUT> outTypeInfo,
int parallelism) |
ReduceTransformation(String name,
int parallelism,
Transformation<IN> input,
ReduceFunction<IN> reducer,
KeySelector<IN,K> keySelector,
TypeInformation<K> keyTypeInfo) |
Modifier and Type | Method and Description |
---|---|
static <T,K> KeyedStream<T,K> |
FlinkKafkaShuffle.persistentKeyBy(DataStream<T> dataStream,
String topic,
int producerParallelism,
int numberOfPartitions,
Properties properties,
KeySelector<T,K> keySelector)
Uses Kafka as a message bus to persist keyBy shuffle.
|
static <T,K> KeyedStream<T,K> |
FlinkKafkaShuffle.readKeyBy(String topic,
StreamExecutionEnvironment env,
TypeInformation<T> typeInformation,
Properties kafkaProperties,
KeySelector<T,K> keySelector)
|
static <T,K> void |
FlinkKafkaShuffle.writeKeyBy(DataStream<T> dataStream,
String topic,
Properties kafkaProperties,
KeySelector<T,K> keySelector)
|
Modifier and Type | Method and Description |
---|---|
KeySelector<IN,K> |
WindowOperator.getKeySelector() |
Constructor and Description |
---|
EvictingWindowOperator(WindowAssigner<? super IN,W> windowAssigner,
TypeSerializer<W> windowSerializer,
KeySelector<IN,K> keySelector,
TypeSerializer<K> keySerializer,
StateDescriptor<? extends ListState<StreamRecord<IN>>,?> windowStateDescriptor,
InternalWindowFunction<Iterable<IN>,OUT,K,W> windowFunction,
Trigger<? super IN,? super W> trigger,
Evictor<? super IN,? super W> evictor,
long allowedLateness,
OutputTag<IN> lateDataOutputTag) |
WindowOperator(WindowAssigner<? super IN,W> windowAssigner,
TypeSerializer<W> windowSerializer,
KeySelector<IN,K> keySelector,
TypeSerializer<K> keySerializer,
StateDescriptor<? extends AppendingState<IN,ACC>,?> windowStateDescriptor,
InternalWindowFunction<ACC,OUT,K,W> windowFunction,
Trigger<? super IN,? super W> trigger,
long allowedLateness,
OutputTag<IN> lateDataOutputTag)
Creates a new
WindowOperator based on the given policies and user functions. |
WindowOperatorBuilder(WindowAssigner<? super T,W> windowAssigner,
Trigger<? super T,? super W> trigger,
ExecutionConfig config,
TypeInformation<T> inputType,
KeySelector<T,K> keySelector,
TypeInformation<K> keyType) |
Constructor and Description |
---|
CustomPartitionerWrapper(Partitioner<K> partitioner,
KeySelector<T,K> keySelector) |
KeyGroupStreamPartitioner(KeySelector<T,K> keySelector,
int maxParallelism) |
Modifier and Type | Method and Description |
---|---|
protected Collection<Integer> |
AbstractTwoInputTransformationTranslator.translateInternal(Transformation<OUT> transformation,
Transformation<IN1> firstInputTransformation,
Transformation<IN2> secondInputTransformation,
StreamOperatorFactory<OUT> operatorFactory,
TypeInformation<?> keyTypeInfo,
KeySelector<IN1,?> firstKeySelector,
KeySelector<IN2,?> secondKeySelector,
TransformationTranslator.Context context) |
protected Collection<Integer> |
AbstractTwoInputTransformationTranslator.translateInternal(Transformation<OUT> transformation,
Transformation<IN1> firstInputTransformation,
Transformation<IN2> secondInputTransformation,
StreamOperatorFactory<OUT> operatorFactory,
TypeInformation<?> keyTypeInfo,
KeySelector<IN1,?> firstKeySelector,
KeySelector<IN2,?> secondKeySelector,
TransformationTranslator.Context context) |
Modifier and Type | Class and Description |
---|---|
static class |
KeySelectorUtil.ArrayKeySelector<IN>
A key selector for selecting individual array fields as keys and returns them as a Tuple.
|
static class |
KeySelectorUtil.ComparableKeySelector<IN>
A key selector for selecting key fields via a TypeComparator.
|
static class |
KeySelectorUtil.OneKeySelector<IN,K>
Key extractor that extracts a single field via a generic comparator.
|
Modifier and Type | Method and Description |
---|---|
static <X> KeySelector<X,Tuple> |
KeySelectorUtil.getSelectorForKeys(Keys<X> keys,
TypeInformation<X> typeInfo,
ExecutionConfig executionConfig) |
static <X,K> KeySelector<X,K> |
KeySelectorUtil.getSelectorForOneKey(Keys<X> keys,
Partitioner<K> partitioner,
TypeInformation<X> typeInfo,
ExecutionConfig executionConfig) |
Modifier and Type | Interface and Description |
---|---|
interface |
RowDataKeySelector
RowDataKeySelector takes an RowData and extracts the deterministic key for the RowData.
|
Modifier and Type | Class and Description |
---|---|
class |
BinaryRowDataKeySelector
A KeySelector which will extract key from RowData.
|
class |
EmptyRowDataKeySelector
A utility class which key is always empty no matter what the input row is.
|
Constructor and Description |
---|
MiniBatchIncrementalGroupAggFunction(GeneratedAggsHandleFunction genPartialAggsHandler,
GeneratedAggsHandleFunction genFinalAggsHandler,
KeySelector<RowData,RowData> finalKeySelector,
long stateRetentionTime) |
Constructor and Description |
---|
MapBundleOperator(MapBundleFunction<K,V,IN,OUT> function,
BundleTrigger<IN> bundleTrigger,
KeySelector<IN,K> keySelector) |
Modifier and Type | Method and Description |
---|---|
KeySelector<RowData,RowData> |
JoinInputSideSpec.getUniqueKeySelector()
Returns the
KeySelector to extract unique key from the input row. |
Modifier and Type | Method and Description |
---|---|
static JoinInputSideSpec |
JoinInputSideSpec.withUniqueKey(InternalTypeInfo<RowData> uniqueKeyType,
KeySelector<RowData,RowData> uniqueKeySelector)
Creates a
JoinInputSideSpec that the input has an unique key. |
static JoinInputSideSpec |
JoinInputSideSpec.withUniqueKeyContainedByJoinKey(InternalTypeInfo<RowData> uniqueKeyType,
KeySelector<RowData,RowData> uniqueKeySelector)
Creates a
JoinInputSideSpec that input has an unique key and the unique key is
contained by the join key. |
Modifier and Type | Field and Description |
---|---|
protected KeySelector<RowData,RowData> |
AbstractTopNFunction.sortKeySelector |
Constructor and Description |
---|
TopNRecordsCombiner(WindowTimerService<Long> timerService,
StateKeyContext keyContext,
WindowMapState<Long,List<RowData>> dataState,
Comparator<RowData> sortKeyComparator,
KeySelector<RowData,RowData> sortKeySelector,
long topN,
TypeSerializer<RowData> recordSerializer,
boolean isEventTime) |
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.