Uh oh!
There was an error while loading. Please reload this page.
[SPARK-17330] [SPARK UT] Clean up spark-warehouse in UT - #14894
[SPARK-17330] [SPARK UT] Clean up spark-warehouse in UT#14894tone-zhang wants to merge 1 commit into
Conversation
srowen
commented
Aug 31, 2016
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? |
tone-zhang
commented
Aug 31, 2016
@srowen Thanks for the comments. |
srowen
commented
Aug 31, 2016
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. |
tone-zhang
commented
Sep 1, 2016
@srowen Thanks a lot for your help. |
There was a problem hiding this comment.
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.
@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!
tone-zhang
commented
Sep 6, 2016
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! |
srowen
commented
Sep 6, 2016
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 |
tone-zhang
commented
Sep 7, 2016
@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. |
srowen
commented
Sep 7, 2016
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.
tone-zhang
commented
Sep 8, 2016
Update the PR to clean up the "spark-warehouse" in DDLSuite.scala. |
srowen
commented
Sep 10, 2016
Jenkins test this please |
SparkQA
commented
Sep 10, 2016
Test build #65205 has finished for PR 14894 at commit
|
srowen
commented
Sep 11, 2016
I'm OK with this as minor cleanup. It can't hurt. |
srowen
commented
Sep 11, 2016
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> Closesapache#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.