cshannon commented on code in PR #3332:
URL: https://github.com/apache/accumulo/pull/3332#discussion_r1181094376
##########
core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java:
##########
@@ -1553,4 +1556,117 @@ public void setCacheProvider(CacheProvider
cacheProvider) {
reader.setCacheProvider(cacheProvider);
}
}
+
+ interface IndexedFileSKVIterator extends FileSKVIterator {
+ FileSKVIterator getIndex() throws IOException;
+ }
+
+ static class FencedReader implements IndexedFileSKVIterator {
+
+ private final Reader reader;
+ private final Range fence;
+
+ public FencedReader(Reader reader, Range seekFence) {
+ this.reader = Objects.requireNonNull(reader);
+ this.fence = seekFence;
+ }
+
+ @Override
+ public void seek(Range range, Collection<ByteSequence> columnFamilies,
boolean inclusive)
+ throws IOException {
+ reader.clear();
+
+ if (fence != null) {
Review Comment:
I added a new test case for this in my latest commit:
https://github.com/apache/accumulo/blob/d755bc3c7bc9639660e3f1edb70a616fc12906f1/core/src/test/java/org/apache/accumulo/core/file/rfile/FencedRFileTest.java#L186
--
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]