You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/17 16:04:36 UTC

[GitHub] [flink] ferenc-csaky commented on a diff in pull request #20011: [FLINK-28112][filesystems] Fix error message when directly supported file system is not able to be handled

ferenc-csaky commented on code in PR #20011:
URL: https://github.com/apache/flink/pull/20011#discussion_r900287393


##########
flink-core/src/main/java/org/apache/flink/core/fs/FileSystem.java:
##########
@@ -527,13 +527,30 @@ public static FileSystem getUnguardedFileSystem(final URI fsUri) throws IOExcept
                 try {
                     fs = FALLBACK_FACTORY.create(uri);
                 } catch (UnsupportedFileSystemSchemeException e) {
-                    throw new UnsupportedFileSystemSchemeException(
-                            "Could not find a file system implementation for scheme '"
-                                    + uri.getScheme()
-                                    + "'. The scheme is not directly supported by Flink and no Hadoop file system to "
-                                    + "support this scheme could be loaded. For a full list of supported file systems, "
-                                    + "please see https://nightlies.apache.org/flink/flink-docs-stable/ops/filesystems/.",
-                            e);
+                    if (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 "

Review Comment:
   Nit: I'd write `plugin(s)` to avoid the inline if param and simplify the template.



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org