You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "LsomeYeah (via GitHub)" <gi...@apache.org> on 2023/06/07 06:20:13 UTC

[GitHub] [incubator-paimon] LsomeYeah opened a new pull request, #1327: Dev

LsomeYeah opened a new pull request, #1327:
URL: https://github.com/apache/incubator-paimon/pull/1327

   <!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
   
   ### Purpose
   
   <!-- Linking this pull request to the issue -->
   Linked issue: close #xxx
   
   [debug] Make it more accurate to locate exception when loading FileIoLoader.
   
   In FileIO#get, if an exception occurs when loading FileIOLoader, the cause of the exception should be traced back. The exception may be caused by LocalFileIO or HadoopFileIO.
   
   <!-- What is the purpose of the change -->
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API or storage format -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   


-- 
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@paimon.apache.org

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


[GitHub] [incubator-paimon] tsreaper merged pull request #1327: [common] Make it more accurate to locate exception when loading FileIoLoader.

Posted by "tsreaper (via GitHub)" <gi...@apache.org>.
tsreaper merged PR #1327:
URL: https://github.com/apache/incubator-paimon/pull/1327


-- 
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@paimon.apache.org

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


[GitHub] [incubator-paimon] tsreaper commented on a diff in pull request #1327: [common] Make it more accurate to locate exception when loading FileIoLoader.

Posted by "tsreaper (via GitHub)" <gi...@apache.org>.
tsreaper commented on code in PR #1327:
URL: https://github.com/apache/incubator-paimon/pull/1327#discussion_r1222376118


##########
paimon-common/src/main/java/org/apache/paimon/fs/FileIO.java:
##########
@@ -267,11 +279,20 @@ static FileIO get(Path path, CatalogContext config) throws IOException {
                                 + fallbackIO.getClass().getSimpleName()
                                 + " also cannot access this path.";
             }
-            throw new UnsupportedSchemeException(
-                    String.format(
-                            "Could not find a file io implementation for scheme '%s' in the classpath."
-                                    + "%s Hadoop FileSystem also cannot access this path '%s'.",
-                            uri.getScheme(), fallbackMsg, path));
+            UnsupportedSchemeException ex =
+                    new UnsupportedSchemeException(
+                            String.format(
+                                    "Could not find a file io implementation for scheme '%s' in the classpath."
+                                            + "%s Hadoop FileSystem also cannot access this path '%s'.",
+                                    uri.getScheme(), fallbackMsg, path));
+
+            if (localFileIOException != null) {
+                ex.addSuppressed(localFileIOException);
+            }
+            if (hadoopIOException != null) {
+                ex.addSuppressed(hadoopIOException);
+            }

Review Comment:
   Save all suppressed exceptions in a `List`, so we don't have to check if each possible exception is null.



-- 
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@paimon.apache.org

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