com.cloudera.sqoop.manager
Class MySQLUtils
java.lang.Object
com.cloudera.sqoop.manager.MySQLUtils
public final class MySQLUtils
- extends java.lang.Object
Helper methods and constants for MySQL imports/exports.
Method Summary |
static boolean |
outputDelimsAreMySQL(org.apache.hadoop.conf.Configuration conf)
|
static java.lang.String |
writePasswordFile(org.apache.hadoop.conf.Configuration conf)
Writes the user's password to a tmp file with 0600 permissions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.apache.commons.logging.Log LOG
MYSQL_DUMP_CMD
public static final java.lang.String MYSQL_DUMP_CMD
- See Also:
- Constant Field Values
MYSQL_IMPORT_CMD
public static final java.lang.String MYSQL_IMPORT_CMD
- See Also:
- Constant Field Values
OUTPUT_FIELD_DELIM_KEY
public static final java.lang.String OUTPUT_FIELD_DELIM_KEY
- See Also:
- Constant Field Values
OUTPUT_RECORD_DELIM_KEY
public static final java.lang.String OUTPUT_RECORD_DELIM_KEY
- See Also:
- Constant Field Values
OUTPUT_ENCLOSED_BY_KEY
public static final java.lang.String OUTPUT_ENCLOSED_BY_KEY
- See Also:
- Constant Field Values
OUTPUT_ESCAPED_BY_KEY
public static final java.lang.String OUTPUT_ESCAPED_BY_KEY
- See Also:
- Constant Field Values
OUTPUT_ENCLOSE_REQUIRED_KEY
public static final java.lang.String OUTPUT_ENCLOSE_REQUIRED_KEY
- See Also:
- Constant Field Values
TABLE_NAME_KEY
public static final java.lang.String TABLE_NAME_KEY
CONNECT_STRING_KEY
public static final java.lang.String CONNECT_STRING_KEY
USERNAME_KEY
public static final java.lang.String USERNAME_KEY
PASSWORD_KEY
public static final java.lang.String PASSWORD_KEY
WHERE_CLAUSE_KEY
public static final java.lang.String WHERE_CLAUSE_KEY
EXTRA_ARGS_KEY
public static final java.lang.String EXTRA_ARGS_KEY
- See Also:
- Constant Field Values
MYSQL_DEFAULT_CHARSET
public static final java.lang.String MYSQL_DEFAULT_CHARSET
- See Also:
- Constant Field Values
outputDelimsAreMySQL
public static boolean outputDelimsAreMySQL(org.apache.hadoop.conf.Configuration conf)
- Returns:
- true if the user's output delimiters match those used by mysqldump.
fields: ,
lines: \n
optional-enclose: \'
escape: \\
writePasswordFile
public static java.lang.String writePasswordFile(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
- Writes the user's password to a tmp file with 0600 permissions.
- Returns:
- the filename used.
- Throws:
java.io.IOException
Copyright © 2010 Cloudera, Inc.