From b185964b15329996e17ae43107afe3470e0b4231 Mon Sep 17 00:00:00 2001 From: Vinayakumar B Date: Fri, 12 Oct 2018 17:34:10 +0530 Subject: [PATCH] HDFS-13945. TestDataNodeVolumeFailure is Flaky. Contributed by Ayush Saxena. (cherry picked from commit 6e0e6daaf3215213c32cdffa79f3730d40e981ea) --- .../hdfs/server/datanode/TestDataNodeVolumeFailure.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java index 16c0cfaabea..7d04942f0e0 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java @@ -424,10 +424,8 @@ public class TestDataNodeVolumeFailure { @Override public Boolean get() { // underReplicatedBlocks are due to failed volumes - int underReplicatedBlocks = BlockManagerTestUtil - .checkHeartbeatAndGetUnderReplicatedBlocksCount( - cluster.getNamesystem(), bm); - + long underReplicatedBlocks = bm.getLowRedundancyBlocksCount() + + bm.getPendingReconstructionBlocksCount(); if (underReplicatedBlocks > 0) { return true; }