//并行流
private static <T> List<List<T>> partition(final List<T> list, final int size) { int limit = (list.size() + size - 1) / size; return Stream.iterate(0, n -> n + 1).limit(limit).parallel() .map(a -> list.stream().skip(a * size).limit(size).parallel().collect(Collectors.toList())) .collect(Collectors.toList()); }