junegunn commented on code in PR #8720:
URL: https://github.com/apache/hbase/pull/8720#discussion_r4144327880


##########
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALInputFormat.java:
##########
@@ -99,6 +102,45 @@ public void testAddFile() {
     assertEquals(9, lfss.size());
   }
 
+  @Test
+  public void testSkipsArchivedMasterLocalWALs() throws Exception {
+    Configuration conf = new Configuration(TEST_UTIL.getConfiguration());
+    conf.set(WALPlayer.INPUT_FILES_SEPARATOR_KEY, ",");
+    conf.setLong(WALInputFormat.START_TIME_KEY, 200);
+    conf.setLong(WALInputFormat.END_TIME_KEY, 300);
+    FileSystem fs = TEST_UTIL.getTestFileSystem();
+    Path inputDir = TEST_UTIL.getDataTestDirOnTestFS("master-local-wals");
+    Path nonEmpty = new Path(inputDir, "master.250$masterlocalwal$");
+    Path empty = new Path(inputDir, "nested/master.251$masterlocalwal$");
+    List<String> expected =
+      Arrays.asList("0000000000000016310", "server.250", "server.250.meta", 
"server.250.syncrep");
+    try {
+      for (String name : expected) {
+        try (FSDataOutputStream out = fs.create(new Path(inputDir, "nested/" + 
name))) {

Review Comment:
   `FileSystem.create(Path)` creates missing parents by default.



-- 
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