apache/hadoop · error · FileNotFoundException
Supplied status references a directory " + providedStatus
Error message
Supplied status references a directory " + providedStatus
What it means
Error "Supplied status references a directory " + providedStatus" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/OpenFileSupport.java:209
// was a status passed in via a withStatus() invocation in
// the builder API?
FileStatus providedStatus = parameters.getStatus();
S3AFileStatus fileStatus = null;
if (providedStatus != null) {
// there's a file status
// make sure the file name matches -the rest of the path
// MUST NOT be checked.
Path providedStatusPath = providedStatus.getPath();
checkArgument(path.getName().equals(providedStatusPath.getName()),
"Filename mismatch between file being opened %s and"
+ " supplied filestatus %s",
path, providedStatusPath);
// make sure the status references a file
if (providedStatus.isDirectory()) {
throw new FileNotFoundException(
"Supplied status references a directory " + providedStatus);
}
// build up the values
long len = providedStatus.getLen();
long modTime = providedStatus.getModificationTime();
String versionId;
String eTag;
// can use this status to skip our own probes,
LOG.debug("File was opened with a supplied FileStatus;"
+ " skipping getFileStatus call in open() operation: {}",
providedStatus);
// what type is the status (and hence: what information does it contain?)
if (providedStatus instanceof S3AFileStatus) {
// is it an S3AFileSystem status?
S3AFileStatus st = (S3AFileStatus) providedStatus;
versionId = st.getVersionId();
eTag = st.getEtag();View on GitHub (pinned to 2add963021)
Solutions
- Pass a file status, not a directory status, when opening a file with a supplied status.
When it happens
Trigger: Thrown at hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/OpenFileSupport.java:209 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/0ad4eccf4e15ee8e.
Report an issue: GitHub.