Package org.apache.sqoop.job.etl

Examples of org.apache.sqoop.job.etl.Extractor.extract()


    try {
      LOG.info("Starting progress service");
      progressService.scheduleAtFixedRate(new ProgressRunnable(context), 0, 2, TimeUnit.MINUTES);

      LOG.info("Running extractor class " + extractorName);
      extractor.extract(extractorContext, configConnection, configJob, split.getPartition());
      LOG.info("Extractor has finished");
      context.getCounter(SqoopCounters.ROWS_READ)
              .increment(extractor.getRowsRead());
    } catch (Exception e) {
      throw new SqoopException(MapreduceExecutionError.MAPRED_EXEC_0017, e);
View Full Code Here


    DummyWriter writer = new DummyWriter();
    ExtractorContext extractorContext = new ExtractorContext(context, writer, null);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("-50.0 <= DCOL AND DCOL < -16.6666666666666665");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("-16.6666666666666665 <= DCOL AND DCOL < 16.666666666666667");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
View Full Code Here

    partition.setConditions("-50.0 <= DCOL AND DCOL < -16.6666666666666665");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("-16.6666666666666665 <= DCOL AND DCOL < 16.666666666666667");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("16.666666666666667 <= DCOL AND DCOL <= 50.0");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
  }
View Full Code Here

    partition.setConditions("-16.6666666666666665 <= DCOL AND DCOL < 16.666666666666667");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("16.666666666666667 <= DCOL AND DCOL <= 50.0");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
  }

  public void testSubquery() throws Exception {
    MutableContext context = new MutableMapContext();
View Full Code Here

    DummyWriter writer = new DummyWriter();
    ExtractorContext extractorContext = new ExtractorContext(context, writer, null);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("-50 <= ICOL AND ICOL < -16");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("-16 <= ICOL AND ICOL < 17");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
View Full Code Here

    partition.setConditions("-50 <= ICOL AND ICOL < -16");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("-16 <= ICOL AND ICOL < 17");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("17 <= ICOL AND ICOL < 50");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
  }
View Full Code Here

    partition.setConditions("-16 <= ICOL AND ICOL < 17");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("17 <= ICOL AND ICOL < 50");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
  }

  public class DummyWriter extends DataWriter {
    int indx = START;
View Full Code Here

    try {
      LOG.info("Starting progress service");
      progressService.scheduleAtFixedRate(new ProgressRunnable(context), 0, 2, TimeUnit.MINUTES);

      LOG.info("Running extractor class " + extractorName);
      extractor.extract(extractorContext, configConnection, configJob, split.getPartition());
      LOG.info("Extractor has finished");
      context.getCounter(SqoopCounters.ROWS_READ)
              .increment(extractor.getRowsRead());
    } catch (Exception e) {
      throw new SqoopException(MapreduceExecutionError.MAPRED_EXEC_0017, e);
View Full Code Here

    DummyWriter writer = new DummyWriter();
    ExtractorContext extractorContext = new ExtractorContext(context, writer);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("-50.0 <= DCOL AND DCOL < -16.6666666666666665");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("-16.6666666666666665 <= DCOL AND DCOL < 16.666666666666667");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
View Full Code Here

    partition.setConditions("-50.0 <= DCOL AND DCOL < -16.6666666666666665");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("-16.6666666666666665 <= DCOL AND DCOL < 16.666666666666667");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);

    partition = new GenericJdbcImportPartition();
    partition.setConditions("16.666666666666667 <= DCOL AND DCOL <= 50.0");
    extractor.extract(extractorContext, connectionConfig, jobConfig, partition);
  }
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.