HDFS-6245: Merging r1588842 from trunk to branch-2.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1588843 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arpit Agarwal 2014-04-21 00:16:20 +00:00
parent 2fb649a668
commit ba0c72d010
3 changed files with 14 additions and 3 deletions

View File

@ -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

View File

@ -1783,8 +1783,15 @@ public class DataNode extends Configured
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);

View File

@ -78,7 +78,8 @@ public class StorageLocation {
* @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;