Skip to content

HDDS-15653. Freon randomkeys does not throw error when inputs are negative.#10596

Open
sravani-revuri wants to merge 2 commits into
apache:masterfrom
sravani-revuri:HDDS-15653
Open

HDDS-15653. Freon randomkeys does not throw error when inputs are negative.#10596
sravani-revuri wants to merge 2 commits into
apache:masterfrom
sravani-revuri:HDDS-15653

Conversation

@sravani-revuri

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Running ozone freon rk with a negative value for --numOfVolumes , --numOfBuckets or --numOfKeys does not fail with an error. Instead, the command prints a progress bar with negative value and hangs.

bash-5.1$ ozone freon rk --numOfVolumes=1 --numOfBuckets=1 --numOfKeys=-1 
2026-06-24 04:37:36,027 [main] INFO freon.RandomKeyGenerator: Number of Threads: 10
2026-06-24 04:37:36,035 [main] INFO freon.RandomKeyGenerator: Number of Volumes: 1.
2026-06-24 04:37:36,035 [main] INFO freon.RandomKeyGenerator: Number of Buckets per Volume: 1.
2026-06-24 04:37:36,035 [main] INFO freon.RandomKeyGenerator: Number of Keys per Bucket: -1.
2026-06-24 04:37:36,035 [main] INFO freon.RandomKeyGenerator: Key size: 10240 bytes
2026-06-24 04:37:36,036 [main] INFO freon.RandomKeyGenerator: Buffer size: 4096 bytes
2026-06-24 04:37:36,036 [main] INFO freon.RandomKeyGenerator: validateWrites : false
2026-06-24 04:37:36,036 [main] INFO freon.RandomKeyGenerator: Number of Validate Threads: 1
2026-06-24 04:37:36,036 [main] INFO freon.RandomKeyGenerator: cleanObjects : false
2026-06-24 04:37:36,038 [main] INFO freon.RandomKeyGenerator: Starting progress bar Thread.

 -0.00% |?                                                                                                    |  0/-1 Time: 0:00:00|  
2026-06-24 04:37:36,044 [pool-2-thread-1] INFO rpc.RpcClient: Creating Volume: vol-0-97512, with hadoop as owner and space quota set to -1 bytes, counts quota set to -1
2026-06-24 04:37:36,083 [pool-2-thread-2] INFO rpc.RpcClient: Creating Bucket: vol-0-97512/bucket-0-75850, with server-side default bucket layout, hadoop as owner, Versioning false, Storage Type set to DISK and Encryption set to false, Replication Type set to server-side default replication type, Namespace Quota set to -1, Space Quota set to -1 
^C
***************************************************
Status: Success
Git Base Revision: 9d50c6884666e794e45102260a4017bb31802e1b
Number of Volumes created: 1
Number of Buckets created: 1
Number of Keys added: 0
Average Time spent in volume creation: 00:00:00,002
Average Time spent in bucket creation: 00:00:00,001
Average Time spent in key creation: 00:00:00,000
Average Time spent in key write: 00:00:00,000
Total bytes written: 0
Total Execution time: 00:00:26,117
***************************************************

For decimal input:

bash-5.1$ ozone freon rk --numOfVolumes=0.1 --numOfBuckets=1 --numOfKeys=1 
Invalid value for option '--num-of-volumes': '0.1' is not an int

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15653

How was this patch tested?

Manual Test.

bash-5.1$ ozone freon rk --numOfVolumes=-1 --numOfBuckets=1 --numOfKeys=1 
Invalid command, numOfVolumes must be a positive integer
bash-5.1$ ozone freon rk --numOfVolumes=1 --numOfBuckets=-1 --numOfKeys=1 
Invalid command, numOfBuckets must be a positive integer
bash-5.1$ ozone freon rk --numOfVolumes=1 --numOfBuckets=1 --numOfKeys=-1 
Invalid command, numOfKeys must be a positive integer
bash-5.1$ ozone freon rk --numOfVolumes=-1 --numOfBuckets=-1 --numOfKeys=-1 
Invalid command, numOfVolumes must be a positive integer

@sravani-revuri sravani-revuri marked this pull request as ready for review June 24, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants