public class MapReduceManagerImpl extends Object implements MapReduceManager
MapReduceManager
.
This is an internal class, not intended to be used by clients.
Modifier and Type | Class and Description |
---|---|
static class |
MapReduceManagerImpl.IntermediateCompositeKey<V>
IntermediateCompositeKey
|
Modifier and Type | Method and Description |
---|---|
protected <KIn,VIn,KOut,VOut> |
combine(MapCombineCommand<KIn,VIn,KOut,VOut> mcc,
org.infinispan.distexec.mapreduce.MapReduceManagerImpl.CollectableCollector<KOut,VOut> collector) |
protected <KIn> Set<KIn> |
filterLocalPrimaryOwner(Set<KIn> nodeLocalKeys,
DistributionManager dm) |
ExecutorService |
getExecutorService()
ExecutorService provided for local task execution
|
void |
init(EmbeddedCacheManager cacheManager,
CacheLoaderManager cacheLoaderManager,
ExecutorService asyncTransportExecutor) |
protected <KIn> Set<KIn> |
loadAllKeysFromCacheLoaderUsingFilter(Set<KIn> filterOutSet) |
protected <KIn,KOut> KOut |
loadValueFromCacheLoader(KIn key) |
protected <KIn,VIn,KOut,VOut> |
map(MapCombineCommand<KIn,VIn,KOut,VOut> mcc) |
<KIn,VIn,KOut,VOut> |
mapAndCombineForDistributedReduction(MapCombineCommand<KIn,VIn,KOut,VOut> mcc)
Invoked when MapCombineCommand arrives to a target Infinispan node and returns set of
intermediate keys that needs to be reduced.
|
<KIn,VIn,KOut,VOut> |
mapAndCombineForLocalReduction(MapCombineCommand<KIn,VIn,KOut,VOut> mcc)
Invoked when MapCombineCommand arrives to a target Infinispan node and returns map of resulting
values that need to be reduced.
|
<T> Map<Address,List<T>> |
mapKeysToNodes(DistributionManager dm,
String taskId,
Collection<T> keysToMap,
boolean useIntermediateCompositeKey)
Maps Map/Reduce task intermediate or input keys to nodes on Infinispan cluster
|
<KOut,VOut> |
reduce(ReduceCommand<KOut,VOut> reduceCommand)
Invoked when ReduceCommand arrives to a target Infinispan node.
|
protected CacheLoader |
resolveCacheLoader() |
public void init(EmbeddedCacheManager cacheManager, CacheLoaderManager cacheLoaderManager, ExecutorService asyncTransportExecutor)
public ExecutorService getExecutorService()
MapReduceManager
getExecutorService
in interface MapReduceManager
ExecutorService
for local taskspublic <KIn,VIn,KOut,VOut> Map<KOut,List<VOut>> mapAndCombineForLocalReduction(MapCombineCommand<KIn,VIn,KOut,VOut> mcc) throws InterruptedException
MapReduceManager
Unlike MapReduceManager.mapAndCombineForDistributedReduction(MapCombineCommand)
implementations should return a map Map
mapAndCombineForLocalReduction
in interface MapReduceManager
mcc
- MapCombineCommand sent from MapReduceTaskInterruptedException
public <KIn,VIn,KOut,VOut> Set<KOut> mapAndCombineForDistributedReduction(MapCombineCommand<KIn,VIn,KOut,VOut> mcc) throws InterruptedException
MapReduceManager
mapAndCombineForDistributedReduction
in interface MapReduceManager
mcc
- MapCombineCommand sent from MapReduceTaskInterruptedException
public <KOut,VOut> Map<KOut,VOut> reduce(ReduceCommand<KOut,VOut> reduceCommand) throws InterruptedException
MapReduceManager
reduce
in interface MapReduceManager
reduceCommand
- ReduceCommand sent from MapReduceTaskInterruptedException
protected <KIn,VIn,KOut,VOut> org.infinispan.distexec.mapreduce.MapReduceManagerImpl.CollectableCollector<KOut,VOut> map(MapCombineCommand<KIn,VIn,KOut,VOut> mcc) throws InterruptedException
InterruptedException
protected <KIn,VIn,KOut,VOut> Set<KOut> combine(MapCombineCommand<KIn,VIn,KOut,VOut> mcc, org.infinispan.distexec.mapreduce.MapReduceManagerImpl.CollectableCollector<KOut,VOut> collector) throws Exception
Exception
protected <KIn> Set<KIn> loadAllKeysFromCacheLoaderUsingFilter(Set<KIn> filterOutSet)
protected <KIn,KOut> KOut loadValueFromCacheLoader(KIn key)
protected CacheLoader resolveCacheLoader()
public <T> Map<Address,List<T>> mapKeysToNodes(DistributionManager dm, String taskId, Collection<T> keysToMap, boolean useIntermediateCompositeKey)
MapReduceManager
mapKeysToNodes
in interface MapReduceManager
dm
- distribution manager to use for locating keys on hash wheeltaskId
- id of the map/reduce taskkeysToMap
- list of input keys to locate in the clusteruseIntermediateCompositeKey
- if true use composite keys for shared intermediate cacheprotected <KIn> Set<KIn> filterLocalPrimaryOwner(Set<KIn> nodeLocalKeys, DistributionManager dm)
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.