com.cloudera.sqoop.hive
Class HiveImport

java.lang.Object
  extended by com.cloudera.sqoop.hive.HiveImport

public class HiveImport
extends java.lang.Object

Utility to import a table into the Hive metastore. Manages the connection to Hive itself as well as orchestrating the use of the other classes in this package.


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
HiveImport(SqoopOptions opts, ConnManager connMgr, org.apache.hadoop.conf.Configuration conf, boolean generateOnly)
           
 
Method Summary
 void importTable(java.lang.String inputTableName, java.lang.String outputTableName, boolean createOnly)
          Perform the import of data from an HDFS path to a Hive table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

HiveImport

public HiveImport(SqoopOptions opts,
                  ConnManager connMgr,
                  org.apache.hadoop.conf.Configuration conf,
                  boolean generateOnly)
Method Detail

importTable

public void importTable(java.lang.String inputTableName,
                        java.lang.String outputTableName,
                        boolean createOnly)
                 throws java.io.IOException
Perform the import of data from an HDFS path to a Hive table.

Parameters:
inputTableName - the name of the table as loaded into HDFS
outputTableName - the name of the table to create in Hive.
createOnly - if true, run the CREATE TABLE statement but not LOAD DATA.
Throws:
java.io.IOException


Copyright © 2010 Cloudera, Inc.