Example usage for org.apache.hadoop.mapred JobContext getInputFormatClass

List of usage examples for org.apache.hadoop.mapred JobContext getInputFormatClass

Introduction

In this page you can find the example usage for org.apache.hadoop.mapred JobContext getInputFormatClass.

Prototype

public Class<? extends InputFormat<?, ?>> getInputFormatClass() throws ClassNotFoundException;

Source Link

Document

Get the InputFormat class for the job.

Usage

From source file:edu.uci.ics.hyracks.hadoop.compat.util.HadoopAdapter.java

License:Apache License

private org.apache.hadoop.mapreduce.InputSplit[] getNewInputSplits(JobConf conf)
        throws ClassNotFoundException, IOException, InterruptedException {
    org.apache.hadoop.mapreduce.InputSplit[] splits = null;
    JobContext context = new JobContextImpl(conf, null);
    org.apache.hadoop.mapreduce.InputFormat inputFormat = ReflectionUtils
            .newInstance(context.getInputFormatClass(), conf);
    List<org.apache.hadoop.mapreduce.InputSplit> inputSplits = inputFormat.getSplits(context);
    return inputSplits.toArray(new org.apache.hadoop.mapreduce.InputSplit[] {});
}