lasdf1234 opened a new issue, #15135:
URL: https://github.com/apache/gravitino/issues/15135

   ### 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"`.
   
   Symlink / realpath checks only make sense for schemes that expose them 
(`file://` via NIO, `hdfs://` via Hadoop FS). Object stores have no POSIX 
symlink model; lexical containment via `OrphanFileLocationUtils` is already 
sufficient. Today every non-`file` location is forced through 
`Path.getFileSystem(conf)`, so S3/GCS/ABS/OSS jobs fail even though Iceberg 
`S3FileIO` works (expire-snapshots and Trino orphan cleanup can succeed on the 
same table).
   
   Introduced with the orphan cleanup job in #11195 / #13153.
   
   ### Error message and/or stacktrace
   
   ```
   org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for 
scheme "s3"
        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(...)
        at 
org.apache.gravitino.maintenance.jobs.iceberg.IcebergRemoveOrphanFilesJob.resolveAndValidateLocation(...)
        at 
org.apache.gravitino.maintenance.jobs.iceberg.IcebergRemoveOrphanFilesJob.execute(...)
   ```
   
   ### How to reproduce
   
   1. Run `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
   
   - Enterprise remote E2E: 
https://github.com/datastrato/gravitino-enterprise/issues/3725
   - Related narrower draft: #15081 / #15082 (catch-based); this issue tracks 
scheme-dispatch: lexical for all, NIO for `file`, Hadoop symlink walk only for 
`hdfs`.


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

Reply via email to