Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ public static OzoneQuota parseSpaceQuota(String quotaInBytes) {
nSize = Long.parseLong(size);
} catch (NumberFormatException e) {
throw new IllegalArgumentException("Invalid values for quota, to ensure" +
" that the Quota format is legal(supported values are B," +
" KB, MB, GB and TB). And the quota value cannot be greater than " +
"Long.MAX_VALUE BYTES");
" that the Quota format is legal(supported values are B," +
" KB, MB, GB and TB with positive long values)." +
" And the quota value cannot be greater than " +
"Long.MAX_VALUE BYTES");
}

if (nSize <= 0) {
Expand Down
6 changes: 6 additions & 0 deletions hadoop-hdds/docs/content/feature/Quota.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ f. If the cluster is upgraded from old version less than 1.1.0, use of quota on
### Storage Space level quota
Storage space level quotas allow the use of units B, KB, MB, GB and TB. Represents how much storage Spaces will be used.

#### Note:

- Decimals are not supported while setting quota for volume and bucket. For example, 1.5 TB.

Copy link
Contributor

@sumitagrawl sumitagrawl Jun 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per bug, need update CLI help output also for HDDS-8373

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified the Exception message accordingly

- Ensure that the minimum storage quota is default block size * replication factor. If you set the value lesser than the default block size * replication factor, while writing the data (key put) operation, an operation error is displayed.

#### Volume Storage Space level quota
```shell
bin/ozone sh volume create --space-quota 5MB /volume1
Expand Down
5 changes: 5 additions & 0 deletions hadoop-hdds/docs/content/feature/Quota.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ menu:
## 客户端用法
### Storage space级别配额
Storage space级别配额允许使用 B, KB ,MB ,GB ,TB 等单位。表示将使用多少个存储空间。

#### 注意:
- Volume 和 Bucket 不支持设置带小数点的配额值,例如 1.5 TB.
- 最小的有效空间配额,是一个数据块需要的存储空间,即默认块大小 * 副本数. 请确保设置的空间配额不小于这个数值,不然对象/文件写入操作,会失败。

#### Volume Space quota用法
```shell
bin/ozone sh volume create --space-quota 5MB /volume1
Expand Down