keepcalculator

06 Numbers and Powers

Apache Ozone: Hadoop-Compatible Object Storage Guide

Card No. 06·21124 · Updated · Standard formula, shown below

Raw storage needed 30.00 TB
Usable capacity (with 3x repl.)
10.00 TB
Result
Data size
10 TB
You entered
Replication factor
3
You entered
You enter
Data size, Replication factor
You get
Raw storage needed, Usable capacity (with 3x repl.)
Rounding
2 dp

Apache Ozone is a scalable, distributed object store designed for Hadoop and cloud-native workloads, offering S3-compatible and Hadoop-compatible interfaces. This guide explains what Ozone is, how it works, its architecture, use cases, and how it compares to alternatives like HDFS and Amazon S3.

What Is Apache Ozone?

Apache Ozone is an open-source, distributed object store that runs on commodity hardware. It was created to address the limitations of HDFS (Hadoop Distributed File System) for handling billions of small files and to provide a native S3-compatible interface for cloud-native applications. Ozone stores data as objects (key-value pairs) in buckets, which are similar to S3 buckets, but it also supports a Hadoop-compatible file system interface (via the Ozone File System, O3FS) so existing Hadoop applications can use it without modification.

Ozone is designed to scale to billions of objects and hundreds of petabytes, while maintaining high throughput and low latency. It separates metadata management from data storage, allowing independent scaling of each.

Background: Why Ozone Was Created

HDFS is the traditional storage layer for Hadoop, but it has known limitations: it struggles with millions of small files (the NameNode holds all metadata in memory), and it lacks native object storage semantics like versioning and S3 API compatibility. As organizations moved toward cloud-native architectures and data lakes, they needed a storage system that could handle both big data analytics and object storage workloads.

Ozone was started as a subproject of Apache Hadoop in 2016 and became a top-level Apache project in 2020. It aims to combine the scalability of object stores with the semantics of HDFS, enabling a single storage platform for both analytics and cloud-native applications.

How Ozone Works: Architecture and Components

Ozone uses a two-layer architecture:

  • Metadata layer: Ozone Manager (OM) handles namespace, permissions, and bucket/volume operations. It uses a database (RocksDB) to store metadata, and supports horizontal scaling via multiple OM nodes.
  • Storage layer: Data nodes store the actual data blocks. Ozone uses a container-based model: data is divided into containers, each managed by a Storage Container Manager (SCM). SCM tracks container locations and replication.

When a client writes an object, it contacts the OM to get a container location, then writes data directly to the data nodes. This avoids the bottleneck of a single NameNode, as metadata is distributed across multiple OM instances.

Ozone also supports replication (default 3x) and erasure coding (RS-3-2, RS-6-3) for better storage efficiency. It provides both S3 API (via S3 Gateway) and Hadoop FileSystem API (O3FS), so tools like Spark, Hive, and Flink can read/write data seamlessly.

Key Features and Benefits

  • Scalability: Ozone can scale to billions of objects and hundreds of petabytes by scaling OM and SCM independently.
  • Small files support: Unlike HDFS, Ozone handles millions of small files efficiently because metadata is not kept in memory on a single node.
  • S3 compatibility: Applications written for S3 can work with Ozone via the S3 Gateway, making it easy to migrate.
  • Hadoop compatibility: O3FS allows existing MapReduce, Spark, and Hive jobs to run unchanged.
  • Multi-tenancy: Volumes and buckets support quotas and ACLs, enabling secure multi-tenant deployments.
  • Consistency: Ozone provides strong consistency for read-after-write, unlike some object stores.

How to Choose: Ozone vs. HDFS vs. S3

Choosing between Ozone, HDFS, and S3 depends on your workload:

  • HDFS is best for large files (GBs) with high throughput, but it fails with small files and lacks native S3 API.
  • S3 is ideal for cloud-native apps, but if you’re on-premises, you need a compatible alternative like Ozone or MinIO.
  • Ozone is a good middle ground: it offers HDFS-like performance for analytics and S3 API for cloud-native apps, all in one system. It’s especially useful if you already have Hadoop tools and want to move to object storage without rewriting code.

For example, if you have a Spark cluster that reads from HDFS and you want to use S3-based tools, Ozone can serve both without duplicating data.

Common Problems and Misconceptions

Misconception: Ozone is a drop-in replacement for HDFS. While O3FS provides Hadoop compatibility, not all Hadoop features are supported (e.g., append writes are limited). You may need to adjust configurations.

Problem: Performance tuning. Ozone’s performance depends on container sizes, replication factor, and network. For best results, tune SCM and OM memory, and use erasure coding for cold data to save space.

Problem: Migration complexity. Moving data from HDFS to Ozone requires a data copy (e.g., using distcp). Plan for downtime or run both systems during migration.

Cost and Deployment Considerations

Ozone is free and open-source (Apache 2.0 license). The main costs are hardware and operational overhead. You can run Ozone on commodity servers with local disks (HDD or SSD). For production, you need at least 3 data nodes for replication, plus OM and SCM nodes. Erasure coding reduces raw storage needed: for a 10 TB dataset with RS-3-2, you need about 12.5 TB raw (vs. 30 TB with 3x replication).

Operational effort is similar to running HDFS: you need to manage daemons, monitor health, and handle failures. Ozone provides a web UI and CLI for administration.

Alternatives to Ozone

  • MinIO: S3-compatible object store, simpler but not Hadoop-compatible.
  • Ceph: Distributed storage with S3 and POSIX interfaces, but more complex.
  • HDFS with Ozone as a tier: Some deployments use HDFS for hot data and Ozone for cold data.
  • Cloud S3: If you’re in the cloud, native S3 is the easiest, but you lose on-prem control.

Frequently Asked Questions

Q: Does Ozone support Hadoop MapReduce?
Yes, via the O3FS filesystem. MapReduce jobs can read/write to Ozone using the o3fs:// URI.

Q: Can I use Ozone with Spark?
Yes, Spark can access Ozone via Hadoop FileSystem API or S3A connector (if using S3 gateway).

Q: How is Ozone different from HDFS?
Ozone separates metadata from data, allowing better scalability and small file support. HDFS has a single NameNode that limits metadata.

Q: What is the S3 gateway in Ozone?
It’s a service that translates S3 API calls to Ozone operations, so S3 clients can use Ozone without changes.

Q: Is Ozone production-ready?
Yes, it has been used in production by companies like Yahoo (Verizon Media) and others. It’s actively developed.

Q: How do I set up Ozone?
You can use the Docker image for testing, or deploy via Apache Ambari or manually. Refer to the official documentation for detailed steps.

Related

Formula used
in t | Data size | TB | 10 | 0 | 100000
in r | Replication factor | - | 3 | 1 | 5
out raw | Raw storage needed | TB | t * r | 2
out usable | Usable capacity (with 3x repl.) | TB | t | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →