In [1]:
util.Properties.versionMsg
Out[1]:
In [2]:
import org.apache.spark._
import org.apache.spark.sql._
var spark = SparkSession.builder().master("local[*]").appName("spark")
.config("spark.driver.memory", "8g")
.config("spark.executor.memory", "8g")
.config("spark.python.worker.memory", "8g")
.getOrCreate()
Out[2]:
In [3]:
val df = spark.read.json("/usr/local/spark/examples/src/main/resources/people.json")
df.show
Out[3]:
In [4]:
spark.stop()
In [ ]: