Description
This PR aims to update Scala/Python/Java examples by replacing `SQLContext` with newly added `SparkSession`.
- Use SparkSession Builder Pattern in 154(Scala 55, Java 52, Python 47) files.
- Add `getConf` in Python `SparkContext` class: python/pyspark/context.py
- Replace SQLContext Singleton Pattern with SparkSession Singleton Pattern:
- `SqlNetworkWordCount.scala`
- `JavaSqlNetworkWordCount.java`
- `sql_network_wordcount.py`
Now, `SQLContexts` are used only in R examples and the following two Python examples. The python examples are untouched in this PR since it already fails some unknown issue.
- `simple_params_example.py`
- `aft_survival_regression.py`
Attachments
Issue Links
- is blocked by
-
SPARK-15052 Use builder pattern to create SparkSession
- Resolved
- links to