@Override
  public <I, K, V> Map<K, V> mapToPair(List<I> data, SerializablePairFunction<I, K, V> func, Integer parallelism) {
    return data.stream().parallel().map(throwingMapToPairWrapper(func)).collect(Collectors.toMap(Pair::getLeft, Pair::getRight));
  }
@Test
  public void testMapToPair() {
    List<String> mapList = Arrays.asList("spark_hudi", "flink_hudi");

    Map<String, String> resultMap = context.mapToPair(mapList, x -> {
      String[] splits = x.split("_");
      return new ImmutablePair<>(splits[0], splits[1]);
    }, 2);

    Assertions.assertEquals(resultMap.get("spark"), resultMap.get("flink"));
  }