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

  }

  @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

  }

  @Override
  /** {@inheritDoc} */
  public int run(SqoopOptions options) {
    HiveImport hiveImport = null;
    Set<String> excludes = new HashSet<String>();

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

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

      if (options.getAllTablesExclude() != null) {
        excludes.addAll(Arrays.asList(options.getAllTablesExclude().split(",")));
      }
View Full Code Here

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

  }

  @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

      // the generateOnly=true in the constructor).
      if (options.doHiveImport()) {
        // For Parquet file, the import action will create hive table directly
        // via kite. So there is no need to create hive table again.
        if (options.getFileLayout() != SqoopOptions.FileLayout.ParquetFile) {
          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

  }

  @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

  }

  @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
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.