|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.mapreduce.impl.AbstractJob<KeyIn,ValueIn>
KeyIn - type of the input keyValueIn - type of the input valuepublic abstract class AbstractJob<KeyIn,ValueIn>
Base class for all map reduce job implementations
| Nested Class Summary | |
|---|---|
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 |
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
AbstractJob(String name,
JobTracker jobTracker,
KeyValueSource<KeyIn,ValueIn> keyValueSource)
|
|
| Method Summary | ||
|---|---|---|
Job<KeyIn,ValueIn> |
chunkSize(int chunkSize)
Defines the number of elements per chunk. |
|
protected abstract
|
invoke(Collator collator)
|
|
Job<KeyIn,ValueIn> |
keyPredicate(KeyPredicate<KeyIn> predicate)
Defines the KeyPredicate implementation to preselect keys the MapReduce task will be executed on. |
|
|
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
|
submit(Collator collator)
|
|
Job<KeyIn,ValueIn> |
topologyChangedStrategy(TopologyChangedStrategy topologyChangedStrategy)
Defines the strategy to handle topology changes while executing the map reduce job. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final String name
protected final JobTracker jobTracker
protected final KeyValueSource<KeyIn,ValueIn> keyValueSource
protected Mapper<KeyIn,ValueIn,?,?> mapper
protected CombinerFactory<?,?,?> combinerFactory
protected ReducerFactory<?,?,?> reducerFactory
protected Collection<KeyIn> keys
protected KeyPredicate<KeyIn> predicate
protected int chunkSize
protected TopologyChangedStrategy topologyChangedStrategy
| Constructor Detail |
|---|
public AbstractJob(String name,
JobTracker jobTracker,
KeyValueSource<KeyIn,ValueIn> keyValueSource)
| Method Detail |
|---|
public <KeyOut,ValueOut> MappingJob<KeyIn,KeyOut,ValueOut> mapper(Mapper<KeyIn,ValueIn,KeyOut,ValueOut> mapper)
JobIllegalStateException to be thrown telling you to not change the internal state.
mapper in interface Job<KeyIn,ValueIn>KeyOut - type of the emitted keyValueOut - type of the emitted valuemapper - tasks mapper
public Job<KeyIn,ValueIn> onKeys(Iterable<KeyIn> keys)
Job
onKeys in interface Job<KeyIn,ValueIn>keys - keys to be executed against
public Job<KeyIn,ValueIn> onKeys(KeyIn... keys)
Job
onKeys in interface Job<KeyIn,ValueIn>keys - keys to be executed against
public Job<KeyIn,ValueIn> keyPredicate(KeyPredicate<KeyIn> predicate)
JobKeyPredicate 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 keys
public Job<KeyIn,ValueIn> chunkSize(int chunkSize)
JobReducerFactory is defined, the chunk will be sent to the nodes that
is responsible for the emitted keys.
chunkSize in interface Job<KeyIn,ValueIn>chunkSize - the number of elements per chunk
public Job<KeyIn,ValueIn> topologyChangedStrategy(TopologyChangedStrategy topologyChangedStrategy)
JobTopologyChangedStrategy.
topologyChangedStrategy in interface Job<KeyIn,ValueIn>topologyChangedStrategy - strategy to handle topology changes while executing the map reduce job
protected <T> JobCompletableFuture<T> submit(Collator collator)
protected abstract <T> JobCompletableFuture<T> invoke(Collator collator)
protected void prepareKeyPredicate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||