hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aengin...@apache.org
Subject hadoop git commit: HDFS-12045. Add log when Diskbalancer volume is transient storage type. Contributed by steven-wugang.
Date Tue, 27 Jun 2017 07:42:35 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 2b87faf16 -> 8641a2c08


HDFS-12045. Add log when Diskbalancer volume is transient storage type. Contributed by steven-wugang.


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

Branch: refs/heads/trunk
Commit: 8641a2c08b0ce0f1f23cf2d508baccc4f627a385
Parents: 2b87faf
Author: Anu Engineer <aengineer@apache.org>
Authored: Tue Jun 27 00:39:47 2017 -0700
Committer: Anu Engineer <aengineer@apache.org>
Committed: Tue Jun 27 00:39:47 2017 -0700

----------------------------------------------------------------------
 .../hadoop/hdfs/server/datanode/DiskBalancer.java       | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8641a2c0/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java
index 0c75001..6b2cd52 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java
@@ -1011,15 +1011,19 @@ public class DiskBalancer {
         return;
       }
 
+      if (source.isTransientStorage() || dest.isTransientStorage()) {
+        final String errMsg = "Disk Balancer - Unable to support " +
+                "transient storage type.";
+        LOG.error(errMsg);
+        item.setErrMsg(errMsg);
+        return;
+      }
+
       List<FsVolumeSpi.BlockIterator> poolIters = new LinkedList<>();
       startTime = Time.now();
       item.setStartTime(startTime);
       secondsElapsed = 0;
 
-      if (source.isTransientStorage() || dest.isTransientStorage()) {
-        return;
-      }
-
       try {
         openPoolIters(source, poolIters);
         if (poolIters.size() == 0) {


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