There is a race between java.io.File::exists() and java.io.File:mkdirs() in createBufferFile().
First an existence of a directory is checked and if it does not exist, the directory is created.
If two threads are executing this code, following schedule is possible:
1) threadA: exists("/tmp/hadoop-root") returns false
2) threadB: exists("/tmp/hadoop-root") returns false
3) threadA: mkdirs("/tmp/hadoop-root") succeeds
4) threadB: mkdirs("/tmp/hadoop-root") fails and IOException is thrown
https://github.com/oracle/oci-hdfs-connector/blob/aeeac0e2b3a71a49286ec670b913edf600cf0607/hdfs-connector/src/main/java/com/oracle/bmc/hdfs/store/BmcFileBackedOutputStream.java#L65
There is a race between java.io.File::exists() and java.io.File:mkdirs() in createBufferFile().
First an existence of a directory is checked and if it does not exist, the directory is created.
If two threads are executing this code, following schedule is possible: 1) threadA: exists("/tmp/hadoop-root") returns false 2) threadB: exists("/tmp/hadoop-root") returns false 3) threadA: mkdirs("/tmp/hadoop-root") succeeds 4) threadB: mkdirs("/tmp/hadoop-root") fails and IOException is thrown