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

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


  }

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

    connConf.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connConf.connection.connectionString = GenericJdbcTestConstants.URL;
    //specifying stage table without specifying table name
    jobConf.table.stageTableName = stageTableName;
View Full Code Here


  }

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

    String fullStageTableName = executor.delimitIdentifier(stageTableName);

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

  }

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

    String fullStageTableName = executor.delimitIdentifier(stageTableName);

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

    }
  }

  private Validation validateExportJob(Object jobConfiguration) {
    Validation validation = new Validation(ExportJobConfiguration.class);
    ExportJobConfiguration configuration = (ExportJobConfiguration)jobConfiguration;

    if(configuration.table.tableName == null && configuration.table.sql == null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Either table name or SQL must be specified");
    }
    if(configuration.table.tableName != null && configuration.table.sql != null) {
View Full Code Here

    executor.close();
  }

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

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

            + " VALUES (?,?,?)");
  }

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

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

            + " (" + tableColumns + ") VALUES (?,?)");
  }

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

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

  private GenericJdbcExecutor executor;

  @Override
  public void initialize(MutableContext context, Object connectionConfiguration, Object jobConfiguration) {
    ConnectionConfiguration connectionConfig = (ConnectionConfiguration)connectionConfiguration;
    ExportJobConfiguration jobConfig = (ExportJobConfiguration)jobConfiguration;

    configureJdbcProperties(context, connectionConfig, jobConfig);
    try {
      configureTableProperties(context, connectionConfig, jobConfig);
View Full Code Here

    ConnectionConfiguration connectionConfig = new ConnectionConfiguration();

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

    ExportJobConfiguration jobConfig = new ExportJobConfiguration();

    context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_DATA_SQL,
        "INSERT INTO " + executor.delimitIdentifier(tableName) + " VALUES (?,?,?)");

    Loader loader = new GenericJdbcExportLoader();
View Full Code Here

    }
  }

  private Validation validateExportJob(Object jobConfiguration) {
    Validation validation = new Validation(ExportJobConfiguration.class);
    ExportJobConfiguration configuration = (ExportJobConfiguration)jobConfiguration;

    if(configuration.table.tableName == null && configuration.table.sql == null) {
      validation.addMessage(Status.UNACCEPTABLE, "table", "Either table name or SQL must be specified");
    }
    if(configuration.table.tableName != null && configuration.table.sql != null) {
View Full Code Here

TOP

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

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.