Fix 202507001
Inconsistency or Issue Description
During the use of Apache Spark for writing data to Apache Ozone buckets via the S3A protocol, distinct failures were identified based on the bucket layout and integration settings with Apache Iceberg. These failures prevented file writing and Spark job completion, even with valid configurations.
Additionally, an issue was identified in viewing Apache Ozone buckets and volumes through the Ozone Recon UI when the Ranger plugin was enabled.
Affected Services and Components
- Apache Ozone 1.4.0
- Apache Spark 3.3.4
Related Issues
- TDP-PATCH-9180
- BIGTOP-9162
Impact
It is not possible to write to Apache Ozone buckets using Apache Spark with the S3 protocol or to view Apache Ozone buckets and volumes through the Ozone Recon UI when the Ranger plugin is enabled.
Technical Details
Writing to Bucket with OBJECT_STORE Layout
Executing the following command resulted in an error:
df.write.mode("overwrite").text("s3a://bucket/keyfile")
Error returned:
javax.servlet.ServletException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
This bug was mapped in JIRA HDDS-10399, related to incorrect request handling in the S3 Gateway when managing directories in OBJECT_STORE layout.
Writing to Bucket with FILE_SYSTEM_OPTIMIZED Layout
Executing the following command resulted in an error:
df.write.mode("overwrite").text("s3a://bucket/keyfile")
Error returned:
DIRECTORY_NOT_EMPTY org.apache.hadoop.ozone.om.exceptions.OMException: Directory is not empty. Key:keyfile
Error in the overwrite operation when the key already exists as a directory.
Ozone OFS does not handle nested deletions and overwrites properly when using the S3A driver.
Writing with Iceberg to OFS Bucket via S3A
Executing the following command resulted in an error:
spark.sql.catalog.s3fs = org.apache.iceberg.spark.SparkCatalog
spark.sql.catalog.s3fs.type = hadoop
spark.sql.catalog.s3fs.warehouse = s3a://benchmark-iceberg-s3-fs/
df.writeTo("s3fs.benchmark_iceberg_s3_fs.customers").createOrReplace()}
Error returned:
DIRECTORY_NOT_EMPTY org.apache.iceberg.exceptions.CommitFailedException: Failed to commit changes using rename
java.io.FileNotFoundException: No such file or directory
Iceberg operations depend on atomic rename()
, which fails with the S3A driver in conjunction with Ozone OFS. The intermediate commit is not found during operation finalization.
Required Actions
Follow the instructions below, according to the Enterprise Linux (EL) version, to install the fix and resolve these issues.
- Enterprise Linux 9
- Enterprise Linux 8
Fix Installation
Install the fix (fix-202507001) on all machines (cluster nodes) that have Apache Ozone service components installed.
- Download the fix using
wget
orcurl
:
wget --user USERNAME --password PASSWORD https://repo.tecnisys.com.br/yum/tdp/fixes/ozone/1.4.0/202507/140-202507001/ozone-1.4.0-fix-202507001-0.el9.noarch.rpm
Replace USERNAME
and PASSWORD
with your credentials for accessing the Tecnisys public package repository.
- Install the fix:
sudo dnf install ozone-1.4.0-fix-202507001-0.el9.noarch.rpm
Remember to install this fix on all machines (cluster nodes) that have Apache Ozone service components installed.
- Using Ambari Web, restart the Apache Ozone and Apache Spark services.
Ozone Plugin Reinstallation
Reinstall the Ozone plugin for Ranger on all machines (cluster nodes) that have the Ozone Manager component installed.
- Download the plugin RPM using
wget
orcurl
:
wget --user USERNAME --password PASSWORD https://repo.tecnisys.com.br/repository/yum-tdp/tdp/components/2.3.0/el-9-x86_64/ranger/ranger_2_3-ozone-plugin-2.4.0-2.x86_64.rpm
Replace USERNAME
and PASSWORD
with your credentials for accessing the Tecnisys public package repository.
- Install the plugin:
sudo dnf install ranger_2_3-ozone-plugin-2.4.0-2.x86_64.rpm
Remember to install this plugin on all machines (cluster nodes) that have the Ozone Manager component installed.
Fix Installation
Install the fix (fix-202507001) on all machines (cluster nodes) that have Apache Ozone service components installed.
- Download the fix using
wget
orcurl
:
wget --user USERNAME --password PASSWORD https://repo.tecnisys.com.br/yum/tdp/fixes/ozone/1.4.0/202507/140-202507001/ozone-1.4.0-fix-202507001-0.el8.noarch.rpm
Replace USERNAME
and PASSWORD
with your credentials for accessing the Tecnisys public package repository.
- Install the fix:
sudo dnf install ozone-1.4.0-fix-202507001-0.el8.noarch.rpm
Remember to install this fix on all machines (cluster nodes) that have Apache Ozone service components installed.
- Using Ambari Web, restart the Apache Ozone and Apache Spark services.
Ozone Plugin Reinstallation
Reinstall the Ozone plugin for Ranger on all machines (cluster nodes) that have the Ozone Manager component installed.
- Download the plugin RPM using
wget
orcurl
:
wget --user USERNAME --password PASSWORD https://repo.tecnisys.com.br/repository/yum-tdp/tdp/components/2.3.0/el-8-x86_64/ranger/ranger_2_3-ozone-plugin-2.4.0-2.x86_64.rpm
Replace USERNAME
and PASSWORD
with your credentials for accessing the Tecnisys public package repository.
- Install the plugin:
sudo dnf install ranger_2_3-ozone-plugin-2.4.0-2.x86_64.rpm
Remember to install this plugin on all machines (cluster nodes) that have the Ozone Manager component installed.