You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ms...@apache.org on 2019/03/13 10:53:02 UTC

[hadoop] branch trunk updated: HDDS-1256. Fix failure in TestKeyValueContainerCheck. Contributed by Supratim Deka.

This is an automated email from the ASF dual-hosted git repository.

msingh pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new d602d46  HDDS-1256. Fix failure in TestKeyValueContainerCheck. Contributed by Supratim Deka.
d602d46 is described below

commit d602d462a64399126abcb5b2079d5117baa4edfd
Author: Mukul Kumar Singh <ms...@apache.org>
AuthorDate: Wed Mar 13 16:22:19 2019 +0530

    HDDS-1256. Fix failure in TestKeyValueContainerCheck. Contributed by Supratim Deka.
---
 .../hadoop/ozone/container/keyvalue/TestKeyValueContainerCheck.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/TestKeyValueContainerCheck.java b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/TestKeyValueContainerCheck.java
index f1b8fe7..79abc2f 100644
--- a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/TestKeyValueContainerCheck.java
+++ b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/TestKeyValueContainerCheck.java
@@ -139,9 +139,11 @@ import static org.junit.Assert.assertTrue;
     String strBlock = "block";
     String strChunk = "-chunkFile";
     byte[] chunkData = new byte[(int) chunkLen];
+    long totalBlks = normalBlocks + deletedBlocks;
 
     containerData = new KeyValueContainerData(containerId,
-        (long) StorageUnit.MB.toBytes(chunksPerBlock * chunkLen),
+        (long) StorageUnit.BYTES.toBytes(
+            chunksPerBlock * chunkLen * totalBlks),
         UUID.randomUUID().toString(), UUID.randomUUID().toString());
     container = new KeyValueContainer(containerData, conf);
     container.create(volumeSet, new RoundRobinVolumeChoosingPolicy(),
@@ -156,7 +158,7 @@ import static org.junit.Assert.assertTrue;
     assertTrue(chunksPath.listFiles().length == 0);
 
     List<ContainerProtos.ChunkInfo> chunkList = new ArrayList<>();
-    for (int i = 0; i < (normalBlocks + deletedBlocks); i++) {
+    for (int i = 0; i < (totalBlks); i++) {
       BlockID blockID = new BlockID(containerId, i);
       BlockData blockData = new BlockData(blockID);
 


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