FileBasedSink could write tmp files above the output prefix.
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
FileBasedWriteOperation.TemporaryDirectoryBuilder tempDirBuilder =
new FileBasedWriteOperation.TemporaryDirectoryBuilder();
tempDirBuilder.apply("/home/output/"),
apply() returns "/home/temp-beam-output-2017-01-25_22-14-49"
And, it was not under the output prefix "/home/output/".
Examples of Path resolve:
Paths.get("/home/output").resolve("temp-beam");
Paths.get("/home/output/").resolve("temp-beam");
/home/output/temp-beam
/home/output/temp-beam
Paths.get("/home/output").resolve("..").resolve("temp-beam");
Paths.get("/home/output/").resolve("..").resolve("temp-beam");
/home/output/../temp-beam
/home/output/../temp-beam
Paths.get("/home/output").resolveSibling("temp-beam");
Paths.get("/home/output/").resolveSibling("temp-beam");
/home/temp-beam
/home/temp-beam
Imported from Jira [BEAM-1315](https://issues.apache.org/jira/browse/BEAM-1315). Original Jira may contain additional context.
Reported by: peihe0@gmail.com.
Contributor guide
Research direction
Start by locating FileBasedWriteOperation.TemporaryDirectoryBuilder and inspect how apply() constructs its path. Reproduce the example with /home/output/ and verify that the temporary directory remains under that output prefix. Done means the reported path behavior is corrected and the relevant behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100