-
Notifications
You must be signed in to change notification settings - Fork 525
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
[skipci]feat: [curve/toos-v2] add bs list dir #2082
Conversation
I'm trying to implement this cmd refer to
To get the dir info I use type FileInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id *uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
FileName *string `protobuf:"bytes,2,opt,name=fileName" json:"fileName,omitempty"`
ParentId *uint64 `protobuf:"varint,3,opt,name=parentId" json:"parentId,omitempty"`
FileType *FileType `protobuf:"varint,4,opt,name=fileType,enum=curve.mds.FileType" json:"fileType,omitempty"`
Owner *string `protobuf:"bytes,5,opt,name=owner" json:"owner,omitempty"`
ChunkSize *uint32 `protobuf:"varint,6,opt,name=chunkSize" json:"chunkSize,omitempty"`
SegmentSize *uint32 `protobuf:"varint,7,opt,name=segmentSize" json:"segmentSize,omitempty"`
Length *uint64 `protobuf:"varint,8,opt,name=length" json:"length,omitempty"`
Ctime *uint64 `protobuf:"varint,9,opt,name=ctime" json:"ctime,omitempty"`
SeqNum *uint64 `protobuf:"varint,10,opt,name=seqNum" json:"seqNum,omitempty"`
FileStatus *FileStatus `protobuf:"varint,11,opt,name=fileStatus,enum=curve.mds.FileStatus" json:"fileStatus,omitempty"`
//用于文件转移到回收站的情况下恢复场景下的使用,
//RecycleBin(回收站)目录下使用/其他场景下不使用
OriginalFullPathName *string `protobuf:"bytes,12,opt,name=originalFullPathName" json:"originalFullPathName,omitempty"`
// cloneSource 当前用于存放克隆源(当前主要用于curvefs)
// 后期可以考虑存放 s3相关信息
CloneSource *string `protobuf:"bytes,13,opt,name=cloneSource" json:"cloneSource,omitempty"`
// cloneLength 克隆源文件的长度,用于clone过程中进行extent
CloneLength *uint64 `protobuf:"varint,14,opt,name=cloneLength" json:"cloneLength,omitempty"`
StripeUnit *uint64 `protobuf:"varint,15,opt,name=stripeUnit" json:"stripeUnit,omitempty"`
StripeCount *uint64 `protobuf:"varint,16,opt,name=stripeCount" json:"stripeCount,omitempty"`
ThrottleParams *FileThrottleParams `protobuf:"bytes,17,opt,name=throttleParams" json:"throttleParams,omitempty"`
Epoch *uint64 `protobuf:"varint,18,opt,name=epoch" json:"epoch,omitempty"`
} I was confused in Maybe I should call Any other comments on my code are welcome, many thanks. |
|
PLS add some output, let's see the result. |
Agree. I'm working on it. When it works as expected, I'll complete the output. thx. |
Yep, you need to add the corresponding command |
Yes,call curve/src/tools/namespace_tool.cpp Line 213 in f856f13
GetFileSize like curve/src/tools/namespace_tool.cpp Line 198 in f856f13
|
PTAL @Cyber-SiKu @ilixiaocui 👀 |
7266dc4
to
00de601
Compare
Done.
|
Signed-off-by: Sindweller <sindweller5530@gmail.com>
What problem does this PR solve?
Issue Number: #2038
Problem Summary:
What is changed and how it works?
What's Changed:
support list dir command in curve tool
How it Works:
curve bs list dir --dir /
Side effects(Breaking backward compatibility? Performance regression?):
Check List