@Override
  public int[] getPartitionKey() {
    if (tasks.size() == 1)
      // ONE TASK, USE THE INNER TASK'S PARTITION KEY
      return tasks.get(0).getPartitionKey();

    // MULTIPLE PARTITIONS
    final int[] partitions = new int[tasks.size()];
    for (int i = 0; i < tasks.size(); ++i) {
      final OAbstractRecordReplicatedTask task = tasks.get(i);
      partitions[i] = task.getPartitionKey()[0];
    }

    return partitions;
  }
@ Override public int [ ] getPartitionKey ( ) { if ( tasks . size ( ) == 1 ) return tasks . get ( 0 ) . getPartitionKey ( ) ; final int [ ] partitions = new int [ tasks . size ( ) ] ; for ( int i = 0 ; i < tasks . size ( ) ; ++ i ) { final OAbstractRecordReplicatedTask task = tasks . get ( i ) ; partitions [ i ] = task . getPartitionKey ( ) [ 0 ] ; } return partitions ; }
Return the partition keys of all the sub-tasks.