HMS 4.x metadata transformer silently rewrites schema locations

Đang mở
#757 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
kubernetes, rust
Lĩnh vực
backend, databases

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện hành vi metastore của Hive 4.0.0 với Trino, tập trung vào việc đọc vị trí schema và các bảng được tạo thông qua Hive connector. Kiểm tra cách operator cấu hình metastore.metadata.transformer.class và xác minh liệu việc tắt transformer có giữ nguyên các vị trí tường minh và hành vi của managed table hay không. Hoàn tất khi cấu hình được xử lý phù hợp và cả hai lỗi đã báo cáo đều được giải quyết hoặc được ngăn chặn một cách rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

type/bug
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

Ngôn ngữ chính
Rust
Star
29
Fork
2
Merge trung bình
1 ngày 19 giờ
Pull request đã merge (30 ngày)
12

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stackabletech/hive-operator

Tất cả issue của stackabletech/hive-operator

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.