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()
DataLoadingService
getNumberOfPartitions
in interface DataLoadingService
public Configuration getContextConfiguration(AllocatedEvaluator allocatedEvaluator)
getContextConfiguration
in interface DataLoadingService
public Configuration getServiceConfiguration(AllocatedEvaluator allocatedEvaluator)
getServiceConfiguration
in interface DataLoadingService
public String getComputeContextIdPrefix()
getComputeContextIdPrefix
in interface DataLoadingService
public boolean isComputeContext(ActiveContext context)
isComputeContext
in interface DataLoadingService
public boolean isDataLoadedContext(ActiveContext context)
DataLoadingService
isDataLoadedContext
in interface DataLoadingService
Copyright © 2015 The Apache Software Foundation. All rights reserved.