1.

What is the stateful intermediate operation? Give some examples of stateful intermediate operations.

Answer»

To complete some of the intermediate operations, some state is to be MAINTAINED, and such intermediate operations are called stateful intermediate operations. PARALLEL execution of these types of operations is complex.

For Eg: sorted() , DISTINCT() , limit() , skip() etc. 

Sending data elements to further steps in the pipeline stops TILL all the data is sorted for sorted() and stream data elements are stored in temporary data structures.



Discussion

No Comment Found