Reduce excessive logging (#4680)

* Reduce excessive logging

* Refactoring code as per comments
This commit is contained in:
Niketh Sabbineni 2017-08-15 10:14:20 -07:00 committed by Fangjin Yang
parent ab28dc3b97
commit dba7c7d3cd
1 changed files with 89 additions and 87 deletions

View File

@ -193,7 +193,16 @@ public class LoadQueuePeon
private void processSegmentChangeRequest()
{
if (currentlyProcessing == null) {
if (currentlyProcessing != null) {
log.debug(
"Server[%s] skipping processSegmentChangeRequest because something is currently loading[%s].",
basePath,
currentlyProcessing.getSegmentIdentifier()
);
return;
}
if (!segmentsToDrop.isEmpty()) {
currentlyProcessing = segmentsToDrop.firstEntry().getValue();
log.info("Server[%s] dropping [%s]", basePath, currentlyProcessing.getSegmentIdentifier());
@ -280,13 +289,6 @@ public class LoadQueuePeon
catch (Exception e) {
failAssign(e);
}
} else {
log.info(
"Server[%s] skipping doNext() because something is currently loading[%s].",
basePath,
currentlyProcessing.getSegmentIdentifier()
);
}
}
private void actionCompleted()