public < R > MapPartitionOperator < T , R > mapPartition ( MapPartitionFunction < T , R > mapPartition ) { if ( mapPartition == null ) { throw new NullPointerException ( "MapPartition function must not be null." ) ; } String callLocation = Utils . getCallLocationName ( ) ; TypeInformation < R > resultType = TypeExtractor . getMapPartitionReturnTypes ( mapPartition , getType ( ) , callLocation , true ) ; return new MapPartitionOperator <> ( this , resultType , clean ( mapPartition ) , callLocation ) ; }
Applies a Map - style operation to the entire partition of the data . The function is called once per parallel partition of the data and the entire partition is available through the given Iterator . The number of elements that each instance of the MapPartition function sees is non deterministic and depends on the parallelism of the operation .