Example usage for org.apache.hadoop.mapred.lib.db DBConfiguration INPUT_CLASS_PROPERTY

List of usage examples for org.apache.hadoop.mapred.lib.db DBConfiguration INPUT_CLASS_PROPERTY

Introduction

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

Prototype

String INPUT_CLASS_PROPERTY

To view the source code for org.apache.hadoop.mapred.lib.db DBConfiguration INPUT_CLASS_PROPERTY.

Click Source Link

Document

Class name implementing DBWritable which will hold input tuples

Usage

From source file:com.vertica.hivestoragehandler.VerticaStorageHandler.java

License:Apache License

private void configureJobProperties(TableDesc tableDesc, Map<String, String> jobProperties) {
    if (LOG.isDebugEnabled()) {
        LOG.debug("tableDesc: " + tableDesc);
        LOG.debug("jobProperties: " + jobProperties);
    }//from ww  w . j a  v a  2  s  . c o  m

    String tblName = tableDesc.getTableName();
    Properties tblProps = tableDesc.getProperties();
    String columnNames = tblProps.getProperty(Constants.LIST_COLUMNS);
    jobProperties.put(DBConfiguration.INPUT_CLASS_PROPERTY, DbRecordWritable.class.getName());
    jobProperties.put(DBConfiguration.INPUT_TABLE_NAME_PROPERTY, tblName);
    jobProperties.put(DBConfiguration.OUTPUT_TABLE_NAME_PROPERTY, tblName);
    jobProperties.put(DBConfiguration.INPUT_FIELD_NAMES_PROPERTY, columnNames);
    jobProperties.put(DBConfiguration.OUTPUT_FIELD_NAMES_PROPERTY, columnNames);

    for (String key : tblProps.stringPropertyNames()) {
        if (key.startsWith("mapred.jdbc.")) {
            String value = tblProps.getProperty(key);
            LOG.info("JSH key = " + key + ", value = " + value);
            jobProperties.put(key, value);
            String key2 = key.replace("mapred.", "mapreduce.");
            if (!key.equalsIgnoreCase(key2)) {
                LOG.info("JSH key = " + key2 + ", value = " + value);
                jobProperties.put(key2, value);
            }
        }
    }
}

From source file:infinidb.hadoop.db.InfiniDBConfiguration.java

License:Apache License

Class<?> getInputClass() {
    return job.getClass(DBConfiguration.INPUT_CLASS_PROPERTY, NullDBWritable.class);
}

From source file:infinidb.hadoop.db.InfiniDBConfiguration.java

License:Apache License

void setInputClass(Class<? extends DBWritable> inputClass) {
    job.setClass(DBConfiguration.INPUT_CLASS_PROPERTY, inputClass, DBWritable.class);
}