Apache9 commented on code in PR #5507:
URL: https://github.com/apache/hbase/pull/5507#discussion_r1386676259


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestAsyncLogRolling.java:
##########
@@ -49,6 +61,122 @@ public static void setUpBeforeClass() throws Exception {
     
conf.setInt(FanOutOneBlockAsyncDFSOutputHelper.ASYNC_DFS_OUTPUT_CREATE_MAX_RETRIES,
 100);
     conf.set(WALFactory.WAL_PROVIDER, "asyncfs");
     AbstractTestLogRolling.setUpBeforeClass();
+
+    // For slow sync threshold test: roll once after a sync above this 
threshold
+    TEST_UTIL.getConfiguration().setInt(FSHLog.ROLL_ON_SYNC_TIME_MS, 5000);
+  }
+
+  @Test
+  public void testSlowSyncLogRolling() throws Exception {

Review Comment:
   Since we move some method from FSHLog to AbstractFSWAL, is it possible to 
just move the testSlowSyncLogRolling to AbstractTestLogRolling, instead of 
writing a new one here?



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractFSWAL.java:
##########
@@ -2245,6 +2245,14 @@ private static void split(final Configuration conf, 
final Path p) throws IOExcep
     WALSplitter.split(baseDir, p, archiveDir, fs, conf, 
WALFactory.getInstance(conf));
   }
 
+  W getWriter() {
+    return this.writer;
+  }
+
+  void setWriter(W writer) {

Review Comment:
   I think there is config to control the writer's type, can use it create the 
Writer, instead of introducing a set method?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to