dlmarion commented on code in PR #5485:
URL: https://github.com/apache/accumulo/pull/5485#discussion_r2049415992
##########
server/base/src/main/java/org/apache/accumulo/server/compaction/FileCompactor.java:
##########
@@ -346,10 +346,21 @@ public CompactionStats call()
// have compacted, or in the case of cloned tables where one
// of the tables has compacted the input file but the other
// has not.
- String dropCachePrefixProperty =
+ final String dropCachePrefixProperty =
acuTableConf.get(Property.TABLE_COMPACTION_INPUT_DROP_CACHE_BEHIND);
- final EnumSet<FileTypePrefix> dropCacheFilePrefixes =
- FileTypePrefix.typesFromList(dropCachePrefixProperty);
+ final EnumSet<FileTypePrefix> dropCacheFileTypes;
+ if (dropCachePrefixProperty.equalsIgnoreCase("ALL")) {
+ dropCacheFileTypes = EnumSet.allOf(FileTypePrefix.class);
+ } else if (dropCachePrefixProperty.equalsIgnoreCase("NON-IMPORT")) {
+ dropCacheFileTypes = EnumSet.of(FileTypePrefix.FLUSH,
FileTypePrefix.FULL_COMPACTION,
+ FileTypePrefix.COMPACTION,
FileTypePrefix.MERGING_MINOR_COMPACTION);
+ } else if (dropCachePrefixProperty.equalsIgnoreCase("NONE")) {
+ dropCacheFileTypes = EnumSet.noneOf(FileTypePrefix.class);
+ } else {
+ throw new IllegalArgumentException("Invalid value for property "
+ + Property.TABLE_COMPACTION_INPUT_DROP_CACHE_BEHIND.getKey()
+ + " expected one of ALL, NONE, or NON-IMPORT");
+ }
Review Comment:
Created PR #5486
--
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]