You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@livy.apache.org by GitBox <gi...@apache.org> on 2019/09/23 12:10:56 UTC

[GitHub] [incubator-livy] namanmishra91 opened a new pull request #235: [LIVY-666] [WIP] Support named interpreter groups

namanmishra91 opened a new pull request #235: [LIVY-666] [WIP] Support named interpreter groups
URL: https://github.com/apache/incubator-livy/pull/235
 
 
   ## What changes were proposed in this pull request?
   Currently, a session contains only one interpreter group. For a new REPL of the same type, a new session has to be created. In order to support use case of multiple REPLs attached to the same spark application with separate variable scoping (similar to scoped interpreter mode in Zeppelin: https://zeppelin.apache.org/docs/0.8.0/usage/interpreter/interpreter_binding_mode.html#scoped-mode), this change adds support for having multiple interpreter groups in a session. The interpreter group on which the execution has to done can be specified via the statement execution API.
   
   The detailed proposal is on the Jira: https://issues.apache.org/jira/browse/LIVY-666
   
   The changes are backward compatible.
   
   ## How was this patch tested?
   Tested manually on laptop by running Livy standalone. Tried running a few commands and verified the functionality.
   Created a scala session:
   `curl -i -X POST -H "Content-Type: application/json" -d '{"name":"test", "kind":"scala"}' localhost:8998/sessions`
   
   `curl localhost:8998/sessions/0/statements -X POST -H 'Content-Type: application/json' -d '{"code":"val a=5", "interpreterGroup":"g1"}'`
   `curl localhost:8998/sessions/0/statements -X POST -H 'Content-Type: application/json' -d '{"code":"print(a)", "interpreterGroup":"g1"}'`
   prints 5
   `curl localhost:8998/sessions/0/statements -X POST -H 'Content-Type: application/json' -d '{"code":"print(a)", "interpreterGroup":"g2"}'`
   'a' is not defined
   
   I have added a few unit tests but couldn't run those since other tests are failing. Verifying that the tests work as expected is in progress.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services