hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1586034 - in /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
Date Wed, 09 Apr 2014 16:55:04 GMT
Author: szetszwo
Date: Wed Apr  9 16:55:03 2014
New Revision: 1586034

URL: http://svn.apache.org/r1586034
Log:
HDFS-6206. Fix NullPointerException in DFSUtil.substituteForWildcardAddress.

Modified:
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1586034&r1=1586033&r2=1586034&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Wed Apr  9 16:55:03 2014
@@ -347,6 +347,9 @@ Release 2.4.1 - UNRELEASED
     HDFS-6198. DataNode rolling upgrade does not correctly identify current
     block pool directory and replace with trash on Windows. (cnauroth)
 
+    HDFS-6206. Fix NullPointerException in DFSUtil.substituteForWildcardAddress.
+    (szetszwo) 
+
 Release 2.4.0 - 2014-04-07 
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java?rev=1586034&r1=1586033&r2=1586034&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java
Wed Apr  9 16:55:03 2014
@@ -37,6 +37,7 @@ import static org.apache.hadoop.hdfs.DFS
 import java.io.IOException;
 import java.io.PrintStream;
 import java.io.UnsupportedEncodingException;
+import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -1100,7 +1101,8 @@ public class DFSUtil {
     InetSocketAddress sockAddr = NetUtils.createSocketAddr(configuredAddress);
     InetSocketAddress defaultSockAddr = NetUtils.createSocketAddr(defaultHost
         + ":0");
-    if (sockAddr.getAddress().isAnyLocalAddress()) {
+    final InetAddress addr = sockAddr.getAddress();
+    if (addr != null && addr.isAnyLocalAddress()) {
       if (UserGroupInformation.isSecurityEnabled() &&
           defaultSockAddr.getAddress().isAnyLocalAddress()) {
         throw new IOException("Cannot use a wildcard address with security. " +



Mime
View raw message