dlmarion commented on code in PR #5648:
URL: https://github.com/apache/accumulo/pull/5648#discussion_r2152582095
##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletsMetadata.java:
##########
@@ -126,8 +131,19 @@ public TabletsMetadata build() {
"scanTable() cannot be used in conjunction with forLevel(),
forTable() or forTablet() %s %s",
level, table);
if (level == DataLevel.ROOT) {
- ClientContext ctx = ((ClientContext) _client);
- return new TabletsMetadata(getRootMetadata(ctx));
+ final ClientContext ctx = ((ClientContext) _client);
+ final RootTabletMetadata rtm = RootTabletMetadata.read(ctx);
+ final SortedMapIterator iter = new
SortedMapIterator(rtm.toKeyValues());
+ if (!tabletMetadataFilters.isEmpty()) {
+ for (var filter : tabletMetadataFilters) {
+ if (!filter.acceptRow(iter)) {
+ LOG.trace("Not returning root metadata as it does not pass
filter: {}",
+ filter.getClass().getSimpleName());
+ return new TabletsMetadata((AutoCloseable) null, Set.of());
+ }
+ }
+ }
+ return new TabletsMetadata(rtm.toTabletMetadata());
Review Comment:
changes pushed
--
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]