HDFS-2572. Remove Unnecessary double-check in DN#getHostName (harsh)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1204177 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5573b691d5
commit
67f25b0a1b
|
@ -55,6 +55,8 @@ Trunk (unreleased changes)
|
|||
HDFS-2564. Cleanup unnecessary exceptions thrown and unnecessary casts.
|
||||
(Hari Mankude via eli)
|
||||
|
||||
HDFS-2572. Remove unnecessary double-check in DN#getHostName. (harsh)
|
||||
|
||||
OPTIMIZATIONS
|
||||
HDFS-2477. Optimize computing the diff between a block report and the
|
||||
namenode state. (Tomasz Nykiel via hairong)
|
||||
|
|
|
@ -454,11 +454,8 @@ public class DataNode extends Configured
|
|||
|
||||
private static String getHostName(Configuration config)
|
||||
throws UnknownHostException {
|
||||
String name = null;
|
||||
// use configured nameserver & interface to get local hostname
|
||||
if (config.get(DFS_DATANODE_HOST_NAME_KEY) != null) {
|
||||
name = config.get(DFS_DATANODE_HOST_NAME_KEY);
|
||||
}
|
||||
String name = config.get(DFS_DATANODE_HOST_NAME_KEY);
|
||||
if (name == null) {
|
||||
name = DNS
|
||||
.getDefaultHost(config.get(DFS_DATANODE_DNS_INTERFACE_KEY,
|
||||
|
|
Loading…
Reference in New Issue