diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 7d2a15a309e..c428fc97aa4 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -167,6 +167,9 @@ Release 2.4.1 - UNRELEASED HDFS-6236. ImageServlet should use Time#monotonicNow to measure latency. (cnauroth) + HDFS-6245. datanode fails to start with a bad disk even when failed + volumes is set. (Arpit Agarwal) + Release 2.4.0 - 2014-04-07 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java index 456e6c1ae6d..7215253fb07 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java @@ -1783,8 +1783,15 @@ public static List getStorageLocations(Configuration conf) { try { location = StorageLocation.parse(locationString); } catch (IOException ioe) { - throw new IllegalArgumentException("Failed to parse conf property " - + DFS_DATANODE_DATA_DIR_KEY + ": " + locationString, ioe); + LOG.error("Failed to initialize storage directory " + locationString + + ". Exception details: " + ioe); + // Ignore the exception. + continue; + } catch (SecurityException se) { + LOG.error("Failed to initialize storage directory " + locationString + + ". Exception details: " + se); + // Ignore the exception. + continue; } locations.add(location); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/StorageLocation.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/StorageLocation.java index 66ab18f31fb..f85fcb115ef 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/StorageLocation.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/StorageLocation.java @@ -78,7 +78,8 @@ public File getFile() { * @return A StorageLocation object if successfully parsed, null otherwise. * Does not throw any exceptions. */ - static StorageLocation parse(String rawLocation) throws IOException { + static StorageLocation parse(String rawLocation) + throws IOException, SecurityException { Matcher matcher = regex.matcher(rawLocation); StorageType storageType = StorageType.DEFAULT; String location = rawLocation;