-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-17330] [SPARK UT] Clean up spark-warehouse in UT #14894
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
|
How would this relate to SPARK-8368? We already have a Utils method for deleting recursively already; please use that. Is this the only path that leaves behind spark-warehouse? |
|
@srowen Thanks for the comments. |
|
OK, but the change isn't actually related to SPARK-8368, so I think you can remove that link in the title and the link that was created in the JIRA. See No, I'm saying that if you find all instances of tests that don't clean up spark-warehouse (there may be more, and we should try to fix all of them), then there's also no reason to have to ignore it in git. But that's not the fix, just a cleanup. |
|
@srowen Thanks a lot for your help. |
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 seems like a bandaid. Where is this directory created and not cleaned up in the first place? I see other tests that create it, so, it's probably best to fix the source?
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.
@srowen Thanks a lot for your help!
Yes, it is better to clean up the temporary path at the source. I will have a check and update the PR.
Thanks!
|
In Spark UT, the temporary data file should be stored in spark/target/tmp not in spark/spark-warehouse. The Spark UT suite will clean up the path spark/target/tmp when finish the test. It is the existing mechanism. @srowen Thanks a lot for your comments. Could you please have a review? Thanks! |
|
This is better. It looks like Although I agree with your changes, aren't there other places in the same file that need the same treatment? Ultimately the goal is to see that after a successful test run, no |
|
@srowen I checked DDLSuite.scala, the case "Create Database using Default Warehouse Path" is used to test the default "spark-warehouse" setting. In the doc, the default path should be "("user.dir")/spark-warehouse". I prefer to keep the path, just remove it after finish the case manually. |
|
Yes, I think it wouldn't hurt to always try to delete the default spark-warehouse in this suite after each test. Try running all tests after you're done to see if anything leaves it behind; the goal is to get rid of the entry in gitignore. |
When run Spark UT based on the latest version of master branch, One UT case is failed becaues the temporary data files have not been cleaned up. The UT name is "SPARK-8368: includes jars passed in through --jars". In Spark UT, the temorary data file should be stored in spark/target/tmp not in spark/spark-warehouse.
|
Update the PR to clean up the "spark-warehouse" in DDLSuite.scala. |
|
Jenkins test this please |
|
Test build #65205 has finished for PR 14894 at commit
|
|
I'm OK with this as minor cleanup. It can't hurt. |
|
Merged to master |
## What changes were proposed in this pull request? Check the database warehouse used in Spark UT, and remove the existing database file before run the UT (SPARK-8368). ## How was this patch tested? Run Spark UT with the command for several times: ./build/sbt -Pyarn -Phadoop-2.6 -Phive -Phive-thriftserver "test-only *HiveSparkSubmitSuit*" Without the patch, the test case can be passed only at the first time, and always failed from the second time. With the patch the test case always can be passed correctly. Author: tone-zhang <tone.zhang@linaro.org> Closes apache#14894 from tone-zhang/issue1.
What changes were proposed in this pull request?
Check the database warehouse used in Spark UT, and remove the existing database file before run the UT (SPARK-8368).
How was this patch tested?
Run Spark UT with the command for several times:
./build/sbt -Pyarn -Phadoop-2.6 -Phive -Phive-thriftserver "test-only HiveSparkSubmitSuit"
Without the patch, the test case can be passed only at the first time, and always failed from the second time.
With the patch the test case always can be passed correctly.