@Override
    public boolean isSource() {
        return isSourceTopic;
    }
This is a simple container class used during the assignment process to distinguish
TopicPartitions type. Since the assignment logic can depend on the type of topic we're
looking at, and the rack information of the partition, this container class should have
everything necessary to make informed task assignment decisions.
One detail worth noting is the fact that the rack id information can be fetched lazily
when requested, so as to not make RPC calls when the rack information is unnecessary for
the assignor that is currently making decisions.
streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/DefaultTaskTopicPartition.java