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-23547][SQL]Cleanup the .pipeout file when the Hive Session closed #20702
Conversation
String lScratchDir = hiveConf.getVar(ConfVars.LOCALSCRATCHDIR); | ||
String sessionID = hiveConf.getVar(ConfVars.HIVESESSIONID); | ||
|
||
File[] fileAry = new File(lScratchDir).listFiles( |
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.
Nit: There is an overloaded version of listfiles.
Using it saves 1 line.
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.
Sorry i did not find the overloaded version of listfiles which saves 1 line.
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.
No problem. I hope this works.
File[] fileAry = new File(lScratchDir).listFiles(
(dir, name) -> name.startsWith(sessionID) && name.endsWith(".pipeout"));
I think it would be good if you would have one unit test for your change.
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.
@attilapiros will fix it, thanks!
Jenkins, ok to test |
@gatorsmile @liufengdb could you please take a look at this, thanks! |
@cloud-fan @felixcheung would you please take a review. Thanks! |
ok to test |
cc @liufengdb |
Test build #88195 has finished for PR 20702 at commit
|
lgtm! |
thanks, merging to master! |
…osed ## What changes were proposed in this pull request? ![2018-03-07_121010](https://user-images.githubusercontent.com/24823338/37073232-922e10d2-2200-11e8-8172-6e03aa984b39.png) when the hive session closed, we should also cleanup the .pipeout file. ## How was this patch tested? Added test cases. Author: zuotingbing <zuo.tingbing9@zte.com.cn> Closes apache#20702 from zuotingbing/SPARK-23547.
What changes were proposed in this pull request?
when the hive session closed, we should also cleanup the .pipeout file.
How was this patch tested?
Added test cases.