public int numPartitionsAssigned() {
        return assignment().size();
    }
@return the number of topic partitions assigned to this (sink) task.
connect/runtime/src/test/java/org/apache/kafka/connect/integration/TaskHandle.java