@Override
    public Map<TopicPartition, Long> changelogOffsets() {
        if (state() == State.RUNNING) {
            // if we are in running state, just return the latest offset sentinel indicating
            // we should be at the end of the changelog
            return changelogPartitions().stream()
                                        .collect(Collectors.toMap(Function.identity(), tp -> Task.LATEST_OFFSET));
        } else {
            return Collections.unmodifiableMap(stateMgr.changelogOffsets());
        }
    }
Produces a string representation containing useful information about a Task starting with the given indent.
This is useful in debugging scenarios.

@return A string representation of the Task instance.
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java