-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-22837][SQL]Session timeout checker does not work in SessionManager. #20025
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
Conversation
felixcheung
left a comment
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.
| } | ||
| } | ||
|
|
||
| private void initSessionTimeoutCheckerConfig() { |
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.
should we refactor createBackgroundOperationPool to call this?
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.
Thanks @felixcheung . In my opinion you can create a new or follow-up PR if it is necessary. This PR is to fix the bug about the Session Timeout Checker does not work currently.
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.
|
Jenkins, ok to test |
|
Test build #85299 has finished for PR 20025 at commit
|
|
Could you please merge this to Master? Thanks @felixcheung @srowen |
felixcheung
left a comment
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.
@cloud-fan @gatorsmile would you like a look please?
| } | ||
| } | ||
|
|
||
| private void initSessionTimeoutCheckerConfig() { |
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.
|
Currently we do not call the i fix this bug refer to |
|
@zuotingbing I think all the code in SparkSQLSessionManager.scala should be gone because they are just some reflection hacks. It is possible to call |
|
@liufengdb I think the class |
|
@rxin Could you please to review this? Thanks. In my opinion we can create a new or follow-up PR if refactor is necessary. This PR is to fix the bug about the Session Timeout Checker does not work currently. |
|
My understanding is that the reflection was used originally because we don't control what is done inside the init method of the super class, given that different hive versions can be used. However, after we inlined the hive code, it is safe to call the init method directly now. This is a cleaner way to fix the referred and other potential bugs, IMO. |
|
@gatorsmile What is your opinion about this? Thanks! |
|
ping @gatorsmile |
|
ping @liufengdb |
|
Test build #86167 has finished for PR 20025 at commit
|
162a93f to
79fc11a
Compare
|
Test build #86231 has finished for PR 20025 at commit
|
|
@cloud-fan @gatorsmile @liufengdb @felixcheung @srowen @vanzin Is anybody could make further contact and discuss this PR? Thanks! |
| keepAliveTime, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(poolQueueSize), | ||
| new ThreadFactoryWithGarbageCleanup(threadPoolName)); | ||
| backgroundOperationPool.allowCoreThreadTimeOut(true); | ||
|
|
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 think we can keep this file unchanged. Looks like the hive thread pool is more flexible than the spark one.
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.
yes, i will update it . Thanks!
|
@gatorsmile @felixcheung I left one comment, otherwise lgtm. |
|
ok to test |
|
Test build #86349 has finished for PR 20025 at commit
|
…ead pool is more flexible than the spark one.
|
Test build #86370 has finished for PR 20025 at commit
|
| import java.util.concurrent.Future; | ||
| import java.util.concurrent.LinkedBlockingQueue; | ||
| import java.util.concurrent.ThreadPoolExecutor; | ||
| import java.util.concurrent.TimeUnit; |
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.
revert this back.
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.
yes, thanks
| } | ||
| createBackgroundOperationPool(); | ||
| addService(operationManager); | ||
| super.init(hiveConf); |
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.
hmm, I think we revert keep this line too.
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.
yes, we could keep super.init() here and remove initCompositeService in SparkSQLSessionManager.init(). thanks
|
Test build #86508 has finished for PR 20025 at commit
|
|
@gatorsmile @liufengdb Anything else? Thanks! |
|
lgtm |
felixcheung
left a comment
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.
LGTM so long as @gatorsmile approves.
|
Thanks! Merged to master/2.3 |
…nager. ## What changes were proposed in this pull request? Currently we do not call the `super.init(hiveConf)` in `SparkSQLSessionManager.init`. So we do not load the config `HIVE_SERVER2_SESSION_CHECK_INTERVAL HIVE_SERVER2_IDLE_SESSION_TIMEOUT HIVE_SERVER2_IDLE_SESSION_CHECK_OPERATION` , which cause the session timeout checker does not work. ## How was this patch tested? manual tests Author: zuotingbing <[email protected]> Closes #20025 from zuotingbing/SPARK-22837. (cherry picked from commit bbb87b3) Signed-off-by: gatorsmile <[email protected]>
What changes were proposed in this pull request?
Currently we do not call the
super.init(hiveConf)inSparkSQLSessionManager.init. So we do not load the configHIVE_SERVER2_SESSION_CHECK_INTERVAL HIVE_SERVER2_IDLE_SESSION_TIMEOUT HIVE_SERVER2_IDLE_SESSION_CHECK_OPERATION, which cause the session timeout checker does not work.How was this patch tested?
manual tests