Affected Stackable version
26.7
Affected Apache Hive version
4.0.0
Current and expected behavior
Hive 4 introduced metastore.metadata.transformer.class and defaults it to org.apache.hadoop.hive.metastore.MetastoreDefaultTransformer.
Against a metastore used by Trino, the transformer causes two distinct failures:
- Schema locations are silently rewritten on read. A schema created with an explicit
location under hive.metastore.warehouse.dir is stored correctly in DBS, but every read through the Thrift API returns <warehouse>/<dbname>.db instead. Trino's Iceberg connector derives new table locations from that value, so tables land in the wrong prefix.
CREATE TABLE through the Trino Hive connector is converted from MANAGED_TABLE to EXTERNAL_TABLE. Trino then refuses to write to its own table with Cannot write to non-managed Hive table, so INSERT INTO is broken for every table created through the Hive connector.
Possible solution
For our use cases, disabling the transformer may be the right choice here.
Workaround
Disable the transformer through the metastore's config overrides. Note the value is a single
space, not an empty string:
spec:
metastore:
configOverrides:
hive-site.xml:
metastore.metadata.transformer.class: " "
Additional context
No response
Environment
k8s: v1.35.1 - also seen on OpenShift environments
Would you like to work on fixing this bug?
None
Affected Stackable version
26.7
Affected Apache Hive version
4.0.0
Current and expected behavior
Hive 4 introduced
metastore.metadata.transformer.classand defaults it toorg.apache.hadoop.hive.metastore.MetastoreDefaultTransformer.Against a metastore used by Trino, the transformer causes two distinct failures:
locationunderhive.metastore.warehouse.diris stored correctly inDBS, but every read through the Thrift API returns<warehouse>/<dbname>.dbinstead. Trino's Iceberg connector derives new table locations from that value, so tables land in the wrong prefix.CREATE TABLEthrough the Trino Hive connector is converted fromMANAGED_TABLEtoEXTERNAL_TABLE. Trino then refuses to write to its own table withCannot write to non-managed Hive table, soINSERT INTOis broken for every table created through the Hive connector.Possible solution
For our use cases, disabling the transformer may be the right choice here.
Workaround
Disable the transformer through the metastore's config overrides. Note the value is a single
space, not an empty string:
Additional context
No response
Environment
k8s: v1.35.1 - also seen on OpenShift environments
Would you like to work on fixing this bug?
None