shell: add command volume.move

This commit is contained in:
Chris Lu 2019-04-20 11:35:20 -07:00
parent 61720e6f75
commit 6fc1f53018
17 changed files with 727 additions and 311 deletions

View file

@ -65,7 +65,7 @@ func main() {
})
if err != nil {
log.Printf("Error VolumeTail volume %d: %v", vid, err)
log.Printf("Error VolumeTailSender volume %d: %v", vid, err)
}
}

View file

@ -22,9 +22,13 @@ func TailVolume(master string, grpcDialOption grpc.DialOption, vid needle.Volume
volumeServer := lookup.Locations[0].Url
return TailVolumeFromServer(volumeServer, grpcDialOption, vid, sinceNs, timeoutSeconds, fn)
}
func TailVolumeFromServer(volumeServer string, grpcDialOption grpc.DialOption, vid needle.VolumeId, sinceNs uint64, timeoutSeconds int, fn func(n *needle.Needle) error) error {
return WithVolumeServerClient(volumeServer, grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
stream, err := client.VolumeTail(context.Background(), &volume_server_pb.VolumeTailRequest{
stream, err := client.VolumeTailSender(context.Background(), &volume_server_pb.VolumeTailSenderRequest{
VolumeId: uint32(vid),
SinceNs: sinceNs,
DrainingSeconds: uint32(timeoutSeconds),

View file

@ -35,9 +35,9 @@ message Heartbeat {
string rack = 7;
uint32 admin_port = 8;
repeated VolumeInformationMessage volumes = 9;
// delta volume ids
repeated uint32 new_vids = 10;
repeated uint32 deleted_vids = 11;
// delta volumes
repeated VolumeShortInformationMessage new_volumes = 10;
repeated VolumeShortInformationMessage deleted_volumes = 11;
}
message HeartbeatResponse {
@ -59,6 +59,13 @@ message VolumeInformationMessage {
uint32 compact_revision = 11;
}
message VolumeShortInformationMessage {
uint32 id = 1;
string collection = 3;
uint32 replica_placement = 8;
uint32 ttl = 10;
}
message Empty {
}

View file

@ -12,6 +12,7 @@ It has these top-level messages:
Heartbeat
HeartbeatResponse
VolumeInformationMessage
VolumeShortInformationMessage
Empty
SuperBlockExtra
ClientListenRequest
@ -68,9 +69,9 @@ type Heartbeat struct {
Rack string `protobuf:"bytes,7,opt,name=rack" json:"rack,omitempty"`
AdminPort uint32 `protobuf:"varint,8,opt,name=admin_port,json=adminPort" json:"admin_port,omitempty"`
Volumes []*VolumeInformationMessage `protobuf:"bytes,9,rep,name=volumes" json:"volumes,omitempty"`
// delta volume ids
NewVids []uint32 `protobuf:"varint,10,rep,packed,name=new_vids,json=newVids" json:"new_vids,omitempty"`
DeletedVids []uint32 `protobuf:"varint,11,rep,packed,name=deleted_vids,json=deletedVids" json:"deleted_vids,omitempty"`
// delta volumes
NewVolumes []*VolumeShortInformationMessage `protobuf:"bytes,10,rep,name=new_volumes,json=newVolumes" json:"new_volumes,omitempty"`
DeletedVolumes []*VolumeShortInformationMessage `protobuf:"bytes,11,rep,name=deleted_volumes,json=deletedVolumes" json:"deleted_volumes,omitempty"`
}
func (m *Heartbeat) Reset() { *m = Heartbeat{} }
@ -141,16 +142,16 @@ func (m *Heartbeat) GetVolumes() []*VolumeInformationMessage {
return nil
}
func (m *Heartbeat) GetNewVids() []uint32 {
func (m *Heartbeat) GetNewVolumes() []*VolumeShortInformationMessage {
if m != nil {
return m.NewVids
return m.NewVolumes
}
return nil
}
func (m *Heartbeat) GetDeletedVids() []uint32 {
func (m *Heartbeat) GetDeletedVolumes() []*VolumeShortInformationMessage {
if m != nil {
return m.DeletedVids
return m.DeletedVolumes
}
return nil
}
@ -275,13 +276,53 @@ func (m *VolumeInformationMessage) GetCompactRevision() uint32 {
return 0
}
type VolumeShortInformationMessage struct {
Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
Collection string `protobuf:"bytes,3,opt,name=collection" json:"collection,omitempty"`
ReplicaPlacement uint32 `protobuf:"varint,8,opt,name=replica_placement,json=replicaPlacement" json:"replica_placement,omitempty"`
Ttl uint32 `protobuf:"varint,10,opt,name=ttl" json:"ttl,omitempty"`
}
func (m *VolumeShortInformationMessage) Reset() { *m = VolumeShortInformationMessage{} }
func (m *VolumeShortInformationMessage) String() string { return proto.CompactTextString(m) }
func (*VolumeShortInformationMessage) ProtoMessage() {}
func (*VolumeShortInformationMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *VolumeShortInformationMessage) GetId() uint32 {
if m != nil {
return m.Id
}
return 0
}
func (m *VolumeShortInformationMessage) GetCollection() string {
if m != nil {
return m.Collection
}
return ""
}
func (m *VolumeShortInformationMessage) GetReplicaPlacement() uint32 {
if m != nil {
return m.ReplicaPlacement
}
return 0
}
func (m *VolumeShortInformationMessage) GetTtl() uint32 {
if m != nil {
return m.Ttl
}
return 0
}
type Empty struct {
}
func (m *Empty) Reset() { *m = Empty{} }
func (m *Empty) String() string { return proto.CompactTextString(m) }
func (*Empty) ProtoMessage() {}
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
type SuperBlockExtra struct {
ErasureCoding *SuperBlockExtra_ErasureCoding `protobuf:"bytes,1,opt,name=erasure_coding,json=erasureCoding" json:"erasure_coding,omitempty"`
@ -290,7 +331,7 @@ type SuperBlockExtra struct {
func (m *SuperBlockExtra) Reset() { *m = SuperBlockExtra{} }
func (m *SuperBlockExtra) String() string { return proto.CompactTextString(m) }
func (*SuperBlockExtra) ProtoMessage() {}
func (*SuperBlockExtra) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (*SuperBlockExtra) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *SuperBlockExtra) GetErasureCoding() *SuperBlockExtra_ErasureCoding {
if m != nil {
@ -309,7 +350,7 @@ func (m *SuperBlockExtra_ErasureCoding) Reset() { *m = SuperBlockExtra_E
func (m *SuperBlockExtra_ErasureCoding) String() string { return proto.CompactTextString(m) }
func (*SuperBlockExtra_ErasureCoding) ProtoMessage() {}
func (*SuperBlockExtra_ErasureCoding) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{4, 0}
return fileDescriptor0, []int{5, 0}
}
func (m *SuperBlockExtra_ErasureCoding) GetData() uint32 {
@ -340,7 +381,7 @@ type ClientListenRequest struct {
func (m *ClientListenRequest) Reset() { *m = ClientListenRequest{} }
func (m *ClientListenRequest) String() string { return proto.CompactTextString(m) }
func (*ClientListenRequest) ProtoMessage() {}
func (*ClientListenRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (*ClientListenRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *ClientListenRequest) GetName() string {
if m != nil {
@ -359,7 +400,7 @@ type VolumeLocation struct {
func (m *VolumeLocation) Reset() { *m = VolumeLocation{} }
func (m *VolumeLocation) String() string { return proto.CompactTextString(m) }
func (*VolumeLocation) ProtoMessage() {}
func (*VolumeLocation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (*VolumeLocation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *VolumeLocation) GetUrl() string {
if m != nil {
@ -397,7 +438,7 @@ type LookupVolumeRequest struct {
func (m *LookupVolumeRequest) Reset() { *m = LookupVolumeRequest{} }
func (m *LookupVolumeRequest) String() string { return proto.CompactTextString(m) }
func (*LookupVolumeRequest) ProtoMessage() {}
func (*LookupVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (*LookupVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *LookupVolumeRequest) GetVolumeIds() []string {
if m != nil {
@ -420,7 +461,7 @@ type LookupVolumeResponse struct {
func (m *LookupVolumeResponse) Reset() { *m = LookupVolumeResponse{} }
func (m *LookupVolumeResponse) String() string { return proto.CompactTextString(m) }
func (*LookupVolumeResponse) ProtoMessage() {}
func (*LookupVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (*LookupVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *LookupVolumeResponse) GetVolumeIdLocations() []*LookupVolumeResponse_VolumeIdLocation {
if m != nil {
@ -439,7 +480,7 @@ func (m *LookupVolumeResponse_VolumeIdLocation) Reset() { *m = LookupVol
func (m *LookupVolumeResponse_VolumeIdLocation) String() string { return proto.CompactTextString(m) }
func (*LookupVolumeResponse_VolumeIdLocation) ProtoMessage() {}
func (*LookupVolumeResponse_VolumeIdLocation) Descriptor() ([]byte, []int) {
return fileDescriptor0, []int{8, 0}
return fileDescriptor0, []int{9, 0}
}
func (m *LookupVolumeResponse_VolumeIdLocation) GetVolumeId() string {
@ -471,7 +512,7 @@ type Location struct {
func (m *Location) Reset() { *m = Location{} }
func (m *Location) String() string { return proto.CompactTextString(m) }
func (*Location) ProtoMessage() {}
func (*Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (*Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *Location) GetUrl() string {
if m != nil {
@ -500,7 +541,7 @@ type AssignRequest struct {
func (m *AssignRequest) Reset() { *m = AssignRequest{} }
func (m *AssignRequest) String() string { return proto.CompactTextString(m) }
func (*AssignRequest) ProtoMessage() {}
func (*AssignRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (*AssignRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *AssignRequest) GetCount() uint64 {
if m != nil {
@ -563,7 +604,7 @@ type AssignResponse struct {
func (m *AssignResponse) Reset() { *m = AssignResponse{} }
func (m *AssignResponse) String() string { return proto.CompactTextString(m) }
func (*AssignResponse) ProtoMessage() {}
func (*AssignResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (*AssignResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
func (m *AssignResponse) GetFid() string {
if m != nil {
@ -616,7 +657,7 @@ type StatisticsRequest struct {
func (m *StatisticsRequest) Reset() { *m = StatisticsRequest{} }
func (m *StatisticsRequest) String() string { return proto.CompactTextString(m) }
func (*StatisticsRequest) ProtoMessage() {}
func (*StatisticsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
func (*StatisticsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
func (m *StatisticsRequest) GetReplication() string {
if m != nil {
@ -651,7 +692,7 @@ type StatisticsResponse struct {
func (m *StatisticsResponse) Reset() { *m = StatisticsResponse{} }
func (m *StatisticsResponse) String() string { return proto.CompactTextString(m) }
func (*StatisticsResponse) ProtoMessage() {}
func (*StatisticsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
func (*StatisticsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
func (m *StatisticsResponse) GetReplication() string {
if m != nil {
@ -703,7 +744,7 @@ type StorageType struct {
func (m *StorageType) Reset() { *m = StorageType{} }
func (m *StorageType) String() string { return proto.CompactTextString(m) }
func (*StorageType) ProtoMessage() {}
func (*StorageType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
func (*StorageType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
func (m *StorageType) GetReplication() string {
if m != nil {
@ -726,7 +767,7 @@ type Collection struct {
func (m *Collection) Reset() { *m = Collection{} }
func (m *Collection) String() string { return proto.CompactTextString(m) }
func (*Collection) ProtoMessage() {}
func (*Collection) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} }
func (*Collection) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
func (m *Collection) GetName() string {
if m != nil {
@ -741,7 +782,7 @@ type CollectionListRequest struct {
func (m *CollectionListRequest) Reset() { *m = CollectionListRequest{} }
func (m *CollectionListRequest) String() string { return proto.CompactTextString(m) }
func (*CollectionListRequest) ProtoMessage() {}
func (*CollectionListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} }
func (*CollectionListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
type CollectionListResponse struct {
Collections []*Collection `protobuf:"bytes,1,rep,name=collections" json:"collections,omitempty"`
@ -750,7 +791,7 @@ type CollectionListResponse struct {
func (m *CollectionListResponse) Reset() { *m = CollectionListResponse{} }
func (m *CollectionListResponse) String() string { return proto.CompactTextString(m) }
func (*CollectionListResponse) ProtoMessage() {}
func (*CollectionListResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} }
func (*CollectionListResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
func (m *CollectionListResponse) GetCollections() []*Collection {
if m != nil {
@ -766,7 +807,7 @@ type CollectionDeleteRequest struct {
func (m *CollectionDeleteRequest) Reset() { *m = CollectionDeleteRequest{} }
func (m *CollectionDeleteRequest) String() string { return proto.CompactTextString(m) }
func (*CollectionDeleteRequest) ProtoMessage() {}
func (*CollectionDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} }
func (*CollectionDeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
func (m *CollectionDeleteRequest) GetName() string {
if m != nil {
@ -781,7 +822,7 @@ type CollectionDeleteResponse struct {
func (m *CollectionDeleteResponse) Reset() { *m = CollectionDeleteResponse{} }
func (m *CollectionDeleteResponse) String() string { return proto.CompactTextString(m) }
func (*CollectionDeleteResponse) ProtoMessage() {}
func (*CollectionDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} }
func (*CollectionDeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
//
// volume related
@ -798,7 +839,7 @@ type DataNodeInfo struct {
func (m *DataNodeInfo) Reset() { *m = DataNodeInfo{} }
func (m *DataNodeInfo) String() string { return proto.CompactTextString(m) }
func (*DataNodeInfo) ProtoMessage() {}
func (*DataNodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} }
func (*DataNodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }
func (m *DataNodeInfo) GetId() string {
if m != nil {
@ -854,7 +895,7 @@ type RackInfo struct {
func (m *RackInfo) Reset() { *m = RackInfo{} }
func (m *RackInfo) String() string { return proto.CompactTextString(m) }
func (*RackInfo) ProtoMessage() {}
func (*RackInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} }
func (*RackInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }
func (m *RackInfo) GetId() string {
if m != nil {
@ -910,7 +951,7 @@ type DataCenterInfo struct {
func (m *DataCenterInfo) Reset() { *m = DataCenterInfo{} }
func (m *DataCenterInfo) String() string { return proto.CompactTextString(m) }
func (*DataCenterInfo) ProtoMessage() {}
func (*DataCenterInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} }
func (*DataCenterInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }
func (m *DataCenterInfo) GetId() string {
if m != nil {
@ -966,7 +1007,7 @@ type TopologyInfo struct {
func (m *TopologyInfo) Reset() { *m = TopologyInfo{} }
func (m *TopologyInfo) String() string { return proto.CompactTextString(m) }
func (*TopologyInfo) ProtoMessage() {}
func (*TopologyInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} }
func (*TopologyInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }
func (m *TopologyInfo) GetId() string {
if m != nil {
@ -1016,7 +1057,7 @@ type VolumeListRequest struct {
func (m *VolumeListRequest) Reset() { *m = VolumeListRequest{} }
func (m *VolumeListRequest) String() string { return proto.CompactTextString(m) }
func (*VolumeListRequest) ProtoMessage() {}
func (*VolumeListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} }
func (*VolumeListRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} }
type VolumeListResponse struct {
TopologyInfo *TopologyInfo `protobuf:"bytes,1,opt,name=topology_info,json=topologyInfo" json:"topology_info,omitempty"`
@ -1025,7 +1066,7 @@ type VolumeListResponse struct {
func (m *VolumeListResponse) Reset() { *m = VolumeListResponse{} }
func (m *VolumeListResponse) String() string { return proto.CompactTextString(m) }
func (*VolumeListResponse) ProtoMessage() {}
func (*VolumeListResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} }
func (*VolumeListResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} }
func (m *VolumeListResponse) GetTopologyInfo() *TopologyInfo {
if m != nil {
@ -1038,6 +1079,7 @@ func init() {
proto.RegisterType((*Heartbeat)(nil), "master_pb.Heartbeat")
proto.RegisterType((*HeartbeatResponse)(nil), "master_pb.HeartbeatResponse")
proto.RegisterType((*VolumeInformationMessage)(nil), "master_pb.VolumeInformationMessage")
proto.RegisterType((*VolumeShortInformationMessage)(nil), "master_pb.VolumeShortInformationMessage")
proto.RegisterType((*Empty)(nil), "master_pb.Empty")
proto.RegisterType((*SuperBlockExtra)(nil), "master_pb.SuperBlockExtra")
proto.RegisterType((*SuperBlockExtra_ErasureCoding)(nil), "master_pb.SuperBlockExtra.ErasureCoding")
@ -1436,94 +1478,97 @@ var _Seaweed_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("master.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 1416 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6f, 0xdc, 0x44,
0x14, 0x8f, 0xbd, 0x1f, 0x59, 0xbf, 0xfd, 0xc8, 0xee, 0x24, 0x6d, 0xdd, 0x2d, 0x6d, 0xb7, 0xee,
0x65, 0xcb, 0x47, 0x54, 0xc2, 0x81, 0x03, 0xa0, 0xaa, 0x4d, 0x53, 0x51, 0x35, 0xd0, 0xd6, 0x69,
0x8b, 0x84, 0x84, 0xcc, 0xc4, 0x7e, 0x09, 0x56, 0xbc, 0xb6, 0xb1, 0x67, 0xb7, 0xd9, 0x5e, 0xb8,
0x70, 0x44, 0x70, 0xe0, 0xff, 0xe1, 0xc2, 0x91, 0x3f, 0x85, 0x03, 0x12, 0x77, 0x24, 0x34, 0xe3,
0xb1, 0x77, 0xec, 0xdd, 0xa4, 0x15, 0x12, 0x87, 0xde, 0x3c, 0xbf, 0xf7, 0x66, 0xe6, 0xcd, 0xef,
0x7d, 0xee, 0x42, 0x67, 0x42, 0x53, 0x86, 0xc9, 0x76, 0x9c, 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 0xff, 0x06, 0x00, 0x00, 0xff, 0xff,
0x88, 0xac, 0x76, 0x9c, 0x27, 0x11, 0x00, 0x00,
// 1457 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6e, 0xdb, 0x46,
0x10, 0x36, 0x29, 0x59, 0x96, 0x46, 0x96, 0x2c, 0xad, 0x9d, 0x84, 0x51, 0x9a, 0x44, 0xd9, 0x5c,
0x94, 0xfe, 0x18, 0xa9, 0x7b, 0xe8, 0xa1, 0x2d, 0x82, 0xc4, 0x71, 0x50, 0x23, 0x6e, 0x93, 0x50,
0x49, 0x0a, 0x14, 0x28, 0xd8, 0x35, 0xb9, 0x76, 0x08, 0x53, 0x24, 0x4b, 0xae, 0x1c, 0x2b, 0x97,
0x5e, 0x7a, 0x2c, 0xd2, 0x43, 0xdf, 0xa7, 0x97, 0x1e, 0xf3, 0x30, 0x05, 0x7a, 0x2f, 0x50, 0xec,
0x0f, 0xc9, 0x25, 0x25, 0xdb, 0x49, 0x81, 0x1e, 0x72, 0xdb, 0x9d, 0x99, 0x9d, 0x9d, 0xfd, 0x66,
0xf8, 0xcd, 0x48, 0xb0, 0x3a, 0x21, 0x29, 0xa3, 0xc9, 0x66, 0x9c, 0x44, 0x2c, 0x42, 0x2d, 0xb9,
0x73, 0xe2, 0x7d, 0xfc, 0xa6, 0x06, 0xad, 0xaf, 0x29, 0x49, 0xd8, 0x3e, 0x25, 0x0c, 0x75, 0xc1,
0xf4, 0x63, 0xcb, 0x18, 0x1a, 0xa3, 0x96, 0x6d, 0xfa, 0x31, 0x42, 0x50, 0x8f, 0xa3, 0x84, 0x59,
0xe6, 0xd0, 0x18, 0x75, 0x6c, 0xb1, 0x46, 0x57, 0x01, 0xe2, 0xe9, 0x7e, 0xe0, 0xbb, 0xce, 0x34,
0x09, 0xac, 0x9a, 0xb0, 0x6d, 0x49, 0xc9, 0xb3, 0x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, 0xa1, 0x6e, 0x67, 0x9f, 0xb4, 0xef, 0xa5, 0xf8, 0x29, 0xac, 0xef, 0x45, 0xd1, 0xd1,
0x34, 0x96, 0x61, 0x64, 0xb1, 0x96, 0x5f, 0x68, 0x0c, 0x6b, 0xfc, 0xce, 0xfc, 0x85, 0x95, 0x52,
0x30, 0xab, 0xa5, 0x80, 0xff, 0x36, 0x60, 0xa3, 0xec, 0x56, 0x31, 0xc5, 0x8f, 0xb0, 0x9e, 0xfb,
0x75, 0x02, 0xf5, 0x66, 0x79, 0x41, 0x7b, 0xeb, 0xb6, 0x96, 0xcc, 0x45, 0xa7, 0x33, 0xf2, 0xf4,
0x32, 0xb0, 0xec, 0xfe, 0x71, 0x45, 0x92, 0x0e, 0x4e, 0xa0, 0x57, 0x35, 0xe3, 0x1f, 0x63, 0x7e,
0xab, 0x42, 0xb6, 0x99, 0x9d, 0x44, 0x9f, 0x42, 0xab, 0x08, 0xc4, 0x14, 0x81, 0xac, 0x97, 0x02,
0x51, 0x77, 0x15, 0x56, 0x68, 0x03, 0x96, 0x69, 0x92, 0x44, 0x19, 0x89, 0xc9, 0x0d, 0xfe, 0x02,
0x9a, 0xff, 0x39, 0x8b, 0xf8, 0x8d, 0x01, 0x9d, 0xbb, 0x69, 0xea, 0x1f, 0xe6, 0xe5, 0xb2, 0x01,
0xcb, 0x92, 0x62, 0x24, 0x95, 0xca, 0x0d, 0x1a, 0x42, 0x5b, 0x7d, 0x4b, 0x1a, 0xf4, 0xba, 0xe8,
0xdc, 0xcf, 0x54, 0x7d, 0x79, 0x75, 0x19, 0x1a, 0x67, 0x8d, 0x4a, 0x13, 0x5c, 0x3e, 0xb5, 0x09,
0x36, 0xb4, 0x26, 0x78, 0x05, 0x5a, 0xe2, 0x50, 0x18, 0x79, 0x54, 0x75, 0xc7, 0x26, 0x17, 0x7c,
0x1b, 0x79, 0x14, 0xff, 0x6e, 0x40, 0x37, 0x7b, 0x8d, 0xca, 0x7c, 0x0f, 0x6a, 0x07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xcb, 0xb0,
0x32, 0xa6, 0xe4, 0x25, 0xa5, 0x1e, 0xda, 0x85, 0xce, 0x98, 0x86, 0x5e, 0xf1, 0xb3, 0x7b, 0x43,
0xf3, 0x91, 0x4b, 0x07, 0x1f, 0x2c, 0x92, 0xe6, 0x1c, 0xb7, 0x34, 0x32, 0x6e, 0x1b, 0xe8, 0x31,
0x74, 0x1e, 0x52, 0x1a, 0x6f, 0x47, 0x61, 0x48, 0x5d, 0x46, 0x3d, 0x74, 0x4d, 0x67, 0xda, 0xf9,
0x31, 0x77, 0x70, 0x79, 0x8e, 0x3a, 0xb2, 0xa9, 0x48, 0x79, 0x7c, 0x02, 0xab, 0xfa, 0x74, 0x57,
0x72, 0xb8, 0x60, 0x16, 0x1d, 0x5c, 0x3f, 0x67, 0x2c, 0xc4, 0x4b, 0xe8, 0x0e, 0x34, 0xe4, 0xb8,
0x81, 0x2c, 0xcd, 0xb8, 0x34, 0x4f, 0x95, 0xe2, 0x2a, 0xcf, 0x26, 0x78, 0x09, 0x3d, 0x04, 0x28,
0x1a, 0x36, 0xd2, 0x71, 0x99, 0x9b, 0x18, 0x06, 0x57, 0x4f, 0xd1, 0xe6, 0xce, 0xbe, 0x83, 0x6e,
0xb9, 0x75, 0xa1, 0xe1, 0xc2, 0xee, 0xa4, 0x55, 0xc4, 0xe0, 0xc6, 0x19, 0x16, 0xb9, 0xe3, 0x1f,
0xa0, 0x57, 0xed, 0x48, 0x08, 0x2f, 0x3c, 0x58, 0xea, 0x6e, 0x83, 0x9b, 0x67, 0xda, 0xe8, 0x20,
0x14, 0x55, 0x59, 0x02, 0x61, 0xae, 0x82, 0x4b, 0x20, 0xcc, 0x97, 0x32, 0x5e, 0xda, 0x6f, 0x88,
0x3f, 0x82, 0x3e, 0xfb, 0x37, 0x00, 0x00, 0xff, 0xff, 0xcd, 0x41, 0x9f, 0x9c, 0x18, 0x12, 0x00,
0x00,
}

View file

@ -42,7 +42,9 @@ service VolumeServer {
rpc CopyFile (CopyFileRequest) returns (stream CopyFileResponse) {
}
rpc VolumeTail (VolumeTailRequest) returns (stream VolumeTailResponse) {
rpc VolumeTailSender (VolumeTailSenderRequest) returns (stream VolumeTailSenderResponse) {
}
rpc VolumeTailReceiver (VolumeTailReceiverRequest) returns (VolumeTailReceiverResponse) {
}
}
@ -169,17 +171,26 @@ message CopyFileResponse {
bytes file_content = 1;
}
message VolumeTailRequest {
message VolumeTailSenderRequest {
uint32 volume_id = 1;
uint64 since_ns = 2;
uint32 drainingSeconds = 3;
}
message VolumeTailResponse {
message VolumeTailSenderResponse {
bytes needle_header = 1;
bytes needle_body = 2;
bool is_last_chunk = 3;
}
message VolumeTailReceiverRequest {
uint32 volume_id = 1;
uint64 since_ns = 2;
uint32 drainingSeconds = 3;
string source_volume_server = 4;
}
message VolumeTailReceiverResponse {
}
message ReadVolumeFileStatusRequest {
uint32 volume_id = 1;
}
@ -191,6 +202,7 @@ message ReadVolumeFileStatusResponse {
uint64 dat_file_size = 5;
uint64 file_count = 6;
uint32 compaction_revision = 7;
string collection = 8;
}
message DiskStatus {

View file

@ -39,8 +39,10 @@ It has these top-level messages:
VolumeCopyResponse
CopyFileRequest
CopyFileResponse
VolumeTailRequest
VolumeTailResponse
VolumeTailSenderRequest
VolumeTailSenderResponse
VolumeTailReceiverRequest
VolumeTailReceiverResponse
ReadVolumeFileStatusRequest
ReadVolumeFileStatusResponse
DiskStatus
@ -660,70 +662,118 @@ func (m *CopyFileResponse) GetFileContent() []byte {
return nil
}
type VolumeTailRequest struct {
type VolumeTailSenderRequest struct {
VolumeId uint32 `protobuf:"varint,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"`
SinceNs uint64 `protobuf:"varint,2,opt,name=since_ns,json=sinceNs" json:"since_ns,omitempty"`
DrainingSeconds uint32 `protobuf:"varint,3,opt,name=drainingSeconds" json:"drainingSeconds,omitempty"`
}
func (m *VolumeTailRequest) Reset() { *m = VolumeTailRequest{} }
func (m *VolumeTailRequest) String() string { return proto.CompactTextString(m) }
func (*VolumeTailRequest) ProtoMessage() {}
func (*VolumeTailRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} }
func (m *VolumeTailSenderRequest) Reset() { *m = VolumeTailSenderRequest{} }
func (m *VolumeTailSenderRequest) String() string { return proto.CompactTextString(m) }
func (*VolumeTailSenderRequest) ProtoMessage() {}
func (*VolumeTailSenderRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} }
func (m *VolumeTailRequest) GetVolumeId() uint32 {
func (m *VolumeTailSenderRequest) GetVolumeId() uint32 {
if m != nil {
return m.VolumeId
}
return 0
}
func (m *VolumeTailRequest) GetSinceNs() uint64 {
func (m *VolumeTailSenderRequest) GetSinceNs() uint64 {
if m != nil {
return m.SinceNs
}
return 0
}
func (m *VolumeTailRequest) GetDrainingSeconds() uint32 {
func (m *VolumeTailSenderRequest) GetDrainingSeconds() uint32 {
if m != nil {
return m.DrainingSeconds
}
return 0
}
type VolumeTailResponse struct {
type VolumeTailSenderResponse struct {
NeedleHeader []byte `protobuf:"bytes,1,opt,name=needle_header,json=needleHeader,proto3" json:"needle_header,omitempty"`
NeedleBody []byte `protobuf:"bytes,2,opt,name=needle_body,json=needleBody,proto3" json:"needle_body,omitempty"`
IsLastChunk bool `protobuf:"varint,3,opt,name=is_last_chunk,json=isLastChunk" json:"is_last_chunk,omitempty"`
}
func (m *VolumeTailResponse) Reset() { *m = VolumeTailResponse{} }
func (m *VolumeTailResponse) String() string { return proto.CompactTextString(m) }
func (*VolumeTailResponse) ProtoMessage() {}
func (*VolumeTailResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} }
func (m *VolumeTailSenderResponse) Reset() { *m = VolumeTailSenderResponse{} }
func (m *VolumeTailSenderResponse) String() string { return proto.CompactTextString(m) }
func (*VolumeTailSenderResponse) ProtoMessage() {}
func (*VolumeTailSenderResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} }
func (m *VolumeTailResponse) GetNeedleHeader() []byte {
func (m *VolumeTailSenderResponse) GetNeedleHeader() []byte {
if m != nil {
return m.NeedleHeader
}
return nil
}
func (m *VolumeTailResponse) GetNeedleBody() []byte {
func (m *VolumeTailSenderResponse) GetNeedleBody() []byte {
if m != nil {
return m.NeedleBody
}
return nil
}
func (m *VolumeTailResponse) GetIsLastChunk() bool {
func (m *VolumeTailSenderResponse) GetIsLastChunk() bool {
if m != nil {
return m.IsLastChunk
}
return false
}
type VolumeTailReceiverRequest struct {
VolumeId uint32 `protobuf:"varint,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"`
SinceNs uint64 `protobuf:"varint,2,opt,name=since_ns,json=sinceNs" json:"since_ns,omitempty"`
DrainingSeconds uint32 `protobuf:"varint,3,opt,name=drainingSeconds" json:"drainingSeconds,omitempty"`
SourceVolumeServer string `protobuf:"bytes,4,opt,name=source_volume_server,json=sourceVolumeServer" json:"source_volume_server,omitempty"`
}
func (m *VolumeTailReceiverRequest) Reset() { *m = VolumeTailReceiverRequest{} }
func (m *VolumeTailReceiverRequest) String() string { return proto.CompactTextString(m) }
func (*VolumeTailReceiverRequest) ProtoMessage() {}
func (*VolumeTailReceiverRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} }
func (m *VolumeTailReceiverRequest) GetVolumeId() uint32 {
if m != nil {
return m.VolumeId
}
return 0
}
func (m *VolumeTailReceiverRequest) GetSinceNs() uint64 {
if m != nil {
return m.SinceNs
}
return 0
}
func (m *VolumeTailReceiverRequest) GetDrainingSeconds() uint32 {
if m != nil {
return m.DrainingSeconds
}
return 0
}
func (m *VolumeTailReceiverRequest) GetSourceVolumeServer() string {
if m != nil {
return m.SourceVolumeServer
}
return ""
}
type VolumeTailReceiverResponse struct {
}
func (m *VolumeTailReceiverResponse) Reset() { *m = VolumeTailReceiverResponse{} }
func (m *VolumeTailReceiverResponse) String() string { return proto.CompactTextString(m) }
func (*VolumeTailReceiverResponse) ProtoMessage() {}
func (*VolumeTailReceiverResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} }
type ReadVolumeFileStatusRequest struct {
VolumeId uint32 `protobuf:"varint,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"`
}
@ -731,7 +781,7 @@ type ReadVolumeFileStatusRequest struct {
func (m *ReadVolumeFileStatusRequest) Reset() { *m = ReadVolumeFileStatusRequest{} }
func (m *ReadVolumeFileStatusRequest) String() string { return proto.CompactTextString(m) }
func (*ReadVolumeFileStatusRequest) ProtoMessage() {}
func (*ReadVolumeFileStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} }
func (*ReadVolumeFileStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} }
func (m *ReadVolumeFileStatusRequest) GetVolumeId() uint32 {
if m != nil {
@ -748,12 +798,13 @@ type ReadVolumeFileStatusResponse struct {
DatFileSize uint64 `protobuf:"varint,5,opt,name=dat_file_size,json=datFileSize" json:"dat_file_size,omitempty"`
FileCount uint64 `protobuf:"varint,6,opt,name=file_count,json=fileCount" json:"file_count,omitempty"`
CompactionRevision uint32 `protobuf:"varint,7,opt,name=compaction_revision,json=compactionRevision" json:"compaction_revision,omitempty"`
Collection string `protobuf:"bytes,8,opt,name=collection" json:"collection,omitempty"`
}
func (m *ReadVolumeFileStatusResponse) Reset() { *m = ReadVolumeFileStatusResponse{} }
func (m *ReadVolumeFileStatusResponse) String() string { return proto.CompactTextString(m) }
func (*ReadVolumeFileStatusResponse) ProtoMessage() {}
func (*ReadVolumeFileStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} }
func (*ReadVolumeFileStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} }
func (m *ReadVolumeFileStatusResponse) GetVolumeId() uint32 {
if m != nil {
@ -804,6 +855,13 @@ func (m *ReadVolumeFileStatusResponse) GetCompactionRevision() uint32 {
return 0
}
func (m *ReadVolumeFileStatusResponse) GetCollection() string {
if m != nil {
return m.Collection
}
return ""
}
type DiskStatus struct {
Dir string `protobuf:"bytes,1,opt,name=dir" json:"dir,omitempty"`
All uint64 `protobuf:"varint,2,opt,name=all" json:"all,omitempty"`
@ -814,7 +872,7 @@ type DiskStatus struct {
func (m *DiskStatus) Reset() { *m = DiskStatus{} }
func (m *DiskStatus) String() string { return proto.CompactTextString(m) }
func (*DiskStatus) ProtoMessage() {}
func (*DiskStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} }
func (*DiskStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} }
func (m *DiskStatus) GetDir() string {
if m != nil {
@ -857,7 +915,7 @@ type MemStatus struct {
func (m *MemStatus) Reset() { *m = MemStatus{} }
func (m *MemStatus) String() string { return proto.CompactTextString(m) }
func (*MemStatus) ProtoMessage() {}
func (*MemStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} }
func (*MemStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} }
func (m *MemStatus) GetGoroutines() int32 {
if m != nil {
@ -939,8 +997,10 @@ func init() {
proto.RegisterType((*VolumeCopyResponse)(nil), "volume_server_pb.VolumeCopyResponse")
proto.RegisterType((*CopyFileRequest)(nil), "volume_server_pb.CopyFileRequest")
proto.RegisterType((*CopyFileResponse)(nil), "volume_server_pb.CopyFileResponse")
proto.RegisterType((*VolumeTailRequest)(nil), "volume_server_pb.VolumeTailRequest")
proto.RegisterType((*VolumeTailResponse)(nil), "volume_server_pb.VolumeTailResponse")
proto.RegisterType((*VolumeTailSenderRequest)(nil), "volume_server_pb.VolumeTailSenderRequest")
proto.RegisterType((*VolumeTailSenderResponse)(nil), "volume_server_pb.VolumeTailSenderResponse")
proto.RegisterType((*VolumeTailReceiverRequest)(nil), "volume_server_pb.VolumeTailReceiverRequest")
proto.RegisterType((*VolumeTailReceiverResponse)(nil), "volume_server_pb.VolumeTailReceiverResponse")
proto.RegisterType((*ReadVolumeFileStatusRequest)(nil), "volume_server_pb.ReadVolumeFileStatusRequest")
proto.RegisterType((*ReadVolumeFileStatusResponse)(nil), "volume_server_pb.ReadVolumeFileStatusResponse")
proto.RegisterType((*DiskStatus)(nil), "volume_server_pb.DiskStatus")
@ -975,7 +1035,8 @@ type VolumeServerClient interface {
VolumeCopy(ctx context.Context, in *VolumeCopyRequest, opts ...grpc.CallOption) (*VolumeCopyResponse, error)
ReadVolumeFileStatus(ctx context.Context, in *ReadVolumeFileStatusRequest, opts ...grpc.CallOption) (*ReadVolumeFileStatusResponse, error)
CopyFile(ctx context.Context, in *CopyFileRequest, opts ...grpc.CallOption) (VolumeServer_CopyFileClient, error)
VolumeTail(ctx context.Context, in *VolumeTailRequest, opts ...grpc.CallOption) (VolumeServer_VolumeTailClient, error)
VolumeTailSender(ctx context.Context, in *VolumeTailSenderRequest, opts ...grpc.CallOption) (VolumeServer_VolumeTailSenderClient, error)
VolumeTailReceiver(ctx context.Context, in *VolumeTailReceiverRequest, opts ...grpc.CallOption) (*VolumeTailReceiverResponse, error)
}
type volumeServerClient struct {
@ -1167,12 +1228,12 @@ func (x *volumeServerCopyFileClient) Recv() (*CopyFileResponse, error) {
return m, nil
}
func (c *volumeServerClient) VolumeTail(ctx context.Context, in *VolumeTailRequest, opts ...grpc.CallOption) (VolumeServer_VolumeTailClient, error) {
stream, err := grpc.NewClientStream(ctx, &_VolumeServer_serviceDesc.Streams[2], c.cc, "/volume_server_pb.VolumeServer/VolumeTail", opts...)
func (c *volumeServerClient) VolumeTailSender(ctx context.Context, in *VolumeTailSenderRequest, opts ...grpc.CallOption) (VolumeServer_VolumeTailSenderClient, error) {
stream, err := grpc.NewClientStream(ctx, &_VolumeServer_serviceDesc.Streams[2], c.cc, "/volume_server_pb.VolumeServer/VolumeTailSender", opts...)
if err != nil {
return nil, err
}
x := &volumeServerVolumeTailClient{stream}
x := &volumeServerVolumeTailSenderClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
@ -1182,23 +1243,32 @@ func (c *volumeServerClient) VolumeTail(ctx context.Context, in *VolumeTailReque
return x, nil
}
type VolumeServer_VolumeTailClient interface {
Recv() (*VolumeTailResponse, error)
type VolumeServer_VolumeTailSenderClient interface {
Recv() (*VolumeTailSenderResponse, error)
grpc.ClientStream
}
type volumeServerVolumeTailClient struct {
type volumeServerVolumeTailSenderClient struct {
grpc.ClientStream
}
func (x *volumeServerVolumeTailClient) Recv() (*VolumeTailResponse, error) {
m := new(VolumeTailResponse)
func (x *volumeServerVolumeTailSenderClient) Recv() (*VolumeTailSenderResponse, error) {
m := new(VolumeTailSenderResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *volumeServerClient) VolumeTailReceiver(ctx context.Context, in *VolumeTailReceiverRequest, opts ...grpc.CallOption) (*VolumeTailReceiverResponse, error) {
out := new(VolumeTailReceiverResponse)
err := grpc.Invoke(ctx, "/volume_server_pb.VolumeServer/VolumeTailReceiver", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for VolumeServer service
type VolumeServerServer interface {
@ -1219,7 +1289,8 @@ type VolumeServerServer interface {
VolumeCopy(context.Context, *VolumeCopyRequest) (*VolumeCopyResponse, error)
ReadVolumeFileStatus(context.Context, *ReadVolumeFileStatusRequest) (*ReadVolumeFileStatusResponse, error)
CopyFile(*CopyFileRequest, VolumeServer_CopyFileServer) error
VolumeTail(*VolumeTailRequest, VolumeServer_VolumeTailServer) error
VolumeTailSender(*VolumeTailSenderRequest, VolumeServer_VolumeTailSenderServer) error
VolumeTailReceiver(context.Context, *VolumeTailReceiverRequest) (*VolumeTailReceiverResponse, error)
}
func RegisterVolumeServerServer(s *grpc.Server, srv VolumeServerServer) {
@ -1502,27 +1573,45 @@ func (x *volumeServerCopyFileServer) Send(m *CopyFileResponse) error {
return x.ServerStream.SendMsg(m)
}
func _VolumeServer_VolumeTail_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(VolumeTailRequest)
func _VolumeServer_VolumeTailSender_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(VolumeTailSenderRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(VolumeServerServer).VolumeTail(m, &volumeServerVolumeTailServer{stream})
return srv.(VolumeServerServer).VolumeTailSender(m, &volumeServerVolumeTailSenderServer{stream})
}
type VolumeServer_VolumeTailServer interface {
Send(*VolumeTailResponse) error
type VolumeServer_VolumeTailSenderServer interface {
Send(*VolumeTailSenderResponse) error
grpc.ServerStream
}
type volumeServerVolumeTailServer struct {
type volumeServerVolumeTailSenderServer struct {
grpc.ServerStream
}
func (x *volumeServerVolumeTailServer) Send(m *VolumeTailResponse) error {
func (x *volumeServerVolumeTailSenderServer) Send(m *VolumeTailSenderResponse) error {
return x.ServerStream.SendMsg(m)
}
func _VolumeServer_VolumeTailReceiver_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(VolumeTailReceiverRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VolumeServerServer).VolumeTailReceiver(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/volume_server_pb.VolumeServer/VolumeTailReceiver",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VolumeServerServer).VolumeTailReceiver(ctx, req.(*VolumeTailReceiverRequest))
}
return interceptor(ctx, in, info, handler)
}
var _VolumeServer_serviceDesc = grpc.ServiceDesc{
ServiceName: "volume_server_pb.VolumeServer",
HandlerType: (*VolumeServerServer)(nil),
@ -1579,6 +1668,10 @@ var _VolumeServer_serviceDesc = grpc.ServiceDesc{
MethodName: "ReadVolumeFileStatus",
Handler: _VolumeServer_ReadVolumeFileStatus_Handler,
},
{
MethodName: "VolumeTailReceiver",
Handler: _VolumeServer_VolumeTailReceiver_Handler,
},
},
Streams: []grpc.StreamDesc{
{
@ -1592,8 +1685,8 @@ var _VolumeServer_serviceDesc = grpc.ServiceDesc{
ServerStreams: true,
},
{
StreamName: "VolumeTail",
Handler: _VolumeServer_VolumeTail_Handler,
StreamName: "VolumeTailSender",
Handler: _VolumeServer_VolumeTailSender_Handler,
ServerStreams: true,
},
},
@ -1603,92 +1696,96 @@ var _VolumeServer_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("volume_server.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 1378 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x58, 0xdb, 0x6e, 0xd4, 0x46,
0x18, 0x8e, 0xd9, 0xcd, 0xe9, 0xdf, 0x5d, 0x08, 0x13, 0x20, 0x8b, 0x39, 0x05, 0x43, 0x61, 0x39,
0x34, 0xb4, 0xa0, 0xb6, 0xb4, 0xbd, 0x68, 0x21, 0x69, 0xd5, 0x48, 0x05, 0x24, 0x07, 0x50, 0x2b,
0x2a, 0x59, 0x13, 0x7b, 0x92, 0x8c, 0xe2, 0xf5, 0x18, 0xcf, 0x98, 0x92, 0xaa, 0xea, 0xcb, 0x54,
0xbd, 0xe9, 0x45, 0x9f, 0xa1, 0x2f, 0xd0, 0x27, 0xea, 0x4d, 0x35, 0x07, 0x7b, 0xd7, 0xa7, 0xac,
0x29, 0x77, 0xe3, 0x6f, 0xfe, 0xf3, 0xfc, 0xf3, 0xcf, 0xb7, 0x0b, 0xab, 0x6f, 0x58, 0x98, 0x8e,
0x89, 0xc7, 0x49, 0xf2, 0x86, 0x24, 0x1b, 0x71, 0xc2, 0x04, 0x43, 0x2b, 0x05, 0xd0, 0x8b, 0x77,
0x9d, 0x7b, 0x80, 0x1e, 0x63, 0xe1, 0x1f, 0x6c, 0x91, 0x90, 0x08, 0xe2, 0x92, 0xd7, 0x29, 0xe1,
0x02, 0x9d, 0x87, 0xa5, 0x3d, 0x1a, 0x12, 0x8f, 0x06, 0x7c, 0x68, 0xad, 0x77, 0x46, 0xcb, 0xee,
0xa2, 0xfc, 0xde, 0x0e, 0xb8, 0xf3, 0x0c, 0x56, 0x0b, 0x0a, 0x3c, 0x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, 0x88, 0x6e,
0x34, 0x69, 0x16, 0x49, 0xa8, 0x7d, 0x73, 0xa6, 0x5c, 0xee, 0xc3, 0xcb, 0xa6, 0x97, 0x19, 0x57,
0x8d, 0xc1, 0x15, 0xe7, 0xd5, 0x8d, 0x59, 0x62, 0xb9, 0x83, 0x1f, 0x01, 0x26, 0xec, 0x0e, 0x5d,
0x6b, 0xd2, 0x9b, 0x3e, 0x8a, 0xeb, 0xc7, 0x0b, 0xe5, 0xa6, 0x7f, 0x86, 0x33, 0x75, 0x2f, 0x39,
0xaa, 0xb9, 0x85, 0xc7, 0xd0, 0x05, 0x7b, 0xa3, 0xad, 0x78, 0xee, 0xf8, 0x05, 0x2c, 0x65, 0x6c,
0x0d, 0x5d, 0xad, 0x6a, 0x97, 0xb8, 0xa8, 0xed, 0x1c, 0x27, 0x32, 0xd5, 0x4d, 0xaf, 0xb2, 0x52,
0x49, 0x5a, 0xd5, 0x5c, 0xaa, 0x29, 0xae, 0xd7, 0x5c, 0xaa, 0x69, 0x66, 0x26, 0x8d, 0xef, 0x2e,
0xa8, 0xbf, 0xa8, 0x1e, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0x07, 0x6f, 0xca, 0x8a, 0xb9, 0x12,
0x00, 0x00,
// 1450 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x58, 0xdd, 0x6e, 0xdc, 0xc4,
0x17, 0x8f, 0xbb, 0x9b, 0xec, 0xe6, 0xec, 0x26, 0x4d, 0x27, 0x69, 0xb3, 0xd9, 0x7e, 0xa5, 0x6e,
0xff, 0xed, 0xf6, 0xe3, 0x9f, 0x96, 0x56, 0x40, 0x81, 0x0b, 0x68, 0x13, 0x10, 0x91, 0x68, 0x2b,
0x39, 0x6d, 0x05, 0x02, 0xc9, 0x9a, 0xd8, 0x27, 0x89, 0x15, 0xaf, 0xed, 0x78, 0xc6, 0xa1, 0x01,
0x2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a, 0x53, 0xaa, 0xfa,
0x47, 0x58, 0xa9, 0x7a, 0xe9, 0x49, 0x05, 0x0a, 0x4f, 0x19, 0x27, 0x86, 0x1b, 0x4d, 0xd9, 0x53,
0xc3, 0xaf, 0xa0, 0x9b, 0x8c, 0xaa, 0xe4, 0x5a, 0x59, 0xba, 0x30, 0x88, 0x0f, 0xf5, 0xd3, 0x58,
0x32, 0xd5, 0x34, 0x4e, 0x80, 0x33, 0x19, 0x26, 0xeb, 0x81, 0x53, 0x1a, 0x77, 0xeb, 0x81, 0x53,
0x9e, 0x4d, 0x85, 0xb9, 0xa3, 0x64, 0xe9, 0xc8, 0xce, 0x60, 0x95, 0x4d, 0xb6, 0x6e, 0xb4, 0xac,
0x6c, 0xb2, 0xf5, 0x63, 0xdd, 0xcc, 0xee, 0x9c, 0xf8, 0x93, 0xf0, 0xd1, 0x3f, 0x01, 0x00, 0x00,
0xff, 0xff, 0x4c, 0x2f, 0x65, 0x47, 0x3b, 0x14, 0x00, 0x00,
}

View file

@ -72,29 +72,39 @@ func (ms *MasterServer) SendHeartbeat(stream master_pb.Seaweed_SendHeartbeatServ
}
}
glog.V(1).Infof("master received heartbeat %s", heartbeat.String())
message := &master_pb.VolumeLocation{
Url: dn.Url(),
PublicUrl: dn.PublicUrl,
}
if len(heartbeat.NewVids) > 0 || len(heartbeat.DeletedVids) > 0 {
if len(heartbeat.NewVolumes) > 0 || len(heartbeat.DeletedVolumes) > 0 {
// process delta volume ids if exists for fast volume id updates
message.NewVids = append(message.NewVids, heartbeat.NewVids...)
message.DeletedVids = append(message.DeletedVids, heartbeat.DeletedVids...)
for _, volInfo := range heartbeat.NewVolumes{
message.NewVids = append(message.NewVids, volInfo.Id)
}
for _, volInfo := range heartbeat.DeletedVolumes{
message.DeletedVids = append(message.DeletedVids, volInfo.Id)
}
// update master internal volume layouts
t.IncrementalSyncDataNodeRegistration(heartbeat.NewVolumes, heartbeat.DeletedVolumes, dn)
} else {
// process heartbeat.Volumes
newVolumes, deletedVolumes := t.SyncDataNodeRegistration(heartbeat.Volumes, dn)
for _, v := range newVolumes {
glog.V(0).Infof("master see new volume %d from %s", uint32(v.Id), dn.Url())
message.NewVids = append(message.NewVids, uint32(v.Id))
}
for _, v := range deletedVolumes {
glog.V(0).Infof("master see deleted volume %d from %s", uint32(v.Id), dn.Url())
message.DeletedVids = append(message.DeletedVids, uint32(v.Id))
}
}
if len(message.NewVids) > 0 || len(message.DeletedVids) > 0 {
ms.clientChansLock.RLock()
for _, ch := range ms.clientChans {
for host, ch := range ms.clientChans {
glog.V(0).Infof("master send to %s: %s", host, message.String())
ch <- message
}
ms.clientChansLock.RUnlock()

View file

@ -97,23 +97,30 @@ func (vs *VolumeServer) doHeartbeat(ctx context.Context, masterNode, masterGrpcA
for {
select {
case vid := <-vs.store.NewVolumeIdChan:
case volumeMessage := <-vs.store.NewVolumesChan:
deltaBeat := &master_pb.Heartbeat{
NewVids: []uint32{uint32(vid)},
NewVolumes:[]*master_pb.VolumeShortInformationMessage{
&volumeMessage,
},
}
glog.V(1).Infof("volume server %s:%d adds volume %d", vs.store.Ip, vs.store.Port, volumeMessage.Id)
if err = stream.Send(deltaBeat); err != nil {
glog.V(0).Infof("Volume Server Failed to update to master %s: %v", masterNode, err)
return "", err
}
case vid := <-vs.store.DeletedVolumeIdChan:
case volumeMessage := <-vs.store.DeletedVolumesChan:
deltaBeat := &master_pb.Heartbeat{
DeletedVids: []uint32{uint32(vid)},
DeletedVolumes:[]*master_pb.VolumeShortInformationMessage{
&volumeMessage,
},
}
glog.V(1).Infof("volume server %s:%d deletes volume %d", vs.store.Ip, vs.store.Port, volumeMessage.Id)
if err = stream.Send(deltaBeat); err != nil {
glog.V(0).Infof("Volume Server Failed to update to master %s: %v", masterNode, err)
return "", err
}
case <-tickChan:
glog.V(1).Infof("volume server %s:%d heartbeat", vs.store.Ip, vs.store.Port)
if err = stream.Send(vs.store.CollectHeartbeat()); err != nil {
glog.V(0).Infof("Volume Server Failed to talk with master %s: %v", masterNode, err)
return "", err

View file

@ -19,11 +19,7 @@ func (vs *VolumeServer) VolumeCopy(ctx context.Context, req *volume_server_pb.Vo
v := vs.store.GetVolume(needle.VolumeId(req.VolumeId))
if v != nil {
// unmount the volume
err := vs.store.UnmountVolume(needle.VolumeId(req.VolumeId))
if err != nil {
return nil, fmt.Errorf("failed to unmount volume %d: %v", req.VolumeId, err)
}
return nil, fmt.Errorf("volume %d already exists", req.VolumeId)
}
location := vs.store.FindFreeLocation()
@ -31,8 +27,6 @@ func (vs *VolumeServer) VolumeCopy(ctx context.Context, req *volume_server_pb.Vo
return nil, fmt.Errorf("no space left")
}
volumeFileName := storage.VolumeFileName(req.Collection, location.Directory, int(req.VolumeId))
// the master will not start compaction for read-only volumes, so it is safe to just copy files directly
// copy .dat and .idx files
// read .idx .dat file size and timestamp
@ -40,8 +34,7 @@ func (vs *VolumeServer) VolumeCopy(ctx context.Context, req *volume_server_pb.Vo
// send .dat file
// confirm size and timestamp
var volFileInfoResp *volume_server_pb.ReadVolumeFileStatusResponse
datFileName := volumeFileName + ".dat"
idxFileName := volumeFileName + ".idx"
var volumeFileName, idxFileName, datFileName string
err := operation.WithVolumeServerClient(req.SourceDataNode, vs.grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
var err error
volFileInfoResp, err = client.ReadVolumeFileStatus(ctx,
@ -52,6 +45,8 @@ func (vs *VolumeServer) VolumeCopy(ctx context.Context, req *volume_server_pb.Vo
return fmt.Errorf("read volume file status failed, %v", err)
}
volumeFileName = storage.VolumeFileName(volFileInfoResp.Collection, location.Directory, int(req.VolumeId))
// println("source:", volFileInfoResp.String())
copyFileClient, err := client.CopyFile(ctx, &volume_server_pb.CopyFileRequest{
@ -64,6 +59,7 @@ func (vs *VolumeServer) VolumeCopy(ctx context.Context, req *volume_server_pb.Vo
return fmt.Errorf("failed to start copying volume %d idx file: %v", req.VolumeId, err)
}
idxFileName = volumeFileName + ".idx"
err = writeToFile(copyFileClient, idxFileName)
if err != nil {
return fmt.Errorf("failed to copy volume %d idx file: %v", req.VolumeId, err)
@ -79,6 +75,7 @@ func (vs *VolumeServer) VolumeCopy(ctx context.Context, req *volume_server_pb.Vo
return fmt.Errorf("failed to start copying volume %d dat file: %v", req.VolumeId, err)
}
datFileName = volumeFileName + ".dat"
err = writeToFile(copyFileClient, datFileName)
if err != nil {
return fmt.Errorf("failed to copy volume %d dat file: %v", req.VolumeId, err)
@ -86,9 +83,13 @@ func (vs *VolumeServer) VolumeCopy(ctx context.Context, req *volume_server_pb.Vo
return nil
})
if err != nil {
os.Remove(idxFileName)
os.Remove(datFileName)
if err != nil && volumeFileName != "" {
if idxFileName != "" {
os.Remove(idxFileName)
}
if datFileName != "" {
os.Remove(datFileName)
}
return nil, err
}
@ -168,6 +169,7 @@ func (vs *VolumeServer) ReadVolumeFileStatus(ctx context.Context, req *volume_se
resp.IdxFileTimestampSeconds = uint64(modTime.Unix())
resp.FileCount = v.FileCount()
resp.CompactionRevision = uint32(v.CompactionRevision)
resp.Collection = v.Collection
return resp, nil
}

View file

@ -1,16 +1,18 @@
package weed_server
import (
"context"
"fmt"
"time"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/operation"
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
"github.com/chrislusf/seaweedfs/weed/storage"
"github.com/chrislusf/seaweedfs/weed/storage/needle"
)
func (vs *VolumeServer) VolumeTail(req *volume_server_pb.VolumeTailRequest, stream volume_server_pb.VolumeServer_VolumeTailServer) error {
func (vs *VolumeServer) VolumeTailSender(req *volume_server_pb.VolumeTailSenderRequest, stream volume_server_pb.VolumeServer_VolumeTailSenderServer) error {
v := vs.store.GetVolume(needle.VolumeId(req.VolumeId))
if v == nil {
@ -50,7 +52,7 @@ func (vs *VolumeServer) VolumeTail(req *volume_server_pb.VolumeTailRequest, stre
}
func sendNeedlesSince(stream volume_server_pb.VolumeServer_VolumeTailServer, v *storage.Volume, lastTimestampNs uint64) (lastProcessedTimestampNs uint64, err error) {
func sendNeedlesSince(stream volume_server_pb.VolumeServer_VolumeTailSenderServer, v *storage.Volume, lastTimestampNs uint64) (lastProcessedTimestampNs uint64, err error) {
foundOffset, isLastOne, err := v.BinarySearchByAppendAtNs(lastTimestampNs)
if err != nil {
@ -61,7 +63,7 @@ func sendNeedlesSince(stream volume_server_pb.VolumeServer_VolumeTailServer, v *
if isLastOne {
// need to heart beat to the client to ensure the connection health
sendErr := stream.Send(&volume_server_pb.VolumeTailResponse{IsLastChunk: true})
sendErr := stream.Send(&volume_server_pb.VolumeTailSenderResponse{IsLastChunk: true})
return lastTimestampNs, sendErr
}
@ -78,7 +80,7 @@ func sendNeedlesSince(stream volume_server_pb.VolumeServer_VolumeTailServer, v *
stopOffset = len(needleBody)
}
sendErr := stream.Send(&volume_server_pb.VolumeTailResponse{
sendErr := stream.Send(&volume_server_pb.VolumeTailSenderResponse{
NeedleHeader: needleHeader,
NeedleBody: needleBody[i:stopOffset],
IsLastChunk: isLastChunk,
@ -96,3 +98,21 @@ func sendNeedlesSince(stream volume_server_pb.VolumeServer_VolumeTailServer, v *
return
}
func (vs *VolumeServer) VolumeTailReceiver(ctx context.Context, req *volume_server_pb.VolumeTailReceiverRequest) (*volume_server_pb.VolumeTailReceiverResponse, error) {
resp := &volume_server_pb.VolumeTailReceiverResponse{}
v := vs.store.GetVolume(needle.VolumeId(req.VolumeId))
if v == nil {
return resp, fmt.Errorf("receiver not found volume id %d", req.VolumeId)
}
defer glog.V(1).Infof("receive tailing volume %d finished", v.Id)
return resp, operation.TailVolumeFromServer(req.SourceVolumeServer, vs.grpcDialOption, v.Id, req.SinceNs, int(req.DrainingSeconds), func(n *needle.Needle) error {
_, err := vs.store.Write(v.Id, n)
return err
})
}

View file

@ -119,7 +119,6 @@ func (c *commandVolumeFixReplication) Do(args []string, commandEnv *commandEnv,
err := operation.WithVolumeServerClient(dst.dataNode.Id, commandEnv.option.GrpcDialOption, func(volumeServerClient volume_server_pb.VolumeServerClient) error {
_, replicateErr := volumeServerClient.VolumeCopy(ctx, &volume_server_pb.VolumeCopyRequest{
VolumeId: volumeInfo.Id,
Collection: volumeInfo.Collection,
SourceDataNode: sourceNode.dataNode.Id,
})
return replicateErr

View file

@ -0,0 +1,124 @@
package shell
import (
"context"
"fmt"
"io"
"log"
"time"
"github.com/chrislusf/seaweedfs/weed/operation"
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
"github.com/chrislusf/seaweedfs/weed/storage/needle"
"google.golang.org/grpc"
)
func init() {
commands = append(commands, &commandVolumeMove{})
}
type commandVolumeMove struct {
grpcDialOption grpc.DialOption
}
func (c *commandVolumeMove) Name() string {
return "volume.move"
}
func (c *commandVolumeMove) Help() string {
return `move a live volume from one volume server to another volume server
volume.move <source volume server host:port> <target volume server host:port> <volume id>
This command move a live volume from one volume server to another volume server. Here are the steps:
1. This command asks the target volume server to copy the source volume from source volume server, remember the last entry's timestamp.
2. This command asks the target volume server to mount the new volume
Now the master will mark this volume id as readonly.
3. This command asks the target volume server to tail the source volume for updates after the timestamp, for 1 minutes to drain the requests.
4. This command asks the source volume server to unmount the source volume
Now the master will mark this volume id as writable.
5. This command asks the source volume server to delete the source volume
`
}
func (c *commandVolumeMove) Do(args []string, commandEnv *commandEnv, writer io.Writer) (err error) {
if len(args) != 3 {
fmt.Fprintf(writer, "received args: %+v\n", args)
return fmt.Errorf("need 3 args of <source volume server host:port> <target volume server host:port> <volume id>")
}
c.grpcDialOption = commandEnv.option.GrpcDialOption
ctx := context.Background()
sourceVolumeServer, targetVolumeServer, volumeIdString := args[0], args[1], args[2]
volumeId, err := needle.NewVolumeId(volumeIdString)
if err != nil {
return fmt.Errorf("wrong volume id format %s: %v", volumeId, err)
}
if sourceVolumeServer == targetVolumeServer {
return fmt.Errorf("source and target volume servers are the same!")
}
log.Printf("copying volume %d from %s to %s", volumeId, sourceVolumeServer, targetVolumeServer)
lastAppendAtNs, err := c.copyVolume(ctx, volumeId, sourceVolumeServer, targetVolumeServer)
if err != nil {
return fmt.Errorf("copy volume %d from %s to %s: %v", volumeId, sourceVolumeServer, targetVolumeServer, err)
}
log.Printf("tailing volume %d from %s to %s", volumeId, sourceVolumeServer, targetVolumeServer)
if err = c.tailVolume(ctx, volumeId, sourceVolumeServer, targetVolumeServer, lastAppendAtNs, 5*time.Second); err != nil {
return fmt.Errorf("tail volume %d from %s to %s: %v", volumeId, sourceVolumeServer, targetVolumeServer, err)
}
log.Printf("deleting volume %d from %s", volumeId, sourceVolumeServer)
if err = c.deleteVolume(ctx, volumeId, sourceVolumeServer); err != nil {
return fmt.Errorf("delete volume %d from %s: %v", volumeId, sourceVolumeServer, err)
}
log.Printf("moved volume %d from %s to %s", volumeId, sourceVolumeServer, targetVolumeServer)
return nil
}
func (c *commandVolumeMove) copyVolume(ctx context.Context, volumeId needle.VolumeId, sourceVolumeServer, targetVolumeServer string) (lastAppendAtNs uint64, err error) {
err = operation.WithVolumeServerClient(targetVolumeServer, c.grpcDialOption, func(volumeServerClient volume_server_pb.VolumeServerClient) error {
resp, replicateErr := volumeServerClient.VolumeCopy(ctx, &volume_server_pb.VolumeCopyRequest{
VolumeId: uint32(volumeId),
SourceDataNode: sourceVolumeServer,
})
if replicateErr == nil {
lastAppendAtNs = resp.LastAppendAtNs
}
return replicateErr
})
return
}
func (c *commandVolumeMove) tailVolume(ctx context.Context, volumeId needle.VolumeId, sourceVolumeServer, targetVolumeServer string, lastAppendAtNs uint64, timeout time.Duration) (err error) {
return operation.WithVolumeServerClient(targetVolumeServer, c.grpcDialOption, func(volumeServerClient volume_server_pb.VolumeServerClient) error {
_, replicateErr := volumeServerClient.VolumeTailReceiver(ctx, &volume_server_pb.VolumeTailReceiverRequest{
VolumeId: uint32(volumeId),
SinceNs: lastAppendAtNs,
DrainingSeconds: uint32(timeout.Seconds()),
SourceVolumeServer: sourceVolumeServer,
})
return replicateErr
})
}
func (c *commandVolumeMove) deleteVolume(ctx context.Context, volumeId needle.VolumeId, sourceVolumeServer string) (err error) {
return operation.WithVolumeServerClient(sourceVolumeServer, c.grpcDialOption, func(volumeServerClient volume_server_pb.VolumeServerClient) error {
_, unmountErr := volumeServerClient.VolumeDelete(ctx, &volume_server_pb.VolumeDeleteRequest{
VolumeId: uint32(volumeId),
})
return unmountErr
})
}

View file

@ -18,18 +18,18 @@ const (
* A VolumeServer contains one Store
*/
type Store struct {
Ip string
Port int
PublicUrl string
Locations []*DiskLocation
dataCenter string //optional informaton, overwriting master setting if exists
rack string //optional information, overwriting master setting if exists
connected bool
volumeSizeLimit uint64 //read from the master
Client master_pb.Seaweed_SendHeartbeatClient
NeedleMapType NeedleMapType
NewVolumeIdChan chan needle.VolumeId
DeletedVolumeIdChan chan needle.VolumeId
Ip string
Port int
PublicUrl string
Locations []*DiskLocation
dataCenter string //optional informaton, overwriting master setting if exists
rack string //optional information, overwriting master setting if exists
connected bool
volumeSizeLimit uint64 //read from the master
Client master_pb.Seaweed_SendHeartbeatClient
NeedleMapType NeedleMapType
NewVolumesChan chan master_pb.VolumeShortInformationMessage
DeletedVolumesChan chan master_pb.VolumeShortInformationMessage
}
func (s *Store) String() (str string) {
@ -45,8 +45,8 @@ func NewStore(port int, ip, publicUrl string, dirnames []string, maxVolumeCounts
location.loadExistingVolumes(needleMapKind)
s.Locations = append(s.Locations, location)
}
s.NewVolumeIdChan = make(chan needle.VolumeId, 3)
s.DeletedVolumeIdChan = make(chan needle.VolumeId, 3)
s.NewVolumesChan = make(chan master_pb.VolumeShortInformationMessage, 3)
s.DeletedVolumesChan = make(chan master_pb.VolumeShortInformationMessage, 3)
return
}
func (s *Store) AddVolume(volumeId needle.VolumeId, collection string, needleMapKind NeedleMapType, replicaPlacement string, ttlString string, preallocate int64) error {
@ -67,7 +67,7 @@ func (s *Store) DeleteCollection(collection string) (e error) {
if e != nil {
return
}
// let the heartbeat send the list of volumes, instead of sending the deleted volume ids to DeletedVolumeIdChan
// let the heartbeat send the list of volumes, instead of sending the deleted volume ids to DeletedVolumesChan
}
return
}
@ -100,7 +100,13 @@ func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKind
location.Directory, vid, collection, replicaPlacement, ttl)
if volume, err := NewVolume(location.Directory, collection, vid, needleMapKind, replicaPlacement, ttl, preallocate); err == nil {
location.SetVolume(vid, volume)
s.NewVolumeIdChan <- vid
glog.V(0).Info("add volume", vid)
s.NewVolumesChan <- master_pb.VolumeShortInformationMessage{
Id: uint32(vid),
Collection: collection,
ReplicaPlacement: uint32(replicaPlacement.Byte()),
Ttl: ttl.ToUint32(),
}
return nil
} else {
return err
@ -229,7 +235,14 @@ func (s *Store) HasVolume(i needle.VolumeId) bool {
func (s *Store) MountVolume(i needle.VolumeId) error {
for _, location := range s.Locations {
if found := location.LoadVolume(i, s.NeedleMapType); found == true {
s.NewVolumeIdChan <- needle.VolumeId(i)
glog.V(0).Infof("mount volume %d", i)
v := s.findVolume(i)
s.NewVolumesChan <- master_pb.VolumeShortInformationMessage{
Id: uint32(v.Id),
Collection: v.Collection,
ReplicaPlacement: uint32(v.ReplicaPlacement.Byte()),
Ttl: v.Ttl.ToUint32(),
}
return nil
}
}
@ -238,9 +251,20 @@ func (s *Store) MountVolume(i needle.VolumeId) error {
}
func (s *Store) UnmountVolume(i needle.VolumeId) error {
v := s.findVolume(i)
if v == nil {
return nil
}
message := master_pb.VolumeShortInformationMessage{
Id: uint32(v.Id),
Collection: v.Collection,
ReplicaPlacement: uint32(v.ReplicaPlacement.Byte()),
Ttl: v.Ttl.ToUint32(),
}
for _, location := range s.Locations {
if err := location.UnloadVolume(i); err == nil {
s.DeletedVolumeIdChan <- needle.VolumeId(i)
glog.V(0).Infof("UnmountVolume %d", i)
s.DeletedVolumesChan <- message
return nil
}
}
@ -249,9 +273,20 @@ func (s *Store) UnmountVolume(i needle.VolumeId) error {
}
func (s *Store) DeleteVolume(i needle.VolumeId) error {
v := s.findVolume(i)
if v == nil {
return nil
}
message := master_pb.VolumeShortInformationMessage{
Id: uint32(v.Id),
Collection: v.Collection,
ReplicaPlacement: uint32(v.ReplicaPlacement.Byte()),
Ttl: v.Ttl.ToUint32(),
}
for _, location := range s.Locations {
if error := location.deleteVolumeById(i); error == nil {
s.DeletedVolumeIdChan <- needle.VolumeId(i)
glog.V(0).Infof("DeleteVolume %d", i)
s.DeletedVolumesChan <- message
return nil
}
}

View file

@ -43,6 +43,20 @@ func NewVolumeInfo(m *master_pb.VolumeInformationMessage) (vi VolumeInfo, err er
return vi, nil
}
func NewVolumeInfoFromShort(m *master_pb.VolumeShortInformationMessage) (vi VolumeInfo, err error) {
vi = VolumeInfo{
Id: needle.VolumeId(m.Id),
Collection: m.Collection,
}
rp, e := NewReplicaPlacementFromByte(byte(m.ReplicaPlacement))
if e != nil {
return vi, e
}
vi.ReplicaPlacement = rp
vi.Ttl = needle.LoadTTLFromUint32(m.Ttl)
return vi, nil
}
func (vi VolumeInfo) String() string {
return fmt.Sprintf("Id:%d, Size:%d, ReplicaPlacement:%s, Collection:%s, Version:%v, FileCount:%d, DeleteCount:%d, DeletedByteCount:%d, ReadOnly:%v",
vi.Id, vi.Size, vi.ReplicaPlacement, vi.Collection, vi.Version, vi.FileCount, vi.DeleteCount, vi.DeletedByteCount, vi.ReadOnly)

View file

@ -78,6 +78,20 @@ func (dn *DataNode) UpdateVolumes(actualVolumes []storage.VolumeInfo) (newVolume
return
}
func (dn *DataNode) DeltaUpdateVolumes(newlVolumes, deletedVolumes []storage.VolumeInfo) {
dn.Lock()
for _, v := range deletedVolumes {
delete(dn.volumes, v.Id)
dn.UpAdjustVolumeCountDelta(-1)
dn.UpAdjustActiveVolumeCountDelta(-1)
}
dn.Unlock()
for _, v := range newlVolumes {
dn.AddOrUpdateVolume(v)
}
return
}
func (dn *DataNode) GetVolumes() (ret []storage.VolumeInfo) {
dn.RLock()
for _, v := range dn.volumes {

View file

@ -171,7 +171,7 @@ func (t *Topology) SyncDataNodeRegistration(volumes []*master_pb.VolumeInformati
}
}
newVolumes, deletedVolumes = dn.UpdateVolumes(volumeInfos)
for _, v := range volumeInfos {
for _, v := range newVolumes {
t.RegisterVolumeLayout(v, dn)
}
for _, v := range deletedVolumes {
@ -179,3 +179,27 @@ func (t *Topology) SyncDataNodeRegistration(volumes []*master_pb.VolumeInformati
}
return
}
func (t *Topology) IncrementalSyncDataNodeRegistration(newVolumes, deletedVolumes []*master_pb.VolumeShortInformationMessage, dn *DataNode) {
var newVis, oldVis []storage.VolumeInfo
for _, v := range newVolumes {
vi, err := storage.NewVolumeInfoFromShort(v)
if err != nil {
glog.V(0).Infof("NewVolumeInfoFromShort %v: %v", v, err)
continue
}
newVis = append(newVis, vi)
t.RegisterVolumeLayout(vi, dn)
}
for _, v := range deletedVolumes {
vi, err := storage.NewVolumeInfoFromShort(v)
if err != nil {
glog.V(0).Infof("NewVolumeInfoFromShort %v: %v", v, err)
continue
}
oldVis = append(oldVis, vi)
t.UnRegisterVolumeLayout(vi, dn)
}
dn.DeltaUpdateVolumes(newVis, oldVis)
return
}

View file

@ -52,28 +52,28 @@ func (mc *MasterClient) KeepConnectedToMaster() {
func (mc *MasterClient) tryAllMasters() {
for _, master := range mc.masters {
glog.V(1).Infof("Connecting to master %v", master)
glog.V(1).Infof("%s Connecting to master %v", mc.name, master)
gprcErr := withMasterClient(context.Background(), master, mc.grpcDialOption, func(ctx context.Context, client master_pb.SeaweedClient) error {
stream, err := client.KeepConnected(ctx)
if err != nil {
glog.V(0).Infof("failed to keep connected to %s: %v", master, err)
glog.V(0).Infof("%s failed to keep connected to %s: %v", mc.name, master, err)
return err
}
if err = stream.Send(&master_pb.ClientListenRequest{Name: mc.name}); err != nil {
glog.V(0).Infof("failed to send to %s: %v", master, err)
glog.V(0).Infof("%s failed to send to %s: %v", mc.name, master, err)
return err
}
if mc.currentMaster == "" {
glog.V(1).Infof("Connected to %v", master)
glog.V(1).Infof("%s Connected to %v", mc.name, master)
mc.currentMaster = master
}
for {
if volumeLocation, err := stream.Recv(); err != nil {
glog.V(0).Infof("failed to receive from %s: %v", master, err)
glog.V(0).Infof("%s failed to receive from %s: %v", mc.name, master, err)
return err
} else {
loc := Location{
@ -81,9 +81,11 @@ func (mc *MasterClient) tryAllMasters() {
PublicUrl: volumeLocation.PublicUrl,
}
for _, newVid := range volumeLocation.NewVids {
glog.V(0).Infof("%s: %s adds volume %d", mc.name, loc.Url, newVid)
mc.addLocation(newVid, loc)
}
for _, deletedVid := range volumeLocation.DeletedVids {
glog.V(0).Infof("%s: %s removes volume %d", mc.name, loc.Url, deletedVid)
mc.deleteLocation(deletedVid, loc)
}
}