hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x...@apache.org
Subject hadoop git commit: HDDS-27. Fix TestStorageContainerManager#testBlockDeletionTra; nsactions. Contributed by Xiaoyu Yao.
Date Tue, 08 May 2018 01:30:11 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 696a4be0d -> 08ea90e1e


HDDS-27. Fix TestStorageContainerManager#testBlockDeletionTra;nsactions. Contributed by Xiaoyu
Yao.


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

Branch: refs/heads/trunk
Commit: 08ea90e1e4cd5d4860668a1368f0b0396fbe83e0
Parents: 696a4be
Author: Xiaoyu Yao <xyao@apache.org>
Authored: Mon May 7 18:24:00 2018 -0700
Committer: Xiaoyu Yao <xyao@apache.org>
Committed: Mon May 7 18:29:50 2018 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/ozone/TestStorageContainerManager.java  | 1 -
 .../hadoop/ozone/TestStorageContainerManagerHelper.java       | 7 +++----
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/08ea90e1/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
----------------------------------------------------------------------
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
index 78ea5e1..9a33885 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManager.java
@@ -23,7 +23,6 @@ import java.io.IOException;
 import org.apache.commons.lang3.RandomUtils;
 import org.apache.hadoop.hdds.conf.OzoneConfiguration;
 import org.apache.hadoop.hdds.scm.container.common.helpers.ContainerInfo;
-import org.apache.hadoop.hdds.scm.server.SCMClientProtocolServer;
 import org.apache.hadoop.hdds.scm.server.SCMStorage;
 import org.apache.hadoop.hdds.scm.node.NodeManager;
 import org.apache.hadoop.ozone.container.ContainerTestHelper;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/08ea90e1/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManagerHelper.java
----------------------------------------------------------------------
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManagerHelper.java
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManagerHelper.java
index da87d7a..e5873a5 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManagerHelper.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestStorageContainerManagerHelper.java
@@ -19,6 +19,7 @@ package org.apache.hadoop.ozone;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
+import com.google.common.primitives.Longs;
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.StorageType;
@@ -43,9 +44,9 @@ import org.apache.hadoop.utils.MetadataStore;
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.LinkedList;
 import java.util.Set;
 
 /**
@@ -148,9 +149,7 @@ public class TestStorageContainerManagerHelper {
     List<Map.Entry<byte[], byte[]>> kvs =
         meta.getRangeKVs(null, Integer.MAX_VALUE, filter);
     kvs.forEach(entry -> {
-      String key = DFSUtil.bytes2String(entry.getKey());
-      key.replace(OzoneConsts.DELETING_KEY_PREFIX, "");
-      allBlocks.add(Long.parseLong(key));
+      allBlocks.add(Longs.fromByteArray(entry.getKey()));
     });
     return allBlocks;
   }


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