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

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

Introduction

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

Prototype

public String getInputTableName() 

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 {// w w w .jav  a2  s .  c o  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());
    }
}