Source:
<code>public void onPartitionsAssigned(final Collection<TopicPartition> assignment) { log.debug("at state {}: partitions assigned at the end of consumer rebalance.\n" + "\tcurrent suspended active tasks: {}\n" + "\tcurrent suspended standby tasks: {}\n", streamThread.state, assignment, taskManager.suspendedActiveTaskIds(), taskManager.suspendedStandbyTaskIds()); if (streamThread.assignmentErrorCode.get() == StreamsPartitionAssignor.Error.INCOMPLETE_SOURCE_TOPIC_METADATA.code()) { log.error("Received error code - shutdown", streamThread.assignmentErrorCode.get()); streamThread.shutdown(); return; } final long start = time.milliseconds(); try { if (streamThread.setState(State.PARTITIONS_ASSIGNED) == null) { <START> log.error("State transition from to PARTITIONS_ASSIGNED failed. " + <END> "Will skip the task initialization", streamThread.state()); } else if (streamThread.assignmentErrorCode.get() != StreamsPartitionAssignor.Error.NONE.code()) { log.error("Encountered assignment error during partition assignment: {}. " + "Will skip the task initialization", streamThread.assignmentErrorCode); } else { log.debug("Creating tasks based on assignment."); taskManager.createTasks(assignment); } } catch (final Throwable t) { log.error( "Error caught during partition assignment, " + "will abort the current process and re-throw at the end of rebalance: {}", t ); streamThread.setRebalanceException(t); } finally { log.info("partition assignment took ms.\n" + "\tcurrent active tasks: {}\n" + "\tcurrent standby tasks: {}\n" + "\tprevious active tasks: {}\n", time.milliseconds() - start, taskManager.activeTaskIds(), taskManager.standbyTaskIds(), taskManager.prevActiveTaskIds()); } }</code><technical_language>is this ERROR? If receive a SHUTDOWN signal, "eager exit" create tasks IMHO. want log a DEBUG though. update message: log.debug("Skipping task creation in rebalance in shutdown phase.");</technical_language>

Target:
public void onPartitionsAssigned(final Collection<TopicPartition> assignment) { log.debug("at state {}: partitions assigned at the end of consumer rebalance.\n" + "\tcurrent suspended active tasks: {}\n" + "\tcurrent suspended standby tasks: {}\n", streamThread.state, assignment, taskManager.suspendedActiveTaskIds(), taskManager.suspendedStandbyTaskIds()); if (streamThread.assignmentErrorCode.get() == StreamsPartitionAssignor.Error.INCOMPLETE_SOURCE_TOPIC_METADATA.code()) { log.error("Received error code - shutdown", streamThread.assignmentErrorCode.get()); streamThread.shutdown(); return; } final long start = time.milliseconds(); try { if (streamThread.setState(State.PARTITIONS_ASSIGNED) == null) { log.debug( "Skipping task creation in rebalance because we are already in state.", streamThread.state() ); } else if (streamThread.assignmentErrorCode.get() != StreamsPartitionAssignor.Error.NONE.code()) { log.debug( "Encountered assignment error during partition assignment: {}. Skipping task initialization", streamThread.assignmentErrorCode ); } else { log.debug("Creating tasks based on assignment."); taskManager.createTasks(assignment); } } catch (final Throwable t) { log.error( "Error caught during partition assignment, " + "will abort the current process and re-throw at the end of rebalance", t); streamThread.setRebalanceException(t); } finally { log.info("partition assignment took ms.\n" + "\tcurrent active tasks: {}\n" + "\tcurrent standby tasks: {}\n" + "\tprevious active tasks: {}\n", time.milliseconds() - start, taskManager.activeTaskIds(), taskManager.standbyTaskIds(), taskManager.prevActiveTaskIds()); } }