Gargi-jais11 opened a new pull request, #9001: URL: https://github.com/apache/ozone/pull/9001
## What changes were proposed in this pull request? [HDDS-12078](https://issues.apache.org/jira/browse/HDDS-12078) added a method ContainerIDParameters#getValidatedIDs to validate and convert container IDs passed from the command line, and fail the command quickly if IDs with invalid syntax are used. This was added for ozone admin container reconcile but should be used for ozone admin container info as well. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-13592 ## How was this patch tested? Added robot test and new unit tests to `TestInfoSubCommand`. Below is the output after local check on docker cluster. ``` bash-5.1$ ozone admin container info 13 -2 Container IDs must be positive integers. Invalid container IDs: -2 bash-5.1$ ozone admin container info 14 abc Container IDs must be positive integers. Invalid container IDs: abc bash-5.1$ ozone admin container info 1 23 45 Container id: 1 Pipeline id: cf19c04e-f553-4d38-ab65-0418cb18a3dd Write PipelineId: 744e21de-3b8c-465e-89c9-76ae5dbb6b29 Write Pipeline State: OPEN Container State: CLOSED Datanodes: [ba8cbb1f-8932-4bf7-94bb-df3101063236/ozone-datanode-3.ozone_default] Replicas: [State: CLOSED; ReplicaIndex: 0; Origin: ba8cbb1f-8932-4bf7-94bb-df3101063236; Location: ba8cbb1f-8932-4bf7-94bb-df3101063236/ozone-datanode-3.ozone_default] Container id: 23 Pipeline id: 80991d77-4fe5-44cb-a589-774d88921444 Write PipelineId: 744e21de-3b8c-465e-89c9-76ae5dbb6b29 Write Pipeline State: OPEN Container State: CLOSED Datanodes: [ba8cbb1f-8932-4bf7-94bb-df3101063236/ozone-datanode-3.ozone_default] Replicas: [State: CLOSED; ReplicaIndex: 0; Origin: ba8cbb1f-8932-4bf7-94bb-df3101063236; Location: ba8cbb1f-8932-4bf7-94bb-df3101063236/ozone-datanode-3.ozone_default] Container id: 45 Pipeline id: 61f615a0-f572-4e59-a44c-0f981f4d84ec Write PipelineId: 744e21de-3b8c-465e-89c9-76ae5dbb6b29 Write Pipeline State: OPEN Container State: CLOSED Datanodes: [ba8cbb1f-8932-4bf7-94bb-df3101063236/ozone-datanode-3.ozone_default] Replicas: [State: CLOSED; ReplicaIndex: 0; Origin: ba8cbb1f-8932-4bf7-94bb-df3101063236; Location: ba8cbb1f-8932-4bf7-94bb-df3101063236/ozone-datanode-3.ozone_default] ``` -- 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]
