protected void reportAllElementKeyGroups ( ) { Preconditions . checkState ( partitioningSource . length >= numberOfElements ) ; for ( int i = 0 ; i < numberOfElements ; ++ i ) { int keyGroup = KeyGroupRangeAssignment . assignToKeyGroup ( keyExtractorFunction . extractKeyFromElement ( partitioningSource [ i ] ) , totalKeyGroups ) ; reportKeyGroupOfElementAtIndex ( i , keyGroup ) ; } }
This method iterates over the input data and reports the key - group for each element .