com.hazelcast.mapreduce.impl
Class MapReduceUtil

java.lang.Object
  extended by com.hazelcast.mapreduce.impl.MapReduceUtil

public final class MapReduceUtil
extends Object

This utility class contains a few basic operations that are needed in multiple places


Method Summary
static String buildExecutorName(String name)
           
static JobProcessInformationImpl createJobProcessInformation(JobTaskConfiguration configuration, JobSupervisor supervisor)
           
static void enforcePartitionTableWarmup(MapReduceService mapReduceService)
           
static
<V> V
executeOperation(Operation operation, Address address, MapReduceService mapReduceService, NodeEngine nodeEngine)
           
static
<V> List<V>
executeOperation(OperationFactory operationFactory, MapReduceService mapReduceService, NodeEngine nodeEngine, boolean returnsResponse)
           
static void injectManagedContext(NodeEngine nodeEngine, Object injectee, Object... injectees)
           
static
<K,V> Map<Address,Map<K,V>>
mapResultToMember(JobSupervisor supervisor, Map<K,V> result)
           
static int mapSize(int sourceSize)
           
static void notifyRemoteException(JobSupervisor supervisor, Throwable throwable)
           
static String printPartitionStates(JobPartitionState[] partitionStates)
           
static JobPartitionState.State stateChange(Address owner, int partitionId, JobPartitionState.State currentState, JobProcessInformationImpl processInformation, JobTaskConfiguration configuration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createJobProcessInformation

public static JobProcessInformationImpl createJobProcessInformation(JobTaskConfiguration configuration,
                                                                    JobSupervisor supervisor)

notifyRemoteException

public static void notifyRemoteException(JobSupervisor supervisor,
                                         Throwable throwable)

stateChange

public static JobPartitionState.State stateChange(Address owner,
                                                  int partitionId,
                                                  JobPartitionState.State currentState,
                                                  JobProcessInformationImpl processInformation,
                                                  JobTaskConfiguration configuration)

mapResultToMember

public static <K,V> Map<Address,Map<K,V>> mapResultToMember(JobSupervisor supervisor,
                                                            Map<K,V> result)

printPartitionStates

public static String printPartitionStates(JobPartitionState[] partitionStates)

executeOperation

public static <V> List<V> executeOperation(OperationFactory operationFactory,
                                           MapReduceService mapReduceService,
                                           NodeEngine nodeEngine,
                                           boolean returnsResponse)

executeOperation

public static <V> V executeOperation(Operation operation,
                                     Address address,
                                     MapReduceService mapReduceService,
                                     NodeEngine nodeEngine)

buildExecutorName

public static String buildExecutorName(String name)

mapSize

public static int mapSize(int sourceSize)

injectManagedContext

public static void injectManagedContext(NodeEngine nodeEngine,
                                        Object injectee,
                                        Object... injectees)

enforcePartitionTableWarmup

public static void enforcePartitionTableWarmup(MapReduceService mapReduceService)
                                        throws TimeoutException
Throws:
TimeoutException


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