We're updating the issue view to help you get more done. 

In some cases, file deletion errors are thrown when creating a file

Description

The code:

if (!fs.exists(ignoreFile)) {
val stream = fs.create(ignoreFile)
stream.close()
}

The stack:

2018-12-05 14:13:30,727 | ERROR | Error executing query, currentState RUNNING
java.io.IOException: alluxio.exception.DirectoryNotEmptyException: Failed to delete XXX (UFS delete file failed) from the under file system
at alluxio.hadoop.AbstractFileSystem.create(AbstractFileSystem.java:204)
at alluxio.hadoop.FileSystem.create(FileSystem.java:27)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:929)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:910)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:807)
at org.apache.hadoop.fs.FileSystem.create(FileSystem.java:796)
...
Caused by: alluxio.exception.DirectoryNotEmptyException: Failed to delete XXX (UFS delete file failed) from the under file system
at alluxio.client.file.BaseFileSystem.delete(BaseFileSystem.java:166)
at alluxio.client.file.BaseFileSystem.delete(BaseFileSystem.java:154)
at alluxio.hadoop.AbstractFileSystem.create(AbstractFileSystem.java:200)
... 25 more

Environment

None

Status

Assignee

Calvin Jia

Reporter

ligq

Labels

None

Components

Affects versions

1.8.1

Priority

Major