stackabletech / stackabletech/hive-operator

HMS 4.x metadata transformer silently rewrites schema locations

Aperta
#757 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

type/bug
Lingua principale
Rust
Stelle
29
Fork
2
Merge medio
1g 19h
PR unite (30g)
12

Descrizione

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:

  1. 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.
  2. 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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il comportamento del metastore di Hive 4.0.0 con Trino, concentrandoti sulle letture delle posizioni degli schemi e sulle tabelle create tramite il Hive connector. Esamina come l'operatore configura metastore.metadata.transformer.class e verifica se la disabilitazione del transformer preserva le posizioni esplicite e il comportamento delle tabelle gestite. Il lavoro è completato quando la configurazione viene gestita correttamente ed entrambi i problemi segnalati sono risolti o chiaramente impediti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
kubernetes, rust
Ambito
backend, databases
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.