AHeise commented on a change in pull request #11139:
[FLINK-16015][filesystems]Throw an error when a plugin for a known scheme is
missing.
URL: https://github.com/apache/flink/pull/11139#discussion_r385668339
##########
File path: flink-core/src/main/java/org/apache/flink/core/fs/FileSystem.java
##########
@@ -440,8 +467,21 @@ public static FileSystem getUnguardedFileSystem(final URI
fsUri) throws IOExcept
try (TemporaryClassLoaderContext ignored =
TemporaryClassLoaderContext.of(classLoader)) {
fs = factory.create(uri);
}
- }
- else {
+ } else if
(!ALLOWED_FALLBACK_FILESYSTEMS.contains(uri.getScheme()) &&
+
DIRECTLY_SUPPORTED_FILESYSTEM.containsKey(uri.getScheme())) {
+ final Collection<String> plugins =
DIRECTLY_SUPPORTED_FILESYSTEM.get(uri.getScheme());
+ throw new
UnsupportedFileSystemSchemeException(String.format(
+ "Could not find a file system
implementation for scheme '%s'. The scheme is " +
+ "directly supported by Flink
through the following plugin%s: %s. Please ensure that each " +
+ "plugin resides within its own
subfolder within the plugins directory. See https://ci.apache" +
+
".org/projects/flink/flink-docs-stable/ops/plugins.html for more information.
If you want to " +
+ "use a Hadoop file system for
that scheme, please add the scheme to the configuration fs" +
+
".allowed-fallback-filesystems.",
+ uri.getScheme(),
+ plugins.size() == 1 ? "" : "s",
+ String.join(", ", plugins)
+ ));
Review comment:
Added reference.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services