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

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


public class GenericJdbcValidator extends Validator {

  @Override
  public Validation validateConnection(Object configuration) {
    Validation validation = new Validation(ConnectionConfiguration.class);
    ConnectionConfiguration config = (ConnectionConfiguration)configuration;

    if(config.connection.connectionString == null
      || !config.connection.connectionString.startsWith("jdbc:")) {
      validation.addMessage(Status.UNACCEPTABLE,
        "connection", "connectionString",
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

public class GenericJdbcValidator extends Validator {

  @Override
  public Validation validateConnection(Object configuration) {
    Validation validation = new Validation(ConnectionConfiguration.class);
    ConnectionConfiguration config = (ConnectionConfiguration)configuration;

    if(config.connection.jdbcDriver == null) {
      validation.addMessage(Status.UNACCEPTABLE, "connection", "jdbcDriver", "Driver can't be empty");
    } else {
      try {
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

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

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

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

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

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

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

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

  @SuppressWarnings("unchecked")
  public void testTableNameWithSchema() throws Exception {
    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();

    String fullTableName = executor.delimitIdentifier(schemaName) + "." + executor.delimitIdentifier(tableName);

    connConf.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
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.