Package org.apache.sqoop.connector.jdbc.configuration

Examples of org.apache.sqoop.connector.jdbc.configuration.ImportJobConfiguration


    context.setString(
        GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MAXVALUE,
        String.valueOf(START + NUMBER_OF_ROWS - 1));

    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();

    Partitioner partitioner = new GenericJdbcImportPartitioner();
    List<Partition> partitions = partitioner.getPartitions(context, 3, connConf, jobConf);

    verifyResult(partitions, new String[] {
View Full Code Here


    context.setString(
        GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MAXVALUE,
        String.valueOf(START + NUMBER_OF_ROWS - 1));

    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();

    Partitioner partitioner = new GenericJdbcImportPartitioner();
    List<Partition> partitions = partitioner.getPartitions(context, 13, connConf, jobConf);

    verifyResult(partitions, new String[] {
View Full Code Here

    context.setString(
        GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MAXVALUE,
        String.valueOf((double)(START + NUMBER_OF_ROWS - 1)));

    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();

    Partitioner partitioner = new GenericJdbcImportPartitioner();
    List<Partition> partitions = partitioner.getPartitions(context, 5, connConf, jobConf);

    verifyResult(partitions, new String[] {
View Full Code Here

        GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MAXVALUE,
        String.valueOf((double)(START + NUMBER_OF_ROWS - 1)));
    context.setString(Constants.JOB_ETL_NUMBER_PARTITIONS, "3");

    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();

    Partitioner partitioner = new GenericJdbcImportPartitioner();
    List<Partition> partitions = partitioner.getPartitions(context, 3, connConf, jobConf);

    verifyResult(partitions, new String[] {
View Full Code Here

    context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_DATA_SQL,
        "SELECT * FROM " + executor.delimitIdentifier(tableName)
            + " WHERE ${CONDITIONS}");

    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();

    GenericJdbcImportPartition partition;

    Extractor extractor = new GenericJdbcImportExtractor();
    DummyWriter writer = new DummyWriter();
View Full Code Here

        "SELECT SQOOP_SUBQUERY_ALIAS.ICOL,SQOOP_SUBQUERY_ALIAS.VCOL FROM "
            + "(SELECT * FROM " + executor.delimitIdentifier(tableName)
            + " WHERE ${CONDITIONS}) SQOOP_SUBQUERY_ALIAS");

    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();

    GenericJdbcImportPartition partition;

    Extractor extractor = new GenericJdbcImportExtractor();
    DummyWriter writer = new DummyWriter();
View Full Code Here

    executor.close();
  }

  public void testTableName() throws Exception {
    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();

    connConf.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connConf.connection.connectionString = GenericJdbcTestConstants.URL;
    jobConf.table.tableName = tableName;
View Full Code Here

        String.valueOf(START+NUMBER_OF_ROWS-1));
  }

  public void testTableNameWithTableColumns() throws Exception {
    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();

    connConf.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connConf.connection.connectionString = GenericJdbcTestConstants.URL;
    jobConf.table.tableName = tableName;
    jobConf.table.columns = tableColumns;
View Full Code Here

        String.valueOf(START+NUMBER_OF_ROWS-1));
  }

  public void testTableSql() throws Exception {
    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();

    connConf.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connConf.connection.connectionString = GenericJdbcTestConstants.URL;
    jobConf.table.sql = tableSql;
    jobConf.table.partitionColumn = "DCOL";
View Full Code Here

        String.valueOf((double)(START+NUMBER_OF_ROWS-1)));
  }

  public void testTableSqlWithTableColumns() throws Exception {
    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();

    connConf.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connConf.connection.connectionString = GenericJdbcTestConstants.URL;
    jobConf.table.sql = tableSql;
    jobConf.table.columns = tableColumns;
View Full Code Here

TOP

Related Classes of org.apache.sqoop.connector.jdbc.configuration.ImportJobConfiguration

Copyright © 2018 www.massapicom. 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.