Fix 4409 by warning once every 15 minutes
When max files is exceeded but files cannot be found to compact, emit a WARN level message once every fifteen minutes, other wise log at trace. This should prevent flooding the logs and the monitor with a large volume of messages, but still be annoying enough that it draws attention to the problem.
NOTE to reviewers: I am not sure if this will address the problem - it will depend on how often the DefaultCompactionPlanner is instantiated because this fix will only work if a new instances of the Planner is NOT created each run. I wanted to get this up early in case it is sufficient.
I wonder if NanoTime from #4364 should have been merged into 2.1 vs main.
@EdColeman I had worked up a WIP fix for this here https://github.com/keith-turner/accumulo/commit/2877bc9e97e3eb456e4bbebfd858bf9292368fdc . Not sure if it works or is a good approach though. One thing I was trying to do was to reuse code for rate limiting logging. I thnik we have multiple places in the code that do something custom for this, would be good to consolidate the pattern in the code somehow and have one way to do it.
I have no issues with a more general solution. This can be closed if that's the way we want to go. My rational for this narrow PR was that, if the approach is correct then it would be a small patch that others could use quickly.
We may want to use this approach and then, as a follow-on. replace it the more general solution when it is ready?
Either way, it assumes that the instantiation of the DefaultCompactPlanner is suitable for using per-instance local variables to control the log rate. If not, then there is no point to using this PR.