return edgeValues;
}
private EdgeValues applyGroup( EdgeValues edgeValues )
{
Group group = (Group) edgeValues.flowElement;
if( group.isSortReversed() )
edgeValues.keyComparatorClassName = ReverseTupleComparator.class.getName();
addComparators( edgeValues.config, "cascading.group.comparator", group.getKeySelectors(), this, group );
if( !group.isGroupBy() )
{
edgeValues.outputClassName = OrderedPartitionedKVOutput.class.getName();
edgeValues.inputClassName = OrderedGroupedKVInput.class.getName();
edgeValues.movementType = EdgeProperty.DataMovementType.SCATTER_GATHER;
edgeValues.sourceType = EdgeProperty.DataSourceType.PERSISTED;
edgeValues.schedulingType = EdgeProperty.SchedulingType.SEQUENTIAL;
}
else
{
addComparators( edgeValues.config, "cascading.sort.comparator", group.getSortingSelectors(), this, group );
edgeValues.outputClassName = OrderedPartitionedKVOutput.class.getName();
edgeValues.inputClassName = OrderedGroupedKVInput.class.getName();
edgeValues.movementType = EdgeProperty.DataMovementType.SCATTER_GATHER;
edgeValues.sourceType = EdgeProperty.DataSourceType.PERSISTED;
edgeValues.schedulingType = EdgeProperty.SchedulingType.SEQUENTIAL;
}
if( group.isSorted() )
{
edgeValues.keyClassName = TuplePair.class.getName();
edgeValues.keyPartitionerClassName = GroupingSortingPartitioner.class.getName();
if( group.isSortReversed() )
edgeValues.keyComparatorClassName = ReverseGroupingSortingComparator.class.getName();
else
edgeValues.keyComparatorClassName = GroupingSortingComparator.class.getName();
}