public static interface PState.Declaration
Modifier and Type | Method and Description |
---|---|
PState.Declaration |
global()
Configures PState to have a single partition.
|
PState.Declaration |
initialValue(java.lang.Object val)
Specifies starting value for PState.
|
<T,F extends RamaFunction2<java.lang.Integer,T,java.lang.Integer>> |
keyPartitioner(java.lang.Class<F> partitionerClass)
Changes the default key partitioner to a custom one.
|
PState.Declaration |
makePrivate()
Configures PState to only be readable within the declaring topology.
|
PState.Declaration global()
PState.Declaration initialValue(java.lang.Object val)
Class
.PState.Declaration makePrivate()
<T,F extends RamaFunction2<java.lang.Integer,T,java.lang.Integer>> PState.Declaration keyPartitioner(java.lang.Class<F> partitionerClass)
select
or selectAsync
. The variants
which only take a Path
as input extract the partitioning key from the Path
.
The key partitioner is also used when calling select
in ETL code.
partitionerClass
- Function implementation which takes as input the number of partitions in the
PState and the partitioning key. Returns the partition number to send the query request.