com.cloudera.sqoop.manager
Class DirectMySQLManager

java.lang.Object
  extended by com.cloudera.sqoop.manager.ConnManager
      extended by com.cloudera.sqoop.manager.SqlManager
          extended by com.cloudera.sqoop.manager.GenericJdbcManager
              extended by com.cloudera.sqoop.manager.MySQLManager
                  extended by com.cloudera.sqoop.manager.DirectMySQLManager

public class DirectMySQLManager
extends MySQLManager

Manages direct connections to MySQL databases so we can use mysqldump to get really fast dumps.


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Fields inherited from class com.cloudera.sqoop.manager.SqlManager
options
 
Constructor Summary
DirectMySQLManager(SqoopOptions options)
           
 
Method Summary
 void exportTable(ExportJobContext context)
          Export the table from HDFS by using mysqlimport to insert the data back into the database.
 void importTable(ImportJobContext context)
          Import the table into HDFS by using mysqldump to pull out the data from the database and upload the files directly to HDFS.
 
Methods inherited from class com.cloudera.sqoop.manager.MySQLManager
escapeColName, escapeTableName, execAndPrint, execute, getColNamesQuery, listDatabases, markWarningPrinted, release
 
Methods inherited from class com.cloudera.sqoop.manager.GenericJdbcManager
close, discardConnection, getConnection, getDriverClass, hasOpenConnection
 
Methods inherited from class com.cloudera.sqoop.manager.SqlManager
formatAndPrintResultSet, getColTypesQuery, getColumnNames, getColumnTypes, getPrimaryKey, getSplitColumn, listTables, makeConnection, readTable, toHiveType, toJavaType
 
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

DirectMySQLManager

public DirectMySQLManager(SqoopOptions options)
Method Detail

importTable

public void importTable(ImportJobContext context)
                 throws java.io.IOException,
                        ImportException
Import the table into HDFS by using mysqldump to pull out the data from the database and upload the files directly to HDFS.

Overrides:
importTable in class MySQLManager
Throws:
java.io.IOException
ImportException

exportTable

public void exportTable(ExportJobContext context)
                 throws java.io.IOException,
                        ExportException
Export the table from HDFS by using mysqlimport to insert the data back into the database.

Overrides:
exportTable in class SqlManager
Throws:
java.io.IOException
ExportException


Copyright © 2010 Cloudera, Inc.