Examples of DBConfiguration


Examples of org.apache.sqoop.mapreduce.db.DBConfiguration

        throws ClassNotFoundException, SQLException {
      super(context);

      Configuration conf = getConf();

      DBConfiguration dbConf = new DBConfiguration(conf);
      procedureName = dbConf.getOutputTableName();
      columnNames = dbConf.getOutputFieldNames();
      columnCount = dbConf.getOutputFieldCount();
    }
View Full Code Here

Examples of org.apache.sqoop.mapreduce.db.DBConfiguration

  @Override
  public void runExport() throws ExportException, IOException {
    SqoopOptions options = context.getOptions();
    Configuration conf = options.getConf();
    DBConfiguration dbConf = null;
    String outputTableName = context.getTableName();
    String tableName = outputTableName;
    String tableClassName =
        new TableClassName(options).getClassForTable(outputTableName);

    LOG.info("Beginning export of " + outputTableName);
    loadJars(conf, context.getJarFile(), tableClassName);

    try {
      Job job = new Job(conf);
      dbConf = new DBConfiguration(job.getConfiguration());
      dbConf.setOutputTableName(tableName);
      configureInputFormat(job, tableName, tableClassName, null);
      configureOutputFormat(job, tableName, tableClassName);
      configureNumTasks(job);
      propagateOptionsToJob(job);
      job.setMapperClass(getMapperClass());
View Full Code Here

Examples of org.apache.sqoop.mapreduce.db.DBConfiguration


  protected void setup(Context context)
      throws IOException, InterruptedException {
    conf = context.getConfiguration();
    dbConf = new DBConfiguration(conf);
    tableName = dbConf.getOutputTableName();
    try {
      conn = dbConf.getConnection();
      conn.setAutoCommit(false);
    } catch (ClassNotFoundException ex) {
View Full Code Here

Examples of org.apache.sqoop.mapreduce.db.DBConfiguration

  }

  public void map(Integer dataSliceId, NullWritable val, Context context)
      throws IOException, InterruptedException {
    conf = context.getConfiguration();
    dbc = new DBConfiguration(conf);
    numMappers = ConfigurationHelper.getConfNumMaps(conf);
    char rd = (char) conf.getInt(DelimiterSet.OUTPUT_RECORD_DELIM_KEY, '\n');
    initNetezzaExternalTableImport(dataSliceId);
    counter = new PerfCounters();
    counter.startClock();
View Full Code Here

Examples of org.apache.sqoop.mapreduce.db.DBConfiguration

  protected void setup(Context context)
      throws IOException, InterruptedException {
    super.setup(context);
    conf = context.getConfiguration();
    dbConf = new DBConfiguration(conf);
    tableName = dbConf.getOutputTableName();
    tmpTableName = tableName + "_" + context.getTaskAttemptID().toString();

    Connection conn = null;
    try {
View Full Code Here

Examples of org.apache.sqoop.mapreduce.db.DBConfiguration

  }

  private void initNetezzaExternalTableExport(Context context)
      throws IOException {
    this.conf = context.getConfiguration();
    dbc = new DBConfiguration(conf);
    File taskAttemptDir = TaskId.getLocalWorkPath(conf);
    this.outputDelimiters = new DelimiterSet(',', '\n', '\000', '\\', false);
    this.fifoFile = new File(taskAttemptDir, ("nzexttable-export.txt"));
    String filename = fifoFile.toString();
    NamedFifo nf;
View Full Code Here

Examples of org.apache.sqoop.mapreduce.db.DBConfiguration

  protected void setup(Context context)
    throws IOException, InterruptedException {

    super.setup(context);
    conf = context.getConfiguration();
    dbConf = new DBConfiguration(conf);
    CopyManager cm = null;
    try {
      conn = dbConf.getConnection();
      cm = ((PGConnection)conn).getCopyAPI();
    } catch (ClassNotFoundException ex) {
View Full Code Here

Examples of org.apache.sqoop.mapreduce.db.DBConfiguration

    // necessary to wipe the state of previous call to configureDB
    jobConf = new JobConf();
    DBConfiguration.configureDB(jobConf, "org.hsqldb.jdbcDriver",
      getConnectString(), null, null, null, null);
    DBConfiguration dbConfiguration = new DBConfiguration(jobConf);
    Connection connection = dbConfiguration.getConnection();
    assertNotNull(connection);
  }
View Full Code Here

Examples of org.apache.sqoop.mapreduce.db.DBConfiguration

    // necessary to wipe the state of previous call to configureDB
    jobConf = new JobConf();
    DBConfiguration.configureDB(jobConf, "org.hsqldb.jdbcDriver",
      getConnectString(), null, null, null, null);
    DBConfiguration dbConfiguration = new DBConfiguration(jobConf);
    Connection connection = dbConfiguration.getConnection();
    assertNotNull(connection);
  }
View Full Code Here

Examples of org.apache.sqoop.mapreduce.db.DBConfiguration

  }

  private void initNetezzaExternalTableExport(Context context)
    throws IOException {
    this.conf = context.getConfiguration();
    dbc = new DBConfiguration(conf);
    File taskAttemptDir = TaskId.getLocalWorkPath(conf);

    char fd = (char) conf.getInt(DelimiterSet.INPUT_FIELD_DELIM_KEY, ',');
    char qc = (char) conf.getInt(DelimiterSet.INPUT_ENCLOSED_BY_KEY, 0);
    char ec = (char) conf.getInt(DelimiterSet.INPUT_ESCAPED_BY_KEY, 0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.