public Node leader() {
        return leader;
    }
The node id of the node currently acting as a leader for this partition or null if there is no leader
clients/src/main/java/org/apache/kafka/common/PartitionInfo.java