92
edits
Changes
→Create And Set Up Spark
===Create And Set Up Spark===
Spark needs to be set up in a cluster so first we need to create a JavaSparkContext object, which tells Spark how to access a cluster. But To create a SparkContext you can also run it locally and act as first need to build a clusterSparkConf object that contains information about your application. We will talk about how to set up a spark in a cluster later. Now let's try to create a spark locally. To do that, we will need the following code:
//create and set up spark