Skip to content

Commit

Permalink
Merge pull request #12 from mariusvniekerk/doccleanup
Browse files Browse the repository at this point in the history
Cleaned up text output
  • Loading branch information
parente authored Jan 31, 2017
2 parents 57669cf + 72f45a5 commit a48e0df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions spylon_kernel/scala_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def get_web_ui_url(sc):
if conf.getBoolean("spark.ui.reverseProxy", False):
proxy_url = conf.get("spark.ui.reverseProxyUrl", "")
if proxy_url:
web_ui_url = "Spark Context Web UI is available at ${proxy_url}/proxy/${application_id}".format(
web_ui_url = "{proxy_url}/proxy/{application_id}".format(
proxy_url=proxy_url, application_id=sc.applicationId)
else:
web_ui_url = "Spark Context Web UI is available at Spark Master Public URL"
web_ui_url = "Spark Master Public URL"
else:
# For spark 2.0 compatibility we have to retrieve this from the scala side.
joption = sc._jsc.sc().uiWebUrl()
Expand Down
8 changes: 4 additions & 4 deletions spylon_kernel/scala_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ def _get_scala_interpreter(self):
"""
if self._interp is None:
assert isinstance(self.kernel, MetaKernel)
self.kernel.Display("Intitializing scala interpreter....")
self.kernel.Display(TextOutput("Intitializing scala interpreter...."))
self._interp = get_scala_interpreter()
# Ensure that spark is available in the python session as well.
self.kernel.cell_magics['python'].env['spark'] = self._interp.spark_session
self.kernel.cell_magics['python'].env['sc'] = self._interp.sc

sc = self._interp.sc
self.kernel.Display(TextOutput(dedent("""\
{webui}
Spark context available as 'sc' (master = {master}, app id = {app_id}
Spark context available as 'sc'"
Web ui available at {webui}
Spark context available as 'sc' (master = {master}, app id = {app_id})
Spark session available as 'spark'
""".format(
master=sc.master,
app_id=sc.applicationId,
Expand Down

0 comments on commit a48e0df

Please sign in to comment.