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

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


    context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MINVALUE,
        Timestamp.valueOf("2013-01-01 01:01:01.123").toString());
    context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_PARTITION_MAXVALUE,
        Timestamp.valueOf("2013-12-31 10:40:50.654").toString());

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

    Partitioner partitioner = new GenericJdbcImportPartitioner();
    PartitionerContext partitionerContext = new PartitionerContext(context, 3, null);
    List<Partition> partitions = partitioner.getPartitions(partitionerContext, connConf, jobConf);
View Full Code Here


    context.setString(GenericJdbcConnectorConstants
        .CONNECTOR_JDBC_PARTITION_MINVALUE, "0");
    context.setString(GenericJdbcConnectorConstants
        .CONNECTOR_JDBC_PARTITION_MAXVALUE, "1");

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

    Partitioner partitioner = new GenericJdbcImportPartitioner();
    PartitionerContext partitionerContext = new PartitionerContext(context, 3, null);
    List<Partition> partitions = partitioner.getPartitions(partitionerContext, connConf, jobConf);
View Full Code Here

    context.setString(GenericJdbcConnectorConstants
        .CONNECTOR_JDBC_PARTITION_MINVALUE, "A");
    context.setString(GenericJdbcConnectorConstants
        .CONNECTOR_JDBC_PARTITION_MAXVALUE, "Z");

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

    Partitioner partitioner = new GenericJdbcImportPartitioner();
    PartitionerContext partitionerContext = new PartitionerContext(context, 25, null);
    List<Partition> partitions = partitioner.getPartitions(partitionerContext, connConf, jobConf);
View Full Code Here

    context.setString(GenericJdbcConnectorConstants
      .CONNECTOR_JDBC_PARTITION_MINVALUE, "Breezy Badger");
    context.setString(GenericJdbcConnectorConstants
      .CONNECTOR_JDBC_PARTITION_MAXVALUE, "Warty Warthog");

    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();
    Partitioner partitioner = new GenericJdbcImportPartitioner();
    PartitionerContext partitionerContext = new PartitionerContext(context, 5, null);
    List<Partition> partitions = partitioner.getPartitions(partitionerContext, connConf, jobConf);
    assertEquals(partitions.size(), 5);
View Full Code Here

    context.setString(GenericJdbcConnectorConstants
        .CONNECTOR_JDBC_PARTITION_MINVALUE, "AAA");
    context.setString(GenericJdbcConnectorConstants
        .CONNECTOR_JDBC_PARTITION_MAXVALUE, "AAF");

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

    Partitioner partitioner = new GenericJdbcImportPartitioner();
    PartitionerContext partitionerContext = new PartitionerContext(context, 5, null);
View Full Code Here

    context.setString(GenericJdbcConnectorConstants
        .CONNECTOR_JDBC_PARTITION_MINVALUE, "AAA");
    context.setString(GenericJdbcConnectorConstants
        .CONNECTOR_JDBC_PARTITION_MAXVALUE, "AAE");

    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();
    jobConf.table.partitionColumnNull = true;

    Partitioner partitioner = new GenericJdbcImportPartitioner();
    PartitionerContext partitionerContext = new PartitionerContext(context, 5, null);
View Full Code Here

  }

  public void testQuery() throws Exception {
    MutableContext context = new MutableMapContext();

    ConnectionConfiguration connectionConfig = new ConnectionConfiguration();

    connectionConfig.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connectionConfig.connection.connectionString = GenericJdbcTestConstants.URL;

    ImportJobConfiguration jobConfig = new ImportJobConfiguration();
View Full Code Here

  }

  public void testSubquery() throws Exception {
    MutableContext context = new MutableMapContext();

    ConnectionConfiguration connectionConfig = new ConnectionConfiguration();

    connectionConfig.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connectionConfig.connection.connectionString = GenericJdbcTestConstants.URL;

    ImportJobConfiguration jobConfig = new ImportJobConfiguration();
View Full Code Here

  }

  public void testInsert() throws Exception {
    MutableContext context = new MutableMapContext();

    ConnectionConfiguration connectionConfig = new ConnectionConfiguration();

    connectionConfig.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connectionConfig.connection.connectionString = GenericJdbcTestConstants.URL;

    ExportJobConfiguration jobConfig = new ExportJobConfiguration();
View Full Code Here

    executor.close();
  }

  @SuppressWarnings("unchecked")
  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 = schemalessTableName;
View Full Code Here

TOP

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

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.