junegunn commented on code in PR #8646:
URL: https://github.com/apache/hbase/pull/8646#discussion_r4015067260
##########
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestWALRecordReader.java:
##########
@@ -190,9 +190,12 @@ public void testPartialRead() throws Exception {
jobConf.setLong(WALInputFormat.START_TIME_KEY, ts + 1);
jobConf.setLong(WALInputFormat.END_TIME_KEY, ts1 + 1);
splits = input.getSplits(MapreduceTestingShim.createJobContext(jobConf));
- assertEquals(1, splits.size());
+ assertEquals(2, splits.size());
+ // The 1st file was created before startTime but stayed open until it
rolled, so its 2nd
+ // entry, written at exactly startTime, is in-range.
+ testSplit(splits.get(0), Bytes.toBytes("2"));
// Only the 1st entry from the 2nd file is in-range.
- testSplit(splits.get(0), Bytes.toBytes("3"));
+ testSplit(splits.get(1), Bytes.toBytes("3"));
Review Comment:
WAL files are named with millisecond timestamps, and `listLocatedStatus`
iterates in name order on HDFS. This ordering has been stable since the test
was written. The line is also pre-existing code, not part of this change.
--
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]