Getting access to Spark cluster in Spark 2.0

In this recipe, we demonstrate how to get access to a Spark cluster using a single point access named SparkSession. Spark 2.0 abstracts multiple contexts (such as SQLContext, HiveContext) into a single entry point, SparkSession, which allows you to get access to all Spark subsystems in a unified way.

Get Apache Spark 2.x Machine Learning Cookbook 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.