[jira] [Commented] (ROCKETMQ-278) Add specified cluster for cluster info cmd
[ https://issues.apache.org/jira/browse/ROCKETMQ-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16174402#comment-16174402 ] ASF GitHub Bot commented on ROCKETMQ-278: - GitHub user lindzh opened a pull request: https://github.com/apache/incubator-rocketmq/pull/168 Fix System.out.printf throws UnknownFormatConversionException ### What is the purpose of the change When using mqadmin command printmsg to print retry topic msgs,it throw an exception like this: com.alibaba.rocketmq.client.exception.MQClientException: Can not find Message Queue for this ``` topic, %%RETRY%%CID_MERSS_CONSUOUP_UAT See http://rocketmq.apache.org/docs/faq/ for further details. at com.alibaba.rocketmq.client.impl.MQAdminImpl.fetchSubscribeMessageQueues(MQAdminImpl.java:161) at com.alibaba.rocketmq.client.impl.consumer.DefaultMQPullConsumerImpl.fetchSubscribeMessageQueues(DefaultMQPullConsumerImpl.java:136) at com.alibaba.rocketmq.client.consumer.DefaultMQPullConsumer.fetchSubscribeMessageQueues(DefaultMQPullConsumer.java:225) at com.alibaba.rocketmq.tools.command.message.PrintMessageSubCommand.execute(PrintMessageSubCommand.java:120) at com.alibaba.rocketmq.tools.command.MQAdminStartup.main0(MQAdminStartup.java:128) ,. JIRA: https://issues.apache.org/jira/browse/ROCKETMQ-278. ``` ### Brief change log * fix all system.out.prinf using in rocketmq. ### Verifying this change * This change is a trivial rework / code cleanup with unitout test coverage. * execute mqadmin printmsg -t %RETRY%CID_MERSS_CONSUOUP_UAT. Follow this checklist to help us incorporate your contribution quickly and easily: - [x] Make sure there is a [JIRA issue](https://issues.apache.org/jira/projects/ROCKETMQ/issues/) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. - [x] Format the pull request title like [ROCKETMQ-XXX] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body. - [x] Write a pull request description that is detailed enough to understand the pull request : - What is the purpose of the change - Brief change log - Verifying this change - [x] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/incubator-rocketmq/tree/master/test). - [x] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass. - [x] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas). You can merge this pull request into a Git repository by running: $ git pull https://github.com/lindzh/incubator-rocketmq fix_print Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/168.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #168 commit 1ae0693693da4a147f1bb3c122833f548c376b09 Author: lindzhDate: 2017-08-11T07:55:24Z Merge branch 'develop' of github.com:apache/incubator-rocketmq into develop commit f0e243c5a8899fedc157accef964a1d617d77d1b Author: lindzh Date: 2017-08-11T10:02:36Z Merge branch 'develop' of github.com:apache/incubator-rocketmq into develop commit 1810be4c560767b83ff173e6fb6a96d4ac7c1428 Author: lindzh Date: 2017-08-14T02:11:27Z Merge branch 'develop' of github.com:apache/incubator-rocketmq into develop commit 53dcd8d0837eee419810f055a4035d3fdd72513f Author: lindzh Date: 2017-08-22T12:34:49Z Merge branch 'develop' of github.com:apache/incubator-rocketmq into develop commit 4abfa4f326d0f5ac7a01f43b3cb882a7916fac59 Author: lindzh Date: 2017-08-28T10:41:53Z Merge branch 'develop' of github.com:apache/incubator-rocketmq into develop commit 845830865fc37d0364a19cbd89ceaf8a30b37e1c Author: yukon Date: 2017-08-29T16:06:13Z Polish merge script, use old title if input is null commit 254d432496c424717d45b8dc9e44ae3bd78ab466 Author: vsair Date: 2017-08-29T16:14:27Z [ROCKETMQ-284] ExpressionMessageFilter will pass some message. Author:
[jira] [Commented] (ROCKETMQ-278) Add specified cluster for cluster info cmd
[ https://issues.apache.org/jira/browse/ROCKETMQ-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16172708#comment-16172708 ] ASF GitHub Bot commented on ROCKETMQ-278: - Github user vongosling commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/152#discussion_r139871793 --- Diff: client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java --- @@ -1167,10 +1168,13 @@ public Properties getBrokerConfig(final String addr, final long timeoutMillis) throw new MQBrokerException(response.getCode(), response.getRemark()); } -public ClusterInfo getBrokerClusterInfo( +public ClusterInfo getBrokerClusterInfo(String cluster, --- End diff -- how to insure the api compatibility > Add specified cluster for cluster info cmd > -- > > Key: ROCKETMQ-278 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-278 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-client, rocketmq-namesrv, rocketmq-tools >Affects Versions: 4.1.0-incubating >Reporter: lindzh >Assignee: Xiaorui Wang > Fix For: 4.2.0-incubating > > > When using mqadmin command clusterlist,it always display all cluster,i want > to display specified cluster. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ROCKETMQ-278) Add specified cluster for cluster info cmd
[ https://issues.apache.org/jira/browse/ROCKETMQ-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16172707#comment-16172707 ] ASF GitHub Bot commented on ROCKETMQ-278: - Github user vongosling commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/152#discussion_r139871898 --- Diff: tools/src/main/java/org/apache/rocketmq/tools/command/topic/TopicListSubCommand.java --- @@ -65,7 +65,7 @@ public void execute(final CommandLine commandLine, final Options options, try { defaultMQAdminExt.start(); if (commandLine.hasOption('c')) { -ClusterInfo clusterInfo = defaultMQAdminExt.examineBrokerClusterInfo(); +ClusterInfo clusterInfo = defaultMQAdminExt.examineBrokerClusterInfo(null); --- End diff -- null as parameter is not a good practice > Add specified cluster for cluster info cmd > -- > > Key: ROCKETMQ-278 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-278 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-client, rocketmq-namesrv, rocketmq-tools >Affects Versions: 4.1.0-incubating >Reporter: lindzh >Assignee: Xiaorui Wang > Fix For: 4.2.0-incubating > > > When using mqadmin command clusterlist,it always display all cluster,i want > to display specified cluster. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ROCKETMQ-278) Add specified cluster for cluster info cmd
[ https://issues.apache.org/jira/browse/ROCKETMQ-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16172706#comment-16172706 ] ASF GitHub Bot commented on ROCKETMQ-278: - Github user vongosling commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/152#discussion_r139871853 --- Diff: namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java --- @@ -63,11 +65,36 @@ public RouteInfoManager() { this.filterServerTable = new HashMap(256); } -public byte[] getAllClusterInfo() { -ClusterInfo clusterInfoSerializeWrapper = new ClusterInfo(); - clusterInfoSerializeWrapper.setBrokerAddrTable(this.brokerAddrTable); - clusterInfoSerializeWrapper.setClusterAddrTable(this.clusterAddrTable); -return clusterInfoSerializeWrapper.encode(); +public byte[] getAllClusterInfo(String cluster) { --- End diff -- I agree @shroman here > Add specified cluster for cluster info cmd > -- > > Key: ROCKETMQ-278 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-278 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-client, rocketmq-namesrv, rocketmq-tools >Affects Versions: 4.1.0-incubating >Reporter: lindzh >Assignee: Xiaorui Wang > Fix For: 4.2.0-incubating > > > When using mqadmin command clusterlist,it always display all cluster,i want > to display specified cluster. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ROCKETMQ-278) Add specified cluster for cluster info cmd
[ https://issues.apache.org/jira/browse/ROCKETMQ-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16172701#comment-16172701 ] ASF GitHub Bot commented on ROCKETMQ-278: - Github user dongeforever commented on the issue: https://github.com/apache/incubator-rocketmq/pull/152 LGTM @zhouxinyu @vongosling > Add specified cluster for cluster info cmd > -- > > Key: ROCKETMQ-278 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-278 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-client, rocketmq-namesrv, rocketmq-tools >Affects Versions: 4.1.0-incubating >Reporter: lindzh >Assignee: Xiaorui Wang > Fix For: 4.2.0-incubating > > > When using mqadmin command clusterlist,it always display all cluster,i want > to display specified cluster. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ROCKETMQ-278) Add specified cluster for cluster info cmd
[ https://issues.apache.org/jira/browse/ROCKETMQ-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16167446#comment-16167446 ] ASF GitHub Bot commented on ROCKETMQ-278: - Github user shroman commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/152#discussion_r139078626 --- Diff: namesrv/src/main/java/org/apache/rocketmq/namesrv/routeinfo/RouteInfoManager.java --- @@ -63,11 +65,36 @@ public RouteInfoManager() { this.filterServerTable = new HashMap(256); } -public byte[] getAllClusterInfo() { -ClusterInfo clusterInfoSerializeWrapper = new ClusterInfo(); - clusterInfoSerializeWrapper.setBrokerAddrTable(this.brokerAddrTable); - clusterInfoSerializeWrapper.setClusterAddrTable(this.clusterAddrTable); -return clusterInfoSerializeWrapper.encode(); +public byte[] getAllClusterInfo(String cluster) { --- End diff -- You change the signature of the public class here. How about having another method -- `public byte[] getAllClusterInfo()`? And you won't need calling `getAllClusterInfo(null)` then too ;) > Add specified cluster for cluster info cmd > -- > > Key: ROCKETMQ-278 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-278 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-client, rocketmq-namesrv, rocketmq-tools >Affects Versions: 4.1.0-incubating >Reporter: lindzh >Assignee: Xiaorui Wang > Fix For: 4.2.0-incubating > > > When using mqadmin command clusterlist,it always display all cluster,i want > to display specified cluster. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ROCKETMQ-278) Add specified cluster for cluster info cmd
[ https://issues.apache.org/jira/browse/ROCKETMQ-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16144646#comment-16144646 ] ASF GitHub Bot commented on ROCKETMQ-278: - Github user vsair commented on the issue: https://github.com/apache/incubator-rocketmq/pull/152 nice! > Add specified cluster for cluster info cmd > -- > > Key: ROCKETMQ-278 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-278 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-client, rocketmq-namesrv, rocketmq-tools >Affects Versions: 4.1.0-incubating >Reporter: lindzh >Assignee: Xiaorui Wang > Fix For: 4.2.0-incubating > > > When using mqadmin command clusterlist,it always display all cluster,i want > to display specified cluster. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ROCKETMQ-278) Add specified cluster for cluster info cmd
[ https://issues.apache.org/jira/browse/ROCKETMQ-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16143662#comment-16143662 ] ASF GitHub Bot commented on ROCKETMQ-278: - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/152 [![Coverage Status](https://coveralls.io/builds/13014639/badge)](https://coveralls.io/builds/13014639) Coverage increased (+0.03%) to 38.68% when pulling **a674878c2125e305b6b3da293833b6583341cb1a on lindzh:add_clusterlist_cluster** into **4c5e58b46acaf4541fbd741b97593618f027be2d on apache:develop**. > Add specified cluster for cluster info cmd > -- > > Key: ROCKETMQ-278 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-278 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-client, rocketmq-namesrv, rocketmq-tools >Affects Versions: 4.1.0-incubating >Reporter: lindzh >Assignee: Xiaorui Wang > Fix For: 4.2.0-incubating > > > When using mqadmin command clusterlist,it always display all cluster,i want > to display specified cluster. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ROCKETMQ-278) Add specified cluster for cluster info cmd
[ https://issues.apache.org/jira/browse/ROCKETMQ-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16139792#comment-16139792 ] ASF GitHub Bot commented on ROCKETMQ-278: - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/152 [![Coverage Status](https://coveralls.io/builds/12969125/badge)](https://coveralls.io/builds/12969125) Coverage increased (+0.02%) to 39.046% when pulling **2df4cfc7dc3a59374251b5ac60cc76f536f97d89 on lindzh:add_clusterlist_cluster** into **ca14a2d474b6c71143944ec95f7c28e23e15632d on apache:develop**. > Add specified cluster for cluster info cmd > -- > > Key: ROCKETMQ-278 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-278 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-client, rocketmq-namesrv, rocketmq-tools >Affects Versions: 4.1.0-incubating >Reporter: lindzh >Assignee: Xiaorui Wang > Fix For: 4.2.0-incubating > > > When using mqadmin command clusterlist,it always display all cluster,i want > to display specified cluster. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ROCKETMQ-278) Add specified cluster for cluster info cmd
[ https://issues.apache.org/jira/browse/ROCKETMQ-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16139791#comment-16139791 ] ASF GitHub Bot commented on ROCKETMQ-278: - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/152 [![Coverage Status](https://coveralls.io/builds/12969125/badge)](https://coveralls.io/builds/12969125) Coverage increased (+0.02%) to 39.046% when pulling **2df4cfc7dc3a59374251b5ac60cc76f536f97d89 on lindzh:add_clusterlist_cluster** into **ca14a2d474b6c71143944ec95f7c28e23e15632d on apache:develop**. > Add specified cluster for cluster info cmd > -- > > Key: ROCKETMQ-278 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-278 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-client, rocketmq-namesrv, rocketmq-tools >Affects Versions: 4.1.0-incubating >Reporter: lindzh >Assignee: Xiaorui Wang > Fix For: 4.2.0-incubating > > > When using mqadmin command clusterlist,it always display all cluster,i want > to display specified cluster. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ROCKETMQ-278) Add specified cluster for cluster info cmd
[ https://issues.apache.org/jira/browse/ROCKETMQ-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16139766#comment-16139766 ] ASF GitHub Bot commented on ROCKETMQ-278: - GitHub user lindzh opened a pull request: https://github.com/apache/incubator-rocketmq/pull/152 [ROCKETMQ-278]add clusterlist cmd by specified cluster When using mqadmin command clusterlist,it always display all cluster,i want to display specified cluster. JIRA: https://issues.apache.org/jira/browse/ROCKETMQ-278 You can merge this pull request into a Git repository by running: $ git pull https://github.com/lindzh/incubator-rocketmq add_clusterlist_cluster Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/152.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #152 commit bcc65e5471d9821e0edb90f6f637e3034ed1da44 Author: lindzhDate: 2017-08-11T06:36:53Z [ROCKETMQ-231]Wrong Pull result sizebugfix Author: lindzh Closes #126 from lindzh/fix_consumer_pull_msg_size. commit aa1c75774eb33fca9a1c3f036249b6c5b86ef0f5 Author: lindzh Date: 2017-08-11T07:40:24Z [ROCKETMQ-254]Fix logger appender unit tests which cost too long Author: lindzh Closes #141 from lindzh/logger_appender_test. commit 1ae0693693da4a147f1bb3c122833f548c376b09 Author: lindzh Date: 2017-08-11T07:55:24Z Merge branch 'develop' of github.com:apache/incubator-rocketmq into develop commit 38bbb1417bcd8bba6eee19df1afe9e6b3061db89 Author: yukon Date: 2017-08-11T09:27:06Z [ROCKETMQ-263]Sets a small timeout value for unit tests in OpenMessaging module commit ccc2235ae9509f101971915ba0521109a82894b0 Author: yukon Date: 2017-08-11T09:54:04Z [ROCKETMQ-258]Move benchmark scripts to distribution module commit f0e243c5a8899fedc157accef964a1d617d77d1b Author: lindzh Date: 2017-08-11T10:02:36Z Merge branch 'develop' of github.com:apache/incubator-rocketmq into develop commit ffad6566b8aee86b87b34f2c77ab2ae3b9c15b1c Author: Ritabrata Moitra Date: 2017-08-11T11:59:28Z [ROCKETMQ-209]Remove duplicated code in class MQClientAPIImpl Author: Ritabrata Moitra Closes #134 from Ritabrata-TW/master. commit 7f96008c8b6f3ce5ac38cd168bd12252799973e3 Author: yukon Date: 2017-08-11T12:28:13Z Remove unused class GetRouteInfoResponseHeader and meaningless comments commit 97aa813eb89c14e0539a8847876d7a28a1efe638 Author: yukon Date: 2017-08-11T12:46:04Z Reformat code globally second time commit f091203a9d4a8c79d6ec8bdfc719a318b7f1ba8f Author: yukon Date: 2017-08-11T13:56:52Z Remove preceded whitespace check from checkstyle commit f613c3b7dfefc1cea15d8aa22fec763995a624e7 Author: yukon Date: 2017-08-11T11:15:38Z [ROCKETMQ-259]Fix too many reflection calls when decode remoting command header commit 332df78e2bb6caadfc6f471445ebb1f9d224 Author: yukon Date: 2017-08-11T14:17:32Z [ROCKETMQ-261] Use write lock when destroy IndexService commit 1810be4c560767b83ff173e6fb6a96d4ac7c1428 Author: lindzh Date: 2017-08-14T02:11:27Z Merge branch 'develop' of github.com:apache/incubator-rocketmq into develop commit ca14a2d474b6c71143944ec95f7c28e23e15632d Author: yukon Date: 2017-08-21T08:18:21Z Polish chapter 'Learn it & Contact us' in README commit 53dcd8d0837eee419810f055a4035d3fdd72513f Author: lindzh Date: 2017-08-22T12:34:49Z Merge branch 'develop' of github.com:apache/incubator-rocketmq into develop commit aacb19c2ac0f10b27aec609cc5b56f314b10f82e Author: lindzh Date: 2017-08-23T03:26:15Z add cluster list to specified cluster commit 2df4cfc7dc3a59374251b5ac60cc76f536f97d89 Author: lindzh Date: 2017-08-24T08:31:55Z add cluster info test > Add specified cluster for cluster info cmd > -- > > Key: ROCKETMQ-278 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-278 > Project: Apache RocketMQ > Issue Type: Improvement > Components: rocketmq-client, rocketmq-namesrv, rocketmq-tools >Affects Versions: 4.1.0-incubating >Reporter: lindzh >Assignee: Xiaorui Wang > Fix For: 4.2.0-incubating > > > When using mqadmin command clusterlist,it always display all cluster,i want > to display specified cluster. -- This message was sent by