ddanielr commented on code in PR #4164:
URL: https://github.com/apache/accumulo/pull/4164#discussion_r1454591953


##########
core/src/main/java/org/apache/accumulo/core/util/compaction/CompactionJobPrioritizer.java:
##########
@@ -56,36 +62,42 @@ public static short createPriority(TableId tableId, 
CompactionKind kind, int tot
     int min;
     int max;
 
-    switch (Ample.DataLevel.of(tableId)) {
-      case ROOT:
+    // Check if the table is in the accumulo namespace
+    if (AccumuloTable.allTableIds().contains(tableId)) {
+      if (tableId.equals(AccumuloTable.ROOT.tableId())) {
         if (kind == CompactionKind.USER) {
           min = ROOT_USER_MIN;
           max = ROOT_USER_MAX;
         } else {
           min = ROOT_SYSTEM_MIN;
           max = ROOT_SYSTEM_MAX;
         }
-        break;
-      case METADATA:
+      } else if (tableId.equals(AccumuloTable.METADATA.tableId())) {
         if (kind == CompactionKind.USER) {
           min = METADATA_USER_MIN;
           max = METADATA_USER_MAX;
         } else {
           min = METADATA_SYSTEM_MIN;
           max = METADATA_SYSTEM_MAX;
         }
-        break;
-      case USER:
+      } else {
+        // This is a table in the accumulo namespace that is not root or 
metadata table.

Review Comment:
   I like pulling this section out for other accumulo-namespace tables!



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