[
https://issues.apache.org/jira/browse/TOREE-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15934883#comment-15934883
]
Ryan Blue commented on TOREE-395:
---------------------------------
That PR probably won't be committed on its own. It has a few parts, one of
which is this issue. The main two are:
1. How does an interpreter provide rich output to Jupyter notebooks? Right now,
they can only provide text so I think we need to change the API. That PR
changes the API so that interpreters return a {{Map[String, String]}} that is
the representation of an object by mime type.
2. How can an interpreter inspect Java objects to create rich output? Python
uses {{_repr_html_}} methods, but defining magic method names isn't a good
practice in JVM languages. The PR introduces an API for registering type-safe
functions that can turn an object into the {{Map[String, String]}} set of
representations.
I pulled out the display API to a separate repo here:
https://github.com/rdblue/jupyter-repr-api
The idea is to get the Jupyter community to recommend a minimal API that can be
an intermediary between Jupyter kernels and libraries. Next steps are to get
feedback on that API and to get the change for #1 committed.
> Provide a way to disable automatic printing of results in Toree Scala
> ---------------------------------------------------------------------
>
> Key: TOREE-395
> URL: https://issues.apache.org/jira/browse/TOREE-395
> Project: TOREE
> Issue Type: Improvement
> Affects Versions: 0.2.0
> Reporter: Kun Liu
>
> Scala REPL supports a flag, ":silent" to enable/disable automatic printing of
> results (those messages begin with "res"). This is also supported in Spark
> shell. But for Toree Scala kernel, this flag is not supported. Thus the
> result of a cell would be always printed.
> But if there is any logging mechanism, the results would be recorded in a log
> file, while this may not be desirable. For instance, a user may not want any
> sensitive data logged when running "dataRDD.take(5)" in a cell.
> Also found the possible source codes for this:
> https://github.com/apache/incubator-toree/blob/master/scala-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/scala/ScalaInterpreter.scala
> There are three methods with silent: Boolean = false as parameter.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)