keith-turner commented on a change in pull request #1650:
URL: https://github.com/apache/accumulo/pull/1650#discussion_r451225287
##########
File path:
server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
##########
@@ -209,20 +205,20 @@ public boolean getCandidates(String continuePoint,
List<String> result)
throws TableNotFoundException {
Iterator<String> candidates =
getContext().getAmple().getGcCandidates(level, continuePoint);
+ long candidateLength = 0;
result.clear();
while (candidates.hasNext()) {
- String cand = candidates.next();
-
- result.add(cand);
- if (almostOutOfMemory(Runtime.getRuntime())) {
- log.info("List of delete candidates has exceeded the memory"
+ String candidate = candidates.next();
+ candidateLength += candidate.length();
+ result.add(candidate);
+ if (almostOutOfMemory(candidateLength)) {
+ log.info("List of delete candidates has exceeded the batch size"
+ " threshold. Attempting to delete what has been gathered so
far.");
Review comment:
May be useful to include the batch size. This probably needs to be
reformatted.
```suggestion
log.info("Candidate batch of size {} has exceeded the"
+ " threshold. Attempting to delete what has been gathered so
far.", candidateLength);
```
----------------------------------------------------------------
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:
[email protected]