Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ public void run() {
TimeUnit.SECONDS);
LOG.info("ContainerBalancer will sleep for {} seconds before starting" +
" balancing.", delayDuration);
Thread.sleep(Duration.ofSeconds(delayDuration).toMillis());
if (isBalancerRunning()) {
Thread.sleep(Duration.ofSeconds(delayDuration).toMillis());
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the bug report is not about this sleep, rather the one in:

long sleepTime = 3 * nodeReportInterval;
LOG.info("ContainerBalancer will sleep for {} ms while waiting " +
"for updated usage information from Datanodes.", sleepTime);
Thread.sleep(sleepTime);
} catch (InterruptedException e) {
LOG.info("Container Balancer was interrupted while waiting for" +
"datanodes refreshing volume usage info");
Thread.currentThread().interrupt();
return;

}
balance();
} catch (Exception e) {
Expand Down