Browse Month: March 2017

Parallel stream and CompletableFuture example

Let’s see how we can paralellize java application. Suppose we have asked to develop application where given the libraries list we need to calculate the number of books in each library. Suppose calculation is an expensive operation. The first thing that comes to our mind is to do this by streams.

Continue Reading

group by key

Group by key and in the Map Partition apply some custom logic on the aggregated values of the key in Spark

Continue Reading