voonhous opened a new issue, #19957:
URL: https://github.com/apache/hudi/issues/19957

   The Trino connector fails merge-on-read real-time queries on Trino 484 and 
later:
   
   ```
   java.lang.SecurityException: Forbidden 
org.apache.hudi.avro.model.HoodieWriteStat! This class is not trusted to be 
included in Avro schemas.
   ```
   
   Trino bumped Avro from 1.12.1 to 1.12.2 in trinodb/trino@8aafdce48d1, and 
the hudi-trino plugin bundles that version. Avro 1.12.2 added 
`ClassSecurityValidator`, which `ClassUtils.forName` runs on every class loaded 
by name. By default it trusts only a few JDK classes.
   
   `HoodieAvroUtils.convertToSpecificRecord` resolves nested records through 
`SpecificData.getClass(schema)`, which goes through that check, so Hudi's own 
generated classes are rejected. Affected reads:
   
   - commit metadata with write stats, which the connector reads to resolve the 
table schema
   - log files with delete blocks (`HoodieDeleteRecordList`)
   
   Hudi itself builds on Avro 1.11.4 and released Trino 483 bundles 1.12.1, so 
neither has hit this yet. The Trino E2E suite on #19953 showed it once it ran 
on the pinned Trino 
([run](https://github.com/apache/hudi/actions/runs/34940577669/job/104288110394)).
   
   Workaround until a fix ships: start every Trino node with 
`-Dorg.apache.avro.SERIALIZABLE_PACKAGES=org.apache.hudi.avro.model`.
   


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