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 InputSplit |
getInputSplitForInputFormat(java.lang.Class<<any>> infClass, InputSplit split, 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(Configuration conf)
Loads an instance of
AbstractInputDataSet stored in the configuration |
static <K,V> AbstractInputDataSet |
loadInputDataSet(java.lang.String tag, Configuration conf)
Loads an instance of
AbstractInputDataSet stored in the configuration using the the given tag |
static void |
validateInputDataSet(InputDataSet inputDs, Job job) |
static void |
validateInputDataSet(InputDataSet inputDs, JobConf jobConf) |
public static InputDataSet createInputDataSet(java.lang.String[] args)
public static AbstractInputDataSet getBestFittingInputDataSetType(FileInputDataSet dataSet)
SimpleInputDataSet will be returneddataSet - a FileInputDataSet which may not be associated to a file.AbstractInputDataSetpublic 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 java.lang.String[] getInputDataSetLocations(AbstractInputDataSet dataSet)
MultiInputDataSet, the locations of all the contained input data sets are returned.dataSet - an input data set
public static InputSplit getInputSplitForInputFormat(java.lang.Class<<any>> infClass,
InputSplit split,
Configuration conf)
throws java.io.IOException
infClass - an InputFormatsplit - an InputSplitconf - a job's configurationjava.io.IOExceptionpublic static boolean isFileInputFormat(java.lang.Class<?> inputFormatClass)
inputFormatClass - true if the given class is a subclass of FileInputFormatpublic static <K,V> AbstractInputDataSet loadInputDataSet(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, 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 foundpublic static void validateInputDataSet(InputDataSet inputDs, Job job) throws java.lang.Exception
java.lang.Exceptionpublic static void validateInputDataSet(InputDataSet inputDs, JobConf jobConf) throws java.lang.Exception
java.lang.ExceptionCopyright © 2016 Oracle and/or its affiliates. All Rights Reserved.