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

   
   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   Deleting objects on Aliyun OSS through Gravitino's Iceberg Aliyun bundle 
fails with
   `NoSuchMethodError: 'com.aliyun.oss.model.VoidResult 
com.aliyun.oss.OSS.deleteObject(java.lang.String, java.lang.String)'`.
   
   Iceberg 1.11.0's `OSSFileIO` is compiled against `aliyun-sdk-oss` 3.13.0, 
where
   `OSS#deleteObject` returns `VoidResult`. Gravitino's version catalog pins
   `aliyun-sdk-oss = "3.10.2"`, where the same method returns `void`, so the 
bytecode in
   `OSSFileIO` cannot link and every delete on an OSS warehouse fails.
   
   `gradle/libs.versions.toml` is the only place the SDK is pinned, and 
`3.10.2` is an
   outlier inside this repository:
   
   - `hadoop-project` 3.3.6, the Hadoop version Gravitino already ships, manages
     `com.aliyun.oss:aliyun-sdk-oss` at **3.13.0**.
   - `:bundles:aliyun-bundle` already resolves **3.13.0** transitively through
     `hadoop-aliyun` 3.3.6.
   - `:bundles:iceberg-aliyun-bundle` is the only module that takes the catalog 
version
     directly, so the two Aliyun bundles currently ship different SDK versions.
   
   ### Error message and/or stacktrace
   
   ```
   java.lang.NoSuchMethodError: 'com.aliyun.oss.model.VoidResult 
com.aliyun.oss.OSS.deleteObject(java.lang.String, java.lang.String)'
       at org.apache.iceberg.aliyun.oss.OSSFileIO.deleteFile(OSSFileIO.java)
   ```
   
   ### How to reproduce
   
   1. Start Gravitino with the Iceberg catalog and the Aliyun bundle
      (`bundles/iceberg-aliyun-bundle`).
   2. Create an Iceberg table whose location is `oss://<bucket>/<path>`.
   3. Drop the table, or run anything that deletes files on the warehouse.
   4. The delete fails with the error above; creates and reads work.
   
   ### Additional context
   
   Bumping the managed version to 3.13.0 fixes it and removes the version skew. 
3.13.0 is
   already listed in `dev/release/maven/dependencies.txt`, so no license or 
audit change is
   needed. I will open a PR with that one-line change.
   


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