-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-31926][SQL][TESTS][FOLLOWUP][test-hive1.2][test-maven] Fix concurrency issue for ThriftCLIService to getPortNumber #28835
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
|
Thank you for investigating this, @yaooqinn . |
|
retest this please |
|
Test build #124064 has finished for PR 28835 at commit
|
|
Test build #124067 has finished for PR 28835 at commit
|
|
Test build #124068 has finished for PR 28835 at commit
|
|
Test build #124069 has finished for PR 28835 at commit
|
|
Sorry, @yaooqinn and @cloud-fan . It seems that we had better revert the patch first because it's too flaky. |
|
Thanks, @dongjoon-hyun, and sorry for the inconvenience. I will keep working on this. |
…urrency issue for ThriftCLIService to getPortNumber"" This reverts commit 75afd88.
|
retest this please |
|
Test build #124088 has finished for PR 28835 at commit
|
|
retest this please |
|
Test build #124087 has finished for PR 28835 at commit
|
|
Test build #124102 has finished for PR 28835 at commit
|
|
retest this please |
|
Test build #124113 has started for PR 28835 at commit |
| * the super class [[CLIService#start]] starts a useless dummy metastore client, skip it and call | ||
| * the ancestor [[CompositeService#start]] directly. | ||
| */ | ||
| override def start(): Unit = startCompositeService() |
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.
CLIService will create a metastore connection during start, which is useless for our dummy execution hive conf and will cause class cast issue though different classloader
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.
Here we bypass it and start the registered services as CompositeService does
|
Test build #124119 has started for PR 28835 at commit |
|
Test build #124108 has finished for PR 28835 at commit
|
|
retest this please |
|
retest this please |
1 similar comment
|
retest this please |
|
Test build #124157 has finished for PR 28835 at commit
|
|
Test build #124158 has finished for PR 28835 at commit
|
|
Test build #124150 has finished for PR 28835 at commit
|
|
retest this please |
|
Test build #124162 has finished for PR 28835 at commit
|
|
retest this please |
juliuszsompolski
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.
Thanks for digging into this!
| throw new ServiceException("Failed to Start " + getName, e) | ||
| } | ||
|
|
||
| // Emulating `AbstractService.start` |
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.
AbstractService.start does also startTime = System.currentTimeMillis();
Lets set startTime as well, just in case.
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.
Nice catch!
| sqlContext.setConf(ConfVars.METASTORECONNECTURLKEY.varname, | ||
| s"jdbc:derby:;databaseName=$metastorePath;create=true") | ||
| sqlContext.setConf(ConfVars.METASTOREURIS.varname, "") |
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.
What's this for?
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.
Some test failures showed that the metastore client was trying to connect through METASTOREURIS which seems to be set by other tests. But now I guess this won't be necessary as we skip that part
|
Test build #124202 has finished for PR 28835 at commit
|
|
Test build #124215 has finished for PR 28835 at commit
|
| // Emulating `AbstractService.start` | ||
| val startTime = new java.lang.Long(System.currentTimeMillis()) | ||
| setAncestorField(this, 3, "startTime", startTime) | ||
| invoke(classOf[AbstractService], this, "ensureCurrentState", classOf[STATE] -> STATE.INITED) |
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.
This can throw IllegalStateException, and in the original implementation it is inside the try catch block, which would turn it into ServiceException.
Let's do that as well just in case :-).
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.
Ah, I see.
juliuszsompolski
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
|
Test build #124218 has finished for PR 28835 at commit
|
|
retest this please |
|
Test build #124228 has finished for PR 28835 at commit
|
|
retest this please |
|
retest this please |
|
Test build #124249 has finished for PR 28835 at commit
|
|
thanks, merging to master! (don't backport as it's not a test only PR anymore) |
|
Test build #124250 has finished for PR 28835 at commit
|
What changes were proposed in this pull request?
This PR brings #28751 back
It once reverted by 4a25200 because of inevitable maven test failure
And reverted again because of the flakiness of the added unit tests
Why are the changes needed?
fix flaky test
Does this PR introduce any user-facing change?
no
How was this patch tested?
passing sbt and maven tests