JavaPairRDD<ByteArray, List<byte[]>> groupedRDD;
if (groupingOptions.getPartitionerClass() != null) {
groupedRDD = parentRDD
.map(new PairMapFunction(ptype.getOutputMapFn(), runtime.getRuntimeContext()))
.map(new PartitionedMapOutputFunction(keySerde, valueSerde, ptype, groupingOptions.getPartitionerClass(),
numPartitions, runtime.getRuntimeContext()))
.groupByKey(new SparkPartitioner(numPartitions));
} else {
groupedRDD = parentRDD
.map(new PairMapFunction(ptype.getOutputMapFn(), runtime.getRuntimeContext()))