-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-11089] [SQL] Adds option for disabling multi-session in Thrift server #9740
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
[SPARK-11089] [SQL] Adds option for disabling multi-session in Thrift server #9740
Conversation
|
Another approach for this problem is to have "global" options. For example,
Another benefit of this approach is that we don't need to restart the Thrift server to switch between single-/multi-session modes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible that we only introduce a command line option here? (Not sure how the JDBC server is used).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean something like --single-session? The benefit of SparkConf option is that users can add it in spark-defaults.conf.
Command line options of start-thriftserver.sh are parsed by both SparkSubmit and HiveServer2.ServerOptionsProcessor. The latter isn't extensible. One option is to add a --single-session option in SparkSubmit and make a synonymous of --conf spark.sql.hive.thriftServer.singleSession=true. However, this option doesn't seem to be general enough to be added in SparkSubmit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks!
|
@liancheng I like the this approach more, all global configurations should be placed in SparkConf (could be override in current session) |
|
@liancheng This option is only for backward compatibility purpose, could we document it somewhere? We should also mention this change (isolated sessions) in release note. |
|
Yeah, I'll add it to the programming guide. |
|
+1 to this approach instead of adding a new concept. |
|
Test build #46000 has finished for PR 9740 at commit
|
|
@liancheng Will you update the programming guide in this PR? |
|
Yeah, updating this one soon. |
|
Test build #46081 has finished for PR 9740 at commit
|
|
Merging to master and 1.6. |
…server This PR adds a new option `spark.sql.hive.thriftServer.singleSession` for disabling multi-session support in the Thrift server. Note that this option is added as a Spark configuration (retrieved from `SparkConf`) rather than Spark SQL configuration (retrieved from `SQLConf`). This is because all SQL configurations are session-ized. Since multi-session support is by default on, no JDBC connection can modify global configurations like the newly added one. Author: Cheng Lian <[email protected]> Closes #9740 from liancheng/spark-11089.single-session-option. (cherry picked from commit 7b1407c) Signed-off-by: Michael Armbrust <[email protected]>
This PR adds a new option
spark.sql.hive.thriftServer.singleSessionfor disabling multi-session support in the Thrift server.Note that this option is added as a Spark configuration (retrieved from
SparkConf) rather than Spark SQL configuration (retrieved fromSQLConf). This is because all SQL configurations are session-ized. Since multi-session support is by default on, no JDBC connection can modify global configurations like the newly added one.