public class MasterInputSplitsHandler extends Object
Modifier and Type | Field and Description |
---|---|
static StrConfOption |
DONE_FRACTIONS_TO_STORE_IN_COUNTERS
Store in counters timestamps when we finished reading
these fractions of input
|
Constructor and Description |
---|
MasterInputSplitsHandler(boolean useLocality,
org.apache.hadoop.mapreduce.Mapper.Context context)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addSplits(InputType splitsType,
List<org.apache.hadoop.mapreduce.InputSplit> inputSplits,
GiraphInputFormat inputFormat)
Add splits
|
static Map<String,Set<String>> |
getCounterGroupAndNames() |
static org.apache.hadoop.mapreduce.Counter |
getSplitFractionDoneTimestampCounter(InputType inputType,
double fraction,
org.apache.hadoop.mapreduce.Mapper.Context context)
Get counter
|
void |
initialize(MasterClient masterClient,
List<WorkerInfo> workers)
Initialize
|
void |
sendSplitTo(InputType splitType,
int workerTaskId,
boolean isFirstSplit)
Called after we receive a split request from some worker, should send
split back to it if available, or send it information that there is no
more available
|
public static final StrConfOption DONE_FRACTIONS_TO_STORE_IN_COUNTERS
public MasterInputSplitsHandler(boolean useLocality, org.apache.hadoop.mapreduce.Mapper.Context context)
useLocality
- Whether to use locality information or notcontext
- Context for accessing counterspublic void initialize(MasterClient masterClient, List<WorkerInfo> workers)
masterClient
- Master clientworkers
- List of workerspublic void addSplits(InputType splitsType, List<org.apache.hadoop.mapreduce.InputSplit> inputSplits, GiraphInputFormat inputFormat)
splitsType
- Type of splitsinputSplits
- SplitsinputFormat
- Formatpublic void sendSplitTo(InputType splitType, int workerTaskId, boolean isFirstSplit)
splitType
- Type of split requestedworkerTaskId
- Id of worker who requested splitisFirstSplit
- Whether this is the first split a thread is requesting,
or this request indicates that previously requested input split was donepublic static org.apache.hadoop.mapreduce.Counter getSplitFractionDoneTimestampCounter(InputType inputType, double fraction, org.apache.hadoop.mapreduce.Mapper.Context context)
inputType
- Type of input for counterfraction
- Fraction for countercontext
- Context to get counter fromCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.