Examples of MutableContext


Examples of org.apache.sqoop.common.MutableContext

    jobConf.table.tableName = schemalessTableName;
    jobConf.table.stageTableName = stageTableName;
    createTable(fullStageTableName);
    executor.executeUpdate("INSERT INTO " + fullStageTableName +
      " VALUES(1, 1.1, 'one')");
    MutableContext context = new MutableMapContext();
    InitializerContext initializerContext = new InitializerContext(context);

    @SuppressWarnings("rawtypes")
    Initializer initializer = new GenericJdbcExportInitializer();
    try {
View Full Code Here

Examples of org.apache.sqoop.common.MutableContext

    jobConf.table.stageTableName = stageTableName;
    jobConf.table.clearStageTable = true;
    createTable(fullStageTableName);
    executor.executeUpdate("INSERT INTO " + fullStageTableName +
      " VALUES(1, 1.1, 'one')");
    MutableContext context = new MutableMapContext();
    InitializerContext initializerContext = new InitializerContext(context);

    @SuppressWarnings("rawtypes")
    Initializer initializer = new GenericJdbcExportInitializer();
    initializer.initialize(initializerContext, connConf, jobConf);
View Full Code Here

Examples of org.apache.sqoop.common.MutableContext

    connConf.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connConf.connection.connectionString = GenericJdbcTestConstants.URL;
    jobConf.table.tableName = schemalessTableName;
    jobConf.table.stageTableName = stageTableName;
    createTable(fullStageTableName);
    MutableContext context = new MutableMapContext();
    InitializerContext initializerContext = new InitializerContext(context);

    @SuppressWarnings("rawtypes")
    Initializer initializer = new GenericJdbcExportInitializer();
    initializer.initialize(initializerContext, connConf, jobConf);
View Full Code Here

Examples of org.apache.sqoop.common.MutableContext

    connConf.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connConf.connection.connectionString = GenericJdbcTestConstants.URL;
    jobConf.table.tableName = tableName;

    MutableContext context = new MutableMapContext();

    Initializer initializer = new GenericJdbcExportInitializer();
    initializer.initialize(context, connConf, jobConf);

    verifyResult(context,
View Full Code Here

Examples of org.apache.sqoop.common.MutableContext

    connConf.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connConf.connection.connectionString = GenericJdbcTestConstants.URL;
    jobConf.table.tableName = tableName;
    jobConf.table.columns = tableColumns;

    MutableContext context = new MutableMapContext();

    Initializer initializer = new GenericJdbcExportInitializer();
    initializer.initialize(context, connConf, jobConf);

    verifyResult(context,
View Full Code Here

Examples of org.apache.sqoop.common.MutableContext

    connConf.connection.jdbcDriver = GenericJdbcTestConstants.DRIVER;
    connConf.connection.connectionString = GenericJdbcTestConstants.URL;
    jobConf.table.sql = tableSql;

    MutableContext context = new MutableMapContext();

    Initializer initializer = new GenericJdbcExportInitializer();
    initializer.initialize(context, connConf, jobConf);

    verifyResult(context,
View Full Code Here

Examples of org.apache.sqoop.common.MutableContext

  public void tearDown() {
    executor.close();
  }

  public void testQuery() throws Exception {
    MutableContext context = new MutableMapContext();
    context.setString(
        GenericJdbcConnectorConstants.CONNECTOR_JDBC_DRIVER,
        GenericJdbcTestConstants.DRIVER);
    context.setString(
        GenericJdbcConnectorConstants.CONNECTOR_JDBC_URL,
        GenericJdbcTestConstants.URL);
    context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_DATA_SQL,
        "SELECT * FROM " + executor.delimitIdentifier(tableName)
            + " WHERE ${CONDITIONS}");

    ConnectionConfiguration connConf = new ConnectionConfiguration();
    ImportJobConfiguration jobConf = new ImportJobConfiguration();
View Full Code Here

Examples of org.apache.sqoop.common.MutableContext

    partition.setConditions("16.666666666666667 <= DCOL AND DCOL <= 50.0");
    extractor.run(context, connConf, jobConf, partition, writer);
  }

  public void testSubquery() throws Exception {
    MutableContext context = new MutableMapContext();
    context.setString(
        GenericJdbcConnectorConstants.CONNECTOR_JDBC_DRIVER,
        GenericJdbcTestConstants.DRIVER);
    context.setString(
        GenericJdbcConnectorConstants.CONNECTOR_JDBC_URL,
        GenericJdbcTestConstants.URL);
    context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_DATA_SQL,
        "SELECT SQOOP_SUBQUERY_ALIAS.ICOL,SQOOP_SUBQUERY_ALIAS.VCOL FROM "
            + "(SELECT * FROM " + executor.delimitIdentifier(tableName)
            + " WHERE ${CONDITIONS}) SQOOP_SUBQUERY_ALIAS");

    ConnectionConfiguration connConf = new ConnectionConfiguration();
View Full Code Here

Examples of org.apache.sqoop.common.MutableContext

  public void tearDown() {
    executor.close();
  }

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

    context.setString(
        GenericJdbcConnectorConstants.CONNECTOR_JDBC_DRIVER,
        GenericJdbcTestConstants.DRIVER);
    context.setString(
        GenericJdbcConnectorConstants.CONNECTOR_JDBC_URL,
        GenericJdbcTestConstants.URL);
    context.setString(GenericJdbcConnectorConstants.CONNECTOR_JDBC_DATA_SQL,
        "INSERT INTO " + executor.delimitIdentifier(tableName)
            + " VALUES (?,?,?)");

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

Examples of org.noos.common.context.MutableContext

        Thread.currentThread().setContextClassLoader(bundleClassLoader);

        try {
            XMLWriter writer = new XMLWriter(new OutputStreamWriter(outputStream));

            MutableContext context = new DefaultMutableContext();
            context.put(MyDoggyToolWindowManager.class, toolWindowManager);
            context.put(PersistenceDelegateFilter.class, (filter != null) ? filter : dummyFilter);
            context.put(InternalPersistenceDelegateFilter.class,
                    (filter != null)
                            ? (filter instanceof InternalPersistenceDelegateFilter ? filter : new InternalPersistenceDelegateFilterWrapper(filter))
                            : dummyFilter);
            context.put("standalone", standalone);

            masterElementWriter.write(writer, context);

            writer.flush();
        } catch (Exception e) {
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.