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

[curve tool]: implement seginfo command #2029

Closed
cw123 opened this issue Nov 4, 2022 · 6 comments
Closed

[curve tool]: implement seginfo command #2029

cw123 opened this issue Nov 4, 2022 · 6 comments
Labels
good first issue Good for newcomers tools Tool improvements

Comments

@cw123
Copy link
Contributor

cw123 commented Nov 4, 2022

Describe the feature you'd like:

we'd like to support seginfo command in curve tool

seginfo is one of the commands to list the segments info of the volume.

  • The implementation of the old tool is here:

https://github.com/opencurve/curve/blob/master/src/tools/namespace_tool.cpp#L277

  • The old command input and out put:
seginfo : list the segments info of the file

$ curve_ops_tool seginfo list --example
Example:
curve_ops_tool seginfo -mdsAddr=127.0.0.1:6666 -fileName=/test

$ curve_ops_tool seginfo -fileName=/test
logicalPoolID: 3
startOffset: 0
segmentSize: 1073741824
chunkSize: 16777216
chunks:
chunkID: 21227073, copysetID: 969
chunkID: 21227074, copysetID: 970
chunkID: 21227075, copysetID: 971
chunkID: 21227076, copysetID: 972
chunkID: 21227077, copysetID: 973
chunkID: 21227078, copysetID: 974
.......

logicalPoolID: 2
startOffset: 1073741824
segmentSize: 1073741824
chunkSize: 16777216
chunks:
chunkID: 21227201, copysetID: 5518
chunkID: 21227202, copysetID: 5519
chunkID: 21227203, copysetID: 5520
chunkID: 21227204, copysetID: 5521
chunkID: 21227205, copysetID: 5522
.......
  • The new command we want:
curve bs seginfo /curvebs-file-name

Teachability, Documentation, Adoption, Migration Strategy:

Refer to tool develop guide to get start, and paste the result of the command in pr.

Build compilation environment:https://github.com/opencurve/curve/blob/master/docs/cn/build_and_run.md

@cw123
Copy link
Contributor Author

cw123 commented Nov 4, 2022

The old output format is inconvenient to read. Need to improve the presentation of results in new tools

@zhanghuidinah
Copy link
Member

/assign @wudong5

@ilixiaocui
Copy link
Contributor

Please note that the code submission deadline for this developer activity is December 3rd :)
@wudong5

@wuhongsong
Copy link
Contributor

you are welcome to continue the work if you are free @wudong5

@ilixiaocui
Copy link
Contributor

cc @wudong5 Since you haven't responded for a long time, this issue is reopened to others who is interested.

@Cyber-SiKu
Copy link
Contributor

#2390

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers tools Tool improvements
Projects
None yet
Development

No branches or pull requests

6 participants