Integration — Hive Metastore
Integration overview
Hive Metastore serves as a central metadata repository for Hive and Iceberg tables in TDP. Other components — mainly Trino and Spark — connect to it via the Thrift protocol on port 9083.
Hive Metastore itself can use an external PostgreSQL (tdp-postgresql) as its own metadata database — see Hive Metastore Configuration.
Service address
The Hive Metastore service within the cluster follows the pattern:
<RELEASE_NAME>-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 IP of the pod on port 9083. If it displays <none>, the service selector does not match the pod — check if the deployment is complete and if the pod labels match the Service selector.
Integration with Trino
Trino uses 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 according to the release name and namespace used in your environment.
Integration with Spark (Iceberg catalog)
For Spark jobs that access Iceberg tables via Hive Metastore as 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"
Check connectivity
To test whether Metastore is accessible from another pod in the cluster:
kubectl -n <NAMESPACE> port-forward svc/tdp-hive-metastore-project-metastore 9083:9083
With port-forward active, tools that support the Thrift protocol can connect to localhost:9083.
Troubleshooting
| Problem | Probable cause | Solution |
|---|---|---|
| Trino does not find tables | Incorrect Metastore URI in catalog | Check service name and namespace |
Service endpoints <none> | Service selector does not match pod | The chart override should correct automatically — check if the deployment was completed |
| Thrift connection timeout | Metastore overloaded or pod not ready | Check PostgreSQL max_connections and pod status |
| Spark does not access Hive tables | hive.metastore.uris not configured | Check spark.hadoop.hive.metastore.uris in Spark values |
For the full list of parameters, use helm show values in the version of the chart you have installed.