S3-compatible object storage,
with metadata and data that scale separately.
Apache Ozone is the distributed object store of TDP: it speaks S3 and the file systems of the Hadoop ecosystem, writes with strong consistency, protects data through replication or erasure coding, and scales metadata and data independently. Follow a key from write to read and get to know the parts that hold it.
Apache Ozone is a distributed object store: the Ozone Manager keeps the object names, the Datanodes keep the data, and applications reach them through the S3 API or through Hadoop-compatible file systems.
Metadata and data
The name in one service, the data in another
The Ozone Manager handles the namespace, and the Storage Container Manager handles the block space. With this separation, metadata and storage grow independently.
Hierarchy
Volume, bucket, and key
Every object has an address in three parts: the volume contains buckets, and the bucket contains keys.
Multiple protocols
S3 and Hadoop file systems
The same data is accessible through the S3 API, the ofs and o3fs file systems, the Java client, the command line, and, over REST, the HttpFS Gateway.
On this page
- See a key being written and read
- Architecture
- The address of an object
- From the Datanode to the block
- How to reach Ozone
- Why Ozone
- In the TDP editions
See a key being written and read
An object written by an S3 application and read back. Press Play or step forward one at a time. Underlined names link to the Glossary.
1 The application asks to write
The application sends an object PUT to the S3 Gateway, which translates it into an Ozone key write. The S3 bucket is a bucket in the s3v volume, and the gateway tells the Ozone Manager that it wants to write a key in it.
In the Glossary: Ozone Manager · S3 Gateway · S3 application
- The application asks to write. The application sends an object PUT to the S3 Gateway, which translates it into an Ozone key write. The S3 bucket is a bucket in the s3v volume, and the gateway tells the Ozone Manager that it wants to write a key in it.
- The Ozone Manager checks and requests a block. The Ozone Manager checks that the write is allowed in that bucket and, to receive the data, requests a block from the Storage Container Manager.
- The SCM chooses where to write. The SCM identifies a suitable container, in a pipeline of Datanodes that it forms, and generates the block identifier: the container ID plus a local ID. The identifier returns to the Ozone Manager.
- The block arrives with a token. The Ozone Manager records the block in its metadata and returns to the gateway the block and a block token, the security permission to write to it.
- The data goes straight to the Datanode. With the token, the gateway sends the data to the pipeline's leader Datanode. The data does not pass through the Ozone Manager or the SCM.
- The leader replicates to the followers. In a bucket with replication, the leader replicates the data to the followers through Ratis, an implementation of the Raft protocol. When a quorum of Datanodes acknowledges, the write is complete.
- The Ozone Manager records the key. Once the write on the Datanode is finished, the gateway updates the block information in the Ozone Manager. The key now exists in the namespace, and the next read already reflects this write.
- The Datanodes report to the SCM. The Datanodes send heartbeats and container reports to the SCM. The reports cover containers, not blocks, so they stay small even with a very large number of files.
- Recon follows along without interfering. The same reports reach Recon, which builds its own copy of the SCM database and keeps a copy of the Ozone Manager database. Recon never sends commands to the Datanodes and, since it only observes, it can show information with some delay.
- The read starts with the name. To read, the application sends a GET to the gateway, and the gateway asks the Ozone Manager for the key by name. The Ozone Manager returns the block list, the block tokens, and, in most cases, the location of the containers.
- The data comes straight back from the Datanode. The gateway presents the token to the Datanode, reads the block data, and returns it to the application as the GET response.
Architecture
Clients and gateways on one side, metadata and data in separate layers, and Recon following the cluster.
What the figure shows:
- The clients and gateways reach Ozone in different ways: S3 applications through the S3 Gateway, Hadoop tools through ofs and o3fs, the CLI and the Java client through the native protocol, and the HttpFS Gateway translates REST calls to the FileSystem API. Clients request metadata from the Ozone Manager and read and write data directly on the Datanodes.
- The Ozone Manager manages the namespace: it stores volumes, buckets and keys, with the listings in RocksDB, issues block tokens and requests blocks from the Storage Container Manager.
- The Storage Container Manager manages the block space (blocks, containers and pipelines), takes care of the cluster and the replicas, forms the Datanode pipelines and is the certificate authority of the cluster.
- Recon is the management and monitoring console: it gathers the metadata of the other services, with a copy of the Ozone Manager database, one of the SCM database and a SQL database of aggregates, and receives the reports from the Datanodes.
- The Datanodes keep the blocks inside containers, open and closed, and send reports to the Storage Container Manager and to Recon.
- The pipeline gathers the Datanodes of an open container: the leader replicates to the followers through Ratis.
Ozone separates namespace management, done by the Ozone Manager, from block space management, done by the Storage Container Manager.
The address of an object
Every Ozone object has an address in three parts, from the volume to the key.
Click each part of the address.
Volume
The top level of the namespace, similar to a home directory: only an administrator creates volumes, and they are the basis of storage accounting. Buckets created through the S3 API live in the s3v volume.
See in the Glossarys3v— Volume- The top level of the namespace, similar to a home directory: only an administrator creates volumes, and they are the basis of storage accounting. Buckets created through the S3 API live in the s3v volume.
sales— Bucket- It lives inside a volume and holds keys. A bucket does not contain another bucket. The bucket layout defines how keys are stored.
reports/orders.csv— Key- The object itself: the data and the metadata that describes it. The slash within the name can be just part of the name or a real directory, depending on the bucket layout.
The bucket layout decides what the slash means.
In an OBS (Object Store) bucket, the whole path is the key name, in a flat structure, as in S3. This is the layout of the buckets created by the S3 Gateway.
In an FSO (File System Optimized) bucket, each intermediate directory is stored separately, and renaming or deleting a directory is an atomic operation. This is the layout optimized for Hadoop-compatible file systems, which write the volume and the bucket as the first directories of the path, as in ofs://<servico>/<volume>/<bucket>/<chave>.
From the Datanode to the block
Where the data lives, from the server down to the block: four levels, each inside the other.
Level 1 of 4
Datanode
The server that stores the data. Clients write to blocks, and the Datanode groups these blocks into containers and sends the SCM reports on its containers.
- PipelineA group of Datanodes formed by the SCM that works as a unit to write and replicate data, with a leader and followers.
- Datanode. The server that stores the data. Clients write to blocks, and the Datanode groups these blocks into containers and sends the SCM reports on its containers.
- Pipeline. A group of Datanodes formed by the SCM that works as a unit to write and replicate data, with a leader and followers.
- Disk volume. A disk or storage device managed by the Datanode, declared in hdds.datanode.dir. Each disk volume holds many containers and is different from the namespace volume.
- Container. The replication unit of Ozone: a self-contained super block, with the list of the blocks it holds and the files with the data. It is different from an application container.
- Open. Mutable. It is replicated by Ratis, and the pipeline leader serves reads and writes.
- Closed. Immutable, once full. It is replicated by asynchronous copy, and any replica serves reads.
- Block. A part of a key, identified by the container ID and a local ID, which serves as an index within the container. Blocks are local information of the Datanode, and the SCM manages the containers.
- Block token. A security permission issued by the Ozone Manager along with the block, which the client presents to the Datanode to write or read.
How to reach Ozone
The same volumes, buckets, and keys, through different paths.
S3 API
S3 Gateway
A stateless, S3-compatible REST interface: any S3 client reads and writes to Ozone as if it were talking to Amazon S3, and several instances can run in parallel. See S3 Gateway.
Hadoop over S3
S3A
The Hadoop S3A file system, with s3a:// addresses, translates the S3 API into a file system interface and reaches Ozone through the S3 Gateway.
File system
ofs
A Hadoop-compatible file system that sees all the volumes and buckets of the cluster, with ofs:// addresses. See ofs and o3fs.
File system
o3fs
A Hadoop-compatible file system that operates within a single bucket, with o3fs:// addresses.
REST for Hadoop
HttpFS Gateway
An optional cluster role, derived from the HDFS HttpFS, that translates REST calls into Hadoop FileSystem API calls. See HttpFS Gateway.
Native
Java client and command line
The Ozone Java library, for applications, and the command line, for administration and data handling.
Why Ozone
Scale
Metadata and data grow separately
The Ozone Manager and the SCM handle metadata, and the Datanodes handle physical storage. Each part grows independently, and the cluster grows incrementally, with more nodes or racks.
Configurable durability
Replicas or erasure coding
Each bucket or object uses replication through Ratis or erasure coding, which keeps fault tolerance with much less space.
Strong consistency
A read sees the latest write
Metadata and data are strongly consistent: a read reflects the result of the latest successfully completed write.
Multiple protocols
S3 and the Hadoop ecosystem
Applications built for S3 and Hadoop ecosystem tools, such as Spark, Hive, and Iceberg, use the same storage, through the S3 API or through ofs.
Layered security
From authentication to encryption
Kerberos, ACLs per volume, bucket, and key, integration with Apache Ranger, TLS in communication, transparent encryption of stored data, and block tokens.
Management
Quotas, snapshots, and Recon
Quotas per volume and bucket, read-only snapshots of buckets, and Recon, the web monitoring console.
Apache Ozone originated in the Big Data analytics ecosystem, is open source software under the Apache License 2.0, and was designed to run on commodity hardware.
In the TDP editions
| Edition | Version | Documentation |
|---|---|---|
| TDP Datacenter | 1.4.1 | TDP Datacenter components |
| TDP Kubernetes | 2.1.1 · chart tdp-ozone 3.0.3 | Configuration in TDP Kubernetes |
In TDP Datacenter
In TDP Datacenter, Ozone is the OZONE service, installed and managed by Ambari.
OZONE_CLIENT (client, one or more), OZONE_DATANODE (slave, one or more), OZONE_HTTPFS_GATEWAY (slave, optional), OZONE_MANAGER (master, one or more), OZONE_RECON (master, one or more), OZONE_S3_GATEWAY (master, one or more) and OZONE_STORAGE_CONTAINER_MANAGER (master, one or more). The OZONE_HTTPFS_GATEWAY requires OZONE_CLIENT. The OZONE_MANAGER requires OZONE_STORAGE_CONTAINER_MANAGER and NAMENODE (HDFS). The OZONE_RECON requires OZONE_CLIENT. The OZONE_S3_GATEWAY requires OZONE_CLIENT. Component category.
The Datanode disk volumes are configurable in hdds.datanode.dir, and the metadata databases of the Ozone Manager and the SCM in ozone.om.db.dirs and ozone.scm.db.dirs, in the ozone-site configuration.
The replication factor is configurable in ozone.replication, and rack information comes from an external script, set in net.topology.script.file.name.
The Ozone Manager and the SCM replicated through Ratis can be enabled in ozone.om.ratis.enable and ozone.scm.ratis.enable. See High availability in TDP Datacenter.
It can be enabled in ozone.security.enabled, with Kerberos authentication in hadoop.security.authentication (ozone-core-site), ACLs in ozone.acl.enabled, the Ranger plugin in ranger-ozone-plugin-enabled, and TLS per component in ozone-env. See Security in TDP Datacenter.
S3 multi-tenancy can be enabled in ozone.om.multitenancy.enabled.
In TDP Kubernetes
In TDP Kubernetes, Ozone is installed by the umbrella chart tdp-ozone, which packages the Apache Ozone chart with the TDP configuration and serves as S3-compatible storage for the other components.
Ozone Manager, SCM, Datanodes, and S3 Gateway, with the number of instances set in tdp-ozone.om.replicas, tdp-ozone.scm.replicas, tdp-ozone.datanode.replicas, and tdp-ozone.s3g.replicas. Recon is enabled by default in tdp-ozone.recon.enabled.
The Datanodes are spread across the cluster nodes by anti-affinity rules and by tdp-ozone.datanode.topologySpreadConstraints.
Datanodes, Ozone Manager, SCM, and S3 Gateway store their data in PersistentVolumeClaims, enabled by default in tdp-ozone.datanode.persistence.enabled, tdp-ozone.om.persistence.enabled, tdp-ozone.scm.persistence.enabled, and tdp-ozone.s3g.persistence.enabled, with the StorageClass and size of each one.
The memory resources and JVM heap of the Ozone components have adjustable defaults, which can be reduced in small clusters. See Ozone Configuration.
The S3 Gateway, Ozone Manager, SCM, and Recon services are internal, of type ClusterIP. External exposure is done through Ingress or Gateway API, mutually exclusive options chosen in TDP-Settings.gateway.
Validation of S3 credentials by Ozone itself depends on the chart's internal Kerberos, disabled by default. Without Kerberos (the default), the S3 Gateway accepts any key pair. Real S3 authentication requires Kerberos. When it is enabled, a private KDC serves only the Ozone services, a Job generates the S3 credentials in a Secret, and S3 clients sign requests with AWS Signature v4. See Ozone Configuration.
The components that store data in S3-compatible storage reach Ozone through the S3 Gateway: Spark and Iceberg through S3A, Trino through native S3, Hive Metastore, Airflow, ClickHouse, and NiFi.
A valid TDP license is required. See License configuration.
Next steps
Sources
Apache Ozone - Architecture Overview
Apache Ozone - Storage Container Manager
Apache Ozone - Storage Containers
Apache Ozone - Write Pipelines
