Skip to main content
Version 3.0.0

Integration — Hive Metastore

The Hive Metastore serves as the central metadata repository for Hive, Delta Lake, and Iceberg tables in TDP. Other components — primarily Trino and Spark — connect to it via the Thrift protocol on port 9083.

Service address

The Hive Metastore service address within the cluster follows the pattern:

<release>-metastore.<namespace>.svc.cluster.local:9083

Example with the default release tdp-hive-metastore-project in the tdp-project namespace:

tdp-hive-metastore-project-metastore.tdp-project.svc.cluster.local:9083

To verify that the service has active endpoints after deployment:

kubectl get endpoints -n tdp-project tdp-hive-metastore-project-metastore

The ENDPOINTS field should show the pod IP on port 9083. If it shows <none>, the service selector does not match the pod — the tdp-hive-metastore chart includes an override (hive-service-override.yaml) that automatically corrects this issue.

Integration with Trino

Trino uses the Hive Metastore as a catalog for Hive and Iceberg tables. The Metastore URI is configured in the Trino catalog definition:

trino:
additionalCatalogs:
hive: |
connector.name=hive
hive.metastore.uri=thrift://tdp-hive-metastore-project-metastore.<namespace>.svc.cluster.local:9083

iceberg: |
connector.name=iceberg
hive.metastore.uri=thrift://tdp-hive-metastore-project-metastore.<namespace>.svc.cluster.local:9083

Adjust the address to match the release name and namespace used in your environment.

Integration with Spark (Iceberg catalog)

For Spark jobs that access Iceberg tables using Hive Metastore as the catalog:

maintenance:
spark:
config:
"spark.sql.catalog.iceberg": "org.apache.iceberg.spark.SparkCatalog"
"spark.sql.catalog.iceberg.type": "hive"
"spark.sql.catalog.iceberg.uri": "thrift://tdp-hive-metastore-project-metastore.<namespace>.svc.cluster.local:9083"

For the tdp-spark chart:

spark:
sparkConf:
"spark.sql.catalog.hive_metastore": "org.apache.spark.sql.hive.HiveExternalCatalog"
"spark.hadoop.hive.metastore.uris": "thrift://tdp-hive-metastore-project-metastore.<namespace>.svc.cluster.local:9083"

Verify connectivity

To test whether the Metastore is accessible from another pod in the cluster:

kubectl -n <namespace> port-forward svc/tdp-hive-metastore-project-metastore 9083:9083

With the port-forward active, tools that support the Thrift protocol can connect at localhost:9083.

Troubleshooting

ProblemProbable causeSolution
Trino cannot find tablesIncorrect Metastore URI in catalogCheck service name and namespace
Service endpoints show <none>Service selector does not match podThe chart override should fix this automatically — verify deployment completed
Thrift connection timeoutOverloaded Metastore or pod not readyCheck PostgreSQL max_connections and pod status
Spark cannot access Hive tableshive.metastore.uris not configuredCheck spark.hadoop.hive.metastore.uris in Spark values

For the full list of parameters, use helm show values on the version of the chart you installed.