com.hazelcast.mapreduce.impl
Class MapReduceService

java.lang.Object
  extended by com.hazelcast.mapreduce.impl.MapReduceService
All Implemented Interfaces:
ManagedService, RemoteService

public class MapReduceService
extends Object
implements ManagedService, RemoteService

The MapReduceService class is the base point for the map reduce implementation. It is used to collect and control a lot of the basic lifecycle events for JobTracker instances and their corresponding JobSupervisors.


Field Summary
static String SERVICE_NAME
          The service name to retrieve an instance of the MapReduceService
 
Constructor Summary
MapReduceService(NodeEngine nodeEngine)
           
 
Method Summary
 boolean checkAssignedMembersAvailable(Collection<Address> assignedMembers)
           
 DistributedObject createDistributedObject(String objectName)
           
 JobSupervisor createJobSupervisor(JobTaskConfiguration configuration)
           
 void destroyDistributedObject(String objectName)
           
 boolean destroyJobSupervisor(JobSupervisor supervisor)
           
 void dispatchEvent(MapReduceNotification notification)
           
 ExecutorService getExecutorService(String name)
           
 JobSupervisor getJobSupervisor(String name, String jobId)
           
 JobTracker getJobTracker(String name)
           
 Address getKeyMember(Object key)
           
 Address getLocalAddress()
           
 NodeEngine getNodeEngine()
           
 void init(NodeEngine nodeEngine, Properties properties)
          Initializes this ManagedService
<R> R
processRequest(Address address, ProcessingOperation processingOperation)
           
 boolean registerJobSupervisorCancellation(String name, String jobId, Address jobOwner)
           
 void reset()
          reset this ManagedService back to initial state.
 void sendNotification(Address address, MapReduceNotification notification)
           
 void shutdown(boolean terminate)
          Shuts down this ManagedService.
 boolean unregisterJobSupervisorCancellation(String name, String jobId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

public static final String SERVICE_NAME
The service name to retrieve an instance of the MapReduceService

See Also:
Constant Field Values
Constructor Detail

MapReduceService

public MapReduceService(NodeEngine nodeEngine)
Method Detail

getJobTracker

public JobTracker getJobTracker(String name)

getJobSupervisor

public JobSupervisor getJobSupervisor(String name,
                                      String jobId)

registerJobSupervisorCancellation

public boolean registerJobSupervisorCancellation(String name,
                                                 String jobId,
                                                 Address jobOwner)

unregisterJobSupervisorCancellation

public boolean unregisterJobSupervisorCancellation(String name,
                                                   String jobId)

createJobSupervisor

public JobSupervisor createJobSupervisor(JobTaskConfiguration configuration)

destroyJobSupervisor

public boolean destroyJobSupervisor(JobSupervisor supervisor)

getExecutorService

public ExecutorService getExecutorService(String name)

init

public void init(NodeEngine nodeEngine,
                 Properties properties)
Description copied from interface: ManagedService
Initializes this ManagedService

Specified by:
init in interface ManagedService
Parameters:
nodeEngine - the NodeEngine this ManagedService belongs to.
properties - the Properties. Can be used to pass settings to the service.

reset

public void reset()
Description copied from interface: ManagedService
reset this ManagedService back to initial state. todo: what is the purpose of reset

Specified by:
reset in interface ManagedService

shutdown

public void shutdown(boolean terminate)
Description copied from interface: ManagedService
Shuts down this ManagedService. todo: what is the purpose of the terminate variable.

Specified by:
shutdown in interface ManagedService

createDistributedObject

public DistributedObject createDistributedObject(String objectName)
Specified by:
createDistributedObject in interface RemoteService

destroyDistributedObject

public void destroyDistributedObject(String objectName)
Specified by:
destroyDistributedObject in interface RemoteService

getKeyMember

public Address getKeyMember(Object key)

checkAssignedMembersAvailable

public boolean checkAssignedMembersAvailable(Collection<Address> assignedMembers)

processRequest

public <R> R processRequest(Address address,
                            ProcessingOperation processingOperation)
                 throws ExecutionException,
                        InterruptedException
Throws:
ExecutionException
InterruptedException

sendNotification

public void sendNotification(Address address,
                             MapReduceNotification notification)

getLocalAddress

public final Address getLocalAddress()

getNodeEngine

public NodeEngine getNodeEngine()

dispatchEvent

public void dispatchEvent(MapReduceNotification notification)


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.