Use FileUtils.createTempDir in IndexGeneratorJob. (#10568)

Simplifies code by using a method designed for this purpose.
This commit is contained in:
Gian Merlino 2020-11-09 22:40:28 -08:00 committed by GitHub
parent cd231d8511
commit 20e7e53ede
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -645,10 +645,7 @@ public class IndexGeneratorJob implements Jobby
null
);
try {
File baseFlushFile = File.createTempFile("base", "flush");
baseFlushFile.delete();
baseFlushFile.mkdirs();
File baseFlushFile = FileUtils.createTempDir("base-flush");
Set<File> toMerge = new TreeSet<>();
int indexCount = 0;
int lineCount = 0;