diff --git a/spylon_kernel/scala_interpreter.py b/spylon_kernel/scala_interpreter.py index 01a2757..4133278 100644 --- a/spylon_kernel/scala_interpreter.py +++ b/spylon_kernel/scala_interpreter.py @@ -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() diff --git a/spylon_kernel/scala_magic.py b/spylon_kernel/scala_magic.py index 8107520..f837431 100644 --- a/spylon_kernel/scala_magic.py +++ b/spylon_kernel/scala_magic.py @@ -35,7 +35,7 @@ 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 @@ -43,9 +43,9 @@ def _get_scala_interpreter(self): 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,