Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add import/export command and test #6972

Closed
wants to merge 11 commits into from

Conversation

carlvine500
Copy link
Contributor

@carlvine500 carlvine500 commented Jun 30, 2023

Which Issue(s) This PR Fixes

Fixes #6971

Brief Description

  1. migrate message across env: we switch our system from aws to aliyun , some message still not consumed in aws , we should migrate message from aws to aliyun ==> just use exportMessage and importMessage .
  2. fix some wrong message: after deploy some bug , the message format is not correct ==> we can exportMessage with json body --> modify message body --> importMessasge
  3. trace bug in lots of message body ==> after export message with json/text format ,we could easily search some keywords to view message detail , such as grep keyword messageFile

How Did You Test This Change?

  1. exportMessage: mock broker , fetch some messages and export to file , at the same time , show result 100% on system.out
  2. importMessage: mock broker , read a message file and send message to broker , at the same time , show result 100% on system.out

example usage

WeChatc0e14e48d1e5c6ef1ee135a5141a74bf

Copy link
Member

@mxsm mxsm left a comment

Choose a reason for hiding this comment

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

@carlvine500 Please check code sytle and fix it

@carlvine500
Copy link
Contributor Author

@carlvine500 Please check code sytle and fix it

ok

@codecov-commenter
Copy link

Codecov Report

Merging #6972 (f6c6d01) into develop (8ab99ac) will increase coverage by 0.10%.
The diff coverage is 68.01%.

@@              Coverage Diff              @@
##             develop    #6972      +/-   ##
=============================================
+ Coverage      42.65%   42.75%   +0.10%     
- Complexity      9211     9260      +49     
=============================================
  Files           1131     1133       +2     
  Lines          80470    80729     +259     
  Branches       10517    10553      +36     
=============================================
+ Hits           34322    34519     +197     
- Misses         41856    41880      +24     
- Partials        4292     4330      +38     
Impacted Files Coverage Δ
.../apache/rocketmq/tools/command/MQAdminStartup.java 0.00% <0.00%> (ø)
...mq/tools/command/message/ExportMessageCommand.java 66.11% <66.11%> (ø)
...mq/tools/command/message/ImportMessageCommand.java 66.97% <66.97%> (ø)
.../org/apache/rocketmq/tools/admin/MQAdminUtils.java 12.21% <100.00%> (+6.39%) ⬆️

... and 40 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@carlvine500
Copy link
Contributor Author

@mxsm bazel-compile still failed , can I ignore it ?

@mxsm
Copy link
Member

mxsm commented Jul 2, 2023

@mxsm bazel-compile still failed , can I ignore it ?

Yes, you can ignore it

@carlvine500
Copy link
Contributor Author

@ferrirW failure test is not about export/import , please review code again .

Copy link
Contributor Author

@carlvine500 carlvine500 left a comment

Choose a reason for hiding this comment

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

it's fixed in latest version

bugfix2: offsetWriter may be closed before export all message;
@carlvine500
Copy link
Contributor Author

@mxsm @ferrirW please check it again .

Copy link

This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR.

@github-actions github-actions bot added the stale label Aug 15, 2024
Copy link

This PR was closed because it has been inactive for 3 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add exportMessage and importMessage command for easy edit file
4 participants