anuragmantri opened a new pull request, #6913: URL: https://github.com/apache/iceberg/pull/6913
After https://github.com/apache/iceberg/pull/6777 all trailing slashes to table locations are removed. This caused the issue below. `ReachableFileUtil.versionHintLocation()` concatenates table location with "metadata" and does a hadoop path resolution. The path resolution fails if the first location is just S3 bucket name which is a valid table path. ``` scala> new org.apache.hadoop.fs.Path("s3a://bucket1", "metadata"); java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: s3a://idmsdatabucket1metadata at org.apache.hadoop.fs.Path.initialize(Path.java:263) at org.apache.hadoop.fs.Path.<init>(Path.java:161) at org.apache.hadoop.fs.Path.<init>(Path.java:119) ... 47 elided Caused by: java.net.URISyntaxException: Relative path in absolute URI: s3a://bucket1metadata at java.base/java.net.URI.checkPath(URI.java:1940) at java.base/java.net.URI.<init>(URI.java:757) at org.apache.hadoop.fs.Path.initialize(Path.java:260) ... 49 more ``` Having a slash succeeds ``` scala> new org.apache.hadoop.fs.Path("s3a://bucket1", "/metadata"); res3: org.apache.hadoop.fs.Path = s3a://bucket1/metadata ``` Tests: This happens only with s3 path. I could not find a suitable integration test for this. I just added a hadoop path resolution test. That would fail without a slash. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
