Skip to content

Commit

Permalink
Explicitly create cache file when caching hdfs
Browse files Browse the repository at this point in the history
  • Loading branch information
Asger Askov Blekinge committed Jan 4, 2022
1 parent bc7b7cc commit 34952e9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public static Path cacheFile(File file, Configuration conf, Progressable progres
try (OutputStream destStream = hdfsFileSystem.createFile(dst)
.overwrite(false)
.progress(progressable)
.create() //nessesary to actually create the file, otherwise
.recursive() //just in case the file
.build();
InputStream srcStream = new FileInputStream(file)
) {
Expand Down

0 comments on commit 34952e9

Please sign in to comment.