dlmarion commented on code in PR #5485:
URL: https://github.com/apache/accumulo/pull/5485#discussion_r2048932240
##########
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:
In the initial commit of `FileTypePrefix` into 2.1 I put the class in
server-base. I didn't remember that I had created `FilePrefix` in core in the
3.0 release several years ago. In `main` I merged FileTypePrefix into
FilePrefix. In a790064 I went ahead and made the same change so that the 2.1
and main branches have the same FilePrefix class. This allowed me to move the
code in FileCompactor to ConfigurationTypeHelper.
--
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]