apache/hadoop · error · IllegalArgumentException
Scheme not defined in the uri: {uri}
Error message
Scheme not defined in the uri: {uri} What it means
Error "Scheme not defined in the uri: {uri}" thrown in apache/hadoop.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java:194
throw new UnsupportedFileSystemException(String.format(
"%s=null: %s: %s",
fsImplConf, NO_ABSTRACT_FS_ERROR, uri.getScheme()));
}
return (AbstractFileSystem) newInstance(clazz, uri, conf);
}
/**
* Get the statistics for a particular file system.
*
* @param uri
* used as key to lookup STATISTICS_TABLE. Only scheme and authority
* part of the uri are used.
* @return a statistics object
*/
protected static synchronized Statistics getStatistics(URI uri) {
String scheme = uri.getScheme();
if (scheme == null) {
throw new IllegalArgumentException("Scheme not defined in the uri: "
+ uri);
}
URI baseUri = getBaseUri(uri);
Statistics result = STATISTICS_TABLE.get(baseUri);
if (result == null) {
result = new Statistics(scheme);
STATISTICS_TABLE.put(baseUri, result);
}
return result;
}
private static URI getBaseUri(URI uri) {
String scheme = uri.getScheme();
String authority = uri.getAuthority();
String baseUriString = scheme + "://";
if (authority != null) {
baseUriString = baseUriString + authority;
} else {View on GitHub (pinned to 2add963021)
Solutions
- Include a scheme in the URI (e.g. hdfs://, viewfs://) so the FileSystem can be selected.
Example fix
Prefix the URI with the filesystem scheme.
When it happens
Trigger: Raised at runtime when the documented precondition or configuration requirement for this operation is violated.
Common situations: Misconfigured or missing property, invalid user input, or calling the API before its prerequisites are met.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/e41d07b0eddc639f.
Report an issue: GitHub.