-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Java] Automatically clean up temp files. #5507
Conversation
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 job!
return false; | ||
@Override | ||
public void close() { | ||
Preconditions.checkState(file.delete(), "Couldn't delete file {}", file.getAbsolutePath()); |
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.
I prefer a warning message instead of a check here.
startProcess(command, null, "raylet"); | ||
try (FileUtil.TempFile rayletFile = FileUtil.getTempFileFromResource("raylet")) { | ||
rayletFile.getFile().setExecutable(true); | ||
List<String> command = ImmutableList.of( |
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.
I'm surprised that CI isn't able to catch this!
Test PASSed. |
Test FAILed. |
Test FAILed. |
Test FAILed. |
Test FAILed. |
This reverts commit fab5ae6.
Why are these changes needed?
Previously, we depends on
File::deleteOnExit
to delete temp files. This way sometimes cannot work if the JVM doesn't exit gracefully. This issue may lead to eating up disk space.What do these changes do?
Related issue number
Linter
scripts/format.sh
to lint the changes in this PR.