Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

zuotingbing
Copy link

@zuotingbing zuotingbing commented Mar 1, 2018

What changes were proposed in this pull request?

2018-03-07_121010

when the hive session closed, we should also cleanup the .pipeout file.

How was this patch tested?

Added test cases.

String lScratchDir = hiveConf.getVar(ConfVars.LOCALSCRATCHDIR);
String sessionID = hiveConf.getVar(ConfVars.HIVESESSIONID);

File[] fileAry = new File(lScratchDir).listFiles(
Copy link
Contributor

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.

Copy link
Author

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.

Copy link
Contributor

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.

Copy link
Author

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!

@zuotingbing
Copy link
Author

Jenkins, ok to test

@zuotingbing
Copy link
Author

zuotingbing commented Mar 7, 2018

@gatorsmile @liufengdb could you please take a look at this, thanks!

@zuotingbing
Copy link
Author

@cloud-fan @felixcheung would you please take a review. Thanks!

@gatorsmile
Copy link
Member

ok to test

@gatorsmile
Copy link
Member

cc @liufengdb

@SparkQA
Copy link

SparkQA commented Mar 13, 2018

Test build #88195 has finished for PR 20702 at commit 93e87f5.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@liufengdb
Copy link

lgtm!

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@asfgit asfgit closed this in 918fb9b Mar 13, 2018
@zuotingbing zuotingbing deleted the SPARK-23547 branch March 14, 2018 01:17
mstewart141 pushed a commit to mstewart141/spark that referenced this pull request Mar 24, 2018
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants