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 tm...@apache.org on 2020/06/19 19:49:57 UTC

[hadoop] 02/06: HADOOP-17018. Intermittent failing of ITestAbfsStreamStatistics in ABFS (#1990)

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

tmarquardt pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git

commit a2f44344c346601607b9ac1de4598b754f9f2d72
Author: Mehakmeet Singh <me...@gmail.com>
AuthorDate: Thu May 7 16:45:28 2020 +0530

    HADOOP-17018. Intermittent failing of ITestAbfsStreamStatistics in ABFS (#1990)
    
    
    Contributed by: Mehakmeet Singh
    
    In some cases, ABFS-prefetch thread runs in the background which returns some bytes from the buffer and gives an extra readOp. Thus, making readOps values arbitrary and giving intermittent failures in some cases. Hence, readOps values of 2 or 3 are seen in different setups.
---
 .../hadoop/fs/azurebfs/ITestAbfsStreamStatistics.java | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsStreamStatistics.java b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsStreamStatistics.java
index b749f49..51531f6 100644
--- a/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsStreamStatistics.java
+++ b/hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsStreamStatistics.java
@@ -84,12 +84,21 @@ public class ITestAbfsStreamStatistics extends AbstractAbfsIntegrationTest {
 
       LOG.info("Result of Read operation : {}", result);
       /*
-      Testing if 2 read_ops value is coming after reading full content from a
-      file (3 if anything to read from Buffer too).
-      Reason: read() call gives read_ops=1,
-      reading from AbfsClient(http GET) gives read_ops=2.
+       * Testing if 2 read_ops value is coming after reading full content
+       * from a file (3 if anything to read from Buffer too). Reason: read()
+       * call gives read_ops=1, reading from AbfsClient(http GET) gives
+       * read_ops=2.
+       *
+       * In some cases ABFS-prefetch thread runs in the background which
+       * returns some bytes from buffer and gives an extra readOp.
+       * Thus, making readOps values arbitrary and giving intermittent
+       * failures in some cases. Hence, readOps values of 2 or 3 is seen in
+       * different setups.
+       *
        */
-      assertReadWriteOps("read", 2, statistics.getReadOps());
+      assertTrue(String.format("The actual value of %d was not equal to the "
+              + "expected value of 2 or 3", statistics.getReadOps()),
+          statistics.getReadOps() == 2 || statistics.getReadOps() == 3);
 
     } finally {
       IOUtils.cleanupWithLogger(LOG, inForOneOperation,


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