hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From su...@apache.org
Subject [11/50] [abbrv] hadoop git commit: HDFS-11369. Change exception message in StorageLocationChecker.
Date Fri, 27 Jan 2017 23:38:08 GMT
HDFS-11369. Change exception message in StorageLocationChecker.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7c1cc30b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7c1cc30b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7c1cc30b

Branch: refs/heads/YARN-2915
Commit: 7c1cc30b3c611ad2d0ae19ebaefd45f31a734e6c
Parents: 425a7e5
Author: Arpit Agarwal <arp@apache.org>
Authored: Thu Jan 26 09:12:38 2017 -0800
Committer: Arpit Agarwal <arp@apache.org>
Committed: Thu Jan 26 09:12:38 2017 -0800

----------------------------------------------------------------------
 .../server/datanode/checker/StorageLocationChecker.java  | 11 ++++++-----
 .../datanode/checker/TestStorageLocationChecker.java     |  4 +++-
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c1cc30b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/StorageLocationChecker.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/StorageLocationChecker.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/StorageLocationChecker.java
index 6e323e0..a0bffcd 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/StorageLocationChecker.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/StorageLocationChecker.java
@@ -213,14 +213,15 @@ public class StorageLocationChecker {
     }
 
     if (failedLocations.size() > maxVolumeFailuresTolerated) {
-      throw new IOException(
-          "Too many failed volumes: " + failedLocations.size() +
-          ". The configuration allows for a maximum of " +
-          maxVolumeFailuresTolerated + " failed volumes.");
+      throw new DiskErrorException("Too many failed volumes - "
+          + "current valid volumes: " + goodLocations.size()
+          + ", volumes configured: " + dataDirs.size()
+          + ", volumes failed: " + failedLocations.size()
+          + ", volume failures tolerated: " + maxVolumeFailuresTolerated);
     }
 
     if (goodLocations.size() == 0) {
-      throw new IOException("All directories in "
+      throw new DiskErrorException("All directories in "
           + DFS_DATANODE_DATA_DIR_KEY + " are invalid: "
           + failedLocations);
     }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7c1cc30b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/checker/TestStorageLocationChecker.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/checker/TestStorageLocationChecker.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/checker/TestStorageLocationChecker.java
index 0fe22cb..169a1b9 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/checker/TestStorageLocationChecker.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/checker/TestStorageLocationChecker.java
@@ -109,7 +109,9 @@ public class TestStorageLocationChecker {
     conf.setInt(DFS_DATANODE_FAILED_VOLUMES_TOLERATED_KEY, 1);
 
     thrown.expect(IOException.class);
-    thrown.expectMessage("Too many failed volumes");
+    thrown.expectMessage("Too many failed volumes - current valid volumes: 1,"
+        + " volumes configured: 3, volumes failed: 2, volume failures"
+        + " tolerated: 1");
     StorageLocationChecker checker =
         new StorageLocationChecker(conf, new FakeTimer());
     checker.check(conf, locations);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message