hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject hadoop git commit: HDFS-10693. metaSave should print blocks, not LightWeightHashSet. Contributed by Yuanbo Liu.
Date Sun, 07 Aug 2016 22:08:03 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 131d58a24 -> 4d3af47f2


HDFS-10693. metaSave should print blocks, not LightWeightHashSet. Contributed by Yuanbo Liu.

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

Branch: refs/heads/trunk
Commit: 4d3af47f2765f6f57936d316ef2a4150b787cc97
Parents: 131d58a
Author: Konstantin V Shvachko <shv@apache.org>
Authored: Sun Aug 7 14:29:26 2016 -0700
Committer: Konstantin V Shvachko <shv@apache.org>
Committed: Sun Aug 7 14:29:26 2016 -0700

----------------------------------------------------------------------
 .../hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java      | 3 ++-
 .../java/org/apache/hadoop/hdfs/server/namenode/TestMetaSave.java | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/4d3af47f/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
index ae28993..694cc95 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/InvalidateBlocks.java
@@ -32,6 +32,7 @@ import org.apache.hadoop.hdfs.protocol.Block;
 import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
 import org.apache.hadoop.hdfs.server.namenode.NameNode;
 import org.apache.hadoop.hdfs.util.LightWeightHashSet;
+import org.apache.hadoop.util.StringUtils;
 import org.apache.hadoop.util.Time;
 import org.apache.hadoop.hdfs.DFSUtil;
 
@@ -151,7 +152,7 @@ class InvalidateBlocks {
       final LightWeightHashSet<Block> blocks = entry.getValue();
       if (blocks.size() > 0) {
         out.println(entry.getKey());
-        out.println(blocks);
+        out.println(StringUtils.join(',', blocks));
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4d3af47f/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestMetaSave.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestMetaSave.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestMetaSave.java
index cd1d966..9816d00 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestMetaSave.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestMetaSave.java
@@ -162,6 +162,7 @@ public class TestMetaSave {
       //skip 2 lines to reach HDFS-9033 scenario.
       line = reader.readLine();
       line = reader.readLine();
+      assertTrue(line.contains("blk"));
       // skip 1 line for Corrupt Blocks section.
       line = reader.readLine();
       line = reader.readLine();


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