Skip to content

Commit

Permalink
Address the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryshao committed Jan 29, 2018
1 parent 1ed62ef commit e5f4b58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions python/pyspark/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,6 @@ def stop(self):
"""
if getattr(self, "_jsc", None):
try:
# We should clean the default session up. See SPARK-23228.
self._jvm.SparkSession.clearDefaultSession()
self._jsc.stop()
except Py4JError:
# Case: SPARK-18523
Expand Down
2 changes: 2 additions & 0 deletions python/pyspark/sql/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,8 @@ def stop(self):
"""Stop the underlying :class:`SparkContext`.
"""
self._sc.stop()
# We should clean the default session up. See SPARK-23228.
self._jvm.SparkSession.clearDefaultSession()
SparkSession._instantiatedSession = None

@since(2.0)
Expand Down

0 comments on commit e5f4b58

Please sign in to comment.