-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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-37786][SQL] StreamingQueryListener support use SQLConf.get to get corresponding SessionState's SQLConf #35092
Conversation
…get corresponding SessionState's SQLConf
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQueryListenersConfSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryManager.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQueryListenersConfSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQueryListenersConfSuite.scala
Show resolved
Hide resolved
…ngQueryListenersConfSuite.scala Co-authored-by: Hyukjin Kwon <gurwls223@gmail.com>
…/StreamingQueryListenersConfSuite.scala" This reverts commit 5ba1290.
GA passed, can merge this. |
Merged to master. |
@HyukjinKwon Should we add a migration guide to mention this in the migration guide? If need I will raise a follow up for this two prs. |
what do we need for migration? |
Right, it's not a migration. But we should make user know this change. Maybe we can mention this in their configuration doc? Such as
|
See #35122 |
What changes were proposed in this pull request?
Current StreamingQueryListener only support add constructor parameter of SparkConf, but if we start a SparkContext first, many SQL conf won't be applied to SparkContext's SparkConf.
Also it's a SQL component, related configuration we defined it as SQLConf. But it's hard to use SQLConf in this plugin listener.
This patch, we use pass SQLConf to
StreamingQueryManager
and useSQLConf.withExistingConf
to wrap the passedSQLConf
. Then we can useSQLConf.get
to get the same SQLConf ofSessionState
when initializingStreamingQueryListener
Why are the changes needed?
Pass corresponding SessionState's SQLConf to
StreamingQueryListener
. Then user can use SQLConf.get to use the SQLConf.Does this PR introduce any user-facing change?
User can use
StreamingQueryListener
with correspondingSessionState
'sSQLConf
. For exampleHow was this patch tested?
Added UT