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.
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
- 1 · How it connects
- 2 · Another namespace
- 3 · Who reads the tables
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.
tdp-hive-metastore in the tdp namespace, in spark.hadoop.hive.metastore.uris. This is where the jobs look for Delta tables.
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.
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
- 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) - 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) - 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) - 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)
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.
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.
- 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.
- Delta catalog (linha 5). Tables are looked up through the spark_catalog catalog, which handles Delta tables.
- Hive Metastore (linha 7). Where the tables are registered. With an empty tables list, the jobs process all Delta tables in this metastore.
- Warehouse (linha 8). The Delta tables' warehouse, in the warehouse bucket.
- S3 endpoint (linha 9). Ozone's S3 Gateway. The keys come from the Secret, not this block.
- Path-style (linha 10). Ozone requires path-style.
Check the addresses in use
The release notes show the metastore, warehouse, S3 endpoint and keys Secret.
helm get notes <RELEASE_NAME> -n <NAMESPACE>
Success when
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.
kubectl -n <NAMESPACE> get configmap -l component=maintenance,app.kubernetes.io/instance=<RELEASE_NAME> -o yaml
Success when
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
Add any other Spark property the jobs need in the same way: a key in maintenance.spark.config, written to spark-defaults.conf.
Both addresses in the values file, merged with the defaults.
By default, the jobs look for Hive Metastore and Ozone in the tdp namespace, with the default release names. When yours are in another namespace or use another release name, you set only two addresses in maintenance.spark.config: Hive Metastore's Thrift address and Ozone's S3 endpoint. The warehouse and the rest of the configuration still come from the chart.
You have Hive Metastore and Ozone outside the tdp namespace, or with other release names, and want the jobs to find them.
The tdp-hive-metastore and tdp-ozone releases in the tdp namespace.
The Hive Metastore Service name is its release name followed by -metastore, and the S3 Gateway Service name is the Ozone release name followed by -s3g-rest.
The jobs connected to another namespace
- 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) - 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) - 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) - 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)
1maintenance:2spark:3 config:4 "spark.hadoop.hive.metastore.uris": "thrift://tdp-hive-metastore-metastore.<SHARED_NAMESPACE>.svc.cluster.local:9083"5 "spark.hadoop.fs.s3a.endpoint": "http://tdp-ozone-s3g-rest.<SHARED_NAMESPACE>.svc.cluster.local:9878"
Only these two keys change. The chart's other settings remain in effect.
- Merge (linha 3). Only these two keys change. The chart's other settings remain in effect.
- Hive Metastore (linha 4). The Hive Metastore Service in its namespace, with the default release. With another release, the release name followed by -metastore.
- S3 Gateway (linha 5). The Ozone S3 Gateway Service, with the default release. With another release, the release name followed by -s3g-rest.
Apply to the release
Each job's next run uses the new addresses.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-deltalake \
--version 3.0.3 \
-n <NAMESPACE> \
-f <VALUES_FILE>
Success when
Metastore URI and S3 endpoint. To confirm, run a job now, as in scenario 1.With Ozone security enabled, the jobs also need the keys issued by Ozone, and its Secret must be copied to the release namespace: see Security - Delta Lake.
Spark and JupyterHub, configured in their own charts.
This chart's jobs only maintain the tables. Spark and JupyterHub read and write them day to day. Each configures access in its own chart, pointing to the same Hive Metastore and S3 storage. This page provides a summary and a link to each one's page.
In the tdp-spark chart, enable Delta Lake in its own values file. Managed tables are stored in s3a://warehouse/delta, the same default warehouse the jobs use, and registered in Hive Metastore. See Integrations - Spark.
In the tdp-jupyter chart, notebooks read and write the same Delta tables. See Integrations - JupyterLab.
Who reads the tables the jobs maintain
- 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) - 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) - 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) - 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) - Spark. With Delta Lake enabled in the Spark chart, managed tables are stored in s3a://warehouse/delta and registered in Hive Metastore. Configure this in the Spark chart itself.
- JupyterHub. Notebooks read and write the same Delta tables. Configure this in the JupyterHub chart itself.
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.
- 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.
- 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.
- 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.
- 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
Configuration
Delta Lake Configuration
First contact, self-test, jobs, resources and the Spark subchart.