Class DBConfiguration

java.lang.Object
org.apache.hadoop.mapreduce.lib.db.DBConfiguration
org.apache.hadoop.mapred.lib.db.DBConfiguration

@Public @Stable public class DBConfiguration extends DBConfiguration
  • Field Details

    • DRIVER_CLASS_PROPERTY

      public static final String DRIVER_CLASS_PROPERTY
      The JDBC Driver class name
      See Also:
    • URL_PROPERTY

      public static final String URL_PROPERTY
      JDBC Database access URL
      See Also:
    • USERNAME_PROPERTY

      public static final String USERNAME_PROPERTY
      User name to access the database
      See Also:
    • PASSWORD_PROPERTY

      public static final String PASSWORD_PROPERTY
      Password to access the database
      See Also:
    • INPUT_TABLE_NAME_PROPERTY

      public static final String INPUT_TABLE_NAME_PROPERTY
      Input table name
      See Also:
    • INPUT_FIELD_NAMES_PROPERTY

      public static final String INPUT_FIELD_NAMES_PROPERTY
      Field names in the Input table
      See Also:
    • INPUT_CONDITIONS_PROPERTY

      public static final String INPUT_CONDITIONS_PROPERTY
      WHERE clause in the input SELECT statement
      See Also:
    • INPUT_ORDER_BY_PROPERTY

      public static final String INPUT_ORDER_BY_PROPERTY
      ORDER BY clause in the input SELECT statement
      See Also:
    • INPUT_QUERY

      public static final String INPUT_QUERY
      Whole input query, exluding LIMIT...OFFSET
      See Also:
    • INPUT_COUNT_QUERY

      public static final String INPUT_COUNT_QUERY
      Input query to get the count of records
      See Also:
    • INPUT_CLASS_PROPERTY

      public static final String INPUT_CLASS_PROPERTY
      Class name implementing DBWritable which will hold input tuples
      See Also:
    • OUTPUT_TABLE_NAME_PROPERTY

      public static final String OUTPUT_TABLE_NAME_PROPERTY
      Output table name
      See Also:
    • OUTPUT_FIELD_NAMES_PROPERTY

      public static final String OUTPUT_FIELD_NAMES_PROPERTY
      Field names in the Output table
      See Also:
    • OUTPUT_FIELD_COUNT_PROPERTY

      public static final String OUTPUT_FIELD_COUNT_PROPERTY
      Number of fields in the Output table
      See Also:
  • Method Details

    • configureDB

      public static void configureDB(JobConf job, String driverClass, String dbUrl, String userName, String passwd)
      Sets the DB access related fields in the JobConf.
      Parameters:
      job - the job
      driverClass - JDBC Driver class name
      dbUrl - JDBC DB access URL.
      userName - DB access username
      passwd - DB access passwd
    • configureDB

      public static void configureDB(JobConf job, String driverClass, String dbUrl)
      Sets the DB access related fields in the JobConf.
      Parameters:
      job - the job
      driverClass - JDBC Driver class name
      dbUrl - JDBC DB access URL.