adoroszlai opened a new pull request, #10542:
URL: https://github.com/apache/ozone/pull/10542

   ## What changes were proposed in this pull request?
   
   Remove deprecated options which were split in HDDS-7957.  Add logic to 
handle them globally, by replacing with the real options before command 
execution.  This simplifies the change to be done in HDDS-7956.
   
   https://issues.apache.org/jira/browse/HDDS-15596
   
   ## How was this patch tested?
   
   Verified that deprecated options are hidden in help, e.g.:
   
   ```bash
   $ ozone admin pipeline list --help
   Usage: ozone admin pipeline list [-hV] [--json] [--verbose]
                                    [--filterByFactor=<factor>] 
[-r=<replication>]
                                    [-s=<state>] [--scm=<scm>]
                                    [--service-id=<scmServiceId>]
                                    [-t=<replicationType>]
   List all active pipelines
         --filterByFactor, --filter-by-factor=<factor>
                       [deprecated] Filter pipelines by factor (e.g. ONE, THREE)
                         (implies RATIS replication type)
   ...
     -s, --state, --filterByState, --filter-by-state=<state>
                       Filter listed pipelines by State, eg OPEN, CLOSED
   ...
   ```
   
   but command accepts and handles them:
   
   ```bash
   $ ozone admin pipeline list -ffc THREE -fst OPEN
   Pipeline{ Id: 6b7a1780-a520-491b-afd3-e548538789a8, Nodes: [ 
{0e7511ea-3861-465f-97b4-0b4ebb900dd0(ozone-datanode-2.ozone_default/172.18.0.9),
 ReplicaIndex: 0}, 
{ee732661-3d27-498f-b807-fd9d0493ff8e(ozone-datanode-1.ozone_default/172.18.0.7),
 ReplicaIndex: 0}, 
{021b0f1e-5f0b-4311-8197-774c87160caf(ozone-datanode-3.ozone_default/172.18.0.8),
 ReplicaIndex: 0},], ReplicationConfig: RATIS/THREE, State:OPEN, 
leaderId:ee732661-3d27-498f-b807-fd9d0493ff8e, 
CreationTimestamp2026-06-18T11:55:50.710Z[Etc/UTC]}
   
   $ ozone admin pipeline list -ffc ONE -fst OPEN
   Pipeline{ Id: cdce37fc-36a4-4e96-85c2-85c9e414944b, Nodes: [ 
{0e7511ea-3861-465f-97b4-0b4ebb900dd0(ozone-datanode-2.ozone_default/172.18.0.9),
 ReplicaIndex: 0},], ReplicationConfig: RATIS/ONE, State:OPEN, 
leaderId:0e7511ea-3861-465f-97b4-0b4ebb900dd0, 
CreationTimestamp2026-06-18T11:55:50.656Z[Etc/UTC]}
   Pipeline{ Id: e66555dd-9902-4d4d-8351-c140d7d811ab, Nodes: [ 
{ee732661-3d27-498f-b807-fd9d0493ff8e(ozone-datanode-1.ozone_default/172.18.0.7),
 ReplicaIndex: 0},], ReplicationConfig: RATIS/ONE, State:OPEN, 
leaderId:ee732661-3d27-498f-b807-fd9d0493ff8e, 
CreationTimestamp2026-06-18T11:55:50.715Z[Etc/UTC]}
   Pipeline{ Id: 8e46649d-7d8f-47d2-8709-79738700c5ea, Nodes: [ 
{021b0f1e-5f0b-4311-8197-774c87160caf(ozone-datanode-3.ozone_default/172.18.0.8),
 ReplicaIndex: 0},], ReplicationConfig: RATIS/ONE, State:OPEN, 
leaderId:021b0f1e-5f0b-4311-8197-774c87160caf, 
CreationTimestamp2026-06-18T11:55:50.719Z[Etc/UTC]}
   ```
   
   Same for interactive mode:
   
   ```bash
   $ ozone admin --interactive
   ozone admin> pipeline list -<TAB>
   --filter-by-factor   --filterByFactor     --help               --replication 
       --service-id         --type               --version            -h        
           -s
   --filter-by-state    --filterByState      --json               --scm         
       --state              --verbose            -V                   -r        
           -t
   
   ozone admin> pipeline list -ffc THREE
   WARNING: Option '-ffc' is deprecated. Use '--filter-by-factor' instead.
   Pipeline{ Id: 6d989d02-f1c6-4009-a5f0-372b4135bd02, Nodes: [ 
{5f3ef100-5fb5-4b42-9364-c4f1149f8a9c(ozone-datanode-3.ozone_default/172.18.0.9),
 ReplicaIndex: 0}, 
{738917eb-d46f-4df2-979e-8fcff1aac502(ozone-datanode-1.ozone_default/172.18.0.8),
 ReplicaIndex: 0}, 
{6957c4f1-1bc7-47e3-92dc-c5d49cbd96ed(ozone-datanode-2.ozone_default/172.18.0.3),
 ReplicaIndex: 0},], ReplicationConfig: RATIS/THREE, State:OPEN, 
leaderId:6957c4f1-1bc7-47e3-92dc-c5d49cbd96ed, 
CreationTimestamp2026-06-18T12:56:51.917Z[Etc/UTC]}
   ```
   
   Updated unit test.
   
   CI:
   https://github.com/adoroszlai/ozone/actions/runs/27765382504


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