com.cloudera.sqoop.util
Class DirectImportUtils
java.lang.Object
com.cloudera.sqoop.util.DirectImportUtils
public final class DirectImportUtils
- extends java.lang.Object
Utility methods that are common to various the direct import managers.
Field Summary |
static org.apache.commons.logging.Log |
LOG
|
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
setFilePermissions
public static void setFilePermissions(java.io.File file,
java.lang.String modstr)
throws java.io.IOException
- Executes chmod on the specified file, passing in the mode string 'modstr'
which may be e.g. "a+x" or "0600", etc.
- Throws:
java.io.IOException
- if chmod failed.
createHdfsSink
public static SplittableBufferedWriter createHdfsSink(org.apache.hadoop.conf.Configuration conf,
SqoopOptions options,
ImportJobContext context)
throws java.io.IOException
- Open a file in HDFS for write to hold the data associated with a table.
Creates any necessary directories, and returns the OutputStream to write
to. The caller is responsible for calling the close() method on the
returned stream.
- Throws:
java.io.IOException
isLocalhost
public static boolean isLocalhost(java.lang.String someHost)
- Returns:
- true if someHost refers to localhost.
Copyright © 2010 Cloudera, Inc.