ChenSammi commented on code in PR #9310:
URL: https://github.com/apache/ozone/pull/9310#discussion_r2540825107


##########
hadoop-hdds/docs/content/design/diskbalancer.md:
##########
@@ -118,6 +119,91 @@ and is not already being moved by another balancing 
operation. To optimize perfo
 containers repeatedly, it caches the list of containers for each volume which 
auto expires after one hour of its last 
 used time or if the container iterator for that is invalidated on full 
utilisation.
 
+## CLI Interface
+
+The DiskBalancer CLI provides the following commands:
+
+### Command Syntax
+
+**Start DiskBalancer:**
+```bash
+ozone admin datanode diskbalancer start [<datanode-address> ...] [OPTIONS] 
[--in-service-datanodes]
+```
+
+**Stop DiskBalancer:**
+```bash
+ozone admin datanode diskbalancer stop [<datanode-address> ...] 
[--in-service-datanodes]
+```
+
+**Update Configuration:**
+```bash
+ozone admin datanode diskbalancer update [<datanode-address> ...] [OPTIONS] 
[--in-service-datanodes]
+```
+
+**Get Status:**
+```bash
+ozone admin datanode diskbalancer status [<datanode-address> ...] 
[--in-service-datanodes] [--json]
+```
+
+**Get Report:**
+```bash
+ozone admin datanode diskbalancer report [<datanode-address> ...] 
[--in-service-datanodes] [--json]
+```
+
+### Command Options
+
+| Option                              | Description                            
                                                                                
                                                                                
                                                                                
                                                                             | 
Example                                        |
+|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------|
+| `<datanode-address>`                | One or more datanode addresses as 
positional arguments. Addresses can be:<br>- Hostname (e.g., `DN-1`) - uses 
default CLIENT_RPC port (9858)<br>- Hostname with port (e.g., `DN-1:9858`)<br>- 
IP address (e.g., `192.168.1.10`)<br>- IP address with port (e.g., 
`192.168.1.10:9858`)<br>- Stdin (`-`) - reads datanode addresses from standard 
input, one per line | `DN-1`<br>`DN-1:9858`<br>`192.168.1.10`<br>`-` |
+| `--in-service-datanodes`            | It queries SCM for all IN_SERVICE 
datanodes and executes the command on all of them.                              
                                                                                
                                                                                
                                                                                
  | `--in-service-datanodes`                       |
+| `--json`                            | Format output as JSON.                 
                                                                                
                                                                                
                                                                                
                                                                             | 
`--json`                                       |
+| `-t/--threshold`                    | Volume density threshold percentage 
(default: 10.0). Used with `start` and `update` commands.                       
                                                                                
                                                                                
                                                                                
| `-t 5`<br>`--threshold 5.0`                    |
+| `-b/--bandwidth-in-mb`              | Maximum disk bandwidth in MB/s 
(default: 10). Used with `start` and `update` commands.                         
                                                                                
                                                                                
                                                                                
     | `-b 20`<br>`--bandwidth-in-mb 50`              |
+| `-p/--parallel-thread`              | Number of parallel threads (default: 
1). Used with `start` and `update` commands.                                    
                                                                                
                                                                                
                                                                               
| `-p 5`<br>`--parallel-thread 10`               |
+| `-s/--stop-after-disk-even`         | Stop automatically after disks are 
balanced (default: false). Used with `start` and `update` commands.             
                                                                                
                                                                                
                                                                                
 | `-s false`<br>`--stop-after-disk-even true`    |
+
+### Examples
+
+```bash
+# Start DiskBalancer on a specific datanode
+ozone admin datanode diskbalancer start DN-1
+
+# Start DiskBalancer on multiple datanodes
+ozone admin datanode diskbalancer start DN-1 DN-2 DN-3

Review Comment:
   Will "ozone admin datanode diskbalancer start DN-1 DN-2 DN-3 --json" works?  
is there special order should be followed between parameters? 



-- 
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]

Reply via email to