You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@livy.apache.org by "Alex Bozarth (JIRA)" <ji...@apache.org> on 2018/05/14 18:18:00 UTC
[jira] [Commented] (LIVY-469) "shared" session kind is undocumented
[ https://issues.apache.org/jira/browse/LIVY-469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16474574#comment-16474574 ]
Alex Bozarth commented on LIVY-469:
-----------------------------------
[~jerryshao] since you added this feature want to take a look?
> "shared" session kind is undocumented
> -------------------------------------
>
> Key: LIVY-469
> URL: https://issues.apache.org/jira/browse/LIVY-469
> Project: Livy
> Issue Type: Bug
> Components: Docs
> Affects Versions: 0.5.0
> Reporter: Tim Harsch
> Priority: Major
>
> From the docs:
> {quote}Starting with version 0.5.0-incubating, each session can support all four Scala, Python and R interpreters with newly added SQL interpreter. The {{kind}}field in session creation is no longer required, instead users should specify code kind (spark, pyspark, sparkr or sql) during statement submission.
> To be compatible with previous versions, users can still specify {{kind}} in session creation, while ignoring {{kind}} in statement submission. Livy will then use this session {{kind}} as default kind for all the submitted statements.{quote}
>
> 1. I've found a 5th value for Session kind (only 4 are documented: https://livy.incubator.apache.org/docs/latest/rest-api.html#session-kind )
> 2. In 'shared' case, "users *cannot* still specify {{kind}} in session creation, while ignoring {{kind}}" due to the error that is received demonstrated below.
> {code}
> harsch@mint64 ~ $ curl -s -X POST --data '{}' -H "Content-Type: application/json" localhost:8998/sessions | python -m json.tool
> {
> "appId": null,
> "appInfo": {
> "driverLogUrl": null,
> "sparkUiUrl": null
> },
> "id": 0,
> "kind": "shared",
> "log": [
> "stdout: ",
> "\nstderr: "
> ],
> "owner": null,
> "proxyUser": null,
> "state": "starting"
> }
> {code}
> Executing this:
> {code}
> curl -s -X POST --data '{"code":"1 + 1"}' -H "Content-Type: application/json" localhost:8998/sessions/0/statements| python -m json.tool
> {code}
> will produce this in the logs:
> {noformat}
> Caused by: org.apache.livy.rsc.rpc.RpcException: java.lang.IllegalArgumentException: Code type should be specified if session kind is shared
> {noformat}
> I do not know how a 'shared' session kind is different from "spark" session kind, or I would suggest some further documentation that would distinguish them. Perhaps one of the dev team could come up with some useful documentation in this regard.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)