You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/08/07 08:26:36 UTC
[GitHub] [rocketmq] makabakaboom opened a new pull request #3228: [ISSUE #3227]add topic message queue count/size statistics and add tools to query it
makabakaboom opened a new pull request #3228:
URL: https://github.com/apache/rocketmq/pull/3228
**Make sure set the target branch to `develop`**
## What is the purpose of the change
#3227
## Brief changelog
#3227
## Verifying this change
#3227
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
- [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github 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 `[ISSUE #123] 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 what the pull request does, how, and why.
- [x] Write necessary unit-test(over 80% coverage) 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/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.
- [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] pirateskipper commented on a change in pull request #3228: [ISSUE #3227]add topic message queue count/size statistics and add tools to query it
Posted by GitBox <gi...@apache.org>.
pirateskipper commented on a change in pull request #3228:
URL: https://github.com/apache/rocketmq/pull/3228#discussion_r693677468
##########
File path: client/src/main/java/org/apache/rocketmq/client/impl/MQClientAPIImpl.java
##########
@@ -1182,7 +1186,29 @@ public TopicStatsTable getTopicStatsInfo(final String addr, final String topic,
request, timeoutMillis);
switch (response.getCode()) {
case ResponseCode.SUCCESS: {
- TopicStatsTable topicStatsTable = TopicStatsTable.decode(response.getBody(), TopicStatsTable.class);
+ TopicStatsTable topicStatsTable = TopicStatsTable.decode(response.getBody(), new TypeReference<TopicStatsTable<TopicOffset>>(){});
+ return topicStatsTable;
+ }
+ default:
+ break;
Review comment:
` throw new MQBrokerException(response.getCode(), response.getRemark(), addr);
}
`
##########
File path: store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java
##########
@@ -910,6 +910,16 @@ public long getMessageTotalInQueue(String topic, int queueId) {
return -1;
}
+ @Override
+ public long getMessageTotalSizeInQueue(String topic, int queueId) {
+ ConsumeQueue logicQueue = this.findConsumeQueue(topic, queueId);
+ if (logicQueue != null) {
Review comment:
`return logicQueue == null ? -1 : logicQueue.getMessageSizeTotalInQueue();`
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] codecov-commenter commented on pull request #3228: [ISSUE #3227]add topic message queue count/size statistics and add tools to query it
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #3228:
URL: https://github.com/apache/rocketmq/pull/3228#issuecomment-894627152
# [Codecov](https://codecov.io/gh/apache/rocketmq/pull/3228?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#3228](https://codecov.io/gh/apache/rocketmq/pull/3228?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (680822b) into [develop](https://codecov.io/gh/apache/rocketmq/commit/5203d52f1bab431ada236ba279c80e62778f8a15?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5203d52) will **increase** coverage by `0.52%`.
> The diff coverage is `24.19%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/3228/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/rocketmq/pull/3228?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #3228 +/- ##
=============================================
+ Coverage 47.93% 48.46% +0.52%
+ Complexity 4564 3196 -1368
=============================================
Files 552 419 -133
Lines 36628 26378 -10250
Branches 4844 3495 -1349
=============================================
- Hits 17558 12783 -4775
+ Misses 16850 11943 -4907
+ Partials 2220 1652 -568
```
| [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/3228?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...etmq/broker/plugin/AbstractPluginMessageStore.java](https://codecov.io/gh/apache/rocketmq/pull/3228/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcGx1Z2luL0Fic3RyYWN0UGx1Z2luTWVzc2FnZVN0b3JlLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ocketmq/broker/processor/AdminBrokerProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/3228/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL0FkbWluQnJva2VyUHJvY2Vzc29yLmphdmE=) | `7.62% <0.00%> (-0.34%)` | :arrow_down: |
| [...he/rocketmq/common/admin/TopicQueueStatistics.java](https://codecov.io/gh/apache/rocketmq/pull/3228/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vYWRtaW4vVG9waWNRdWV1ZVN0YXRpc3RpY3MuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...g/apache/rocketmq/common/protocol/RequestCode.java](https://codecov.io/gh/apache/rocketmq/pull/3228/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vcHJvdG9jb2wvUmVxdWVzdENvZGUuamF2YQ==) | `0.00% <ø> (ø)` | |
| [...n/java/org/apache/rocketmq/store/MessageStore.java](https://codecov.io/gh/apache/rocketmq/pull/3228/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL01lc3NhZ2VTdG9yZS5qYXZh) | `0.00% <ø> (ø)` | |
| [...org/apache/rocketmq/store/DefaultMessageStore.java](https://codecov.io/gh/apache/rocketmq/pull/3228/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0RlZmF1bHRNZXNzYWdlU3RvcmUuamF2YQ==) | `55.62% <50.00%> (-0.09%)` | :arrow_down: |
| [.../apache/rocketmq/common/admin/TopicStatsTable.java](https://codecov.io/gh/apache/rocketmq/pull/3228/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vYWRtaW4vVG9waWNTdGF0c1RhYmxlLmphdmE=) | `100.00% <100.00%> (ø)` | |
| [...cketmq/remoting/protocol/RemotingSerializable.java](https://codecov.io/gh/apache/rocketmq/pull/3228/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL3Byb3RvY29sL1JlbW90aW5nU2VyaWFsaXphYmxlLmphdmE=) | `68.42% <100.00%> (+5.92%)` | :arrow_up: |
| [...n/java/org/apache/rocketmq/store/ConsumeQueue.java](https://codecov.io/gh/apache/rocketmq/pull/3228/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0NvbnN1bWVRdWV1ZS5qYXZh) | `65.43% <100.00%> (+1.19%)` | :arrow_up: |
| [...org/apache/rocketmq/store/ha/WaitNotifyObject.java](https://codecov.io/gh/apache/rocketmq/pull/3228/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL1dhaXROb3RpZnlPYmplY3QuamF2YQ==) | `66.07% <0.00%> (-14.70%)` | :arrow_down: |
| ... and [174 more](https://codecov.io/gh/apache/rocketmq/pull/3228/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/3228?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/3228?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [5203d52...680822b](https://codecov.io/gh/apache/rocketmq/pull/3228?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] coveralls commented on pull request #3228: [ISSUE #3227]add topic message queue count/size statistics and add tools to query it
Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #3228:
URL: https://github.com/apache/rocketmq/pull/3228#issuecomment-894627140
[![Coverage Status](https://coveralls.io/builds/41977278/badge)](https://coveralls.io/builds/41977278)
Coverage increased (+0.08%) to 54.175% when pulling **680822b96082c446a053ca7e49936b3e70b07d7a on makabakaboom:consumeQueue-statistics** into **44bdeedad2d0e28717f5012d375d12af76305bb5 on apache:develop**.
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org