IN
- The type from which the key is extracted, i.e., the array type.public static final class KeySelectorUtil.ArrayKeySelector<IN> extends Object implements KeySelector<IN,Tuple>, ResultTypeQueryable<Tuple>
Modifier and Type | Method and Description |
---|---|
Tuple |
getKey(IN value)
User-defined function that deterministically extracts the key from an object.
|
TypeInformation<Tuple> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
public Tuple getKey(IN value)
KeySelector
For example for a class:
public class Word { String word; int count; }
The key extractor could return the word as a key to group all Word objects by the String they contain.
The code would look like this
public String getKey(Word w) { return w.word; }
getKey
in interface KeySelector<IN,Tuple>
value
- The object to get the key from.public TypeInformation<Tuple> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<Tuple>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.