Tejaskriya opened a new pull request, #5099: URL: https://github.com/apache/ozone/pull/5099
## What changes were proposed in this pull request? Add the option for the command `ozone admin printTopology` to output as JSON ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-8212 ## How was this patch tested? Added new Robot test. Also verified the JSON output using a docker-compose cluster: ``` bash-4.2$ ozone admin printTopology --json | more [ { "ipAddress" : "172.25.0.104", "hostName" : "ozonesecure-ha-datanode3-1.ozonesecure-ha_ozone_net", "nodeState" : "HEALTHY", "operationalState" : "IN_SERVICE", "networkLocation" : "/default-rack", "ports" : { "HTTP" : 9882, "CLIENT_RPC" : 9864, "REPLICATION" : 9886, "RATIS" : 9858, "RATIS_ADMIN" : 9857, "RATIS_SERVER" : 9856, "RATIS_DATASTREAM" : 9855, "STANDALONE" : 9859 } }, { --More-- bash-4.2$ ozone admin printTopology -o --json | more [ { "ipAddress" : "172.25.0.104", "hostName" : "ozonesecure-ha-datanode3-1.ozonesecure-ha_ozone_net", "nodeState" : "HEALTHY", "operationalState" : "IN_SERVICE", "networkLocation" : "/default-rack" }, { "ipAddress" : "172.25.0.103", --More-- bash-4.2$ ozone admin printTopology -f --json | more [ { "ipAddress" : "172.25.0.104", "hostName" : "ozonesecure-ha-datanode3-1.ozonesecure-ha_ozone_net", "nodeState" : "HEALTHY", "operationalState" : "IN_SERVICE", "networkLocation" : "/default-rack", "ports" : { "HTTP" : 9882, "CLIENT_RPC" : 9864, "REPLICATION" : 9886, "RATIS" : 9858, "RATIS_ADMIN" : 9857, "RATIS_SERVER" : 9856, "RATIS_DATASTREAM" : 9855, "STANDALONE" : 9859 }, "uuid" : "d590bb47-252e-4afc-8e40-b2fb27d62425" }, { --More-- ``` -- 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]
