[jira] [Commented] (TOREE-380) Interpreters should be allowed to send results other than text/plain.

2017-06-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TOREE-380:
--

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

https://github.com/apache/incubator-toree/pull/104#discussion_r122049346
  
--- Diff: 
kernel-api/src/main/scala/org/apache/toree/interpreter/broker/BrokerTransformer.scala
 ---
@@ -43,7 +43,7 @@ class BrokerTransformer {
 import scala.concurrent.ExecutionContext.Implicits.global
 
 futureResult
-  .map(results => (Results.Success, Left(results)))
+  .map(results => (Results.Success, Left(Map("text/plain" -> 
results
--- End diff --

Opened https://issues.apache.org/jira/browse/TOREE-418


> Interpreters should be allowed to send results other than text/plain.
> -
>
> Key: TOREE-380
> URL: https://issues.apache.org/jira/browse/TOREE-380
> Project: TOREE
>  Issue Type: Improvement
>Reporter: Ryan Blue
>Assignee: Ryan Blue
>
> Jupyter allows kernels to send results using different content types, but 
> this isn't allowed by Toree for its interpreters. This prevents custom 
> display logic. The basic problem is that {{ExecuteOutput}} is a {{String}} 
> and not a {{Map[String, String]}} like {{CellMagicOutput}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (TOREE-418) Improve use of Jupyter's jvm-repr-api

2017-06-14 Thread Ryan Blue (JIRA)
Ryan Blue created TOREE-418:
---

 Summary: Improve use of Jupyter's jvm-repr-api
 Key: TOREE-418
 URL: https://issues.apache.org/jira/browse/TOREE-418
 Project: TOREE
  Issue Type: Bug
Reporter: Ryan Blue


TOREE-380 uses the [Jupyter jvm-repr API|https://github.com/jupyter/jvm-repr] 
to show rich representations of JVM objects. Libraries can register methods to 
display their classes by MIME type. Currently, the use is limited to the Scala 
interpreter, but it should probably be used to display any JVM object that 
interpreters don't handle.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (TOREE-417) Flaky test: ExecuteActorRelaySpec

2017-06-14 Thread Ryan Blue (JIRA)
Ryan Blue created TOREE-417:
---

 Summary: Flaky test: ExecuteActorRelaySpec
 Key: TOREE-417
 URL: https://issues.apache.org/jira/browse/TOREE-417
 Project: TOREE
  Issue Type: Bug
Affects Versions: 0.1.0
Reporter: Ryan Blue


ExecuteActorRelaySpec is flaky when running in gradle. Some {{expectMsgClass}} 
calls take more than the default 3s timeout.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TOREE-380) Interpreters should be allowed to send results other than text/plain.

2017-06-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TOREE-380:
--

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

https://github.com/apache/incubator-toree/pull/104#discussion_r122048356
  
--- Diff: 
kernel/src/test/scala/org/apache/toree/kernel/protocol/v5/relay/ExecuteRequestRelaySpec.scala
 ---
@@ -88,7 +89,7 @@ class ExecuteRequestRelaySpec extends TestKit(
 // Expected does not actually match real return of magic, which
 // is a tuple of ExecuteReply and ExecuteResult
 val expected = new ExecuteAborted()
-interpreterActorProbe.expectMsgClass(
+interpreterActorProbe.expectMsgClass(max = Duration(5, 
TimeUnit.SECONDS),
--- End diff --

Opened https://issues.apache.org/jira/browse/TOREE-417


> Interpreters should be allowed to send results other than text/plain.
> -
>
> Key: TOREE-380
> URL: https://issues.apache.org/jira/browse/TOREE-380
> Project: TOREE
>  Issue Type: Improvement
>Reporter: Ryan Blue
>Assignee: Ryan Blue
>
> Jupyter allows kernels to send results using different content types, but 
> this isn't allowed by Toree for its interpreters. This prevents custom 
> display logic. The basic problem is that {{ExecuteOutput}} is a {{String}} 
> and not a {{Map[String, String]}} like {{CellMagicOutput}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TOREE-380) Interpreters should be allowed to send results other than text/plain.

2017-06-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TOREE-380:
--

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

https://github.com/apache/incubator-toree/pull/104#discussion_r122047867
  
--- Diff: 
kernel/src/test/scala/org/apache/toree/kernel/protocol/v5/stream/KernelInputStreamSpec.scala
 ---
@@ -65,6 +65,9 @@ class KernelInputStreamSpec
 // set of data
 
doReturn(system.actorSelection(fakeInputOutputHandlerActor.path.toString))
   .when(mockActorLoader).load(MessageType.Incoming.InputReply)
+// Allow time for the actors to start. This avoids read() hanging 
forever
+// when running tests in gradle.
+Thread.sleep(100)
--- End diff --

Opened https://issues.apache.org/jira/browse/TOREE-416


> Interpreters should be allowed to send results other than text/plain.
> -
>
> Key: TOREE-380
> URL: https://issues.apache.org/jira/browse/TOREE-380
> Project: TOREE
>  Issue Type: Improvement
>Reporter: Ryan Blue
>Assignee: Ryan Blue
>
> Jupyter allows kernels to send results using different content types, but 
> this isn't allowed by Toree for its interpreters. This prevents custom 
> display logic. The basic problem is that {{ExecuteOutput}} is a {{String}} 
> and not a {{Map[String, String]}} like {{CellMagicOutput}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (TOREE-416) Flaky test: KernelInputStreamSpec

2017-06-14 Thread Ryan Blue (JIRA)
Ryan Blue created TOREE-416:
---

 Summary: Flaky test: KernelInputStreamSpec
 Key: TOREE-416
 URL: https://issues.apache.org/jira/browse/TOREE-416
 Project: TOREE
  Issue Type: Bug
Affects Versions: 0.1.0
Reporter: Ryan Blue


When running tests in gradle, KernelInputStreamSpec is flaky. Calls to the 
InputStream.read method hang forever. Sleeping for ~100ms at the end of the 
before block seems to avoid the problem. The likely cause is an actor thread or 
ZMQ consumer that needs to start up before running tests, or messages get lost.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (TOREE-380) Interpreters should be allowed to send results other than text/plain.

2017-06-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on TOREE-380:
--

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

https://github.com/apache/incubator-toree/pull/104#discussion_r122046211
  
--- Diff: 
kernel-api/src/main/scala/org/apache/toree/interpreter/broker/BrokerTransformer.scala
 ---
@@ -43,7 +43,7 @@ class BrokerTransformer {
 import scala.concurrent.ExecutionContext.Implicits.global
 
 futureResult
-  .map(results => (Results.Success, Left(results)))
+  .map(results => (Results.Success, Left(Map("text/plain" -> 
results
--- End diff --

No, kernel-api doesn't depend on protocol so it isn't available. But I 
think that this code shouldn't be sending mime types in the first place. 
Sending text/plain here happens because we haven't updated the Python kernel to 
correctly inspect its objects.

Eventually, the python interpreter should send back a result that is a py4j 
reference to the final value and the python representation (from _repr_ and 
_repr_html_) or a JVM object and None to indicate that the Jupyter JVM 
displayer should be called. So for now, I'd rather not change module 
dependencies.


> Interpreters should be allowed to send results other than text/plain.
> -
>
> Key: TOREE-380
> URL: https://issues.apache.org/jira/browse/TOREE-380
> Project: TOREE
>  Issue Type: Improvement
>Reporter: Ryan Blue
>Assignee: Ryan Blue
>
> Jupyter allows kernels to send results using different content types, but 
> this isn't allowed by Toree for its interpreters. This prevents custom 
> display logic. The basic problem is that {{ExecuteOutput}} is a {{String}} 
> and not a {{Map[String, String]}} like {{CellMagicOutput}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)