Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LIVY-971] Support to get session variables when using JDBC to connect to Livy thrift server. #390

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jianzhenwu
Copy link
Contributor

@jianzhenwu jianzhenwu commented Feb 25, 2023

… to Livy thrift server.

What changes were proposed in this pull request?

(Please fill in changes proposed in this fix)
Add DescLivySessionOperation to support fetching sessionId, applicationId, sessionState, sessionLogs from Livy thrift service.
Solve the bug that the thrift api gets stuck when creating an interactive session fails.

(Include a link to the associated JIRA and make sure to add a link to this pr on the JIRA as well)
https://issues.apache.org/jira/browse/LIVY-971

How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
integration tests

Please review https://livy.incubator.apache.org/community/ before opening a pull request.

@jianzhenwu jianzhenwu changed the title SPDI-33521. Support to get session variables when using JDBC to connect to Livy thrift server. [LIVY-971] Support to get session variables when using JDBC to connect to Livy thrift server. Feb 25, 2023
@jianzhenwu jianzhenwu self-assigned this Feb 25, 2023
@jianzhenwu jianzhenwu requested a review from mgaido91 February 25, 2023 07:04
@jianzhenwu jianzhenwu removed their assignment Feb 26, 2023
@mgaido91
Copy link
Contributor

mgaido91 commented Mar 3, 2023

I think this information is available on the Livy web application. I do not know any SQL engine that allows for a similar command, and we try to follow SQL standard. I think we should use the web app for monitoring the status, so if there is something missing there, I would recommend improving that rather than adding a new (unusual) SQL command.

@jianzhenwu jianzhenwu closed this Mar 6, 2023
@jianzhenwu jianzhenwu reopened this Mar 6, 2023
@jianzhenwu
Copy link
Contributor Author

jianzhenwu commented Mar 6, 2023

hi @mgaido91 thanks for your response. I think this feature has the following two usage scenarios.

  1. When other platforms use JDBC to integrate with Livy, they need to save the session ID and application ID.
  2. When the connection creation fails, it may be that the spark session failed to start. At this time, they need to check the reason why the spark session failed to start.
    I think it is convenient for users to use one protocol to meet the needs. What do you think?

@mgaido91
Copy link
Contributor

I think in general also in Spark the SQL interface is kept as conform as possible to the ANSI SQL standard and monitoring information is provided through the web API. If there are similar commands in other SQL engines, we can maybe do something similar. But I'd avoid creating something specific to Livy that nobody expects so nobody uses.

@jianzhenwu
Copy link
Contributor Author

I agree with your points. Thank you for sharing your insights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants