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


##########
server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java:
##########
@@ -462,4 +479,28 @@ public long getErrorsStat() {
   public long getCandidatesStat() {
     return candidates;
   }
+
+  @Override
+  public boolean isRootTable() {
+    return level == DataLevel.ROOT;
+  }
+
+  @Override
+  public boolean isMetadataTable() {
+    return level == DataLevel.METADATA;
+  }
+
+  @Override
+  public Set<TableId> getCandidateTableIDs() {
+    if (isRootTable()) {
+      return Collections.singleton(MetadataTable.ID);
+    } else if (isMetadataTable()) {

Review Comment:
   I missed that javadoc, looking at it now it would need to be adjusted.  
There are three data levels and we run GC for each level.  They are created here
   
   
https://github.com/apache/accumulo/blob/1aeffcf0dca3e9797d3bfd75dd05b821885b1dd4/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java#L207-L209
   
   So for each level we need to return the table IDs that would be seen in the 
metadata for that level.  Like the USER level stores its metadata in the 
metadata table, but we see user table ids in the metadata for that level.  For 
the METADATA level its stores its metadata in the root table and we see the 
metadata table id.  For the ROOT level it stores its metadata in ZK and we see 
the root table id in the metadata for that level.



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