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

ASF GitHub Bot commented on TOREE-395:
--------------------------------------

Github user rdblue commented on a diff in the pull request:

    https://github.com/apache/incubator-toree/pull/116#discussion_r107310980
  
    --- Diff: 
scala-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/scala/ScalaInterpreter.scala
 ---
    @@ -48,7 +48,7 @@ class ScalaInterpreter(private val config:Config = 
ConfigFactory.load) extends I
     
        protected val lastResultOut = new ByteArrayOutputStream()
     
    -   protected val multiOutputStream = MultiOutputStream(List(Console.out, 
lastResultOut))
    +   protected val multiOutputStream = MultiOutputStream(List(lastResultOut))
    --- End diff --
    
    I think the multiOutputStream can be completely removed rather than using 
it to wrap just one output stream. Instead, lastResultOut should be passed to 
IMain instead of multiOutputStream.


> 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)

Reply via email to