public class InputFormatLoadingService<K,V> extends Object implements DataLoadingService
DataLoadingService
that uses the Hadoop InputFormat to find
partitions of data & request resources.
The InputFormat is injected using a Tang external constructor
It also tries to obtain data locality in a greedy
fashion using EvaluatorToPartitionMapper| Constructor and Description |
|---|
InputFormatLoadingService(org.apache.hadoop.mapred.InputFormat<K,V> inputFormat,
org.apache.hadoop.mapred.JobConf jobConf,
int numberOfDesiredSplits,
boolean inMemory,
String inputFormatClass,
String inputPath) |
| Modifier and Type | Method and Description |
|---|---|
String |
getComputeContextIdPrefix() |
Configuration |
getContextConfiguration(AllocatedEvaluator allocatedEvaluator) |
int |
getNumberOfPartitions()
Access to the number of partitions suggested by this DataSource.
|
Configuration |
getServiceConfiguration(AllocatedEvaluator allocatedEvaluator) |
boolean |
isComputeContext(ActiveContext context) |
boolean |
isDataLoadedContext(ActiveContext context)
Distinguishes data loaded contexts from compute contexts.
|
@Inject public InputFormatLoadingService(org.apache.hadoop.mapred.InputFormat<K,V> inputFormat, org.apache.hadoop.mapred.JobConf jobConf, int numberOfDesiredSplits, boolean inMemory, String inputFormatClass, String inputPath)
public int getNumberOfPartitions()
DataLoadingServicegetNumberOfPartitions in interface DataLoadingServicepublic Configuration getContextConfiguration(AllocatedEvaluator allocatedEvaluator)
getContextConfiguration in interface DataLoadingServicepublic Configuration getServiceConfiguration(AllocatedEvaluator allocatedEvaluator)
getServiceConfiguration in interface DataLoadingServicepublic String getComputeContextIdPrefix()
getComputeContextIdPrefix in interface DataLoadingServicepublic boolean isComputeContext(ActiveContext context)
isComputeContext in interface DataLoadingServicepublic boolean isDataLoadedContext(ActiveContext context)
DataLoadingServiceisDataLoadedContext in interface DataLoadingServiceCopyright © 2015 The Apache Software Foundation. All rights reserved.