jojochuang commented on code in PR #348: URL: https://github.com/apache/ozone-site/pull/348#discussion_r3029772013
########## docs/03-core-concepts/03-namespace/02-buckets/05-default-replication.mdx: ########## @@ -0,0 +1,63 @@ +--- +title: Default Bucket Replication +sidebar_label: Default Replication +--- + +# Default Bucket Replication + +The data redundancy for keys within an Apache Ozone bucket is determined by a replication configuration (type and value). This configuration can be set as an explicit default on the bucket itself, or it can be inherited from cluster-wide defaults if not set on the bucket. This document explains this process. + +## Setting a Default Replication on a Bucket + +When a bucket is created, a default replication configuration can be explicitly stored on the bucket. This bucket-level default will apply to all keys created within it, unless a key is written with its own specific replication override. + +Ozone uses the following order of precedence to set a default replication property **on a bucket** during creation: + +1. **Explicit Flags:** Using both the `--type` and `--replication` flags in the `ozone sh bucket create` command. This is the most direct way to set a bucket's default replication. +2. **Client-Side Value with Type Flag:** Using the `--type` flag during bucket creation in combination with the `ozone.replication` property set in the client's `ozone-site.xml`. + +**Example:** +If `ozone.replication=1` is set on the client, the following command sets the default replication for `bucket2` to `RATIS-1`: +```bash +ozone sh bucket create vol1/bucket2 -t RATIS +``` + Review Comment: Actually it doesn't print that now: ``` bash-5.1$ ozone sh volume create vol1 bash-5.1$ ozone sh bucket create vol1/bucket2 -t RATIS bash-5.1$ ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
