Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

9.8 KB
Raw Blame

title: "Hudi Catalog" slug: "/lakehouse-hudi-catalog" keywords: - lakehouse - hudi - metadata license: "This software is licensed under the Apache License version 2."

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

Introduction

Apache Gravitino provides the ability to manage Apache Hudi metadata.

Requirements and Limitations

:::info Tested and verified with Apache Hudi 0.15.0. :::

Catalog

Catalog Capabilities

  • Works as a catalog proxy, supporting HMS as catalog backend.
  • Only support read operations (list and load) for Hudi schemas and tables.
  • Doesn't support timeline management operations now.

Catalog Properties

Property name Description Default value Required
catalog-backend Catalog backend of Gravitino Hudi catalog. Only supports hms now. (none) Yes
uri The URI associated with the backend. Such as thrift://127.0.0.1:9083 for HMS backend. (none) Yes
client.pool-size For HMS backend. The maximum number of Hive metastore clients in the pool for Gravitino. 1 No
client.pool-cache.eviction-interval-ms For HMS backend. The cache pool eviction interval. 300000 No
gravitino.bypass. Property name with this prefix passed down to the underlying backend client for use. Such as gravitino.bypass.hive.metastore.failure.retries = 3 indicate 3 times of retries upon failure of Thrift metastore calls for HMS backend. (none) No
default.catalog The default catalog name for the Hive3 metastore backend; this configuration is ignored when using a Hive2 metastore. hive No

Catalog Backend Security

Users can use the following properties to configure the security of the catalog backend if needed. For example, if you are using a Kerberos Hive catalog backend, you must set authentication.type to Kerberos and provide authentication.kerberos.principal and authentication.kerberos.keytab-uri.

Property name Description Default value Required
authentication.type The type of authentication for hudi catalog backend. This configuration only applicable for hms backend, and only supports kerberos, simple currently. simple No
authentication.impersonation-enable Whether to enable impersonation for the hudi catalog false No
authentication.kerberos.principal The principal of the Kerberos authentication (none) required if the value of authentication.type is kerberos.
authentication.kerberos.keytab-uri The URI of The keytab for the Kerberos authentication. (none) required if the value of authentication.type is kerberos.
authentication.kerberos.check-interval-sec The check interval of Kerberos credential for hudi catalog. 60 No
authentication.kerberos.keytab-fetch-timeout-sec The fetch timeout of retrieving Kerberos keytab from authentication.kerberos.keytab-uri. 60 No

Property name with this prefix passed down to the underlying backend client for use. Such as gravitino.bypass.hive.metastore.kerberos.principal=XXXX、gravitino.bypass.hadoop.security.authentication=kerberos、gravitino.bypass.hive.metastore.sasl.enabled=ture And so on.

Identifier Case Behavior

Schema and table identifiers are case-insensitive; you can use any casing. Column identifiers remain case-sensitive.

:::caution After upgrading, if loading an existing mixed-case object reports a retained identifier conflict, Gravitino does not support metadata-only unregister of an individual external object. Use this catalog-wide recovery procedure:

  1. Have an administrator force-drop the Gravitino catalog. This deletes every Gravitino registration and its privileges, tags, and other relationships in the catalog. It does not drop the Hudi schemas, tables, or physical data in the Hive Metastore.
  2. Recreate the Gravitino catalog and load the objects again. Keep the existing gravitino.identifier properties; deleted registrations do not block new imports.
  3. Reapply any privileges, tags, or other governance relationships that the new registrations need.

A source identifier can have only one active Gravitino registration. Coordinate with other Gravitino catalogs that share the external source before resetting a catalog. :::

Catalog Operations

Refer to Manage Catalogs and Schemas for more details.

Schema

Schema Capabilities

  • Only support read operations: listSchema, loadSchema, and schemaExists.

When a Hive catalog and a Hudi catalog share an HMS, use one Gravitino catalog to manage each schema. A schema registered through the Hive catalog can still appear in Hudi listings, but loading it or one of its tables through the Hudi catalog can fail with HTTP 501 because its external identifier already belongs to the Hive registration.

Schema Properties

  • The Location is an optional property that shows the storage path to the Hudi database

Schema Operations

Only support read operations: listSchema, loadSchema, and schemaExists. Refer to Manage Catalogs and Schemas for more details.

Table

Table Capabilities

  • Only support read operations: listTable, loadTable, and tableExists.

Table Partitions

  • Support loading Hudi partitioned tables (Hudi only supports identity partitioning).

Table Sort Orders

  • Doesn't support table sort orders.

Table Distributions

  • Doesn't support table distributions.

Table Indexes

  • Doesn't support table indexes.

Table Properties

  • For HMS backend, it will bring out all the table parameters from the HMS.

Table Column Types

The table maps the Gravitino type names returned by the REST API to Apache Hudi SQL types.

Gravitino Type Apache Hudi Type
boolean boolean
integer int
long long
date date
timestamp timestamp
float float
double double
string string
decimal(p,s) decimal(p,s)
binary bytes
list array
map map
struct struct

The HMS backend reads column types through the Hive converter, so tables can also expose byte, short, varchar(n), and char(n). For decimal(p,s), precision ranges from 1 to 38 and scale from 0 through precision. An HMS timestamp is returned without a time zone. See the Hive type mapping for length limits and the types available when creating tables through the Hive catalog.

Table Operations

Only support read operations: listTable, loadTable, and tableExists. Refer to Manage Relational Metadata Using Gravitino for more details.