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