Skip to content

Conversation

panzhi33
Copy link
Contributor

Make sure set the target branch to develop

What is the purpose of the change

XXXXX

Brief changelog

XX

Verifying this change

XXXX

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.

  • Make sure there is a Github issue 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.
  • 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.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • 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.
  • 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.

@vongosling vongosling linked an issue Jul 15, 2021 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Jul 15, 2021

Coverage Status

Coverage increased (+0.3%) to 54.484% when pulling 75271df on panzhi33:develop into ec985ee on apache:develop.

@vongosling vongosling added this to the 4.9.1 milestone Jul 19, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2021

Codecov Report

Merging #3149 (bc35d5c) into develop (30058cf) will increase coverage by 0.23%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3149      +/-   ##
=============================================
+ Coverage      47.82%   48.05%   +0.23%     
+ Complexity      4551     4348     -203     
=============================================
  Files            552      514      -38     
  Lines          36643    35040    -1603     
  Branches        4846     4669     -177     
=============================================
- Hits           17526    16840     -686     
+ Misses         16881    16015     -866     
+ Partials        2236     2185      -51     
Impacted Files Coverage Δ
...rocketmq/broker/pagecache/ManyMessageTransfer.java 36.36% <0.00%> (-9.80%) ⬇️
.../rocketmq/broker/pagecache/OneMessageTransfer.java 24.00% <0.00%> (-9.34%) ⬇️
...rg/apache/rocketmq/remoting/netty/NettyLogger.java 16.32% <0.00%> (-2.73%) ⬇️
...mq/client/impl/consumer/RebalanceLitePullImpl.java 48.52% <0.00%> (-2.22%) ⬇️
...ocketmq/broker/processor/SendMessageProcessor.java 39.74% <0.00%> (-1.44%) ⬇️
...he/rocketmq/client/impl/consumer/ProcessQueue.java 58.60% <0.00%> (-1.40%) ⬇️
...he/rocketmq/client/trace/AsyncTraceDispatcher.java 78.21% <0.00%> (-1.00%) ⬇️
...pl/consumer/ConsumeMessageConcurrentlyService.java 47.57% <0.00%> (-0.98%) ⬇️
...e/rocketmq/client/impl/consumer/RebalanceImpl.java 39.45% <0.00%> (-0.79%) ⬇️
...lient/impl/consumer/DefaultMQPushConsumerImpl.java 39.64% <0.00%> (-0.53%) ⬇️
... and 74 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30058cf...bc35d5c. Read the comment docs.

@zongtanghu zongtanghu modified the milestones: 4.9.1, 4.9.2 Aug 1, 2021
Comment on lines 25 to 41
download() {
if [[ -e /tmp/rocketmq/ ]]; then
rm -rf /tmp/rocketmq/
fi

wget --no-check-certificate -P /tmp/rocketmq/ https://ons-migration.oss-cn-hangzhou.aliyuncs.com/rocketmq-for-export.tar.gz
if [[ $? -ne 0 ]]; then
echo -e "[ERROR] Download rocketmq error, please make sure this file exists"
exit 1
else
echo -e "[INFO] Download rocketmq completed,file path: $(pwd)/rocketmq-for-export.tar.gz"
fi

tar -zxvf /tmp/rocketmq/rocketmq-for-export.tar.gz -C /tmp/rocketmq/ > /dev/null 2>&1

echo -e "[INFO] Unzip rocketmq-for-export.tar.gz completed"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not appropriate to download packages from OSS here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any update for here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has been deleted about oss


try {
String clusterName = commandLine.getOptionValue('c').trim();
String filePath = !commandLine.hasOption('f') ? "/tmp/rocketmq/export" : commandLine.getOptionValue('f')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define a constant for "/tmp/rocketmq/export"

Comment on lines 120 to 121
ConcurrentMap<String, TopicConfig> topicConfigMap = new ConcurrentHashMap<>();
ConcurrentMap<String, SubscriptionGroupConfig> subGroupConfigMap = new ConcurrentHashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will topicConfigMap subGroupConfigMap be used by multiple threads? If not, it would be better just use plain HashMap here.

Comment on lines 83 to 89
Map<String, Properties> map = new HashMap<>();
Properties masterProperties = defaultMQAdminExt.getBrokerConfig(masterAddr);
map.put("master", needBrokerProprties(masterProperties));
masterBrokerSize++;
slaveBrokerSize += masterAndSlaveMap.get(masterAddr).size();

brokerConfigs.put(masterProperties.getProperty("brokerName"), needBrokerProprties(masterProperties));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of map defined in this loop?

.iterator();
while (iterator.hasNext()) {
String topic = iterator.next().getKey();
if (topicList.getTopicList().contains(topic) || !specialTopic && (topic.startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX) || topic.startsWith(MixAll.DLQ_GROUP_TOPIC_PREFIX))) {
Copy link
Contributor

@dingshuangxi888 dingshuangxi888 Sep 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!specialTopic && (topic.startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX) || topic.startsWith(MixAll.DLQ_GROUP_TOPIC_PREFIX))

这段逻辑应该再加个括号

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里加不加括号,逻辑都是一样的,但是为了方便理解,我还是加上去了

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯嗯,逻辑清晰一点,未来加个条件也不会出bug

@francisoliverlee francisoliverlee self-requested a review September 30, 2021 06:25
@francisoliverlee francisoliverlee modified the milestones: 4.9.2, 4.9.3 Oct 11, 2021
@RongtongJin RongtongJin modified the milestones: 4.9.3, 4.9.2 Oct 13, 2021
@RongtongJin RongtongJin merged commit cd45023 into apache:develop Oct 13, 2021
GenerousMan pushed a commit to GenerousMan/rocketmq that referenced this pull request Aug 12, 2022
carlvine500 pushed a commit to carlvine500/rocketmq-apache that referenced this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support metadata export
9 participants