Update Log Message to Include Additional Info

Updated the log message to include the the count awaiting final shutdown.
This commit is contained in:
Pfifer, Justin 2016-10-26 09:57:08 -07:00
parent 6fb204d507
commit a3c1a21ca0

View file

@ -48,7 +48,7 @@ class ShutdownFuture implements Future<Void> {
private long outstandingRecordProcessors(long timeout, TimeUnit unit) private long outstandingRecordProcessors(long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException { throws InterruptedException, ExecutionException, TimeoutException {
long startNanos = System.nanoTime(); final long startNanos = System.nanoTime();
// //
// Awaiting for all ShardConsumer/RecordProcessors to be notified that a shutdown has been requested. // Awaiting for all ShardConsumer/RecordProcessors to be notified that a shutdown has been requested.
@ -58,8 +58,9 @@ class ShutdownFuture implements Future<Void> {
// //
if (!notificationCompleteLatch.await(timeout, unit)) { if (!notificationCompleteLatch.await(timeout, unit)) {
long awaitingNotification = notificationCompleteLatch.getCount(); long awaitingNotification = notificationCompleteLatch.getCount();
log.info("Awaiting " + awaitingNotification + " record processors to complete shutdown notification");
long awaitingFinalShutdown = shutdownCompleteLatch.getCount(); long awaitingFinalShutdown = shutdownCompleteLatch.getCount();
log.info("Awaiting " + awaitingNotification + " record processors to complete shutdown notification, and "
+ awaitingFinalShutdown + " awaiting final shutdown");
if (awaitingFinalShutdown != 0) { if (awaitingFinalShutdown != 0) {
// //
// The number of record processor awaiting final shutdown should be a superset of the those awaiting // The number of record processor awaiting final shutdown should be a superset of the those awaiting