You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@toree.apache.org by "Jakob Odersky (JIRA)" <ji...@apache.org> on 2017/04/05 19:00:44 UTC

[jira] [Comment Edited] (TOREE-402) Installer should support parameterized kernel names

    [ https://issues.apache.org/jira/browse/TOREE-402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15957443#comment-15957443 ] 

Jakob Odersky edited comment on TOREE-402 at 4/5/17 6:59 PM:
-------------------------------------------------------------

Thanks for the detailed description. This could be a useful addition to Toree, however I think it will add quite a bit of complexity to the installer and only solves a minor problem. Any patches are welcome!

In the meantime, I can think of one alternate solution (that would need to be discussed further) and one workaround:

1) Alternate solution: change the install script to allow installing only one kernel per invocation (essentially remove the ability specify multiple interpreters) and specify the name as-is, without appending the language used. The advantage in this case would be that we don't need to complicate the install scripts with template parsing and value substitution. Unfortunately however, this also changes the install script api and hence may break existing deployments. Then again, we are currently on version 0.x, so breaking changes should not necessarily be rejected.

2) Workaround: install kernels as usual and then modify the generated `kernel.json` files, changing the `display_name` property to the required kernel name.

In my opinion, 2) is the simplest fix for now. It can also be applied in automated deployments with command line tools that modify JSON data such as jq or plain sed.


was (Author: jodersky):
Thanks for the detailed description. This could be a useful addition to Toree, however I think it will require quite some time to implement and only solves a minor problem. Any patches are welcome!

In the meantime, I can think of one alternate solution (that would need to be discussed further) and one workaround:

1) Alternate solution: change the install script to allow installing only one kernel per invocation (essentially remove the ability specify multiple interpreters) and specify the name as-is, without appending the language used. The advantage in this case would be that we don't need to complicate the install scripts with template parsing and value substitution. Unfortunately however, this also changes the install script api and hence may break existing deployments. Then again, we are currently on version 0.x, so breaking changes should not necessarily be rejected.

2) Workaround: install kernels as usual and then modify the generated `kernel.json` files, changing the `display_name` property to the required kernel name.

In my opinion, 2) is the simplest fix for now. It can also be applied in automated deployments with command line tools that modify JSON data such as jq or plain sed.

> Installer should support parameterized kernel names
> ---------------------------------------------------
>
>                 Key: TOREE-402
>                 URL: https://issues.apache.org/jira/browse/TOREE-402
>             Project: TOREE
>          Issue Type: Wish
>          Components: Kernel
>    Affects Versions: 0.2.0
>            Reporter: Christian Kadner
>            Priority: Minor
>
> For enterprise deployments of Apache Toree it would be nice to have more flexibility when specifying kernel name(s) when installing multiple interpreters at the same time.
> Currently the Apache Toree installer allows to specify {{kernel_name}} and {{interpreters}}, i.e. running {code}jupyter toree install --kernel_name='Spark 2.1' --interpresters=Scala,PySpark,SparkR,SQL{code} would result in kernels with these names:
> {code}
> Spark 2.1 - Scala
> Spark 2.1 - PySpark
> Spark 2.1 - SparkR
> Spark 2.1 - SQL
> {code}
> For enterprise deployments that support other languages and Spark versions however this naming scheme is not flexible enough. Suppose this is the desired list of kernels (kernel display names):
> {code}
> Python 2.7 with Spark 1.6
> Python 2.7 with Spark 2.0
> Python 3.5 with Spark 1.6
> Python 3.5 with Spark 2.0
> R with Spark 1.6
> R with Spark 2.0
> Scala 2.10 with Spark 1.6
> Scala 2.11 with Spark 2.0
> {code}
> In order to achieve the above names, one would have to write a custom script to replace the {{display_name}} in the {{kernel.json}} files that get created by the Toree installer.
> It would be nice to enrich the Toree install options to allow for some kind of pattern instead of a fixed string, i.e.:
> {code}
> jupyter toree install --kernel_name='{interpreter.name} {interpreter.version} with Spark {spark.version}' ...
> {code}
> The install documentation might read:
> {noformat}
> --kernel_name=<Unicode> (ToreeInstall.kernel_name)
>     Examples:  '{interpreter.name} {interpreter.version} with Spark {spark.version}'
>     Default:   'Apache Toree - {interpreter.name}'
>     Install the kernel spec with this name. This is also used as the display name for kernels in the Jupyter UI.
> {noformat}
> Of course the placeholders would then have to be replaced by the Toree install code and actual list of available variables may be different from the above suggestion.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)