public class InputDataSetUtils
extends java.lang.Object
| Constructor and Description |
|---|
InputDataSetUtils() |
| Modifier and Type | Method and Description |
|---|---|
static InputDataSet |
createInputDataSet(java.lang.String[] args) |
static AbstractInputDataSet |
getBestFittingInputDataSetType(FileInputDataSet dataSet)
Converts the given input data set to the most general class possible.
|
static AbstractInputDataSet |
getBestFittingInputDataSetType(SpatialIndexInputDataSet dataSet)
Converts the given input data set to the most general class possible.
|
static java.lang.String[] |
getInputDataSetLocations(AbstractInputDataSet dataSet)
Gets the location(s) of the given input data set when the location is available.
|
static org.apache.hadoop.mapreduce.InputSplit |
getInputSplitForInputFormat(java.lang.Class<org.apache.hadoop.mapreduce.InputFormat<?,?>> infClass, org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.conf.Configuration conf)
Returns the type of InputSplit expected by the given InputFormat class
|
static boolean |
isFileInputFormat(java.lang.Class<?> inputFormatClass)
Utility method used to know if a given class is a subclass of FileInputFormat from wither, Hadoop old or new API
|
static <K,V> AbstractInputDataSet |
loadInputDataSet(org.apache.hadoop.conf.Configuration conf)
Loads an instance of
AbstractInputDataSet stored in the configuration |
static <K,V> AbstractInputDataSet |
loadInputDataSet(java.lang.String tag, org.apache.hadoop.conf.Configuration conf)
Loads an instance of
AbstractInputDataSet stored in the configuration using the the given tag |
static void |
validateInputDataSet(InputDataSet inputDs, org.apache.hadoop.mapreduce.Job job) |
static void |
validateInputDataSet(InputDataSet inputDs, org.apache.hadoop.mapred.JobConf jobConf) |
public static boolean isFileInputFormat(java.lang.Class<?> inputFormatClass)
inputFormatClass - true if the given class is a subclass of FileInputFormatpublic static java.lang.String[] getInputDataSetLocations(AbstractInputDataSet dataSet)
MultiInputDataSet, the locations of all the contained input data sets are returned.dataSet - an input data setpublic static AbstractInputDataSet getBestFittingInputDataSetType(SpatialIndexInputDataSet dataSet)
FileInputFormat. If the given input data set does not contain a path or an index name, a SimpleInputDataSet will be returneddataSet - a SpatialIndexInputDataSet which may not be a real spatial indexAbstractInputDataSetpublic static AbstractInputDataSet getBestFittingInputDataSetType(FileInputDataSet dataSet)
SimpleInputDataSet will be returneddataSet - a FileInputDataSet which may not be associated to a file.AbstractInputDataSetpublic static <K,V> AbstractInputDataSet loadInputDataSet(org.apache.hadoop.conf.Configuration conf) throws java.lang.IllegalAccessException, java.lang.InstantiationException
AbstractInputDataSet stored in the configurationconf - a job's configurationAbstractInputDataSet or null if no information was foundjava.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionpublic static <K,V> AbstractInputDataSet loadInputDataSet(java.lang.String tag, org.apache.hadoop.conf.Configuration conf)
AbstractInputDataSet stored in the configuration using the the given tagtag - a prefix appended to the input data set if anyconf - a job's configurationAbstractInputDataSet or null if no information was found
public static org.apache.hadoop.mapreduce.InputSplit getInputSplitForInputFormat(java.lang.Class<org.apache.hadoop.mapreduce.InputFormat<?,?>> infClass,
org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
infClass - an InputFormatsplit - an InputSplitconf - a job's configurationjava.io.IOExceptionpublic static InputDataSet createInputDataSet(java.lang.String[] args)
public static void validateInputDataSet(InputDataSet inputDs, org.apache.hadoop.mapred.JobConf jobConf) throws java.lang.Exception
java.lang.Exceptionpublic static void validateInputDataSet(InputDataSet inputDs, org.apache.hadoop.mapreduce.Job job) throws java.lang.Exception
java.lang.ExceptionCopyright © 2016 Oracle and/or its affiliates. All Rights Reserved.