EntryKey
- type of the original base keyKey
- type of the key at that processing stateValue
- type of the value at that processing stateprotected class AbstractJob.ReducingJobImpl<EntryKey,Key,Value> extends Object implements ReducingJob<EntryKey,Key,Value>
Modifier | Constructor and Description |
---|---|
protected |
ReducingJobImpl() |
Modifier and Type | Method and Description |
---|---|
ReducingJob<EntryKey,Key,Value> |
chunkSize(int chunkSize)
Defines the number of elements per chunk.
|
ReducingJob<EntryKey,Key,Value> |
keyPredicate(KeyPredicate<EntryKey> predicate)
Defines the
KeyPredicate implementation to preselect keys the MapReduce task will be executed on. |
ReducingJob<EntryKey,Key,Value> |
onKeys(EntryKey... keys)
Defines keys to execute the mapper and a possibly defined reducer against.
|
ReducingJob<EntryKey,Key,Value> |
onKeys(Iterable<EntryKey> keys)
Defines keys to execute the mapper and a possibly defined reducer against.
|
<ValueOut> ReducingSubmittableJob<EntryKey,Key,ValueOut> |
reducer(ReducerFactory<Key,Value,ValueOut> reducerFactory)
Defines the
ReducerFactory for this task. |
JobCompletableFuture<Map<Key,List<Value>>> |
submit()
Submits the task to Hazelcast and executes the defined mapper and reducer on all cluster nodes
|
<ValueOut> JobCompletableFuture<ValueOut> |
submit(Collator<Map.Entry<Key,List<Value>>,ValueOut> collator)
Submits the task to Hazelcast and executes the defined mapper and reducer on all cluster nodes and executes the
collator before returning the final result.
|
ReducingJob<EntryKey,Key,Value> |
topologyChangedStrategy(TopologyChangedStrategy topologyChangedStrategy)
Defines the strategy to handle topology changes while executing the map reduce job.
|
public <ValueOut> ReducingSubmittableJob<EntryKey,Key,ValueOut> reducer(ReducerFactory<Key,Value,ValueOut> reducerFactory)
ReducingJob
ReducerFactory
for this task. This method is not idempotent and is callable only one time. Further
calls result in an IllegalStateException
to be thrown telling you to not change the internal state.reducer
in interface ReducingJob<EntryKey,Key,Value>
ValueOut
- type of the reduced valuereducerFactory
- ReducerFactory to build Reducerspublic ReducingJob<EntryKey,Key,Value> onKeys(Iterable<EntryKey> keys)
ReducingJob
onKeys
in interface ReducingJob<EntryKey,Key,Value>
keys
- keys to be executed againstpublic ReducingJob<EntryKey,Key,Value> onKeys(EntryKey... keys)
ReducingJob
onKeys
in interface ReducingJob<EntryKey,Key,Value>
keys
- keys to be executed againstpublic ReducingJob<EntryKey,Key,Value> keyPredicate(KeyPredicate<EntryKey> predicate)
ReducingJob
KeyPredicate
implementation to preselect keys the MapReduce task will be executed on.
Preselecting keys can speed up the job massively.ReducingJob.onKeys(Iterable)
or ReducingJob.onKeys(Object...)
to define a
range of known and evaluated keys.keyPredicate
in interface ReducingJob<EntryKey,Key,Value>
predicate
- predicate implementation to be used to evaluate keyspublic ReducingJob<EntryKey,Key,Value> chunkSize(int chunkSize)
ReducingJob
ReducerFactory
is defined the chunk will be send to the nodes that
is responsible for the emitted keys.chunkSize
in interface ReducingJob<EntryKey,Key,Value>
chunkSize
- the number of elements per chunkpublic ReducingJob<EntryKey,Key,Value> topologyChangedStrategy(TopologyChangedStrategy topologyChangedStrategy)
ReducingJob
TopologyChangedStrategy
.topologyChangedStrategy
in interface ReducingJob<EntryKey,Key,Value>
topologyChangedStrategy
- strategy to usepublic JobCompletableFuture<Map<Key,List<Value>>> submit()
ReducingJob
submit
in interface ReducingJob<EntryKey,Key,Value>
public <ValueOut> JobCompletableFuture<ValueOut> submit(Collator<Map.Entry<Key,List<Value>>,ValueOut> collator)
ReducingJob
submit
in interface ReducingJob<EntryKey,Key,Value>
ValueOut
- type of the collated valuecollator
- collator to use after map and reduceCopyright © 2018 Hazelcast, Inc.. All Rights Reserved.