public class AggregatorUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MAX_BYTES_PER_AGGREGATOR_REQUEST
How big a single aggregator request can be (in bytes)
|
static int |
MAX_BYTES_PER_AGGREGATOR_REQUEST_DEFAULT
Default max size of single aggregator request (1MB)
|
static String |
USE_THREAD_LOCAL_AGGREGATORS
Whether or not to have a copy of aggregators for each compute thread.
|
static boolean |
USE_THREAD_LOCAL_AGGREGATORS_DEFAULT
Default is not to have a copy of aggregators for each thread
|
Modifier and Type | Method and Description |
---|---|
static WorkerInfo |
getOwner(String aggregatorName,
List<WorkerInfo> workers)
Get owner of aggregator with selected name from the list of workers
|
static String |
getUnregisteredAggregatorMessage(String aggregatorName,
boolean hasRegisteredAggregators,
ImmutableClassesGiraphConfiguration conf)
Get the warning message about usage of unregistered aggregator to be
printed to user.
|
static String |
getUnregisteredBroadcastMessage(String broadcastName,
boolean hasBroadcasted,
ImmutableClassesGiraphConfiguration conf)
Get the warning message when user tries to access broadcast, without
previously setting it, to be printed to user.
|
static String |
getUnregisteredReducerMessage(String reducerName,
boolean hasRegisteredReducers,
ImmutableClassesGiraphConfiguration conf)
Get the warning message about usage of unregistered reducer to be
printed to user.
|
static boolean |
useThreadLocalAggregators(ImmutableClassesGiraphConfiguration conf)
Check if we should use thread local aggregators.
|
public static final String MAX_BYTES_PER_AGGREGATOR_REQUEST
public static final int MAX_BYTES_PER_AGGREGATOR_REQUEST_DEFAULT
public static final String USE_THREAD_LOCAL_AGGREGATORS
public static final boolean USE_THREAD_LOCAL_AGGREGATORS_DEFAULT
public static WorkerInfo getOwner(String aggregatorName, List<WorkerInfo> workers)
aggregatorName
- Name of the aggregatorsworkers
- List of workerspublic static boolean useThreadLocalAggregators(ImmutableClassesGiraphConfiguration conf)
conf
- Giraph configurationpublic static String getUnregisteredAggregatorMessage(String aggregatorName, boolean hasRegisteredAggregators, ImmutableClassesGiraphConfiguration conf)
aggregatorName
- The name of the aggregator which user tried to
accesshasRegisteredAggregators
- True iff user registered some aggregatorsconf
- Giraph configurationpublic static String getUnregisteredReducerMessage(String reducerName, boolean hasRegisteredReducers, ImmutableClassesGiraphConfiguration conf)
reducerName
- The name of the aggregator which user tried to
accesshasRegisteredReducers
- True iff user registered some aggregatorsconf
- Giraph configurationpublic static String getUnregisteredBroadcastMessage(String broadcastName, boolean hasBroadcasted, ImmutableClassesGiraphConfiguration conf)
broadcastName
- The name of the broadcast which user tried to
accesshasBroadcasted
- True iff user has broadcasted value beforeconf
- Giraph configurationCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.