feat(shardnode): define ShardStats with proto

with #22357426

Signed-off-by: xiejian <xiejian3@oppo.com>
This commit is contained in:
xiejian 2024-08-20 16:55:59 +08:00 committed by slasher
parent 64dbd0d4eb
commit 1b7b582fd1
4 changed files with 569 additions and 84 deletions

View File

@ -17,24 +17,10 @@ package shardnode
import (
"context"
"github.com/cubefs/cubefs/blobstore/common/raft"
"github.com/cubefs/cubefs/blobstore/common/sharding"
"github.com/cubefs/cubefs/blobstore/api/clustermgr"
"github.com/cubefs/cubefs/blobstore/common/proto"
)
type ShardStats struct {
Suid proto.Suid
AppliedIndex uint64
LeaderIdx uint32
RouteVersion proto.RouteVersion
Range sharding.Range
Units []clustermgr.ShardUnit
Learner bool
RaftStat raft.Stat
}
func (c *Client) AddShard(ctx context.Context, host string, args AddShardArgs) error {
return nil
}

View File

@ -9,6 +9,7 @@ import (
github_com_cubefs_cubefs_blobstore_common_codemode "github.com/cubefs/cubefs/blobstore/common/codemode"
github_com_cubefs_cubefs_blobstore_common_proto "github.com/cubefs/cubefs/blobstore/common/proto"
proto1 "github.com/cubefs/cubefs/blobstore/common/proto"
raft "github.com/cubefs/cubefs/blobstore/common/raft"
sharding "github.com/cubefs/cubefs/blobstore/common/sharding"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
@ -1717,6 +1718,109 @@ func (m *SealBlobRet) XXX_DiscardUnknown() {
var xxx_messageInfo_SealBlobRet proto.InternalMessageInfo
type ShardStats struct {
Suid github_com_cubefs_cubefs_blobstore_common_proto.Suid `protobuf:"varint,1,opt,name=suid,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.Suid" json:"suid,omitempty"`
AppliedIndex uint64 `protobuf:"varint,2,opt,name=applied_index,json=appliedIndex,proto3" json:"applied_index,omitempty"`
LeaderIdx uint32 `protobuf:"varint,3,opt,name=leader_idx,json=leaderIdx,proto3" json:"leader_idx,omitempty"`
RouteVersion github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion `protobuf:"varint,4,opt,name=route_version,json=routeVersion,proto3,casttype=github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion" json:"route_version,omitempty"`
Range sharding.Range `protobuf:"bytes,5,opt,name=range,proto3" json:"range"`
Units []clustermgr.ShardUnit `protobuf:"bytes,6,rep,name=units,proto3" json:"units"`
Learner bool `protobuf:"varint,7,opt,name=learner,proto3" json:"learner,omitempty"`
RaftStat raft.Stat `protobuf:"bytes,8,opt,name=raftStat,proto3" json:"raftStat"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ShardStats) Reset() { *m = ShardStats{} }
func (m *ShardStats) String() string { return proto.CompactTextString(m) }
func (*ShardStats) ProtoMessage() {}
func (*ShardStats) Descriptor() ([]byte, []int) {
return fileDescriptor_9d3815ca0e5f30f0, []int{31}
}
func (m *ShardStats) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ShardStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ShardStats.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ShardStats) XXX_Merge(src proto.Message) {
xxx_messageInfo_ShardStats.Merge(m, src)
}
func (m *ShardStats) XXX_Size() int {
return m.Size()
}
func (m *ShardStats) XXX_DiscardUnknown() {
xxx_messageInfo_ShardStats.DiscardUnknown(m)
}
var xxx_messageInfo_ShardStats proto.InternalMessageInfo
func (m *ShardStats) GetSuid() github_com_cubefs_cubefs_blobstore_common_proto.Suid {
if m != nil {
return m.Suid
}
return 0
}
func (m *ShardStats) GetAppliedIndex() uint64 {
if m != nil {
return m.AppliedIndex
}
return 0
}
func (m *ShardStats) GetLeaderIdx() uint32 {
if m != nil {
return m.LeaderIdx
}
return 0
}
func (m *ShardStats) GetRouteVersion() github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion {
if m != nil {
return m.RouteVersion
}
return 0
}
func (m *ShardStats) GetRange() sharding.Range {
if m != nil {
return m.Range
}
return sharding.Range{}
}
func (m *ShardStats) GetUnits() []clustermgr.ShardUnit {
if m != nil {
return m.Units
}
return nil
}
func (m *ShardStats) GetLearner() bool {
if m != nil {
return m.Learner
}
return false
}
func (m *ShardStats) GetRaftStat() raft.Stat {
if m != nil {
return m.RaftStat
}
return raft.Stat{}
}
func init() {
proto.RegisterType((*Item)(nil), "cubefs.blobstore.api.shardnode.Item")
proto.RegisterType((*Field)(nil), "cubefs.blobstore.api.shardnode.Field")
@ -1749,79 +1853,87 @@ func init() {
proto.RegisterType((*RetainBlobRet)(nil), "cubefs.blobstore.api.shardnode.RetainBlobRet")
proto.RegisterType((*SealBlobArgs)(nil), "cubefs.blobstore.api.shardnode.SealBlobArgs")
proto.RegisterType((*SealBlobRet)(nil), "cubefs.blobstore.api.shardnode.SealBlobRet")
proto.RegisterType((*ShardStats)(nil), "cubefs.blobstore.api.shardnode.ShardStats")
}
func init() { proto.RegisterFile("shardnode.proto", fileDescriptor_9d3815ca0e5f30f0) }
var fileDescriptor_9d3815ca0e5f30f0 = []byte{
// 1059 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xdd, 0x6e, 0x1b, 0x45,
0x14, 0x66, 0xed, 0xb5, 0x93, 0x1e, 0xaf, 0x13, 0xb4, 0x8a, 0x90, 0x15, 0x89, 0x6c, 0xb4, 0x80,
0x88, 0xf8, 0x59, 0x4b, 0x01, 0xc1, 0x45, 0x81, 0x26, 0x4e, 0x94, 0x62, 0xd2, 0x82, 0x98, 0xb4,
0x95, 0x40, 0x42, 0xd1, 0xda, 0x7b, 0xe2, 0x8c, 0x62, 0xef, 0x98, 0xdd, 0xd9, 0xaa, 0xe9, 0x15,
0x12, 0x17, 0x5c, 0x21, 0x9e, 0x80, 0x0b, 0x9e, 0x82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x44, 0x41, 0xfb, 0xd9, 0x02, 0x67, 0x0f, 0xc3, 0xfe, 0xb5, 0x01, 0xa3, 0xb6, 0x2d, 0x9d, 0x6a,
0xe8, 0x02, 0x6c, 0xf9, 0x14, 0x63, 0x75, 0xa8, 0x15, 0x20, 0x18, 0xca, 0xd6, 0xf2, 0x93, 0xd1,
0x8a, 0xf5, 0xf7, 0x68, 0xc5, 0xfa, 0x77, 0xb4, 0x62, 0x7d, 0xef, 0x04, 0xcd, 0x9b, 0x63, 0x77,
0x9d, 0x2a, 0x15, 0xc2, 0x47, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x1a, 0xd6, 0xcf, 0xcf,
0x10, 0x00, 0x00,
// 1178 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xdd, 0x6e, 0x1b, 0x45,
0x14, 0x66, 0xed, 0xb5, 0xe3, 0x1e, 0xdb, 0x09, 0x5a, 0x45, 0xc8, 0x8a, 0x44, 0x36, 0xda, 0x82,
0x1a, 0xf1, 0xb3, 0x96, 0x02, 0x82, 0x8b, 0x02, 0x4d, 0x1c, 0x2b, 0xc5, 0xa4, 0x05, 0xb1, 0x6e,
0x2b, 0x81, 0x84, 0xac, 0xb5, 0x67, 0xec, 0x8c, 0xb2, 0xde, 0x5d, 0x76, 0x67, 0xab, 0xa4, 0x57,
0x48, 0x5c, 0x70, 0x85, 0x78, 0x02, 0x2e, 0x78, 0x0a, 0x1e, 0x80, 0x9b, 0x5e, 0xc2, 0x0b, 0xac,
0x90, 0x1f, 0x23, 0x57, 0x68, 0xce, 0xcc, 0xae, 0xf3, 0x43, 0x9a, 0x3a, 0xd8, 0x11, 0xbd, 0xa9,
0x76, 0x8e, 0xcf, 0xcf, 0x77, 0x7e, 0xe6, 0x3b, 0xd3, 0xc0, 0x4a, 0x7c, 0xe0, 0x46, 0xc4, 0x0f,
0x08, 0xb5, 0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xc7, 0x39, 0x49, 0x6b, 0x73, 0xdd, 0xa2, 0xb7, 0xa1, 0xee, 0x86, 0xa1, 0xc7, 0x28, 0xe9,
0x31, 0x9f, 0xd0, 0x23, 0x05, 0xb2, 0xa6, 0x84, 0x1d, 0x21, 0x13, 0xec, 0xe3, 0x61, 0x2a, 0x3d,
0x46, 0x8e, 0x24, 0xf9, 0x39, 0xb7, 0xa4, 0xa4, 0x43, 0x8e, 0x2e, 0x3e, 0x64, 0xf4, 0x85, 0xfc,
0x17, 0x33, 0x7f, 0xbc, 0x95, 0xe6, 0xf1, 0x78, 0x2b, 0xff, 0xb7, 0xc7, 0x5b, 0x03, 0x96, 0x3c,
0xea, 0x46, 0x3e, 0x8d, 0x1a, 0x4b, 0x1b, 0xda, 0x66, 0xc5, 0xc9, 0x8e, 0x46, 0x1b, 0x2a, 0x91,
0x3b, 0xe4, 0xa2, 0x69, 0x8d, 0x0a, 0x22, 0xb5, 0x2e, 0x45, 0x8a, 0x7f, 0xcc, 0x11, 0x9a, 0xca,
0x79, 0x6e, 0xd9, 0x5a, 0x7b, 0x3e, 0x59, 0xd7, 0xfe, 0x9c, 0xac, 0x6b, 0x7f, 0x4f, 0xd6, 0xb5,
0x6f, 0x6b, 0x76, 0xf3, 0x6e, 0x3e, 0x6b, 0xfd, 0x32, 0x96, 0xea, 0x83, 0x7f, 0x02, 0x00, 0x00,
0xff, 0xff, 0x02, 0xaf, 0x38, 0x34, 0xf5, 0x12, 0x00, 0x00,
}
func (m *Item) Marshal() (dAtA []byte, err error) {
@ -3126,6 +3238,97 @@ func (m *SealBlobRet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *ShardStats) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ShardStats) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ShardStats) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
{
size, err := m.RaftStat.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintShardnode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x42
if m.Learner {
i--
if m.Learner {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x38
}
if len(m.Units) > 0 {
for iNdEx := len(m.Units) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Units[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintShardnode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x32
}
}
{
size, err := m.Range.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintShardnode(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x2a
if m.RouteVersion != 0 {
i = encodeVarintShardnode(dAtA, i, uint64(m.RouteVersion))
i--
dAtA[i] = 0x20
}
if m.LeaderIdx != 0 {
i = encodeVarintShardnode(dAtA, i, uint64(m.LeaderIdx))
i--
dAtA[i] = 0x18
}
if m.AppliedIndex != 0 {
i = encodeVarintShardnode(dAtA, i, uint64(m.AppliedIndex))
i--
dAtA[i] = 0x10
}
if m.Suid != 0 {
i = encodeVarintShardnode(dAtA, i, uint64(m.Suid))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintShardnode(dAtA []byte, offset int, v uint64) int {
offset -= sovShardnode(v)
base := offset
@ -3700,6 +3903,43 @@ func (m *SealBlobRet) Size() (n int) {
return n
}
func (m *ShardStats) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Suid != 0 {
n += 1 + sovShardnode(uint64(m.Suid))
}
if m.AppliedIndex != 0 {
n += 1 + sovShardnode(uint64(m.AppliedIndex))
}
if m.LeaderIdx != 0 {
n += 1 + sovShardnode(uint64(m.LeaderIdx))
}
if m.RouteVersion != 0 {
n += 1 + sovShardnode(uint64(m.RouteVersion))
}
l = m.Range.Size()
n += 1 + l + sovShardnode(uint64(l))
if len(m.Units) > 0 {
for _, e := range m.Units {
l = e.Size()
n += 1 + l + sovShardnode(uint64(l))
}
}
if m.Learner {
n += 2
}
l = m.RaftStat.Size()
n += 1 + l + sovShardnode(uint64(l))
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovShardnode(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@ -6991,6 +7231,253 @@ func (m *SealBlobRet) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *ShardStats) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShardnode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ShardStats: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ShardStats: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Suid", wireType)
}
m.Suid = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShardnode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Suid |= github_com_cubefs_cubefs_blobstore_common_proto.Suid(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field AppliedIndex", wireType)
}
m.AppliedIndex = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShardnode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.AppliedIndex |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field LeaderIdx", wireType)
}
m.LeaderIdx = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShardnode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.LeaderIdx |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field RouteVersion", wireType)
}
m.RouteVersion = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShardnode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.RouteVersion |= github_com_cubefs_cubefs_blobstore_common_proto.RouteVersion(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShardnode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthShardnode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthShardnode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Range.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Units", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShardnode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthShardnode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthShardnode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Units = append(m.Units, clustermgr.ShardUnit{})
if err := m.Units[len(m.Units)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Learner", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShardnode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Learner = bool(v != 0)
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RaftStat", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShardnode
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthShardnode
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthShardnode
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.RaftStat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipShardnode(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthShardnode
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipShardnode(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0

View File

@ -25,6 +25,7 @@ import "gogoproto/gogo.proto";
import "cubefs/blobstore/common/sharding/range.proto";
import "cubefs/blobstore/api/clustermgr/shard.proto";
import "cubefs/blobstore/common/proto/blob.proto";
import "cubefs/blobstore/common/raft/raft.proto";
message Item {
bytes id = 1 [(gogoproto.customname) = "ID"];
@ -170,4 +171,15 @@ message SealBlobArgs {
bytes name = 3;
}
message SealBlobRet {}
message SealBlobRet {}
message ShardStats {
uint64 suid = 1 [(gogoproto.customname) = "Suid", (gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.Suid"];
uint64 applied_index = 2;
uint32 leader_idx = 3;
uint64 route_version = 4 [(gogoproto.casttype) = "github.com/cubefs/cubefs/blobstore/common/proto.RouteVersion"];
cubefs.blobstore.common.sharding.Range range = 5 [(gogoproto.nullable) = false];
repeated cubefs.blobstore.api.clustermgr.ShardUnit units = 6 [(gogoproto.nullable) = false];
bool learner = 7;
cubefs.blobstore.common.raft.Stat raftStat = 8 [(gogoproto.nullable) = false];
}

View File

@ -35,7 +35,7 @@ package blobstore
// protoc -I ${current}/../ -I /usr/local/include/ -I ${current}/vendor/github.com/gogo/protobuf/ --proto_path=. --gogo_out=Mcubefs/blobstore/common/sharding/range.proto=github.com/cubefs/cubefs/blobstore/common/sharding,Mcubefs/blobstore/common/proto/blob.proto=github.com/cubefs/cubefs/blobstore/common/proto,plugins=grpc:. *.proto
// generate api/shardnode
// cd blobstore/api/shardnode
// protoc -I ${current}/../ -I /usr/local/include/ -I ${current}/vendor/github.com/gogo/protobuf/ --proto_path=. --gogo_out=Mcubefs/blobstore/common/sharding/range.proto=github.com/cubefs/cubefs/blobstore/common/sharding,Mcubefs/blobstore/api/clustermgr/shard.proto=github.com/cubefs/cubefs/blobstore/api/clustermgr,Mcubefs/blobstore/common/proto/blob.proto=github.com/cubefs/cubefs/blobstore/common/proto,plugins=grpc:. *.proto
// protoc -I ${current}/../ -I /usr/local/include/ -I ${current}/vendor/github.com/gogo/protobuf/ -I ${current}/vendor/go.etcd.io/etcd/raft/v3/ --gogo_opt=Mraftpb/raft.proto=go.etcd.io/etcd/raft/v3/raftpb *.proto --proto_path=. --gogo_out=Mcubefs/blobstore/common/sharding/range.proto=github.com/cubefs/cubefs/blobstore/common/sharding,Mcubefs/blobstore/api/clustermgr/shard.proto=github.com/cubefs/cubefs/blobstore/api/clustermgr,Mcubefs/blobstore/common/proto/blob.proto=github.com/cubefs/cubefs/blobstore/common/proto,Mcubefs/blobstore/common/raft/raft.proto=github.com/cubefs/cubefs/blobstore/common/raft,plugins=grpc:. *.proto
// generate api/clustermgr
// cd blobstore/api/clustermgr
// protoc -I ${current}/../ -I /usr/local/include/ -I ${current}/vendor/github.com/gogo/protobuf/ --proto_path=. --gogo_out=Mcubefs/blobstore/common/sharding/range.proto=github.com/cubefs/cubefs/blobstore/common/sharding,plugins=grpc:. *.proto