prestodb/presto · error · PrestoException

LOCAL_FILE_FILESYSTEM_ERROR

LOCAL_FILE_FILESYSTEM_ERROR

Error message

Error listing files in directory: " + location

What it means

DataLocation.files() hit an IOException while opening a DirectoryStream over the location with the glob pattern; directory listing itself failed (permissions, concurrent removal, or filesystem error) and the exception is wrapped into this error.

Source

Thrown at presto-local-file/src/main/java/com/facebook/presto/localfile/DataLocation.java:100

        checkState(location.isDirectory(), "location %s is not a directory", location);

        try (DirectoryStream<Path> paths = newDirectoryStream(location.toPath(), pattern.get())) {
            ImmutableList.Builder<File> builder = ImmutableList.builder();
            for (Path path : paths) {
                builder.add(path.toFile());
            }
            List<File> files = builder.build();

            if (files.isEmpty()) {
                throw new PrestoException(LOCAL_FILE_NO_FILES, "No matching files found in directory: " + location);
            }
            return files.stream()
                    .sorted((o1, o2) -> Long.compare(o2.lastModified(), o1.lastModified()))
                    .collect(Collectors.toList());
        }
        catch (IOException e) {
            throw new PrestoException(LOCAL_FILE_FILESYSTEM_ERROR, "Error listing files in directory: " + location, e);
        }
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Check read/execute permissions on the directory for the Presto process
  2. Ensure the directory still exists and the filesystem is healthy
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at presto-local-file/src/main/java/com/facebook/presto/localfile/DataLocation.java:100 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/daf6f83d62d8eeba. Report an issue: GitHub.