Package org.apache.sqoop.manager

Examples of org.apache.sqoop.manager.ConnManager


  @Override
  protected void configureInputFormat(Job job, String tableName,
                                      String tableClassName, String splitByCol)
    throws ClassNotFoundException, IOException {
    super.configureInputFormat(job, tableName, tableClassName, splitByCol);
    ConnManager mgr = context.getConnManager();
    String username = options.getUsername();
    if (null == username || username.length() == 0) {
      DBConfiguration.configureDB(job.getConfiguration(),
                                  mgr.getDriverClass(),
                                  options.getConnectString(),
                                  options.getFetchSize(),
                                  options.getConnectionParams());
    } else {
      DBConfiguration.configureDB(job.getConfiguration(),
                                  mgr.getDriverClass(),
                                  options.getConnectString(),
                                  username, options.getPassword(),
                                  options.getFetchSize(),
                                  options.getConnectionParams());
    }
View Full Code Here


  }


  @Override
  public void runExport() throws ExportException, IOException {
    ConnManager cmgr = context.getConnManager();
    SqoopOptions options = context.getOptions();
    Configuration conf = options.getConf();
    DBConfiguration dbConf = null;
    String outputTableName = context.getTableName();
    String tableName = outputTableName;
View Full Code Here

  @Override
  protected void configureInputFormat(Job job, String tableName,
                                      String tableClassName, String splitByCol)
    throws ClassNotFoundException, IOException {
    super.configureInputFormat(job, tableName, tableClassName, splitByCol);
    ConnManager mgr = context.getConnManager();
    String username = options.getUsername();
    if (null == username || username.length() == 0) {
      DBConfiguration.configureDB(job.getConfiguration(),
                                  mgr.getDriverClass(),
                                  options.getConnectString(),
                                  options.getFetchSize(),
                                  options.getConnectionParams());
    } else {
      DBConfiguration.configureDB(job.getConfiguration(),
                                  mgr.getDriverClass(),
                                  options.getConnectString(),
                                  username, options.getPassword(),
                                  options.getFetchSize(),
                                  options.getConnectionParams());
    }
View Full Code Here

      IOException {

    // Configure the delimiters, etc.
    Configuration conf = job.getConfiguration();

    ConnManager mgr = context.getConnManager();
    String username = options.getUsername();
    if (null == username || username.length() == 0) {
      DBConfiguration.configureDB(job.getConfiguration(), mgr.getDriverClass(),
          options.getConnectString());
    } else {
      DBConfiguration.configureDB(job.getConfiguration(), mgr.getDriverClass(),
          options.getConnectString(), username, options.getPassword());
    }

    String[] colNames = options.getColumns();
    if (null == colNames) {
      colNames = mgr.getColumnNames(tableName);
    }

    String[] sqlColNames = null;
    if (null != colNames) {
      sqlColNames = new String[colNames.length];
      for (int i = 0; i < colNames.length; i++) {
        sqlColNames[i] = mgr.escapeColName(colNames[i]);
      }
    }

    DataDrivenDBInputFormat.setInput(job, DBWritable.class, tableName, null,
        null, sqlColNames);
View Full Code Here

  @Override
  protected void configureInputFormat(Job job, String tableName,
                                      String tableClassName, String splitByCol)
    throws ClassNotFoundException, IOException {
    super.configureInputFormat(job, tableName, tableClassName, splitByCol);
    ConnManager mgr = context.getConnManager();
    String username = options.getUsername();
    if (null == username || username.length() == 0) {
      DBConfiguration.configureDB(job.getConfiguration(),
                                  mgr.getDriverClass(),
                                  options.getConnectString(),
                                  options.getFetchSize(),
                                  options.getConnectionParams());
    } else {
      DBConfiguration.configureDB(job.getConfiguration(),
                                  mgr.getDriverClass(),
                                  options.getConnectString(),
                                  username, options.getPassword(),
                                  options.getFetchSize(),
                                  options.getConnectionParams());
    }
View Full Code Here

TOP

Related Classes of org.apache.sqoop.manager.ConnManager

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.