Replies: 2 comments
-
|
Found some related tasks: |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Today tested using iceberg-rest-fixture docker image instead of HMS with the same outcome. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This issue specifically focuses on the confusion around
file://protocol and the undocumented requirement for shared/local file system access between Trino/Iceberg and HMS in local/test development setups.Documentation URL: https://trino.io/docs/current/object-storage/file-system-local.html
Environment
Issues
On the other hand at Iceberg connector page it is missing: https://trino.io/docs/current/connector/iceberg.html#file-system-access-configuration
local://protocol is used in examples but doesn't clearly explain the relationship withfile://protocol. No explanation of when to use which protocol or how they relate to each other. Howlocal.locationrelates tofile://?Using
file://with/Tested and it works with some constraints.
Trino and HMS must share the same file system view (dirty hacks): have the same host path mounted at identical container paths, share the same GUID/UID to avoid permission issues, have chmod o+rw permissions on the host directory
Catalog Configuration (
catalog/iceberg_local.properties):Docker Compose (simplified, showing shared volume approach):
HMS Configuration (
metastore-site.xml):Verification:
The
file:/iceberg_data/testschemaprefix path is stored in HMS DB and in Iceberg files.Using
file://with a local path other than/It fails and two separate local path structures are managed by HMS and Trino.
local.location = /tmp: tell Trino's local filesystem module, "My root warehouse path is eg /tmp"WITH ( location = 'file:/tmp/iceberg-data/testschema' ): tell the CREATE SCHEMA command, "Create this schema at the absolute path /tmp/iceberg-data/testschema."The filesystem module is combining them. It's taking the "root" path and appending "absolute" path, leading to the nested structure:
(
<local.location> + <location_from_sql>)/tmp + /tmp/iceberg-data/testschema = /tmp/tmp/iceberg-data/testschemaThis is the path inside the container.
Additionally there is an empty
iceberg-data/testschemadirectory likely created by the HMS logic before the filesystem module got involved and wrote the table data to the wrong, nested path.Using
local://I tried using
local://with the environment deployed as above but without luck.The
local://protocol is specifically for shared local filesystems, no?Please review if there is some bug and/or the documentation needs to be updated.
Also please explain and correct me if I'm wrong or heading in the wrong direction.
Beta Was this translation helpful? Give feedback.
All reactions