com.hazelcast.mapreduce.impl.task
Class JobSupervisor
java.lang.Object
com.hazelcast.mapreduce.impl.task.JobSupervisor
public class JobSupervisor
- extends Object
The JobSupervisor is the overall control instance of a map reduce job. There is one JobSupervisor per
unique name-jobId combination and per cluster member.
The emitting cluster member's JobSupervisor has a special control function to synchronize the work of
the other "worker-members" that only execute the task. This job owner node also assigns reducing members
to keys and checks for topology changes that hurt the currently running job and enforces the rules set
by the TopologyChangedStrategy
in case of a topology change situation.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JobSupervisor
public JobSupervisor(JobTaskConfiguration configuration,
AbstractJobTracker jobTracker,
boolean ownerNode,
MapReduceService mapReduceService)
getMapReduceService
public MapReduceService getMapReduceService()
getJobTracker
public JobTracker getJobTracker()
startTasks
public void startTasks(MappingPhase mappingPhase)
onNotification
public void onNotification(MapReduceNotification notification)
notifyRemoteException
public void notifyRemoteException(Address remoteAddress,
Throwable throwable)
cancelAndNotify
public boolean cancelAndNotify(Exception exception)
cancel
public TrackableJobFuture cancel()
getJobResults
public Map<Object,Object> getJobResults()
getReducerByKey
public <KeyIn,ValueIn,ValueOut> Reducer<ValueIn,ValueOut> getReducerByKey(Object key)
getReducerAddressByKey
public Address getReducerAddressByKey(Object key)
assignKeyReducerAddress
public Address assignKeyReducerAddress(Object key)
checkAssignedMembersAvailable
public boolean checkAssignedMembersAvailable()
assignKeyReducerAddress
public boolean assignKeyReducerAddress(Object key,
Address address)
checkFullyProcessed
public void checkFullyProcessed(JobProcessInformation processInformation)
getOrCreateContext
public <K,V> DefaultContext<K,V> getOrCreateContext(MapCombineTask mapCombineTask)
registerReducerEventInterests
public void registerReducerEventInterests(int partitionId,
Set<Address> remoteReducers)
getReducerEventInterests
public Collection<Address> getReducerEventInterests(int partitionId)
getJobProcessInformation
public JobProcessInformationImpl getJobProcessInformation()
getJobOwner
public Address getJobOwner()
isOwnerNode
public boolean isOwnerNode()
getConfiguration
public JobTaskConfiguration getConfiguration()
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.