You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/06/03 17:49:32 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #2136: Remove redundant information in tablets external compaction entry

ctubbsii commented on a change in pull request #2136:
URL: https://github.com/apache/accumulo/pull/2136#discussion_r645009069



##########
File path: server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableUtils.java
##########
@@ -650,4 +649,17 @@ public static MajorCompactionReason from(CompactionKind ck) {
         throw new IllegalArgumentException("Unknown kind " + ck);
     }
   }
+
+  public static TabletFile computeCompactionFileDest(TabletFile tmpFile) {
+    String newFilePath = tmpFile.getMetaInsert();
+    int idx = newFilePath.indexOf("_tmp");
+    if (idx > 0) {
+      newFilePath = newFilePath.substring(0, idx);
+    } else {
+      throw new RuntimeException(
+          "Expected compaction tmp file " + tmpFile.getMetaInsert() + " to have suffix '_tmp'");

Review comment:
       Is there a more specific RTE that can be used? IllegalArgumentException might be appropriate, based on this error message.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org