SteNicholas commented on code in PR #826:
URL: https://github.com/apache/incubator-paimon/pull/826#discussion_r1156801259
##########
paimon-common/src/main/java/org/apache/paimon/fs/FileIO.java:
##########
@@ -244,14 +247,22 @@ static FileIO get(Path path, CatalogContext config)
throws IOException {
Map<String, FileIOLoader> loaders = discoverLoaders();
FileIOLoader loader = loaders.get(uri.getScheme());
+
+ // load fallbackIO
if (loader == null) {
- loader = config.fallbackIO();
- if (loader == null) {
- throw new UnsupportedSchemeException(
- String.format(
- "Could not find a file io implementation for
scheme '%s' in the classpath.",
- uri.getScheme()));
- }
+ loader = checkAccess(config.fallbackIO(), path);
+ }
+
+ // load hadoopIO
+ if (loader == null) {
+ loader = checkAccess(new HadoopFileIOLoader(), path);
+ }
+
+ if (loader == null) {
+ throw new UnsupportedSchemeException(
+ String.format(
+ "Could not find a file io implementation for
scheme '%s' in the classpath.",
Review Comment:
We could improve the exception message to tell users how to solve this
problem.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]