@Override
    public Map<Errors, Integer> errorCounts(Throwable e) {
        Errors error = Errors.forException(e);
        return Collections.singletonMap(error, partitionSizes().size());
    }
@return data or IllegalStateException if the data is removed (to prevent unnecessary memory retention).
clients/src/main/java/org/apache/kafka/common/requests/ProduceRequest.java