private void printClusterBaseInfo(final DefaultMQAdminExt defaultMQAdminExt)
throws RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException,
InterruptedException, MQBrokerException {
ClusterInfo clusterInfoSerializeWrapper = defaultMQAdminExt.examineBrokerClusterInfo();
System.out.printf("%-16s %-32s %-4s %-22s %-22s %11s %11s\n",//
"#Cluster Name",//
"#Broker Name",//
"#BID",//
"#Addr",//
"#Version",//
"#InTPS",//
"#OutTPS"//
);
Iterator<Map.Entry<String, Set<String>>> itCluster =
clusterInfoSerializeWrapper.getClusterAddrTable().entrySet().iterator();
while (itCluster.hasNext()) {
Map.Entry<String, Set<String>> next = itCluster.next();
String clusterName = next.getKey();
TreeSet<String> brokerNameSet = new TreeSet<String>();
brokerNameSet.addAll(next.getValue());
for (String brokerName : brokerNameSet) {
BrokerData brokerData = clusterInfoSerializeWrapper.getBrokerAddrTable().get(brokerName);
if (brokerData != null) {
Iterator<Map.Entry<Long, String>> itAddr =
brokerData.getBrokerAddrs().entrySet().iterator();
while (itAddr.hasNext()) {