Skip to main content

Hive Metastore

Before creating a catalog or running a load or export job, ensure that the warehouse can reach the service endpoint and that its credentials have the required metadata and data permissions. For private endpoints or service-side credential files, coordinate connectivity and provisioning with VeloDB Cloud support.

This document describes all supported parameters when connecting to and accessing Hive MetaStore services through the CREATE CATALOG statement.

Supported catalog types​

Catalog TypeType Identifier (type)Description
HivehmsCatalog for connecting to Hive Metastore
IcebergicebergCatalog for Iceberg table format
PaimonpaimonCatalog for Apache Paimon table format

Common parameters​

The following parameters are common to different Catalog types.

Parameter NameFormer NameRequiredDefaultDescription
hive.metastore.urisYesNoneURI address of Hive Metastore, supports multiple URIs separated by commas. Example: 'hive.metastore.uris' = 'thrift://:9083','hive.metastore.uris' = 'thrift://:9083,thrift://:9083'
hive.metastore.authentication.typehadoop.security.authenticationNosimpleMetastore authentication method: supports simple (default) or kerberos. The Hive Metastore authentication method can be specified separately from HDFS authentication. Legacy Apache Doris configurations may use hadoop.security.authentication. Example: 'hive.metastore.authentication.type' = 'kerberos'
hive.metastore.service.principalhive.metastore.kerberos.principalNoEmptyHive server principal, supports _HOST placeholder. Example: 'hive.metastore.service.principal' = 'hive/_HOST@EXAMPLE.COM'
hive.metastore.client.principalhadoop.kerberos.principalNoEmptyKerberos principal used by VeloDB Cloud to connect to Hive MetaStore service.
hive.metastore.client.keytabhadoop.kerberos.keytabNoEmptyKerberos keytab file path
hive.metastore.usernamehadoop.usernameNohadoopHive Metastore username, used in non-Kerberos mode
hive.conf.resourcesNoEmptyhive-site.xml configuration file path, using relative path
hive.metastore.client.socket.timeoutNoThe service setting hive_metastore_client_timeout_second; source default 10 seconds.Timeout for accessing metadata through Hive Metastore Client connection. If the metadata is large (e.g., when there are many partitions), this value can be increased.

Note:

For compatibility with Apache Doris before 3.1.0, please use the former names.

Required parameters​

  • hive.metastore.uris: Must specify the URI address of Hive Metastore

Optional parameters​

  • hive.metastore.authentication.type: Authentication method, default is simple, optional kerberos

  • hive.metastore.service.principal: Kerberos principal of Hive MetaStore service, must be specified when using Kerberos authentication.

  • hive.metastore.client.principal: Kerberos principal used by VeloDB Cloud to connect to Hive MetaStore service, must be specified when using Kerberos authentication.

  • hive.metastore.client.keytab: Kerberos keytab file path, must be specified when using Kerberos authentication.

  • hive.metastore.username: Username for connecting to Hive MetaStore service, used in non-Kerberos mode, default is hadoop.

  • hive.conf.resources: hive-site.xml configuration file path, used when configuration for connecting to Hive Metastore service needs to be read from configuration files.

Authentication methods​

Simple authentication​

  • simple: Non-Kerberos mode, directly connects to Hive Metastore service.

Configure Kerberos authentication​

To use Kerberos authentication to connect to Hive Metastore service, configure the following parameters:

  • hive.metastore.authentication.type: Set to kerberos

  • hive.metastore.service.principal: Kerberos principal of Hive MetaStore service

  • hive.metastore.client.principal: Kerberos principal used by VeloDB Cloud to connect to Hive MetaStore service

  • hive.metastore.client.keytab: Kerberos keytab file path

'hive.metastore.authentication.type' = 'kerberos',
'hive.metastore.service.principal' = 'hive/_HOST@EXAMPLE.COM',
'hive.metastore.client.principal' = '<client-principal>',
'hive.metastore.client.keytab' = '/etc/security/keytabs/hive.keytab'

For Kerberos authentication, VeloDB Cloud support must provision the keytab and krb5 configuration for the warehouse. Use the service-side path supplied by support; a file on your client computer is not accessible to the service.

For information on common Kerberos configuration issues and best practices, please refer to the Kerberos

Use configuration files​

hive.conf.resources​

If you need to read configuration for connecting to Hive Metastore service through configuration files, you can configure the hive.conf.resources parameter to set the conf file path.

Note:

hive.conf.resources accepts relative paths to service-side files. Ask VeloDB Cloud support to provision the files and provide the paths; warehouse users do not edit fe.conf.

Example: 'hive.conf.resources' = 'hms-1/hive-site.xml'

Catalog-specific parameters​

The following parameters are specific to each Catalog type, in addition to the common parameters.

Hive catalog​

Parameter NameFormer NameRequiredDefaultDescription
typeYesNoneCatalog type, fixed as hms for Hive Catalog
hive.metastore.typeNo'hms'Metadata Catalog type, fixed as hms for Hive Metastore, must be hms when using HiveMetaStore

Examples​

View examples
  1. Create a Hive Catalog using unauthenticated Hive Metastore as metadata service, with S3 storage service.

    CREATE CATALOG hive_hms_s3_test_catalog PROPERTIES (
    'type' = 'hms',
    'hive.metastore.uris' = 'thrift://<metastore-host>:9083',
    's3.access_key' = 'S3_ACCESS_KEY',
    's3.secret_key' = 'S3_SECRET_KEY',
    's3.endpoint' = 'https://s3.ap-east-1.amazonaws.com',
    's3.region' = 'ap-east-1'
    );
  2. Create a Hive Catalog using Hive Metastore with Kerberos authentication enabled as metadata service, with S3 storage service.

    CREATE CATALOG hive_hms_on_oss_kerberos_new_catalog PROPERTIES (
    'type' = 'hms',
    'hive.metastore.uris' = 'thrift://<metastore-host>:9083',
    'hive.metastore.client.principal'='<client-principal>',
    'hive.metastore.client.keytab' = '<service-keytab-path>',
    'hive.metastore.service.principal' = '<metastore-principal>',
    'hive.metastore.authentication.type'='kerberos',
    'hadoop.security.auth_to_local' = 'RULE:[2:\$1@\$0](.*@LABS.TERADATA.COM)s/@.*//
    RULE:[2:\$1@\$0](.*@OTHERLABS.TERADATA.COM)s/@.*//
    RULE:[2:\$1@\$0](.*@OTHERREALM.COM)s/@.*//
    DEFAULT',
    'oss.access_key' = 'OSS_ACCESS_KEY',
    'oss.secret_key' = 'OSS_SECRET_KEY',
    'oss.endpoint' = 'oss-cn-beijing.aliyuncs.com'
    );

Iceberg catalog​

Parameter NameFormer NameRequiredDefaultDescription
typeYesNoneCatalog type, fixed as iceberg for Iceberg
iceberg.catalog.typeNoNoneMetadata Catalog type, fixed as hms for Hive Metastore, must be hms when using HiveMetaStore
warehouseNoNoneIceberg warehouse path

Examples​

View examples
  1. Create an Iceberg Catalog using Hive Metastore as metadata service, with S3 storage service.

    CREATE CATALOG iceberg_hms_s3_test_catalog PROPERTIES (
    'type' = 'iceberg',
    'iceberg.catalog.type' = 'hms',
    'hive.metastore.uris' = 'thrift://<metastore-host>:9083',
    'warehouse' = 's3://<bucket>/iceberg_warehouse/',
    's3.access_key' = 'S3_ACCESS_KEY',
    's3.secret_key' = 'S3_SECRET_KEY',
    's3.endpoint' = 'https://s3.ap-east-1.amazonaws.com',
    's3.region' = 'ap-east-1'
    );
  2. Create an Iceberg Catalog using Hive Metastore with Kerberos authentication enabled as metadata service in a multi-Kerberos environment, with S3 storage service.

    CREATE CATALOG IF NOT EXISTS iceberg_hms_on_oss_kerberos_new_catalog PROPERTIES (
    'type' = 'iceberg',
    'iceberg.catalog.type' = 'hms',
    'hive.metastore.uris' = 'thrift://<metastore-host>:9083',
    'warehouse' = 'oss://<bucket>/iceberg_warehouse/',
    'hive.metastore.client.principal'='<client-principal>',
    'hive.metastore.client.keytab' = '<service-keytab-path>',
    'hive.metastore.service.principal' = '<metastore-principal>',
    'hive.metastore.authentication.type'='kerberos',
    'hadoop.security.auth_to_local' = 'RULE:[2:\$1@\$0](.*@LABS.TERADATA.COM)s/@.*//
    RULE:[2:\$1@\$0](.*@OTHERLABS.TERADATA.COM)s/@.*//
    RULE:[2:\$1@\$0](.*@OTHERREALM.COM)s/@.*//
    DEFAULT',
    'oss.access_key' = 'OSS_ACCESS_KEY',
    'oss.secret_key' = 'OSS_SECRET_KEY',
    'oss.endpoint' = 'oss-cn-beijing.aliyuncs.com'
    );

Paimon catalog​

Parameter NameFormer NameRequiredDefaultDescription
typeYesNoneCatalog type, fixed as paimon for Paimon
paimon.catalog.typeNofilesystemMust be hms when using HiveMetaStore, default is filesystem for storing metadata in filesystem
warehouseYesNonePaimon warehouse path

Examples​

View examples
  1. Create a Paimon Catalog using Hive Metastore as metadata service, with S3 storage service.

    CREATE CATALOG IF NOT EXISTS paimon_hms_s3_test_catalog PROPERTIES (
    'type' = 'paimon',
    'paimon.catalog.type' = 'hms',
    'hive.metastore.uris' = 'thrift://<metastore-host>:9083',
    'warehouse' = 's3://<bucket>/paimon_warehouse/',
    's3.access_key' = 'S3_ACCESS_KEY',
    's3.secret_key' = 'S3_SECRET_KEY',
    's3.endpoint' = 'https://s3.ap-east-1.amazonaws.com',
    's3.region' = 'ap-east-1'
    );
  2. Create a Paimon Catalog using Hive Metastore with Kerberos authentication enabled as metadata service in a multi-Kerberos environment, with S3 storage service.

    CREATE CATALOG IF NOT EXISTS paimon_hms_on_oss_kerberos_new_catalog PROPERTIES (
    'type' = 'paimon',
    'paimon.catalog.type' = 'hms',
    'hive.metastore.uris' = 'thrift://<metastore-host>:9083',
    'warehouse' = 's3://<bucket>/iceberg_warehouse/',
    'hive.metastore.client.principal'='<client-principal>',
    'hive.metastore.client.keytab' = '<service-keytab-path>',
    'hive.metastore.service.principal' = '<metastore-principal>',
    'hive.metastore.authentication.type'='kerberos',
    'hadoop.security.auth_to_local' = 'RULE:[2:\$1@\$0](.*@LABS.TERADATA.COM)s/@.*//
    RULE:[2:\$1@\$0](.*@OTHERLABS.TERADATA.COM)s/@.*//
    RULE:[2:\$1@\$0](.*@OTHERREALM.COM)s/@.*//
    DEFAULT',
    'oss.access_key' = 'OSS_ACCESS_KEY',
    'oss.secret_key' = 'OSS_SECRET_KEY',
    'oss.endpoint' = 'oss-cn-beijing.aliyuncs.com'
    );

Hive Metastore access ports​

VeloDB Cloud requires at least the following ports to be open to access HMS:

ServicePort PurposeDefault PortProtocol
Hive MetastoreThrift (metadata access)9083TCP

Notes:

  • Ports may be customized in hive-site.xml. Always follow your actual configuration.
  • When Kerberos authentication is enabled, ensure network connectivity from VeloDB Cloud to the Kerberos KDC. The KDC listens on TCP port 88 by default, unless customized in your KDC configuration.

FAQ​

  • Q1: Is hive-site.xml mandatory?

    No, it's only used when configuration needs to be read from it.

  • Q2: Must the keytab file exist on every node?

    Yes. VeloDB Cloud support provisions the keytab at the required service-side path.

  • Q3: What should be noted when using write-back functionality, i.e., creating Hive/Iceberg databases/tables in VeloDB Cloud?

    Since creating tables involves metadata operations on the storage side, i.e., accessing the storage system, the Hive MetaStore service server side needs to configure corresponding storage parameters, such as access parameters for S3, OSS and other storage services. When using object storage as the underlying storage system, ensure that the bucket being written to matches the configured Region.

Common errors​

For access-denied errors, check the identity and its permissions for both metadata and data. For timeouts, verify the service endpoint and network path from the warehouse. For errors involving a keytab, CA certificate, Hadoop XML file, or JDBC driver, contact VeloDB Cloud support with the error text and the operation that failed.