private static <T> void addAll(final List<T> list, final List<T> elements) {
        if (list != null && elements != null && !elements.isEmpty()) {
            list.addAll(elements);
        }
    }
Batch tasks are split and executed in the smallest unit,
and the callback function (input -> output) is in a
one-to-one manner.

@param inputList input parameter list
@param unitSize  the minimum unit
@param func      the callback function
@param <IN>      input type
@param <OUT>     output type
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/util/Partitions.java