Processing graphs using Graph X

A graph is combination of vertices and edges. Spark provides a module to define a graph and then process these graphs in real time. In this recipe, we are going to look at a social graph example and process data using Spark.

Getting ready

To perform this recipe, you should have Hadoop and Spark installed. You also need to install Scala. I am using Scala 2.11.0 here.

How to do it...

Take a social networking site that has users and other users such as the activities of a user. Based on the likes, we can conclude who is connected to whom. Consider the following data:

How to do it...

Now, we have to analyze this graph based on the likes that ...

Get Hadoop: Data Processing and Modelling now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.