OjashKush commented on code in PR #19882:
URL: https://github.com/apache/hudi/pull/19882#discussion_r3968128808
##########
hudi-trino/src/main/java/io/trino/plugin/hudi/storage/TrinoStorageConfiguration.java:
##########
@@ -28,14 +30,32 @@ public class TrinoStorageConfiguration
{
private final Map<String, String> configMap;
+ private final transient TrinoFileSystem fileSystem;
+
public TrinoStorageConfiguration()
{
- this(getDefaultConfigs());
+ this(getDefaultConfigs(), null);
+ }
+
+ public TrinoStorageConfiguration(TrinoFileSystem fileSystem)
Review Comment:
Both configs are built without a filesystem, but neither call site is
reachable from the connector today, so nothing currently fails:
- `metaClient.getStorage(StoragePath)` — the connector has one metaclient
build site (`HudiUtil:258`) and it uses `setStorage`. Both routes into the
config-resolving overload (`HoodieTableMetaClient:479`, `:919`) are guarded by
`if (storage == null)`, so neither fires. There's no `setConf` anywhere in
`hudi-trino`.
- `metadataPartitionExists` isn't called from the connector. The nearby
`setConf`-from-engine-context builders (`HoodieTableMetadataUtil:424`, `:437`)
are `deleteMetadataTable` and `deleteMetadataPartition` — write/upgrade paths a
read-only connector doesn't take.
On making the extension point reachable from the read path: the read path
deliberately doesn't use it. `HudiTrinoIOFactory.getStorage(StoragePath)`
returns the injected storage and ignores the path argument entirely — the
connector's pattern is inject-don't-resolve, registered via
`HOODIE_IO_FACTORY_CLASS`. The reflective route matters for one caller,
`createTableLayoutOnStorage`, which resolves through
`HoodieStorageUtils.getStorage` and bypasses the IOFactory. That's the DDL
path, and it passes `new TrinoStorageConfiguration(fileSystem)` explicitly.
--
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]