Github user ctubbsii commented on a diff in the pull request:
https://github.com/apache/accumulo/pull/47#discussion_r40111853
--- Diff:
core/src/main/java/org/apache/accumulo/core/iterators/Combiner.java ---
@@ -149,6 +160,38 @@ public void next() throws IOException {
private Key workKey = new Key();
+ private static final Cache<String,Long> loggedMsgCache =
CacheBuilder.newBuilder().expireAfterWrite(1,
TimeUnit.HOURS).maximumSize(10000).build();
+
+ private void sawDelete() {
+ if (isPartialCompaction) {
+ switch (deleteHandlingAction) {
+ case LOG_ERROR:
+ try {
+ loggedMsgCache.get(this.getClass().getName(), new
Callable<Long>() {
--- End diff --
At first, I thought "Callable<Void>" might be better, but apparently
CacheBuilder doesn't like that, so might be better to use "Callable<Boolean>",
because it's more readable to see "Boolean.TRUE" inserted into the cache to
denote that a log message has recently occurred. (Unless you were going to use
the integer to denote how many times it has been logged before suppressing
repeats after some threshold, like 5.)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---