keith-turner commented on code in PR #5648:
URL: https://github.com/apache/accumulo/pull/5648#discussion_r2152619432


##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletsMetadata.java:
##########
@@ -126,13 +133,39 @@ 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));
+        try {
+          return buildRoot(_client);
+        } catch (IOException e) {
+          throw new UncheckedIOException("Error creating root tablet 
metadata", e);
+        }
       } else {
         return buildNonRoot(_client);
       }
     }
 
+    // visible for testing
+    protected RootTabletMetadata getRootMetadata(AccumuloClient client) {
+      return RootTabletMetadata.read((ClientContext) client);
+    }
+
+    private TabletsMetadata buildRoot(AccumuloClient client) throws 
IOException {
+      final RootTabletMetadata rtm = getRootMetadata(client);
+      if (!tabletMetadataFilters.isEmpty()) {
+        final SortedMapIterator iter = new 
SortedMapIterator(rtm.toKeyValues());

Review Comment:
   probably need to use ColumnFamilySkippingIterator to skip column fams



##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletsMetadata.java:
##########
@@ -150,7 +183,8 @@ private TabletsMetadata buildExtents(AccumuloClient client) 
{
 
       for (DataLevel level : groupedExtents.keySet()) {
         if (level == DataLevel.ROOT) {
-          iterables.add(() -> 
Iterators.singletonIterator(getRootMetadata((ClientContext) client)));
+          iterables.add(() -> Iterators

Review Comment:
   should this use the new buildroot function?



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