Example usage for org.apache.hadoop.mapreduce.lib.db DBConfiguration getInputFieldNames

List of usage examples for org.apache.hadoop.mapreduce.lib.db DBConfiguration getInputFieldNames

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce.lib.db DBConfiguration getInputFieldNames.

Prototype

public String[] getInputFieldNames() 

Source Link

Usage

From source file:com.cloudera.sqoop.mapreduce.db.OracleDataDrivenDBInputFormat.java

License:Apache License

@Override
protected RecordReader<LongWritable, T> createDBRecordReader(DBInputSplit split, Configuration conf)
        throws IOException {

    DBConfiguration dbConf = getDBConf();
    @SuppressWarnings("unchecked")
    Class<T> inputClass = (Class<T>) (dbConf.getInputClass());

    try {/*from  w w w .j a v  a 2s .  co  m*/
        // Use Oracle-specific db reader
        return new OracleDataDrivenDBRecordReader<T>(split, inputClass, conf, getConnection(), dbConf,
                dbConf.getInputConditions(), dbConf.getInputFieldNames(), dbConf.getInputTableName());
    } catch (SQLException ex) {
        throw new IOException(ex.getMessage());
    }
}