com.hazelcast.mapreduce.impl
KeyIn
- type of the input keyValueIn
- type of the input valuepublic abstract class AbstractJob<KeyIn,ValueIn> extends Object implements Job<KeyIn,ValueIn>
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractJob.MappingJobImpl<EntryKey,Key,Value>
This class is just used to comply to the public DSL style API
|
protected class |
AbstractJob.ReducingJobImpl<EntryKey,Key,Value>
This class is just used to comply to the public DSL style API
|
protected class |
AbstractJob.ReducingSubmittableJobImpl<EntryKey,Key,Value>
This class is just used to comply to the public DSL style API
|
Modifier and Type | Field and Description |
---|---|
protected int |
chunkSize |
protected CombinerFactory<?,?,?> |
combinerFactory |
protected JobTracker |
jobTracker |
protected Collection<KeyIn> |
keys |
protected KeyValueSource<KeyIn,ValueIn> |
keyValueSource |
protected Mapper<KeyIn,ValueIn,?,?> |
mapper |
protected String |
name |
protected KeyPredicate<KeyIn> |
predicate |
protected ReducerFactory<?,?,?> |
reducerFactory |
protected TopologyChangedStrategy |
topologyChangedStrategy |
Constructor and Description |
---|
AbstractJob(String name,
JobTracker jobTracker,
KeyValueSource<KeyIn,ValueIn> keyValueSource) |
Modifier and Type | Method and Description |
---|---|
Job<KeyIn,ValueIn> |
chunkSize(int chunkSize)
Defines the number of elements per chunk.
|
protected abstract <T> JobCompletableFuture<T> |
invoke(Collator collator) |
Job<KeyIn,ValueIn> |
keyPredicate(KeyPredicate<KeyIn> predicate)
Defines the
KeyPredicate implementation to preselect keys the MapReduce task will be executed on. |
<KeyOut,ValueOut> |
mapper(Mapper<KeyIn,ValueIn,KeyOut,ValueOut> mapper)
Defines the mapper for this task.
|
Job<KeyIn,ValueIn> |
onKeys(Iterable<KeyIn> keys)
Defines keys to execute the mapper and a possibly defined reducer against.
|
Job<KeyIn,ValueIn> |
onKeys(KeyIn... keys)
Defines keys to execute the mapper and a possibly defined reducer against.
|
protected void |
prepareKeyPredicate() |
protected <T> JobCompletableFuture<T> |
submit(Collator collator) |
Job<KeyIn,ValueIn> |
topologyChangedStrategy(TopologyChangedStrategy topologyChangedStrategy)
Defines the strategy to handle topology changes while executing the map reduce job.
|
protected final String name
protected final JobTracker jobTracker
protected final KeyValueSource<KeyIn,ValueIn> keyValueSource
protected CombinerFactory<?,?,?> combinerFactory
protected ReducerFactory<?,?,?> reducerFactory
protected Collection<KeyIn> keys
protected KeyPredicate<KeyIn> predicate
protected int chunkSize
protected TopologyChangedStrategy topologyChangedStrategy
public AbstractJob(String name, JobTracker jobTracker, KeyValueSource<KeyIn,ValueIn> keyValueSource)
public <KeyOut,ValueOut> MappingJob<KeyIn,KeyOut,ValueOut> mapper(Mapper<KeyIn,ValueIn,KeyOut,ValueOut> mapper)
Job
IllegalStateException
to be thrown telling you to not change the internal state.public Job<KeyIn,ValueIn> onKeys(Iterable<KeyIn> keys)
Job
public Job<KeyIn,ValueIn> onKeys(KeyIn... keys)
Job
public Job<KeyIn,ValueIn> keyPredicate(KeyPredicate<KeyIn> predicate)
Job
KeyPredicate
implementation to preselect keys the MapReduce task will be executed on.
Preselecting keys can speed up the job massively.Job.onKeys(Iterable)
or Job.onKeys(Object...)
to define a
range of known and evaluated keys.keyPredicate
in interface Job<KeyIn,ValueIn>
predicate
- predicate implementation to be used to evaluate keyspublic Job<KeyIn,ValueIn> chunkSize(int chunkSize)
Job
ReducerFactory
is defined, the chunk will be sent to the nodes that
is responsible for the emitted keys.public Job<KeyIn,ValueIn> topologyChangedStrategy(TopologyChangedStrategy topologyChangedStrategy)
Job
TopologyChangedStrategy
.topologyChangedStrategy
in interface Job<KeyIn,ValueIn>
topologyChangedStrategy
- strategy to handle topology changes while executing the map reduce jobprotected <T> JobCompletableFuture<T> submit(Collator collator)
protected abstract <T> JobCompletableFuture<T> invoke(Collator collator)
protected void prepareKeyPredicate()
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.