lasdf1234 opened a new issue, #15081:
URL: https://github.com/apache/gravitino/issues/15081
### Version
main branch
### Describe what's wrong
`IcebergRemoveOrphanFilesJob` fails in `RemoteLocationValidator` before
Iceberg `remove_orphan_files` runs when the table location uses an object-store
scheme (for example `s3://`) and the job classpath has no Hadoop `FileSystem`
for that scheme:
`UnsupportedFileSystemException: No FileSystem for scheme "s3"`.
`RemoteLocationValidator` always calls `Path.getFileSystem(conf)` first. For
filesystems that do not support symlinks it is supposed to return early, but
acquisition of the Hadoop `FileSystem` fails before that check. Lexical URI
containment via `OrphanFileLocationUtils` is already sufficient for these
schemes.
The same failure mode applies to other schemes without a registered Hadoop
FS (`gs://`, `abfs://`, `oss://`, …), not only `s3://`. Registering only an
`s3a` implementation also does not help if the table URI remains `s3://` unless
`fs.s3.impl` is configured.
### Error message and/or stacktrace
```
org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for
scheme "s3"
at
org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:3443)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:365)
at
org.apache.gravitino.maintenance.jobs.iceberg.RemoteLocationValidator.validate(RemoteLocationValidator.java:39)
at
org.apache.gravitino.maintenance.jobs.iceberg.IcebergRemoveOrphanFilesJob.validateRemoteLocation(...)
```
### How to reproduce
1. Run the built-in `IcebergRemoveOrphanFilesJob` /
`builtin-iceberg-remove-orphan-files` against an Iceberg table whose location
is `s3://...`, with Iceberg S3FileIO configured and no Hadoop `FileSystem` for
scheme `s3` on the job classpath.
2. Observe the job fail in `RemoteLocationValidator` before the Iceberg
procedure runs.
### Additional context
Existing unit tests mock an already-available `FileSystem` and do not cover
“scheme with no Hadoop FS on the classpath”.
--
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]