Examples of HiveImport


Examples of com.cloudera.sqoop.hive.HiveImport

  }

  @Override
  /** {@inheritDoc} */
  public int run(SqoopOptions options) {
    HiveImport hiveImport = null;

    if (allTables) {
      // We got into this method, but we should be in a subclass.
      // (This method only handles a single table)
      // This should not be reached, but for sanity's sake, test here.
      LOG.error("ImportTool.run() can only handle a single table.");
      return 1;
    }

    if (!init(options)) {
      return 1;
    }

    codeGenerator.setManager(manager);

    try {
      if (options.doHiveImport()) {
        hiveImport = new HiveImport(options, manager, options.getConf(), false);
      }

      // Import a single table (or query) the user specified.
      importTable(options, options.getTableName(), hiveImport);
    } catch (IllegalArgumentException iea) {
View Full Code Here

Examples of com.cloudera.sqoop.hive.HiveImport

      // If the user has also specified Hive import code generation,
      // use a HiveImport to generate the DDL statements and write
      // them to files (but don't actually perform the import -- thus
      // the generateOnly=true in the constructor).
      if (options.doHiveImport()) {
        HiveImport hiveImport = new HiveImport(options, manager,
            options.getConf(), true);
        hiveImport.importTable(options.getTableName(),
            options.getHiveTableName(), true);
      }

    } catch (IOException ioe) {
      LOG.error("Encountered IOException running codegen job: "
View Full Code Here

Examples of com.cloudera.sqoop.hive.HiveImport

    if (!init(options)) {
      return 1;
    }

    try {
      HiveImport hiveImport = new HiveImport(options, manager,
          options.getConf(), false);
      hiveImport.importTable(options.getTableName(),
          options.getHiveTableName(), true);
    } catch (IOException ioe) {
      LOG.error("Encountered IOException running create table job: "
          + StringUtils.stringifyException(ioe));
      if (System.getProperty(Sqoop.SQOOP_RETHROW_PROPERTY) != null) {
View Full Code Here

Examples of com.cloudera.sqoop.hive.HiveImport

  }

  @Override
  /** {@inheritDoc} */
  public int run(SqoopOptions options) {
    HiveImport hiveImport = null;

    if (!init(options)) {
      return 1;
    }

    try {
      if (options.doHiveImport()) {
        hiveImport = new HiveImport(options, manager, options.getConf(), false);
      }

      String [] tables = manager.listTables();
      if (null == tables) {
        System.err.println("Could not retrieve tables list from server");
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.