Skip to main content
Version 3.0

Delta Lake jobs connected
to the Hive Metastore and S3.

Three scenarios: how the jobs reach the lakehouse, how to point them to a Hive Metastore and an Ozone in another namespace, and who reads the same tables. Each one covers: the chart default, the values file block commented line by line, and the verification.

ChartVersion3.0.3TypeapplicationAppVersion4.0.1
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+

The tdp-deltalake chart connects maintenance jobs to the lakehouse through a Spark configuration: Hive Metastore, where the Delta tables are registered, and S3 storage, where the files are stored. For installation and jobs, see Delta Lake Configuration.

Your environment

If you fill in your environment details here, the examples and commands on the page use what you provided. The namespace, the release name and the values file are your choices, not the chart's.

Scenarios​

The jobs' Spark configuration, the defaults and how to check them.

The maintenance jobs connect to the lakehouse through a Spark configuration: the keys of maintenance.spark.config, which the chart writes to the jobs' spark-defaults.conf. By default, it points to Hive Metastore, where the Delta tables are registered, and to the Ozone S3 Gateway, where the files are stored, both in the tdp namespace. The S3 keys do not go there: they come from a Secret in the release namespace, passed to each run's pod. The following tabs cover Hive Metastore and Ozone in another namespace, and Spark and JupyterHub, which read the same tables.

You want to understand what connects the jobs to your tables before changing any address.

Hive Metastore

tdp-hive-metastore in the tdp namespace, in spark.hadoop.hive.metastore.uris. This is where the jobs look for Delta tables.

S3 storage

The S3 Gateway of tdp-ozone in the tdp namespace, in spark.hadoop.fs.s3a.endpoint, with path-style enabled and the warehouse in spark.sql.warehouse.dir. The warehouse bucket must already exist. See how to create it in Integrations - Apache Ozone.

S3 keys

From the s3-credentials Secret, in the release namespace. With Ozone security enabled, from the ozone-s3-credentials Secret: see Security - Delta Lake.

The jobs, the Hive Metastore and Ozone

namespace <NAMESPACE>ThriftS3AMaintenance jobsspark-defaults.confSecretS3 keysHive Metastorenamespace tdpS3 Gateway (Ozone)bucket warehouse · tdp
  1. Maintenance jobs. Each run reads the spark-defaults.conf assembled from maintenance.spark.config: the Delta catalog over Hive Metastore, the warehouse and the S3 endpoint. The S3 keys come from a Secret in the release namespace. Chart default: Hive Metastore and Ozone S3 in the tdp namespace. (maintenance.spark.config)
  2. S3 keys Secret. The access key and secret key, passed to each run's pod. The details are in Security - Delta Lake. Chart default: s3-credentials. (maintenance.spark.s3Credentials)
  3. Hive Metastore. Where the Delta tables are registered. The jobs reach it through the Thrift address in spark.hadoop.hive.metastore.uris and, with an empty tables list, process all its Delta tables. Chart default: thrift://tdp-hive-metastore-metastore.tdp.svc.cluster.local:9083. (spark.hadoop.hive.metastore.uris)
  4. S3 storage. Where the table files are stored, in the warehouse from spark.sql.warehouse.dir. Path-style is enabled. The warehouse bucket must already exist. Chart default: http://tdp-ozone-s3g-rest.tdp.svc.cluster.local:9878 · s3a://warehouse/delta. (spark.hadoop.fs.s3a.endpoint · spark.sql.warehouse.dir)
With the chart defaults, the jobs look for tables in Hive Metastore and read files from Ozone S3, both in the tdp namespace.

The jobs' Spark configuration

The keys in maintenance.spark.config that connect the jobs to the lakehouse, explained line by line. The chart defaults also include jar paths in the image and other Spark settings, which are not shown here.

This is the state the chart starts with. Your file only needs the keys that change.

1maintenance:
2spark:
3 config:
4 "spark.sql.extensions": "io.delta.sql.DeltaSparkSessionExtension"
5 "spark.sql.catalog.spark_catalog": "org.apache.spark.sql.delta.catalog.DeltaCatalog"
6 "spark.sql.catalogImplementation": "hive"
7 "spark.hadoop.hive.metastore.uris": "thrift://tdp-hive-metastore-metastore.tdp.svc.cluster.local:9083"
8 "spark.sql.warehouse.dir": "s3a://warehouse/delta"
9 "spark.hadoop.fs.s3a.endpoint": "http://tdp-ozone-s3g-rest.tdp.svc.cluster.local:9878"
10 "spark.hadoop.fs.s3a.path.style.access": "true"
11 "spark.hadoop.fs.s3a.impl": "org.apache.hadoop.fs.s3a.S3AFileSystem"

Each key becomes a line in the jobs' spark-defaults.conf. The keys you define are merged with the defaults. The others remain in effect.

  1. spark-defaults.conf (linha 3). Each key becomes a line in the jobs' spark-defaults.conf. The keys you define are merged with the defaults. The others remain in effect.
  2. Delta catalog (linha 5). Tables are looked up through the spark_catalog catalog, which handles Delta tables.
  3. Hive Metastore (linha 7). Where the tables are registered. With an empty tables list, the jobs process all Delta tables in this metastore.
  4. Warehouse (linha 8). The Delta tables' warehouse, in the warehouse bucket.
  5. S3 endpoint (linha 9). Ozone's S3 Gateway. The keys come from the Secret, not this block.
  6. Path-style (linha 10). Ozone requires path-style.
Chart default: catalog, metastore, warehouse and S3

Check the addresses in use

The release notes show the metastore, warehouse, S3 endpoint and keys Secret.

Terminal input
helm get notes <RELEASE_NAME> -n <NAMESPACE>

Success when

The Metastore URI, Warehouse and S3 endpoint lines show your lakehouse addresses, and the indicated Secret exists in the namespace.

View the jobs' spark-defaults.conf

The file each run reads, as assembled by the chart.

Terminal input
kubectl -n <NAMESPACE> get configmap -l component=maintenance,app.kubernetes.io/instance=<RELEASE_NAME> -o yaml

Success when

The ConfigMap contains spark-defaults.conf with the keys from the block above.

Run a job now

A manual run confirms that the jobs can reach the metastore and S3.

Follow the step in Delta Lake Configuration. The log shows one line per table found in the metastore.

If the job cannot reach the metastore or S3

See When something goes wrong.

Add any other Spark property the jobs need in the same way: a key in maintenance.spark.config, written to spark-defaults.conf.

When something goes wrong​

Troubleshooting

Paste the error message or choose the symptom. The answer comes with the cause, what to do and the command.

  1. Job cannot reach the metastore or S3. Cause: The default addresses point to Hive Metastore and Ozone in the tdp namespace, with the default release names. What to do: Set both addresses in maintenance.spark.config (scenario 2). The release notes show the addresses in use.
  2. The warehouse bucket does not exist. Cause: The warehouse bucket does not exist in Ozone. What to do: Create the warehouse bucket in Ozone, as in Integrations - Apache Ozone.
  3. no Delta tables to process; nothing to do. Cause: With an empty tables list, the jobs did not find any Delta tables in the configured Hive Metastore. What to do: Check that the metastore address is the one for your tables, or list the tables in maintenance.jobs.<job>.tables.
  4. Another problem. Cause: Start with the runs and namespace events. What to do: The events in time order show what keeps the pod from starting.

Next steps​