public class HDFSConfig extends AbstractHadoopJobConfig implements OptionHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_HOST
Default host for the name node
|
static java.lang.String |
DEFAULT_PORT
Default port for the name node
|
static java.lang.String |
HADOOP_FS_DEFAULT_NAME
property in core-site.xml that specifies the host running the namenode
|
static java.lang.String |
HDFS_HOST
Key for the HDFS host (name node)
|
static java.lang.String |
HDFS_PORT
Key for the HDFS port
|
static java.lang.String |
IPC_CLIENT_CONNECT_MAX_RETRIES
property in the core-site.xml that specifies how many times to try to
contact the name node before giving up
|
DEFAULT_PORT_YARN, JOBTRACKER_HOST, JOBTRACKER_PORT
Constructor and Description |
---|
HDFSConfig()
Constructor - sets defaults
|
Modifier and Type | Method and Description |
---|---|
void |
configureForHadoop(org.apache.hadoop.conf.Configuration conf,
Environment env)
Populate the supplied Configuration object with HDFS-related settings
|
static java.lang.String |
constructHostURL(HDFSConfig config,
Environment env)
Build an HDFS URL from the settings in the supplied HDFSConfig
|
java.lang.String |
getHDFSHost()
Get the HDFS (name node) host to use
|
java.lang.String |
getHDFSPort()
Get the HDFS (name node) port
|
java.lang.String[] |
getOptions() |
java.lang.String |
HDFSHostTipText()
Get the tool tip text for this property
|
java.lang.String |
HDFSPortTipText()
Get the tool tip text for this property
|
java.util.Enumeration<Option> |
listOptions() |
void |
setHDFSHost(java.lang.String host)
Set the HDFS (name node) host to use
|
void |
setHDFSPort(java.lang.String port)
Set the HDFS (name node) port
|
void |
setOptions(java.lang.String[] options) |
getJobTrackerHost, getJobTrackerPort, isHadoop2, jobTrackerHostTipText, jobTrackerPortTipText, setJobTrackerHost, setJobTrackerPort
public static final java.lang.String HDFS_HOST
public static final java.lang.String HDFS_PORT
public static final java.lang.String HADOOP_FS_DEFAULT_NAME
public static final java.lang.String IPC_CLIENT_CONNECT_MAX_RETRIES
public static final java.lang.String DEFAULT_PORT
public static final java.lang.String DEFAULT_HOST
public java.util.Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
listOptions
in class distributed.core.DistributedJobConfig
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface OptionHandler
setOptions
in class distributed.core.DistributedJobConfig
java.lang.Exception
public java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class distributed.core.DistributedJobConfig
public java.lang.String HDFSHostTipText()
public void setHDFSHost(java.lang.String host)
host
- the name node's hostpublic java.lang.String getHDFSHost()
public java.lang.String HDFSPortTipText()
public void setHDFSPort(java.lang.String port)
port
- the port that the name node is running onpublic java.lang.String getHDFSPort()
public static java.lang.String constructHostURL(HDFSConfig config, Environment env)
config
- the HDFS config to use for building the URLenv
- environment variablespublic void configureForHadoop(org.apache.hadoop.conf.Configuration conf, Environment env)
conf
- the Configuration object to populateenv
- environment variables