hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhara...@apache.org
Subject [hbase] branch master updated: HBASE-25932 addendum: Add test comments. (#3344)
Date Tue, 01 Jun 2021 15:04:04 GMT
This is an automated email from the ASF dual-hosted git repository.

bharathv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git

The following commit(s) were added to refs/heads/master by this push:
     new 4fb0861  HBASE-25932 addendum: Add test comments. (#3344)
4fb0861 is described below

commit 4fb086121450bd5b4e4d604b21758c0b6dff88e4
Author: Bharath Vissapragada <bharathv@apache.org>
AuthorDate: Tue Jun 1 08:03:25 2021 -0700

    HBASE-25932 addendum: Add test comments. (#3344)
    Signed-off-by Anoop Sam John <anoopsamjohn@apache.org>
 .../hadoop/hbase/replication/regionserver/TestWALEntryStream.java  | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestWALEntryStream.java
index d4bdaaa..3442f98 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestWALEntryStream.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestWALEntryStream.java
@@ -109,6 +109,13 @@ public class TestWALEntryStream {
    * Test helper that waits until a non-null entry is available in the stream next or times
+   * A {@link WALEntryStream} provides a streaming access to a queue of log files. Since
the stream
+   * can be consumed as the file is being written, callers relying on {@link WALEntryStream#next()}
+   * may need to retry multiple times before an entry appended to the WAL is visible to the
+   * consumers. One such cause of delay is the close() of writer writing these log files.
While the
+   * closure is in progress, the stream does not switch to the next log in the queue and
next() may
+   * return null entries. This utility wraps these retries into a single next call and that
+   * the test code simpler.
   private static class WALEntryStreamWithRetries extends WALEntryStream {
     // Class member to be able to set a non-final from within a lambda.

View raw message