diff --git a/other/java/client/src/main/proto/filer.proto b/other/java/client/src/main/proto/filer.proto index ba49e420f..fe26cca15 100644 --- a/other/java/client/src/main/proto/filer.proto +++ b/other/java/client/src/main/proto/filer.proto @@ -358,12 +358,7 @@ message FilerConf { string collection = 2; string replication = 3; string ttl = 4; - enum DiskType { - NONE = 0; - HDD = 1; - SSD = 2; - } - DiskType disk_type = 5; + string disk_type = 5; bool fsync = 6; uint32 volume_growth_count = 7; } diff --git a/weed/command/benchmark.go b/weed/command/benchmark.go index 7a112d1ec..04f5b82e7 100644 --- a/weed/command/benchmark.go +++ b/weed/command/benchmark.go @@ -35,7 +35,7 @@ type BenchmarkOptions struct { sequentialRead *bool collection *string replication *string - volumeType *string + diskType *string cpuprofile *string maxCpu *int grpcDialOption grpc.DialOption @@ -63,7 +63,7 @@ func init() { b.sequentialRead = cmdBenchmark.Flag.Bool("readSequentially", false, "randomly read by ids from \"-list\" specified file") b.collection = cmdBenchmark.Flag.String("collection", "benchmark", "write data to this collection") b.replication = cmdBenchmark.Flag.String("replication", "000", "replication type") - b.volumeType = cmdBenchmark.Flag.String("volumeType", "", "[hdd|ssd] choose between hard drive or solid state drive") + b.diskType = cmdBenchmark.Flag.String("diskType", "", "[hdd|ssd] choose between hard drive or solid state drive") b.cpuprofile = cmdBenchmark.Flag.String("cpuprofile", "", "cpu profile output file") b.maxCpu = cmdBenchmark.Flag.Int("maxCpu", 0, "maximum number of CPUs. 0 means all available CPUs") b.fsync = cmdBenchmark.Flag.Bool("fsync", false, "flush data to disk after write") @@ -236,7 +236,7 @@ func writeFiles(idChan chan int, fileIdLineChan chan string, s *stat) { Count: 1, Collection: *b.collection, Replication: *b.replication, - VolumeType: *b.volumeType, + DiskType: *b.diskType, } if assignResult, err := operation.Assign(b.masterClient.GetMaster(), b.grpcDialOption, ar); err == nil { fp.Server, fp.Fid, fp.Collection = assignResult.Url, assignResult.Fid, *b.collection diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go index 1102a8cff..ea7a96047 100644 --- a/weed/command/filer_copy.go +++ b/weed/command/filer_copy.go @@ -37,7 +37,7 @@ type CopyOptions struct { replication *string collection *string ttl *string - volumeType *string + diskType *string maxMB *int masterClient *wdclient.MasterClient concurrenctFiles *int @@ -55,7 +55,7 @@ func init() { copy.replication = cmdCopy.Flag.String("replication", "", "replication type") copy.collection = cmdCopy.Flag.String("collection", "", "optional collection name") copy.ttl = cmdCopy.Flag.String("ttl", "", "time to live, e.g.: 1m, 1h, 1d, 1M, 1y") - copy.volumeType = cmdCopy.Flag.String("volumeType", "", "[hdd|ssd] choose between hard drive or solid state drive") + copy.diskType = cmdCopy.Flag.String("diskType", "", "[hdd|ssd] choose between hard drive or solid state drive") copy.maxMB = cmdCopy.Flag.Int("maxMB", 32, "split files larger than the limit") copy.concurrenctFiles = cmdCopy.Flag.Int("c", 8, "concurrent file copy goroutines") copy.concurrenctChunks = cmdCopy.Flag.Int("concurrentChunks", 8, "concurrent chunk copy goroutines for each file") @@ -313,7 +313,7 @@ func (worker *FileCopyWorker) uploadFileAsOne(task FileCopyTask, f *os.File) err Replication: *worker.options.replication, Collection: *worker.options.collection, TtlSec: worker.options.ttlSec, - VolumeType: *worker.options.volumeType, + DiskType: *worker.options.diskType, Path: task.destinationUrlPath, } @@ -408,7 +408,7 @@ func (worker *FileCopyWorker) uploadFileInChunks(task FileCopyTask, f *os.File, Replication: *worker.options.replication, Collection: *worker.options.collection, TtlSec: worker.options.ttlSec, - VolumeType: *worker.options.volumeType, + DiskType: *worker.options.diskType, Path: task.destinationUrlPath + fileName, } diff --git a/weed/command/filer_sync.go b/weed/command/filer_sync.go index ee3731a99..b6dcd44ee 100644 --- a/weed/command/filer_sync.go +++ b/weed/command/filer_sync.go @@ -31,8 +31,8 @@ type SyncOptions struct { bCollection *string aTtlSec *int bTtlSec *int - aVolumeType *string - bVolumeType *string + aDiskType *string + bDiskType *string aDebug *bool bDebug *bool } @@ -56,8 +56,8 @@ func init() { syncOptions.bCollection = cmdFilerSynchronize.Flag.String("b.collection", "", "collection on filer B") syncOptions.aTtlSec = cmdFilerSynchronize.Flag.Int("a.ttlSec", 0, "ttl in seconds on filer A") syncOptions.bTtlSec = cmdFilerSynchronize.Flag.Int("b.ttlSec", 0, "ttl in seconds on filer B") - syncOptions.aVolumeType = cmdFilerSynchronize.Flag.String("a.volumeType", "", "[hdd|ssd] choose between hard drive or solid state drive on filer A") - syncOptions.bVolumeType = cmdFilerSynchronize.Flag.String("b.volumeType", "", "[hdd|ssd] choose between hard drive or solid state drive on filer B") + syncOptions.aDiskType = cmdFilerSynchronize.Flag.String("a.diskType", "", "[hdd|ssd] choose between hard drive or solid state drive on filer A") + syncOptions.bDiskType = cmdFilerSynchronize.Flag.String("b.diskType", "", "[hdd|ssd] choose between hard drive or solid state drive on filer B") syncOptions.aDebug = cmdFilerSynchronize.Flag.Bool("a.debug", false, "debug mode to print out filer A received files") syncOptions.bDebug = cmdFilerSynchronize.Flag.Bool("b.debug", false, "debug mode to print out filer B received files") syncCpuProfile = cmdFilerSynchronize.Flag.String("cpuprofile", "", "cpu profile output file") @@ -91,7 +91,7 @@ func runFilerSynchronize(cmd *Command, args []string) bool { go func() { for { err := doSubscribeFilerMetaChanges(grpcDialOption, *syncOptions.filerA, *syncOptions.aPath, *syncOptions.filerB, - *syncOptions.bPath, *syncOptions.bReplication, *syncOptions.bCollection, *syncOptions.bTtlSec, *syncOptions.bVolumeType, *syncOptions.bDebug) + *syncOptions.bPath, *syncOptions.bReplication, *syncOptions.bCollection, *syncOptions.bTtlSec, *syncOptions.bDiskType, *syncOptions.bDebug) if err != nil { glog.Errorf("sync from %s to %s: %v", *syncOptions.filerA, *syncOptions.filerB, err) time.Sleep(1747 * time.Millisecond) @@ -103,7 +103,7 @@ func runFilerSynchronize(cmd *Command, args []string) bool { go func() { for { err := doSubscribeFilerMetaChanges(grpcDialOption, *syncOptions.filerB, *syncOptions.bPath, *syncOptions.filerA, - *syncOptions.aPath, *syncOptions.aReplication, *syncOptions.aCollection, *syncOptions.aTtlSec, *syncOptions.aVolumeType, *syncOptions.aDebug) + *syncOptions.aPath, *syncOptions.aReplication, *syncOptions.aCollection, *syncOptions.aTtlSec, *syncOptions.aDiskType, *syncOptions.aDebug) if err != nil { glog.Errorf("sync from %s to %s: %v", *syncOptions.filerB, *syncOptions.filerA, err) time.Sleep(2147 * time.Millisecond) @@ -118,7 +118,7 @@ func runFilerSynchronize(cmd *Command, args []string) bool { } func doSubscribeFilerMetaChanges(grpcDialOption grpc.DialOption, sourceFiler, sourcePath, targetFiler, targetPath string, - replicationStr, collection string, ttlSec int, volumeType string, debug bool) error { + replicationStr, collection string, ttlSec int, diskType string, debug bool) error { // read source filer signature sourceFilerSignature, sourceErr := replication.ReadFilerSignature(grpcDialOption, sourceFiler) @@ -144,7 +144,7 @@ func doSubscribeFilerMetaChanges(grpcDialOption grpc.DialOption, sourceFiler, so filerSource := &source.FilerSource{} filerSource.DoInitialize(pb.ServerToGrpcAddress(sourceFiler), sourcePath) filerSink := &filersink.FilerSink{} - filerSink.DoInitialize(pb.ServerToGrpcAddress(targetFiler), targetPath, replicationStr, collection, ttlSec, volumeType, grpcDialOption) + filerSink.DoInitialize(pb.ServerToGrpcAddress(targetFiler), targetPath, replicationStr, collection, ttlSec, diskType, grpcDialOption) filerSink.SetSourceFiler(filerSource) processEventFn := func(resp *filer_pb.SubscribeMetadataResponse) error { diff --git a/weed/command/mount.go b/weed/command/mount.go index 8e9e73315..6a11fe327 100644 --- a/weed/command/mount.go +++ b/weed/command/mount.go @@ -12,7 +12,7 @@ type MountOptions struct { dirAutoCreate *bool collection *string replication *string - volumeType *string + diskType *string ttlSec *int chunkSizeLimitMB *int concurrentWriters *int @@ -42,7 +42,7 @@ func init() { mountOptions.dirAutoCreate = cmdMount.Flag.Bool("dirAutoCreate", false, "auto create the directory to mount to") mountOptions.collection = cmdMount.Flag.String("collection", "", "collection to create the files") mountOptions.replication = cmdMount.Flag.String("replication", "", "replication(e.g. 000, 001) to create to files. If empty, let filer decide.") - mountOptions.volumeType = cmdMount.Flag.String("volumeType", "", "[hdd|ssd] choose between hard drive or solid state drive") + mountOptions.diskType = cmdMount.Flag.String("diskType", "", "[hdd|ssd] choose between hard drive or solid state drive") mountOptions.ttlSec = cmdMount.Flag.Int("ttl", 0, "file ttl in seconds") mountOptions.chunkSizeLimitMB = cmdMount.Flag.Int("chunkSizeLimitMB", 2, "local write buffer size, also chunk large files") mountOptions.concurrentWriters = cmdMount.Flag.Int("concurrentWriters", 0, "limit concurrent goroutine writers if not 0") diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index 94a145c1b..e3bfba9fb 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -168,7 +168,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool { mountRoot = mountRoot[0 : len(mountRoot)-1] } - volumeType, err := storage.ToVolumeType(*option.volumeType) + diskType, err := storage.ToDiskType(*option.diskType) if err != nil { fmt.Printf("failed to parse volume type: %v\n", err) return false @@ -181,7 +181,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool { Collection: *option.collection, Replication: *option.replication, TtlSec: int32(*option.ttlSec), - VolumeType: volumeType, + DiskType: diskType, ChunkSizeLimit: int64(chunkSizeLimitMB) * 1024 * 1024, ConcurrentWriters: *option.concurrentWriters, CacheDir: *option.cacheDir, diff --git a/weed/command/upload.go b/weed/command/upload.go index bafca8cee..f491d7f1e 100644 --- a/weed/command/upload.go +++ b/weed/command/upload.go @@ -23,7 +23,7 @@ type UploadOptions struct { collection *string dataCenter *string ttl *string - volumeType *string + diskType *string maxMB *int usePublicUrl *bool } @@ -37,7 +37,7 @@ func init() { upload.replication = cmdUpload.Flag.String("replication", "", "replication type") upload.collection = cmdUpload.Flag.String("collection", "", "optional collection name") upload.dataCenter = cmdUpload.Flag.String("dataCenter", "", "optional data center name") - upload.volumeType = cmdUpload.Flag.String("volumeType", "", "[hdd|ssd] choose between hard drive or solid state drive") + upload.diskType = cmdUpload.Flag.String("diskType", "", "[hdd|ssd] choose between hard drive or solid state drive") upload.ttl = cmdUpload.Flag.String("ttl", "", "time to live, e.g.: 1m, 1h, 1d, 1M, 1y") upload.maxMB = cmdUpload.Flag.Int("maxMB", 32, "split files larger than the limit") upload.usePublicUrl = cmdUpload.Flag.Bool("usePublicUrl", false, "upload to public url from volume server") @@ -83,7 +83,7 @@ func runUpload(cmd *Command, args []string) bool { if e != nil { return e } - results, e := operation.SubmitFiles(*upload.master, grpcDialOption, parts, *upload.replication, *upload.collection, *upload.dataCenter, *upload.ttl, *upload.volumeType, *upload.maxMB, *upload.usePublicUrl) + results, e := operation.SubmitFiles(*upload.master, grpcDialOption, parts, *upload.replication, *upload.collection, *upload.dataCenter, *upload.ttl, *upload.diskType, *upload.maxMB, *upload.usePublicUrl) bytes, _ := json.Marshal(results) fmt.Println(string(bytes)) if e != nil { @@ -100,7 +100,7 @@ func runUpload(cmd *Command, args []string) bool { if e != nil { fmt.Println(e.Error()) } - results, _ := operation.SubmitFiles(*upload.master, grpcDialOption, parts, *upload.replication, *upload.collection, *upload.dataCenter, *upload.ttl, *upload.volumeType, *upload.maxMB, *upload.usePublicUrl) + results, _ := operation.SubmitFiles(*upload.master, grpcDialOption, parts, *upload.replication, *upload.collection, *upload.dataCenter, *upload.ttl, *upload.diskType, *upload.maxMB, *upload.usePublicUrl) bytes, _ := json.Marshal(results) fmt.Println(string(bytes)) } diff --git a/weed/command/volume.go b/weed/command/volume.go index 6bfc71f4e..1a079f394 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -49,7 +49,7 @@ type VolumeServerOptions struct { rack *string whiteList []string indexType *string - volumeType *string + diskType *string fixJpgOrientation *bool readRedirect *bool cpuProfile *string @@ -77,7 +77,7 @@ func init() { v.dataCenter = cmdVolume.Flag.String("dataCenter", "", "current volume server's data center name") v.rack = cmdVolume.Flag.String("rack", "", "current volume server's rack name") v.indexType = cmdVolume.Flag.String("index", "memory", "Choose [memory|leveldb|leveldbMedium|leveldbLarge] mode for memory~performance balance.") - v.volumeType = cmdVolume.Flag.String("volumeType", "", "[hdd|ssd] choose between hard drive or solid state drive") + v.diskType = cmdVolume.Flag.String("diskType", "", "[hdd|ssd] choose between hard drive or solid state drive") v.fixJpgOrientation = cmdVolume.Flag.Bool("images.fix.orientation", false, "Adjust jpg orientation when uploading.") v.readRedirect = cmdVolume.Flag.Bool("read.redirect", true, "Redirect moved or non-local volumes.") v.cpuProfile = cmdVolume.Flag.String("cpuprofile", "", "cpu profile output file") @@ -212,7 +212,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v masters := *v.masters - volumeType, err := storage.ToVolumeType(*v.volumeType) + diskType, err := storage.ToDiskType(*v.diskType) if err != nil { glog.Fatalf("failed to parse volume type: %v", err) } @@ -220,7 +220,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v volumeServer := weed_server.NewVolumeServer(volumeMux, publicVolumeMux, *v.ip, *v.port, *v.publicUrl, v.folders, v.folderMaxLimits, v.minFreeSpacePercents, - *v.idxFolder, volumeType, + *v.idxFolder, diskType, volumeNeedleMapKind, strings.Split(masters, ","), 5, *v.dataCenter, *v.rack, v.whiteList, diff --git a/weed/filer/entry.go b/weed/filer/entry.go index e579b9b21..987ea8cca 100644 --- a/weed/filer/entry.go +++ b/weed/filer/entry.go @@ -18,7 +18,7 @@ type Attr struct { Replication string // replication Collection string // collection name TtlSec int32 // ttl in seconds - VolumeType string + DiskType string UserName string GroupNames []string SymlinkTarget string diff --git a/weed/filer/entry_codec.go b/weed/filer/entry_codec.go index 45b391436..cc7353974 100644 --- a/weed/filer/entry_codec.go +++ b/weed/filer/entry_codec.go @@ -56,7 +56,7 @@ func EntryAttributeToPb(entry *Entry) *filer_pb.FuseAttributes { Collection: entry.Attr.Collection, Replication: entry.Attr.Replication, TtlSec: entry.Attr.TtlSec, - VolumeType: entry.Attr.VolumeType, + DiskType: entry.Attr.DiskType, UserName: entry.Attr.UserName, GroupName: entry.Attr.GroupNames, SymlinkTarget: entry.Attr.SymlinkTarget, @@ -82,7 +82,7 @@ func PbToEntryAttribute(attr *filer_pb.FuseAttributes) Attr { t.Collection = attr.Collection t.Replication = attr.Replication t.TtlSec = attr.TtlSec - t.VolumeType = attr.VolumeType + t.DiskType = attr.DiskType t.UserName = attr.UserName t.GroupNames = attr.GroupName t.SymlinkTarget = attr.SymlinkTarget diff --git a/weed/filer/filer_conf.go b/weed/filer/filer_conf.go index 18ed37abd..b4f0e5890 100644 --- a/weed/filer/filer_conf.go +++ b/weed/filer/filer_conf.go @@ -116,7 +116,7 @@ func mergePathConf(a, b *filer_pb.FilerConf_PathConf) { a.Collection = util.Nvl(b.Collection, a.Collection) a.Replication = util.Nvl(b.Replication, a.Replication) a.Ttl = util.Nvl(b.Ttl, a.Ttl) - if b.DiskType != filer_pb.FilerConf_PathConf_NONE { + if b.DiskType != "" { a.DiskType = b.DiskType } a.Fsync = b.Fsync || a.Fsync diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 1d4b323e2..48893f80a 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -31,7 +31,7 @@ type Option struct { Collection string Replication string TtlSec int32 - VolumeType storage.VolumeType + DiskType storage.DiskType ChunkSizeLimit int64 ConcurrentWriters int CacheDir string @@ -178,7 +178,7 @@ func (wfs *WFS) Statfs(ctx context.Context, req *fuse.StatfsRequest, resp *fuse. Collection: wfs.option.Collection, Replication: wfs.option.Replication, Ttl: fmt.Sprintf("%ds", wfs.option.TtlSec), - VolumeType: string(wfs.option.VolumeType), + DiskType: string(wfs.option.DiskType), } glog.V(4).Infof("reading filer stats: %+v", request) diff --git a/weed/filesys/wfs_write.go b/weed/filesys/wfs_write.go index 00a7445c8..903fed810 100644 --- a/weed/filesys/wfs_write.go +++ b/weed/filesys/wfs_write.go @@ -26,7 +26,7 @@ func (wfs *WFS) saveDataAsChunk(fullPath util.FullPath) filer.SaveDataAsChunkFun Replication: wfs.option.Replication, Collection: wfs.option.Collection, TtlSec: wfs.option.TtlSec, - VolumeType: string(wfs.option.VolumeType), + DiskType: string(wfs.option.DiskType), DataCenter: wfs.option.DataCenter, Path: string(fullPath), } diff --git a/weed/operation/assign_file_id.go b/weed/operation/assign_file_id.go index 5f77d28ca..bb0b8e6df 100644 --- a/weed/operation/assign_file_id.go +++ b/weed/operation/assign_file_id.go @@ -18,7 +18,7 @@ type VolumeAssignRequest struct { Replication string Collection string Ttl string - VolumeType string + DiskType string DataCenter string Rack string DataNode string @@ -55,7 +55,7 @@ func Assign(server string, grpcDialOption grpc.DialOption, primaryRequest *Volum Replication: request.Replication, Collection: request.Collection, Ttl: request.Ttl, - VolumeType: request.VolumeType, + DiskType: request.DiskType, DataCenter: request.DataCenter, Rack: request.Rack, DataNode: request.DataNode, @@ -107,7 +107,7 @@ func LookupJwt(master string, fileId string) security.EncodedJwt { type StorageOption struct { Replication string - VolumeType string + DiskType string Collection string DataCenter string Rack string @@ -126,7 +126,7 @@ func (so *StorageOption) ToAssignRequests(count int) (ar *VolumeAssignRequest, a Replication: so.Replication, Collection: so.Collection, Ttl: so.TtlString(), - VolumeType: so.VolumeType, + DiskType: so.DiskType, DataCenter: so.DataCenter, Rack: so.Rack, WritableVolumeCount: so.VolumeGrowthCount, @@ -137,7 +137,7 @@ func (so *StorageOption) ToAssignRequests(count int) (ar *VolumeAssignRequest, a Replication: so.Replication, Collection: so.Collection, Ttl: so.TtlString(), - VolumeType: so.VolumeType, + DiskType: so.DiskType, DataCenter: "", Rack: "", WritableVolumeCount: so.VolumeGrowthCount, diff --git a/weed/operation/submit.go b/weed/operation/submit.go index 70ab4194a..bcdf9ddce 100644 --- a/weed/operation/submit.go +++ b/weed/operation/submit.go @@ -25,7 +25,7 @@ type FilePart struct { Collection string DataCenter string Ttl string - VolumeType string + DiskType string Server string //this comes from assign result Fid string //this comes from assign result, but customizable Fsync bool @@ -39,7 +39,7 @@ type SubmitResult struct { Error string `json:"error,omitempty"` } -func SubmitFiles(master string, grpcDialOption grpc.DialOption, files []FilePart, replication string, collection string, dataCenter string, ttl string, volumeType string, maxMB int, usePublicUrl bool) ([]SubmitResult, error) { +func SubmitFiles(master string, grpcDialOption grpc.DialOption, files []FilePart, replication string, collection string, dataCenter string, ttl string, diskType string, maxMB int, usePublicUrl bool) ([]SubmitResult, error) { results := make([]SubmitResult, len(files)) for index, file := range files { results[index].FileName = file.FileName @@ -50,7 +50,7 @@ func SubmitFiles(master string, grpcDialOption grpc.DialOption, files []FilePart Collection: collection, DataCenter: dataCenter, Ttl: ttl, - VolumeType: volumeType, + DiskType: diskType, } ret, err := Assign(master, grpcDialOption, ar) if err != nil { @@ -72,7 +72,7 @@ func SubmitFiles(master string, grpcDialOption grpc.DialOption, files []FilePart file.Collection = collection file.DataCenter = dataCenter file.Ttl = ttl - file.VolumeType = volumeType + file.DiskType = diskType results[index].Size, err = file.Upload(maxMB, master, usePublicUrl, ret.Auth, grpcDialOption) if err != nil { results[index].Error = err.Error() @@ -146,7 +146,7 @@ func (fi FilePart) Upload(maxMB int, master string, usePublicUrl bool, jwt secur Replication: fi.Replication, Collection: fi.Collection, Ttl: fi.Ttl, - VolumeType: fi.VolumeType, + DiskType: fi.DiskType, } ret, err = Assign(master, grpcDialOption, ar) if err != nil { @@ -160,7 +160,7 @@ func (fi FilePart) Upload(maxMB int, master string, usePublicUrl bool, jwt secur Replication: fi.Replication, Collection: fi.Collection, Ttl: fi.Ttl, - VolumeType: fi.VolumeType, + DiskType: fi.DiskType, } ret, err = Assign(master, grpcDialOption, ar) if err != nil { diff --git a/weed/pb/filer.proto b/weed/pb/filer.proto index ba49e420f..fe26cca15 100644 --- a/weed/pb/filer.proto +++ b/weed/pb/filer.proto @@ -358,12 +358,7 @@ message FilerConf { string collection = 2; string replication = 3; string ttl = 4; - enum DiskType { - NONE = 0; - HDD = 1; - SSD = 2; - } - DiskType disk_type = 5; + string disk_type = 5; bool fsync = 6; uint32 volume_growth_count = 7; } diff --git a/weed/pb/filer_pb/filer.pb.go b/weed/pb/filer_pb/filer.pb.go index bf9108a07..671a5188b 100644 --- a/weed/pb/filer_pb/filer.pb.go +++ b/weed/pb/filer_pb/filer.pb.go @@ -29,55 +29,6 @@ const ( // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 -type FilerConf_PathConf_DiskType int32 - -const ( - FilerConf_PathConf_NONE FilerConf_PathConf_DiskType = 0 - FilerConf_PathConf_HDD FilerConf_PathConf_DiskType = 1 - FilerConf_PathConf_SSD FilerConf_PathConf_DiskType = 2 -) - -// Enum value maps for FilerConf_PathConf_DiskType. -var ( - FilerConf_PathConf_DiskType_name = map[int32]string{ - 0: "NONE", - 1: "HDD", - 2: "SSD", - } - FilerConf_PathConf_DiskType_value = map[string]int32{ - "NONE": 0, - "HDD": 1, - "SSD": 2, - } -) - -func (x FilerConf_PathConf_DiskType) Enum() *FilerConf_PathConf_DiskType { - p := new(FilerConf_PathConf_DiskType) - *p = x - return p -} - -func (x FilerConf_PathConf_DiskType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FilerConf_PathConf_DiskType) Descriptor() protoreflect.EnumDescriptor { - return file_filer_proto_enumTypes[0].Descriptor() -} - -func (FilerConf_PathConf_DiskType) Type() protoreflect.EnumType { - return &file_filer_proto_enumTypes[0] -} - -func (x FilerConf_PathConf_DiskType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use FilerConf_PathConf_DiskType.Descriptor instead. -func (FilerConf_PathConf_DiskType) EnumDescriptor() ([]byte, []int) { - return file_filer_proto_rawDescGZIP(), []int{47, 0, 0} -} - type LookupDirectoryEntryRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -807,7 +758,7 @@ type FuseAttributes struct { GroupName []string `protobuf:"bytes,12,rep,name=group_name,json=groupName,proto3" json:"group_name,omitempty"` // for hdfs SymlinkTarget string `protobuf:"bytes,13,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlink_target,omitempty"` Md5 []byte `protobuf:"bytes,14,opt,name=md5,proto3" json:"md5,omitempty"` - VolumeType string `protobuf:"bytes,15,opt,name=volume_type,json=volumeType,proto3" json:"volume_type,omitempty"` + DiskType string `protobuf:"bytes,15,opt,name=volume_type,json=diskType,proto3" json:"volume_type,omitempty"` } func (x *FuseAttributes) Reset() { @@ -940,9 +891,9 @@ func (x *FuseAttributes) GetMd5() []byte { return nil } -func (x *FuseAttributes) GetVolumeType() string { +func (x *FuseAttributes) GetDiskType() string { if x != nil { - return x.VolumeType + return x.DiskType } return "" } @@ -1547,7 +1498,7 @@ type AssignVolumeRequest struct { DataCenter string `protobuf:"bytes,5,opt,name=data_center,json=dataCenter,proto3" json:"data_center,omitempty"` Path string `protobuf:"bytes,6,opt,name=path,proto3" json:"path,omitempty"` Rack string `protobuf:"bytes,7,opt,name=rack,proto3" json:"rack,omitempty"` - VolumeType string `protobuf:"bytes,8,opt,name=volume_type,json=volumeType,proto3" json:"volume_type,omitempty"` + DiskType string `protobuf:"bytes,8,opt,name=volume_type,json=diskType,proto3" json:"volume_type,omitempty"` } func (x *AssignVolumeRequest) Reset() { @@ -1631,9 +1582,9 @@ func (x *AssignVolumeRequest) GetRack() string { return "" } -func (x *AssignVolumeRequest) GetVolumeType() string { +func (x *AssignVolumeRequest) GetDiskType() string { if x != nil { - return x.VolumeType + return x.DiskType } return "" } @@ -2179,7 +2130,7 @@ type StatisticsRequest struct { Replication string `protobuf:"bytes,1,opt,name=replication,proto3" json:"replication,omitempty"` Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` Ttl string `protobuf:"bytes,3,opt,name=ttl,proto3" json:"ttl,omitempty"` - VolumeType string `protobuf:"bytes,4,opt,name=volume_type,json=volumeType,proto3" json:"volume_type,omitempty"` + DiskType string `protobuf:"bytes,4,opt,name=volume_type,json=diskType,proto3" json:"volume_type,omitempty"` } func (x *StatisticsRequest) Reset() { @@ -2235,9 +2186,9 @@ func (x *StatisticsRequest) GetTtl() string { return "" } -func (x *StatisticsRequest) GetVolumeType() string { +func (x *StatisticsRequest) GetDiskType() string { if x != nil { - return x.VolumeType + return x.DiskType } return "" } @@ -3177,13 +3128,13 @@ type FilerConf_PathConf struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - LocationPrefix string `protobuf:"bytes,1,opt,name=location_prefix,json=locationPrefix,proto3" json:"location_prefix,omitempty"` - Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` - Replication string `protobuf:"bytes,3,opt,name=replication,proto3" json:"replication,omitempty"` - Ttl string `protobuf:"bytes,4,opt,name=ttl,proto3" json:"ttl,omitempty"` - DiskType FilerConf_PathConf_DiskType `protobuf:"varint,5,opt,name=disk_type,json=diskType,proto3,enum=filer_pb.FilerConf_PathConf_DiskType" json:"disk_type,omitempty"` - Fsync bool `protobuf:"varint,6,opt,name=fsync,proto3" json:"fsync,omitempty"` - VolumeGrowthCount uint32 `protobuf:"varint,7,opt,name=volume_growth_count,json=volumeGrowthCount,proto3" json:"volume_growth_count,omitempty"` + LocationPrefix string `protobuf:"bytes,1,opt,name=location_prefix,json=locationPrefix,proto3" json:"location_prefix,omitempty"` + Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` + Replication string `protobuf:"bytes,3,opt,name=replication,proto3" json:"replication,omitempty"` + Ttl string `protobuf:"bytes,4,opt,name=ttl,proto3" json:"ttl,omitempty"` + DiskType string `protobuf:"bytes,5,opt,name=disk_type,json=diskType,proto3" json:"disk_type,omitempty"` + Fsync bool `protobuf:"varint,6,opt,name=fsync,proto3" json:"fsync,omitempty"` + VolumeGrowthCount uint32 `protobuf:"varint,7,opt,name=volume_growth_count,json=volumeGrowthCount,proto3" json:"volume_growth_count,omitempty"` } func (x *FilerConf_PathConf) Reset() { @@ -3246,11 +3197,11 @@ func (x *FilerConf_PathConf) GetTtl() string { return "" } -func (x *FilerConf_PathConf) GetDiskType() FilerConf_PathConf_DiskType { +func (x *FilerConf_PathConf) GetDiskType() string { if x != nil { return x.DiskType } - return FilerConf_PathConf_NONE + return "" } func (x *FilerConf_PathConf) GetFsync() bool { @@ -3644,13 +3595,13 @@ var file_filer_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x25, 0x0a, 0x0d, 0x4b, 0x76, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x22, 0x9d, 0x03, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x6f, 0x72, 0x22, 0xce, 0x02, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x52, 0x09, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xb9, 0x02, 0x0a, 0x08, 0x50, 0x61, 0x74, 0x68, 0x43, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xea, 0x01, 0x0a, 0x08, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1e, 0x0a, 0x0a, @@ -3659,125 +3610,120 @@ var file_filer_proto_rawDesc = []byte{ 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x74, 0x6c, - 0x12, 0x42, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x46, - 0x69, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x43, 0x6f, 0x6e, - 0x66, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x77, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, - 0x72, 0x6f, 0x77, 0x74, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x26, 0x0a, 0x08, 0x44, 0x69, - 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, - 0x12, 0x07, 0x0a, 0x03, 0x48, 0x44, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x53, 0x44, - 0x10, 0x02, 0x32, 0xdc, 0x0c, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x46, 0x69, - 0x6c, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x14, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x44, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x25, 0x2e, 0x66, 0x69, - 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x44, 0x69, 0x72, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x6f, - 0x6f, 0x6b, 0x75, 0x70, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, - 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x66, 0x69, - 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x69, 0x6c, 0x65, - 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x4c, 0x0a, 0x0b, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x66, 0x69, - 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x69, 0x6c, 0x65, - 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x66, 0x69, 0x6c, 0x65, - 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, - 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x65, - 0x6e, 0x64, 0x54, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x66, 0x69, 0x6c, 0x65, - 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x66, 0x69, 0x6c, 0x65, - 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x66, 0x69, - 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x69, 0x6c, 0x65, - 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x11, 0x41, 0x74, - 0x6f, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x22, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x41, 0x74, 0x6f, 0x6d, 0x69, - 0x63, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x41, + 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x66, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x73, + 0x79, 0x6e, 0x63, 0x12, 0x2e, 0x0a, 0x13, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x72, + 0x6f, 0x77, 0x74, 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x11, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x68, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x32, 0xdc, 0x0c, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x46, + 0x69, 0x6c, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x14, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x25, 0x2e, 0x66, + 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, + 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, + 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x66, + 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x69, 0x6c, + 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x4c, 0x0a, + 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x66, + 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x69, 0x6c, + 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x66, 0x69, 0x6c, + 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, + 0x5f, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0d, 0x41, 0x70, 0x70, + 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x66, 0x69, 0x6c, + 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x66, 0x69, 0x6c, + 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, + 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x66, + 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x66, 0x69, 0x6c, + 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x11, 0x41, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x41, 0x73, - 0x73, 0x69, 0x67, 0x6e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1d, 0x2e, 0x66, 0x69, 0x6c, + 0x12, 0x22, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x41, 0x74, 0x6f, 0x6d, + 0x69, 0x63, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, + 0x41, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x41, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1d, 0x2e, 0x66, 0x69, + 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x66, 0x69, 0x6c, 0x65, - 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1d, 0x2e, 0x66, 0x69, + 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, + 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x1d, 0x2e, 0x66, + 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x66, 0x69, 0x6c, - 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0e, - 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1f, - 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, - 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x69, 0x6c, - 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x49, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x1b, - 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, - 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x66, 0x69, - 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, + 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, + 0x0e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x1f, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, + 0x5f, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x66, 0x69, + 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, + 0x1b, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x66, + 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x66, - 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x72, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x22, 0x2e, 0x66, - 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x65, 0x0a, 0x16, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x22, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, - 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, - 0x12, 0x56, 0x0a, 0x0d, 0x4b, 0x65, 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x12, 0x1e, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4b, 0x65, 0x65, - 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4b, 0x65, 0x65, - 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x65, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, + 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x22, 0x2e, + 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x23, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x65, 0x0a, 0x16, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x22, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, + 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, + 0x01, 0x12, 0x56, 0x0a, 0x0d, 0x4b, 0x65, 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x12, 0x1e, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4b, 0x65, + 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4b, 0x65, + 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x65, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x66, 0x69, 0x6c, 0x65, + 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x42, 0x72, 0x6f, 0x6b, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, - 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x42, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x05, 0x4b, 0x76, 0x47, - 0x65, 0x74, 0x12, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4b, 0x76, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x66, 0x69, 0x6c, - 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4b, 0x76, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x05, 0x4b, 0x76, 0x50, 0x75, 0x74, 0x12, 0x16, - 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4b, 0x76, 0x50, 0x75, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, - 0x62, 0x2e, 0x4b, 0x76, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0x4f, 0x0a, 0x10, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, - 0x72, 0x69, 0x73, 0x6c, 0x75, 0x73, 0x66, 0x2f, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, - 0x73, 0x2f, 0x77, 0x65, 0x65, 0x64, 0x2f, 0x70, 0x62, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x05, 0x4b, 0x76, + 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4b, + 0x76, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x66, 0x69, + 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4b, 0x76, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x05, 0x4b, 0x76, 0x50, 0x75, 0x74, 0x12, + 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x70, 0x62, 0x2e, 0x4b, 0x76, 0x50, 0x75, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x5f, + 0x70, 0x62, 0x2e, 0x4b, 0x76, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x4f, 0x0a, 0x10, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, 0x66, 0x73, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x68, 0x72, 0x69, 0x73, 0x6c, 0x75, 0x73, 0x66, 0x2f, 0x73, 0x65, 0x61, 0x77, 0x65, 0x65, 0x64, + 0x66, 0x73, 0x2f, 0x77, 0x65, 0x65, 0x64, 0x2f, 0x70, 0x62, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x72, + 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3792,129 +3738,126 @@ func file_filer_proto_rawDescGZIP() []byte { return file_filer_proto_rawDescData } -var file_filer_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_filer_proto_msgTypes = make([]protoimpl.MessageInfo, 52) var file_filer_proto_goTypes = []interface{}{ - (FilerConf_PathConf_DiskType)(0), // 0: filer_pb.FilerConf.PathConf.DiskType - (*LookupDirectoryEntryRequest)(nil), // 1: filer_pb.LookupDirectoryEntryRequest - (*LookupDirectoryEntryResponse)(nil), // 2: filer_pb.LookupDirectoryEntryResponse - (*ListEntriesRequest)(nil), // 3: filer_pb.ListEntriesRequest - (*ListEntriesResponse)(nil), // 4: filer_pb.ListEntriesResponse - (*Entry)(nil), // 5: filer_pb.Entry - (*FullEntry)(nil), // 6: filer_pb.FullEntry - (*EventNotification)(nil), // 7: filer_pb.EventNotification - (*FileChunk)(nil), // 8: filer_pb.FileChunk - (*FileChunkManifest)(nil), // 9: filer_pb.FileChunkManifest - (*FileId)(nil), // 10: filer_pb.FileId - (*FuseAttributes)(nil), // 11: filer_pb.FuseAttributes - (*CreateEntryRequest)(nil), // 12: filer_pb.CreateEntryRequest - (*CreateEntryResponse)(nil), // 13: filer_pb.CreateEntryResponse - (*UpdateEntryRequest)(nil), // 14: filer_pb.UpdateEntryRequest - (*UpdateEntryResponse)(nil), // 15: filer_pb.UpdateEntryResponse - (*AppendToEntryRequest)(nil), // 16: filer_pb.AppendToEntryRequest - (*AppendToEntryResponse)(nil), // 17: filer_pb.AppendToEntryResponse - (*DeleteEntryRequest)(nil), // 18: filer_pb.DeleteEntryRequest - (*DeleteEntryResponse)(nil), // 19: filer_pb.DeleteEntryResponse - (*AtomicRenameEntryRequest)(nil), // 20: filer_pb.AtomicRenameEntryRequest - (*AtomicRenameEntryResponse)(nil), // 21: filer_pb.AtomicRenameEntryResponse - (*AssignVolumeRequest)(nil), // 22: filer_pb.AssignVolumeRequest - (*AssignVolumeResponse)(nil), // 23: filer_pb.AssignVolumeResponse - (*LookupVolumeRequest)(nil), // 24: filer_pb.LookupVolumeRequest - (*Locations)(nil), // 25: filer_pb.Locations - (*Location)(nil), // 26: filer_pb.Location - (*LookupVolumeResponse)(nil), // 27: filer_pb.LookupVolumeResponse - (*Collection)(nil), // 28: filer_pb.Collection - (*CollectionListRequest)(nil), // 29: filer_pb.CollectionListRequest - (*CollectionListResponse)(nil), // 30: filer_pb.CollectionListResponse - (*DeleteCollectionRequest)(nil), // 31: filer_pb.DeleteCollectionRequest - (*DeleteCollectionResponse)(nil), // 32: filer_pb.DeleteCollectionResponse - (*StatisticsRequest)(nil), // 33: filer_pb.StatisticsRequest - (*StatisticsResponse)(nil), // 34: filer_pb.StatisticsResponse - (*GetFilerConfigurationRequest)(nil), // 35: filer_pb.GetFilerConfigurationRequest - (*GetFilerConfigurationResponse)(nil), // 36: filer_pb.GetFilerConfigurationResponse - (*SubscribeMetadataRequest)(nil), // 37: filer_pb.SubscribeMetadataRequest - (*SubscribeMetadataResponse)(nil), // 38: filer_pb.SubscribeMetadataResponse - (*LogEntry)(nil), // 39: filer_pb.LogEntry - (*KeepConnectedRequest)(nil), // 40: filer_pb.KeepConnectedRequest - (*KeepConnectedResponse)(nil), // 41: filer_pb.KeepConnectedResponse - (*LocateBrokerRequest)(nil), // 42: filer_pb.LocateBrokerRequest - (*LocateBrokerResponse)(nil), // 43: filer_pb.LocateBrokerResponse - (*KvGetRequest)(nil), // 44: filer_pb.KvGetRequest - (*KvGetResponse)(nil), // 45: filer_pb.KvGetResponse - (*KvPutRequest)(nil), // 46: filer_pb.KvPutRequest - (*KvPutResponse)(nil), // 47: filer_pb.KvPutResponse - (*FilerConf)(nil), // 48: filer_pb.FilerConf - nil, // 49: filer_pb.Entry.ExtendedEntry - nil, // 50: filer_pb.LookupVolumeResponse.LocationsMapEntry - (*LocateBrokerResponse_Resource)(nil), // 51: filer_pb.LocateBrokerResponse.Resource - (*FilerConf_PathConf)(nil), // 52: filer_pb.FilerConf.PathConf + (*LookupDirectoryEntryRequest)(nil), // 0: filer_pb.LookupDirectoryEntryRequest + (*LookupDirectoryEntryResponse)(nil), // 1: filer_pb.LookupDirectoryEntryResponse + (*ListEntriesRequest)(nil), // 2: filer_pb.ListEntriesRequest + (*ListEntriesResponse)(nil), // 3: filer_pb.ListEntriesResponse + (*Entry)(nil), // 4: filer_pb.Entry + (*FullEntry)(nil), // 5: filer_pb.FullEntry + (*EventNotification)(nil), // 6: filer_pb.EventNotification + (*FileChunk)(nil), // 7: filer_pb.FileChunk + (*FileChunkManifest)(nil), // 8: filer_pb.FileChunkManifest + (*FileId)(nil), // 9: filer_pb.FileId + (*FuseAttributes)(nil), // 10: filer_pb.FuseAttributes + (*CreateEntryRequest)(nil), // 11: filer_pb.CreateEntryRequest + (*CreateEntryResponse)(nil), // 12: filer_pb.CreateEntryResponse + (*UpdateEntryRequest)(nil), // 13: filer_pb.UpdateEntryRequest + (*UpdateEntryResponse)(nil), // 14: filer_pb.UpdateEntryResponse + (*AppendToEntryRequest)(nil), // 15: filer_pb.AppendToEntryRequest + (*AppendToEntryResponse)(nil), // 16: filer_pb.AppendToEntryResponse + (*DeleteEntryRequest)(nil), // 17: filer_pb.DeleteEntryRequest + (*DeleteEntryResponse)(nil), // 18: filer_pb.DeleteEntryResponse + (*AtomicRenameEntryRequest)(nil), // 19: filer_pb.AtomicRenameEntryRequest + (*AtomicRenameEntryResponse)(nil), // 20: filer_pb.AtomicRenameEntryResponse + (*AssignVolumeRequest)(nil), // 21: filer_pb.AssignVolumeRequest + (*AssignVolumeResponse)(nil), // 22: filer_pb.AssignVolumeResponse + (*LookupVolumeRequest)(nil), // 23: filer_pb.LookupVolumeRequest + (*Locations)(nil), // 24: filer_pb.Locations + (*Location)(nil), // 25: filer_pb.Location + (*LookupVolumeResponse)(nil), // 26: filer_pb.LookupVolumeResponse + (*Collection)(nil), // 27: filer_pb.Collection + (*CollectionListRequest)(nil), // 28: filer_pb.CollectionListRequest + (*CollectionListResponse)(nil), // 29: filer_pb.CollectionListResponse + (*DeleteCollectionRequest)(nil), // 30: filer_pb.DeleteCollectionRequest + (*DeleteCollectionResponse)(nil), // 31: filer_pb.DeleteCollectionResponse + (*StatisticsRequest)(nil), // 32: filer_pb.StatisticsRequest + (*StatisticsResponse)(nil), // 33: filer_pb.StatisticsResponse + (*GetFilerConfigurationRequest)(nil), // 34: filer_pb.GetFilerConfigurationRequest + (*GetFilerConfigurationResponse)(nil), // 35: filer_pb.GetFilerConfigurationResponse + (*SubscribeMetadataRequest)(nil), // 36: filer_pb.SubscribeMetadataRequest + (*SubscribeMetadataResponse)(nil), // 37: filer_pb.SubscribeMetadataResponse + (*LogEntry)(nil), // 38: filer_pb.LogEntry + (*KeepConnectedRequest)(nil), // 39: filer_pb.KeepConnectedRequest + (*KeepConnectedResponse)(nil), // 40: filer_pb.KeepConnectedResponse + (*LocateBrokerRequest)(nil), // 41: filer_pb.LocateBrokerRequest + (*LocateBrokerResponse)(nil), // 42: filer_pb.LocateBrokerResponse + (*KvGetRequest)(nil), // 43: filer_pb.KvGetRequest + (*KvGetResponse)(nil), // 44: filer_pb.KvGetResponse + (*KvPutRequest)(nil), // 45: filer_pb.KvPutRequest + (*KvPutResponse)(nil), // 46: filer_pb.KvPutResponse + (*FilerConf)(nil), // 47: filer_pb.FilerConf + nil, // 48: filer_pb.Entry.ExtendedEntry + nil, // 49: filer_pb.LookupVolumeResponse.LocationsMapEntry + (*LocateBrokerResponse_Resource)(nil), // 50: filer_pb.LocateBrokerResponse.Resource + (*FilerConf_PathConf)(nil), // 51: filer_pb.FilerConf.PathConf } var file_filer_proto_depIdxs = []int32{ - 5, // 0: filer_pb.LookupDirectoryEntryResponse.entry:type_name -> filer_pb.Entry - 5, // 1: filer_pb.ListEntriesResponse.entry:type_name -> filer_pb.Entry - 8, // 2: filer_pb.Entry.chunks:type_name -> filer_pb.FileChunk - 11, // 3: filer_pb.Entry.attributes:type_name -> filer_pb.FuseAttributes - 49, // 4: filer_pb.Entry.extended:type_name -> filer_pb.Entry.ExtendedEntry - 5, // 5: filer_pb.FullEntry.entry:type_name -> filer_pb.Entry - 5, // 6: filer_pb.EventNotification.old_entry:type_name -> filer_pb.Entry - 5, // 7: filer_pb.EventNotification.new_entry:type_name -> filer_pb.Entry - 10, // 8: filer_pb.FileChunk.fid:type_name -> filer_pb.FileId - 10, // 9: filer_pb.FileChunk.source_fid:type_name -> filer_pb.FileId - 8, // 10: filer_pb.FileChunkManifest.chunks:type_name -> filer_pb.FileChunk - 5, // 11: filer_pb.CreateEntryRequest.entry:type_name -> filer_pb.Entry - 5, // 12: filer_pb.UpdateEntryRequest.entry:type_name -> filer_pb.Entry - 8, // 13: filer_pb.AppendToEntryRequest.chunks:type_name -> filer_pb.FileChunk - 26, // 14: filer_pb.Locations.locations:type_name -> filer_pb.Location - 50, // 15: filer_pb.LookupVolumeResponse.locations_map:type_name -> filer_pb.LookupVolumeResponse.LocationsMapEntry - 28, // 16: filer_pb.CollectionListResponse.collections:type_name -> filer_pb.Collection - 7, // 17: filer_pb.SubscribeMetadataResponse.event_notification:type_name -> filer_pb.EventNotification - 51, // 18: filer_pb.LocateBrokerResponse.resources:type_name -> filer_pb.LocateBrokerResponse.Resource - 52, // 19: filer_pb.FilerConf.locations:type_name -> filer_pb.FilerConf.PathConf - 25, // 20: filer_pb.LookupVolumeResponse.LocationsMapEntry.value:type_name -> filer_pb.Locations - 0, // 21: filer_pb.FilerConf.PathConf.disk_type:type_name -> filer_pb.FilerConf.PathConf.DiskType - 1, // 22: filer_pb.SeaweedFiler.LookupDirectoryEntry:input_type -> filer_pb.LookupDirectoryEntryRequest - 3, // 23: filer_pb.SeaweedFiler.ListEntries:input_type -> filer_pb.ListEntriesRequest - 12, // 24: filer_pb.SeaweedFiler.CreateEntry:input_type -> filer_pb.CreateEntryRequest - 14, // 25: filer_pb.SeaweedFiler.UpdateEntry:input_type -> filer_pb.UpdateEntryRequest - 16, // 26: filer_pb.SeaweedFiler.AppendToEntry:input_type -> filer_pb.AppendToEntryRequest - 18, // 27: filer_pb.SeaweedFiler.DeleteEntry:input_type -> filer_pb.DeleteEntryRequest - 20, // 28: filer_pb.SeaweedFiler.AtomicRenameEntry:input_type -> filer_pb.AtomicRenameEntryRequest - 22, // 29: filer_pb.SeaweedFiler.AssignVolume:input_type -> filer_pb.AssignVolumeRequest - 24, // 30: filer_pb.SeaweedFiler.LookupVolume:input_type -> filer_pb.LookupVolumeRequest - 29, // 31: filer_pb.SeaweedFiler.CollectionList:input_type -> filer_pb.CollectionListRequest - 31, // 32: filer_pb.SeaweedFiler.DeleteCollection:input_type -> filer_pb.DeleteCollectionRequest - 33, // 33: filer_pb.SeaweedFiler.Statistics:input_type -> filer_pb.StatisticsRequest - 35, // 34: filer_pb.SeaweedFiler.GetFilerConfiguration:input_type -> filer_pb.GetFilerConfigurationRequest - 37, // 35: filer_pb.SeaweedFiler.SubscribeMetadata:input_type -> filer_pb.SubscribeMetadataRequest - 37, // 36: filer_pb.SeaweedFiler.SubscribeLocalMetadata:input_type -> filer_pb.SubscribeMetadataRequest - 40, // 37: filer_pb.SeaweedFiler.KeepConnected:input_type -> filer_pb.KeepConnectedRequest - 42, // 38: filer_pb.SeaweedFiler.LocateBroker:input_type -> filer_pb.LocateBrokerRequest - 44, // 39: filer_pb.SeaweedFiler.KvGet:input_type -> filer_pb.KvGetRequest - 46, // 40: filer_pb.SeaweedFiler.KvPut:input_type -> filer_pb.KvPutRequest - 2, // 41: filer_pb.SeaweedFiler.LookupDirectoryEntry:output_type -> filer_pb.LookupDirectoryEntryResponse - 4, // 42: filer_pb.SeaweedFiler.ListEntries:output_type -> filer_pb.ListEntriesResponse - 13, // 43: filer_pb.SeaweedFiler.CreateEntry:output_type -> filer_pb.CreateEntryResponse - 15, // 44: filer_pb.SeaweedFiler.UpdateEntry:output_type -> filer_pb.UpdateEntryResponse - 17, // 45: filer_pb.SeaweedFiler.AppendToEntry:output_type -> filer_pb.AppendToEntryResponse - 19, // 46: filer_pb.SeaweedFiler.DeleteEntry:output_type -> filer_pb.DeleteEntryResponse - 21, // 47: filer_pb.SeaweedFiler.AtomicRenameEntry:output_type -> filer_pb.AtomicRenameEntryResponse - 23, // 48: filer_pb.SeaweedFiler.AssignVolume:output_type -> filer_pb.AssignVolumeResponse - 27, // 49: filer_pb.SeaweedFiler.LookupVolume:output_type -> filer_pb.LookupVolumeResponse - 30, // 50: filer_pb.SeaweedFiler.CollectionList:output_type -> filer_pb.CollectionListResponse - 32, // 51: filer_pb.SeaweedFiler.DeleteCollection:output_type -> filer_pb.DeleteCollectionResponse - 34, // 52: filer_pb.SeaweedFiler.Statistics:output_type -> filer_pb.StatisticsResponse - 36, // 53: filer_pb.SeaweedFiler.GetFilerConfiguration:output_type -> filer_pb.GetFilerConfigurationResponse - 38, // 54: filer_pb.SeaweedFiler.SubscribeMetadata:output_type -> filer_pb.SubscribeMetadataResponse - 38, // 55: filer_pb.SeaweedFiler.SubscribeLocalMetadata:output_type -> filer_pb.SubscribeMetadataResponse - 41, // 56: filer_pb.SeaweedFiler.KeepConnected:output_type -> filer_pb.KeepConnectedResponse - 43, // 57: filer_pb.SeaweedFiler.LocateBroker:output_type -> filer_pb.LocateBrokerResponse - 45, // 58: filer_pb.SeaweedFiler.KvGet:output_type -> filer_pb.KvGetResponse - 47, // 59: filer_pb.SeaweedFiler.KvPut:output_type -> filer_pb.KvPutResponse - 41, // [41:60] is the sub-list for method output_type - 22, // [22:41] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 4, // 0: filer_pb.LookupDirectoryEntryResponse.entry:type_name -> filer_pb.Entry + 4, // 1: filer_pb.ListEntriesResponse.entry:type_name -> filer_pb.Entry + 7, // 2: filer_pb.Entry.chunks:type_name -> filer_pb.FileChunk + 10, // 3: filer_pb.Entry.attributes:type_name -> filer_pb.FuseAttributes + 48, // 4: filer_pb.Entry.extended:type_name -> filer_pb.Entry.ExtendedEntry + 4, // 5: filer_pb.FullEntry.entry:type_name -> filer_pb.Entry + 4, // 6: filer_pb.EventNotification.old_entry:type_name -> filer_pb.Entry + 4, // 7: filer_pb.EventNotification.new_entry:type_name -> filer_pb.Entry + 9, // 8: filer_pb.FileChunk.fid:type_name -> filer_pb.FileId + 9, // 9: filer_pb.FileChunk.source_fid:type_name -> filer_pb.FileId + 7, // 10: filer_pb.FileChunkManifest.chunks:type_name -> filer_pb.FileChunk + 4, // 11: filer_pb.CreateEntryRequest.entry:type_name -> filer_pb.Entry + 4, // 12: filer_pb.UpdateEntryRequest.entry:type_name -> filer_pb.Entry + 7, // 13: filer_pb.AppendToEntryRequest.chunks:type_name -> filer_pb.FileChunk + 25, // 14: filer_pb.Locations.locations:type_name -> filer_pb.Location + 49, // 15: filer_pb.LookupVolumeResponse.locations_map:type_name -> filer_pb.LookupVolumeResponse.LocationsMapEntry + 27, // 16: filer_pb.CollectionListResponse.collections:type_name -> filer_pb.Collection + 6, // 17: filer_pb.SubscribeMetadataResponse.event_notification:type_name -> filer_pb.EventNotification + 50, // 18: filer_pb.LocateBrokerResponse.resources:type_name -> filer_pb.LocateBrokerResponse.Resource + 51, // 19: filer_pb.FilerConf.locations:type_name -> filer_pb.FilerConf.PathConf + 24, // 20: filer_pb.LookupVolumeResponse.LocationsMapEntry.value:type_name -> filer_pb.Locations + 0, // 21: filer_pb.SeaweedFiler.LookupDirectoryEntry:input_type -> filer_pb.LookupDirectoryEntryRequest + 2, // 22: filer_pb.SeaweedFiler.ListEntries:input_type -> filer_pb.ListEntriesRequest + 11, // 23: filer_pb.SeaweedFiler.CreateEntry:input_type -> filer_pb.CreateEntryRequest + 13, // 24: filer_pb.SeaweedFiler.UpdateEntry:input_type -> filer_pb.UpdateEntryRequest + 15, // 25: filer_pb.SeaweedFiler.AppendToEntry:input_type -> filer_pb.AppendToEntryRequest + 17, // 26: filer_pb.SeaweedFiler.DeleteEntry:input_type -> filer_pb.DeleteEntryRequest + 19, // 27: filer_pb.SeaweedFiler.AtomicRenameEntry:input_type -> filer_pb.AtomicRenameEntryRequest + 21, // 28: filer_pb.SeaweedFiler.AssignVolume:input_type -> filer_pb.AssignVolumeRequest + 23, // 29: filer_pb.SeaweedFiler.LookupVolume:input_type -> filer_pb.LookupVolumeRequest + 28, // 30: filer_pb.SeaweedFiler.CollectionList:input_type -> filer_pb.CollectionListRequest + 30, // 31: filer_pb.SeaweedFiler.DeleteCollection:input_type -> filer_pb.DeleteCollectionRequest + 32, // 32: filer_pb.SeaweedFiler.Statistics:input_type -> filer_pb.StatisticsRequest + 34, // 33: filer_pb.SeaweedFiler.GetFilerConfiguration:input_type -> filer_pb.GetFilerConfigurationRequest + 36, // 34: filer_pb.SeaweedFiler.SubscribeMetadata:input_type -> filer_pb.SubscribeMetadataRequest + 36, // 35: filer_pb.SeaweedFiler.SubscribeLocalMetadata:input_type -> filer_pb.SubscribeMetadataRequest + 39, // 36: filer_pb.SeaweedFiler.KeepConnected:input_type -> filer_pb.KeepConnectedRequest + 41, // 37: filer_pb.SeaweedFiler.LocateBroker:input_type -> filer_pb.LocateBrokerRequest + 43, // 38: filer_pb.SeaweedFiler.KvGet:input_type -> filer_pb.KvGetRequest + 45, // 39: filer_pb.SeaweedFiler.KvPut:input_type -> filer_pb.KvPutRequest + 1, // 40: filer_pb.SeaweedFiler.LookupDirectoryEntry:output_type -> filer_pb.LookupDirectoryEntryResponse + 3, // 41: filer_pb.SeaweedFiler.ListEntries:output_type -> filer_pb.ListEntriesResponse + 12, // 42: filer_pb.SeaweedFiler.CreateEntry:output_type -> filer_pb.CreateEntryResponse + 14, // 43: filer_pb.SeaweedFiler.UpdateEntry:output_type -> filer_pb.UpdateEntryResponse + 16, // 44: filer_pb.SeaweedFiler.AppendToEntry:output_type -> filer_pb.AppendToEntryResponse + 18, // 45: filer_pb.SeaweedFiler.DeleteEntry:output_type -> filer_pb.DeleteEntryResponse + 20, // 46: filer_pb.SeaweedFiler.AtomicRenameEntry:output_type -> filer_pb.AtomicRenameEntryResponse + 22, // 47: filer_pb.SeaweedFiler.AssignVolume:output_type -> filer_pb.AssignVolumeResponse + 26, // 48: filer_pb.SeaweedFiler.LookupVolume:output_type -> filer_pb.LookupVolumeResponse + 29, // 49: filer_pb.SeaweedFiler.CollectionList:output_type -> filer_pb.CollectionListResponse + 31, // 50: filer_pb.SeaweedFiler.DeleteCollection:output_type -> filer_pb.DeleteCollectionResponse + 33, // 51: filer_pb.SeaweedFiler.Statistics:output_type -> filer_pb.StatisticsResponse + 35, // 52: filer_pb.SeaweedFiler.GetFilerConfiguration:output_type -> filer_pb.GetFilerConfigurationResponse + 37, // 53: filer_pb.SeaweedFiler.SubscribeMetadata:output_type -> filer_pb.SubscribeMetadataResponse + 37, // 54: filer_pb.SeaweedFiler.SubscribeLocalMetadata:output_type -> filer_pb.SubscribeMetadataResponse + 40, // 55: filer_pb.SeaweedFiler.KeepConnected:output_type -> filer_pb.KeepConnectedResponse + 42, // 56: filer_pb.SeaweedFiler.LocateBroker:output_type -> filer_pb.LocateBrokerResponse + 44, // 57: filer_pb.SeaweedFiler.KvGet:output_type -> filer_pb.KvGetResponse + 46, // 58: filer_pb.SeaweedFiler.KvPut:output_type -> filer_pb.KvPutResponse + 40, // [40:59] is the sub-list for method output_type + 21, // [21:40] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_filer_proto_init() } @@ -4529,14 +4472,13 @@ func file_filer_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_filer_proto_rawDesc, - NumEnums: 1, + NumEnums: 0, NumMessages: 52, NumExtensions: 0, NumServices: 1, }, GoTypes: file_filer_proto_goTypes, DependencyIndexes: file_filer_proto_depIdxs, - EnumInfos: file_filer_proto_enumTypes, MessageInfos: file_filer_proto_msgTypes, }.Build() File_filer_proto = out.File diff --git a/weed/pb/master_pb/master.pb.go b/weed/pb/master_pb/master.pb.go index 799e2fe83..74fb00f6d 100644 --- a/weed/pb/master_pb/master.pb.go +++ b/weed/pb/master_pb/master.pb.go @@ -305,7 +305,7 @@ type VolumeInformationMessage struct { ModifiedAtSecond int64 `protobuf:"varint,12,opt,name=modified_at_second,json=modifiedAtSecond,proto3" json:"modified_at_second,omitempty"` RemoteStorageName string `protobuf:"bytes,13,opt,name=remote_storage_name,json=remoteStorageName,proto3" json:"remote_storage_name,omitempty"` RemoteStorageKey string `protobuf:"bytes,14,opt,name=remote_storage_key,json=remoteStorageKey,proto3" json:"remote_storage_key,omitempty"` - VolumeType string `protobuf:"bytes,15,opt,name=volume_type,json=volumeType,proto3" json:"volume_type,omitempty"` + DiskType string `protobuf:"bytes,15,opt,name=volume_type,json=diskType,proto3" json:"volume_type,omitempty"` } func (x *VolumeInformationMessage) Reset() { @@ -438,9 +438,9 @@ func (x *VolumeInformationMessage) GetRemoteStorageKey() string { return "" } -func (x *VolumeInformationMessage) GetVolumeType() string { +func (x *VolumeInformationMessage) GetDiskType() string { if x != nil { - return x.VolumeType + return x.DiskType } return "" } @@ -455,7 +455,7 @@ type VolumeShortInformationMessage struct { ReplicaPlacement uint32 `protobuf:"varint,8,opt,name=replica_placement,json=replicaPlacement,proto3" json:"replica_placement,omitempty"` Version uint32 `protobuf:"varint,9,opt,name=version,proto3" json:"version,omitempty"` Ttl uint32 `protobuf:"varint,10,opt,name=ttl,proto3" json:"ttl,omitempty"` - VolumeType string `protobuf:"bytes,15,opt,name=volume_type,json=volumeType,proto3" json:"volume_type,omitempty"` + DiskType string `protobuf:"bytes,15,opt,name=volume_type,json=diskType,proto3" json:"volume_type,omitempty"` } func (x *VolumeShortInformationMessage) Reset() { @@ -525,9 +525,9 @@ func (x *VolumeShortInformationMessage) GetTtl() uint32 { return 0 } -func (x *VolumeShortInformationMessage) GetVolumeType() string { +func (x *VolumeShortInformationMessage) GetDiskType() string { if x != nil { - return x.VolumeType + return x.DiskType } return "" } @@ -1056,7 +1056,7 @@ type AssignRequest struct { DataNode string `protobuf:"bytes,7,opt,name=data_node,json=dataNode,proto3" json:"data_node,omitempty"` MemoryMapMaxSizeMb uint32 `protobuf:"varint,8,opt,name=memory_map_max_size_mb,json=memoryMapMaxSizeMb,proto3" json:"memory_map_max_size_mb,omitempty"` WritableVolumeCount uint32 `protobuf:"varint,9,opt,name=Writable_volume_count,json=WritableVolumeCount,proto3" json:"Writable_volume_count,omitempty"` - VolumeType string `protobuf:"bytes,10,opt,name=volume_type,json=volumeType,proto3" json:"volume_type,omitempty"` + DiskType string `protobuf:"bytes,10,opt,name=volume_type,json=diskType,proto3" json:"volume_type,omitempty"` } func (x *AssignRequest) Reset() { @@ -1154,9 +1154,9 @@ func (x *AssignRequest) GetWritableVolumeCount() uint32 { return 0 } -func (x *AssignRequest) GetVolumeType() string { +func (x *AssignRequest) GetDiskType() string { if x != nil { - return x.VolumeType + return x.DiskType } return "" } @@ -1256,7 +1256,7 @@ type StatisticsRequest struct { Replication string `protobuf:"bytes,1,opt,name=replication,proto3" json:"replication,omitempty"` Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` Ttl string `protobuf:"bytes,3,opt,name=ttl,proto3" json:"ttl,omitempty"` - VolumeType string `protobuf:"bytes,4,opt,name=volume_type,json=volumeType,proto3" json:"volume_type,omitempty"` + DiskType string `protobuf:"bytes,4,opt,name=volume_type,json=diskType,proto3" json:"volume_type,omitempty"` } func (x *StatisticsRequest) Reset() { @@ -1312,9 +1312,9 @@ func (x *StatisticsRequest) GetTtl() string { return "" } -func (x *StatisticsRequest) GetVolumeType() string { +func (x *StatisticsRequest) GetDiskType() string { if x != nil { - return x.VolumeType + return x.DiskType } return "" } diff --git a/weed/replication/sink/filersink/fetch_write.go b/weed/replication/sink/filersink/fetch_write.go index ac9ff789a..bdd2ba585 100644 --- a/weed/replication/sink/filersink/fetch_write.go +++ b/weed/replication/sink/filersink/fetch_write.go @@ -77,7 +77,7 @@ func (fs *FilerSink) fetchAndWrite(sourceChunk *filer_pb.FileChunk, path string) Collection: fs.collection, TtlSec: fs.ttlSec, DataCenter: fs.dataCenter, - VolumeType: fs.volumeType, + DiskType: fs.diskType, Path: path, } diff --git a/weed/replication/sink/filersink/filer_sink.go b/weed/replication/sink/filersink/filer_sink.go index a60a31b4a..ae257e446 100644 --- a/weed/replication/sink/filersink/filer_sink.go +++ b/weed/replication/sink/filersink/filer_sink.go @@ -23,7 +23,7 @@ type FilerSink struct { replication string collection string ttlSec int32 - volumeType string + diskType string dataCenter string grpcDialOption grpc.DialOption } @@ -47,7 +47,7 @@ func (fs *FilerSink) Initialize(configuration util.Configuration, prefix string) configuration.GetString(prefix+"replication"), configuration.GetString(prefix+"collection"), configuration.GetInt(prefix+"ttlSec"), - configuration.GetString(prefix+"volumeType"), + configuration.GetString(prefix+"diskType"), security.LoadClientTLS(util.GetViper(), "grpc.client")) } @@ -56,13 +56,13 @@ func (fs *FilerSink) SetSourceFiler(s *source.FilerSource) { } func (fs *FilerSink) DoInitialize(grpcAddress string, dir string, - replication string, collection string, ttlSec int, volumeType string, grpcDialOption grpc.DialOption) (err error) { + replication string, collection string, ttlSec int, diskType string, grpcDialOption grpc.DialOption) (err error) { fs.grpcAddress = grpcAddress fs.dir = dir fs.replication = replication fs.collection = collection fs.ttlSec = int32(ttlSec) - fs.volumeType = volumeType + fs.diskType = diskType fs.grpcDialOption = grpcDialOption return nil } diff --git a/weed/server/common.go b/weed/server/common.go index 852fffb5e..187f45723 100644 --- a/weed/server/common.go +++ b/weed/server/common.go @@ -131,7 +131,7 @@ func submitForClientHandler(w http.ResponseWriter, r *http.Request, masterUrl st Replication: r.FormValue("replication"), Collection: r.FormValue("collection"), Ttl: r.FormValue("ttl"), - VolumeType: r.FormValue("volumeType"), + DiskType: r.FormValue("diskType"), } assignResult, ae := operation.Assign(masterUrl, grpcDialOption, ar) if ae != nil { diff --git a/weed/server/filer_grpc_server.go b/weed/server/filer_grpc_server.go index bc6d0ceb9..e8a57261d 100644 --- a/weed/server/filer_grpc_server.go +++ b/weed/server/filer_grpc_server.go @@ -265,7 +265,7 @@ func (fs *FilerServer) cleanupChunks(fullpath string, existingEntry *filer.Entry newEntry.Attributes.Collection, newEntry.Attributes.Replication, newEntry.Attributes.TtlSec, - newEntry.Attributes.VolumeType, + newEntry.Attributes.DiskType, "", "", ) @@ -309,7 +309,7 @@ func (fs *FilerServer) AppendToEntry(ctx context.Context, req *filer_pb.AppendTo } entry.Chunks = append(entry.Chunks, req.Chunks...) - so := fs.detectStorageOption(string(fullpath), entry.Collection, entry.Replication, entry.TtlSec, entry.VolumeType, "", "") + so := fs.detectStorageOption(string(fullpath), entry.Collection, entry.Replication, entry.TtlSec, entry.DiskType, "", "") entry.Chunks, err = filer.MaybeManifestize(fs.saveAsChunk(so), entry.Chunks) if err != nil { // not good, but should be ok @@ -335,7 +335,7 @@ func (fs *FilerServer) DeleteEntry(ctx context.Context, req *filer_pb.DeleteEntr func (fs *FilerServer) AssignVolume(ctx context.Context, req *filer_pb.AssignVolumeRequest) (resp *filer_pb.AssignVolumeResponse, err error) { - so := fs.detectStorageOption(req.Path, req.Collection, req.Replication, req.TtlSec, req.VolumeType, req.DataCenter, req.Rack) + so := fs.detectStorageOption(req.Path, req.Collection, req.Replication, req.TtlSec, req.DiskType, req.DataCenter, req.Rack) assignRequest, altRequest := so.ToAssignRequests(int(req.Count)) @@ -405,7 +405,7 @@ func (fs *FilerServer) Statistics(ctx context.Context, req *filer_pb.StatisticsR Replication: req.Replication, Collection: req.Collection, Ttl: req.Ttl, - VolumeType: req.VolumeType, + DiskType: req.DiskType, }) if grpcErr != nil { return grpcErr diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.go index e6fc31d8e..c8a05b1d4 100644 --- a/weed/server/filer_server_handlers_write.go +++ b/weed/server/filer_server_handlers_write.go @@ -61,7 +61,7 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request) { query.Get("collection"), query.Get("replication"), query.Get("ttl"), - query.Get("volumeType"), + query.Get("diskType"), query.Get("dataCenter"), query.Get("rack"), ) @@ -105,7 +105,7 @@ func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusNoContent) } -func (fs *FilerServer) detectStorageOption(requestURI, qCollection, qReplication string, ttlSeconds int32, volumeType string, dataCenter, rack string) *operation.StorageOption { +func (fs *FilerServer) detectStorageOption(requestURI, qCollection, qReplication string, ttlSeconds int32, diskType string, dataCenter, rack string) *operation.StorageOption { collection := util.Nvl(qCollection, fs.option.Collection) replication := util.Nvl(qReplication, fs.option.DefaultReplication) @@ -135,18 +135,18 @@ func (fs *FilerServer) detectStorageOption(requestURI, qCollection, qReplication DataCenter: util.Nvl(dataCenter, fs.option.DataCenter), Rack: util.Nvl(rack, fs.option.Rack), TtlSeconds: ttlSeconds, - VolumeType: volumeType, + DiskType: diskType, Fsync: fsync || rule.Fsync, VolumeGrowthCount: rule.VolumeGrowthCount, } } -func (fs *FilerServer) detectStorageOption0(requestURI, qCollection, qReplication string, qTtl string, volumeType string, dataCenter, rack string) *operation.StorageOption { +func (fs *FilerServer) detectStorageOption0(requestURI, qCollection, qReplication string, qTtl string, diskType string, dataCenter, rack string) *operation.StorageOption { ttl, err := needle.ReadTTL(qTtl) if err != nil { glog.Errorf("fail to parse ttl %s: %v", qTtl, err) } - return fs.detectStorageOption(requestURI, qCollection, qReplication, int32(ttl.Minutes())*60, volumeType, dataCenter, rack) + return fs.detectStorageOption(requestURI, qCollection, qReplication, int32(ttl.Minutes())*60, diskType, dataCenter, rack) } diff --git a/weed/server/filer_server_handlers_write_autochunk.go b/weed/server/filer_server_handlers_write_autochunk.go index 9f88bd202..e52e20a8a 100644 --- a/weed/server/filer_server_handlers_write_autochunk.go +++ b/weed/server/filer_server_handlers_write_autochunk.go @@ -159,7 +159,7 @@ func (fs *FilerServer) saveMetaData(ctx context.Context, r *http.Request, fileNa Replication: so.Replication, Collection: so.Collection, TtlSec: so.TtlSeconds, - VolumeType: so.VolumeType, + DiskType: so.DiskType, Mime: contentType, Md5: md5bytes, FileSize: uint64(chunkOffset), diff --git a/weed/server/filer_server_handlers_write_cipher.go b/weed/server/filer_server_handlers_write_cipher.go index c5e8a74d8..f9310bdd2 100644 --- a/weed/server/filer_server_handlers_write_cipher.go +++ b/weed/server/filer_server_handlers_write_cipher.go @@ -68,7 +68,7 @@ func (fs *FilerServer) encrypt(ctx context.Context, w http.ResponseWriter, r *ht Replication: so.Replication, Collection: so.Collection, TtlSec: so.TtlSeconds, - VolumeType: so.VolumeType, + DiskType: so.DiskType, Mime: pu.MimeType, Md5: util.Base64Md5ToBytes(pu.ContentMd5), }, diff --git a/weed/server/master_grpc_server_volume.go b/weed/server/master_grpc_server_volume.go index e84d9b386..0b41bce86 100644 --- a/weed/server/master_grpc_server_volume.go +++ b/weed/server/master_grpc_server_volume.go @@ -61,7 +61,7 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest if err != nil { return nil, err } - volumeType, err := storage.ToVolumeType(req.VolumeType) + diskType, err := storage.ToDiskType(req.DiskType) if err != nil { return nil, err } @@ -70,7 +70,7 @@ func (ms *MasterServer) Assign(ctx context.Context, req *master_pb.AssignRequest Collection: req.Collection, ReplicaPlacement: replicaPlacement, Ttl: ttl, - VolumeType: volumeType, + DiskType: diskType, Prealloacte: ms.preallocateSize, DataCenter: req.DataCenter, Rack: req.Rack, @@ -123,7 +123,7 @@ func (ms *MasterServer) Statistics(ctx context.Context, req *master_pb.Statistic return nil, err } - volumeLayout := ms.Topo.GetVolumeLayout(req.Collection, replicaPlacement, ttl, storage.VolumeType(req.VolumeType)) + volumeLayout := ms.Topo.GetVolumeLayout(req.Collection, replicaPlacement, ttl, storage.DiskType(req.DiskType)) stats := volumeLayout.Stats() totalSize := (ms.Topo.GetMaxVolumeCount() + ms.Topo.GetMaxSsdVolumeCount()) * int64(ms.option.VolumeSizeLimitMB) * 1024 * 1024 diff --git a/weed/server/master_server_handlers_admin.go b/weed/server/master_server_handlers_admin.go index 001ff9cdc..e44fb0415 100644 --- a/weed/server/master_server_handlers_admin.go +++ b/weed/server/master_server_handlers_admin.go @@ -137,7 +137,7 @@ func (ms *MasterServer) submitFromMasterServerHandler(w http.ResponseWriter, r * } func (ms *MasterServer) HasWritableVolume(option *topology.VolumeGrowOption) bool { - vl := ms.Topo.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl, option.VolumeType) + vl := ms.Topo.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl, option.DiskType) return vl.GetActiveVolumeCount(option) > 0 } @@ -158,7 +158,7 @@ func (ms *MasterServer) getVolumeGrowOption(r *http.Request) (*topology.VolumeGr if err != nil { return nil, err } - volumeType, err := storage.ToVolumeType(r.FormValue("volumeType")) + diskType, err := storage.ToDiskType(r.FormValue("diskType")) if err != nil { return nil, err } @@ -174,7 +174,7 @@ func (ms *MasterServer) getVolumeGrowOption(r *http.Request) (*topology.VolumeGr Collection: r.FormValue("collection"), ReplicaPlacement: replicaPlacement, Ttl: ttl, - VolumeType: volumeType, + DiskType: diskType, Prealloacte: preallocate, DataCenter: r.FormValue("dataCenter"), Rack: r.FormValue("rack"), diff --git a/weed/server/volume_server.go b/weed/server/volume_server.go index 16f4198e8..53a4c3548 100644 --- a/weed/server/volume_server.go +++ b/weed/server/volume_server.go @@ -20,7 +20,7 @@ type VolumeServer struct { pulseSeconds int dataCenter string rack string - VolumeType storage.VolumeType + DiskType storage.DiskType store *storage.Store guard *security.Guard grpcDialOption grpc.DialOption @@ -39,7 +39,7 @@ type VolumeServer struct { func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, port int, publicUrl string, folders []string, maxCounts []int, minFreeSpacePercents []float32, - idxFolder string, volumeType storage.VolumeType, + idxFolder string, diskType storage.DiskType, needleMapKind storage.NeedleMapType, masterNodes []string, pulseSeconds int, dataCenter string, rack string, @@ -64,7 +64,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, pulseSeconds: pulseSeconds, dataCenter: dataCenter, rack: rack, - VolumeType: volumeType, + DiskType: diskType, needleMapKind: needleMapKind, FixJpgOrientation: fixJpgOrientation, ReadRedirect: readRedirect, @@ -78,7 +78,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string, vs.checkWithMaster() - vs.store = storage.NewStore(vs.grpcDialOption, port, ip, publicUrl, folders, maxCounts, minFreeSpacePercents, idxFolder, vs.needleMapKind, vs.VolumeType) + vs.store = storage.NewStore(vs.grpcDialOption, port, ip, publicUrl, folders, maxCounts, minFreeSpacePercents, idxFolder, vs.needleMapKind, vs.DiskType) vs.guard = security.NewGuard(whiteList, signingKey, expiresAfterSec, readSigningKey, readExpiresAfterSec) handleStaticResources(adminMux) diff --git a/weed/server/webdav_server.go b/weed/server/webdav_server.go index 329560d3f..04b7e0519 100644 --- a/weed/server/webdav_server.go +++ b/weed/server/webdav_server.go @@ -33,7 +33,7 @@ type WebDavOption struct { BucketsPath string GrpcDialOption grpc.DialOption Collection string - VolumeType string + DiskType string Uid uint32 Gid uint32 Cipher bool @@ -379,7 +379,7 @@ func (f *WebDavFile) saveDataAsChunk(reader io.Reader, name string, offset int64 Count: 1, Replication: "", Collection: f.fs.option.Collection, - VolumeType: f.fs.option.VolumeType, + DiskType: f.fs.option.DiskType, Path: name, } diff --git a/weed/shell/command_fs_configure.go b/weed/shell/command_fs_configure.go index 497ef4f9e..d97f8cc15 100644 --- a/weed/shell/command_fs_configure.go +++ b/weed/shell/command_fs_configure.go @@ -52,6 +52,7 @@ func (c *commandFsConfigure) Do(args []string, commandEnv *CommandEnv, writer io collection := fsConfigureCommand.String("collection", "", "assign writes to this collection") replication := fsConfigureCommand.String("replication", "", "assign writes with this replication") ttl := fsConfigureCommand.String("ttl", "", "assign writes with this ttl") + diskType := fsConfigureCommand.String("diskType", "", "[hdd|ssd] choose between hard drive or solid state drive") fsync := fsConfigureCommand.Bool("fsync", false, "fsync for the writes") volumeGrowthCount := fsConfigureCommand.Int("volumeGrowthCount", 0, "the number of physical volumes to add if no writable volumes") isDelete := fsConfigureCommand.Bool("delete", false, "delete the configuration by locationPrefix") @@ -81,6 +82,7 @@ func (c *commandFsConfigure) Do(args []string, commandEnv *CommandEnv, writer io Replication: *replication, Ttl: *ttl, Fsync: *fsync, + DiskType: *diskType, VolumeGrowthCount: uint32(*volumeGrowthCount), } diff --git a/weed/shell/command_volume_balance.go b/weed/shell/command_volume_balance.go index 4a9247cb5..d30de25fc 100644 --- a/weed/shell/command_volume_balance.go +++ b/weed/shell/command_volume_balance.go @@ -120,7 +120,7 @@ func balanceVolumeServers(commandEnv *CommandEnv, volumeReplicas map[uint32][]*V return false } } - return v.VolumeType == string(storage.HardDriveType) && (!v.ReadOnly && v.Size < volumeSizeLimit) + return v.DiskType == string(storage.HardDriveType) && (!v.ReadOnly && v.Size < volumeSizeLimit) }) } if err := balanceSelectedVolume(commandEnv, volumeReplicas, nodes, capacityByMaxVolumeCount, sortWritableVolumes, applyBalancing); err != nil { @@ -135,7 +135,7 @@ func balanceVolumeServers(commandEnv *CommandEnv, volumeReplicas map[uint32][]*V return false } } - return v.VolumeType == string(storage.HardDriveType) && (v.ReadOnly || v.Size >= volumeSizeLimit) + return v.DiskType == string(storage.HardDriveType) && (v.ReadOnly || v.Size >= volumeSizeLimit) }) } if err := balanceSelectedVolume(commandEnv, volumeReplicas, nodes, capacityByMaxVolumeCount, sortReadOnlyVolumes, applyBalancing); err != nil { @@ -150,7 +150,7 @@ func balanceVolumeServers(commandEnv *CommandEnv, volumeReplicas map[uint32][]*V return false } } - return v.VolumeType == string(storage.SsdType) && (!v.ReadOnly && v.Size < volumeSizeLimit) + return v.DiskType == string(storage.SsdType) && (!v.ReadOnly && v.Size < volumeSizeLimit) }) } if err := balanceSelectedVolume(commandEnv, volumeReplicas, nodes, capacityByMaxSsdVolumeCount, sortWritableVolumes, applyBalancing); err != nil { @@ -165,7 +165,7 @@ func balanceVolumeServers(commandEnv *CommandEnv, volumeReplicas map[uint32][]*V return false } } - return v.VolumeType == string(storage.SsdType) && (v.ReadOnly || v.Size >= volumeSizeLimit) + return v.DiskType == string(storage.SsdType) && (v.ReadOnly || v.Size >= volumeSizeLimit) }) } if err := balanceSelectedVolume(commandEnv, volumeReplicas, nodes, capacityByMaxSsdVolumeCount, sortReadOnlyVolumes, applyBalancing); err != nil { diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go index ef224cc4a..88a52ccd8 100644 --- a/weed/storage/disk_location.go +++ b/weed/storage/disk_location.go @@ -19,7 +19,7 @@ import ( type DiskLocation struct { Directory string IdxDirectory string - VolumeType VolumeType + DiskType DiskType MaxVolumeCount int OriginalMaxVolumeCount int MinFreeSpacePercent float32 @@ -33,7 +33,7 @@ type DiskLocation struct { isDiskSpaceLow bool } -func NewDiskLocation(dir string, maxVolumeCount int, minFreeSpacePercent float32, idxDir string, volumeType VolumeType) *DiskLocation { +func NewDiskLocation(dir string, maxVolumeCount int, minFreeSpacePercent float32, idxDir string, diskType DiskType) *DiskLocation { dir = util.ResolvePath(dir) if idxDir == "" { idxDir = dir @@ -43,7 +43,7 @@ func NewDiskLocation(dir string, maxVolumeCount int, minFreeSpacePercent float32 location := &DiskLocation{ Directory: dir, IdxDirectory: idxDir, - VolumeType: volumeType, + DiskType: diskType, MaxVolumeCount: maxVolumeCount, OriginalMaxVolumeCount: maxVolumeCount, MinFreeSpacePercent: minFreeSpacePercent, diff --git a/weed/storage/store.go b/weed/storage/store.go index 1a1bc2e67..1b1c771df 100644 --- a/weed/storage/store.go +++ b/weed/storage/store.go @@ -52,11 +52,11 @@ func (s *Store) String() (str string) { return } -func NewStore(grpcDialOption grpc.DialOption, port int, ip, publicUrl string, dirnames []string, maxVolumeCounts []int, minFreeSpacePercents []float32, idxFolder string, needleMapKind NeedleMapType, volumeType VolumeType) (s *Store) { +func NewStore(grpcDialOption grpc.DialOption, port int, ip, publicUrl string, dirnames []string, maxVolumeCounts []int, minFreeSpacePercents []float32, idxFolder string, needleMapKind NeedleMapType, diskType DiskType) (s *Store) { s = &Store{grpcDialOption: grpcDialOption, Port: port, Ip: ip, PublicUrl: publicUrl, NeedleMapType: needleMapKind} s.Locations = make([]*DiskLocation, 0) for i := 0; i < len(dirnames); i++ { - location := NewDiskLocation(dirnames[i], maxVolumeCounts[i], minFreeSpacePercents[i], idxFolder, volumeType) + location := NewDiskLocation(dirnames[i], maxVolumeCounts[i], minFreeSpacePercents[i], idxFolder, diskType) location.loadExistingVolumes(needleMapKind) s.Locations = append(s.Locations, location) stats.VolumeServerMaxVolumeCounter.Add(float64(maxVolumeCounts[i])) @@ -209,7 +209,7 @@ func (s *Store) CollectHeartbeat() *master_pb.Heartbeat { collectionVolumeReadOnlyCount := make(map[string]map[string]uint8) for _, location := range s.Locations { var deleteVids []needle.VolumeId - switch location.VolumeType { + switch location.DiskType { case SsdType: maxSsdVolumeCount = maxSsdVolumeCount + location.MaxVolumeCount case HardDriveType: diff --git a/weed/storage/volume.go b/weed/storage/volume.go index fdfb68c43..ebc1bff3e 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -262,7 +262,7 @@ func (v *Volume) ToVolumeInformationMessage() (types.NeedleId, *master_pb.Volume Ttl: v.Ttl.ToUint32(), CompactRevision: uint32(v.SuperBlock.CompactionRevision), ModifiedAtSecond: modTime.Unix(), - VolumeType: string(v.location.VolumeType), + DiskType: string(v.location.DiskType), } volumeInfo.RemoteStorageName, volumeInfo.RemoteStorageKey = v.RemoteStorageNameKey() diff --git a/weed/storage/volume_info.go b/weed/storage/volume_info.go index 5aaf42735..24577618e 100644 --- a/weed/storage/volume_info.go +++ b/weed/storage/volume_info.go @@ -14,7 +14,7 @@ type VolumeInfo struct { Size uint64 ReplicaPlacement *super_block.ReplicaPlacement Ttl *needle.TTL - VolumeType string + DiskType string Collection string Version needle.Version FileCount int @@ -41,7 +41,7 @@ func NewVolumeInfo(m *master_pb.VolumeInformationMessage) (vi VolumeInfo, err er ModifiedAtSecond: m.ModifiedAtSecond, RemoteStorageName: m.RemoteStorageName, RemoteStorageKey: m.RemoteStorageKey, - VolumeType: m.VolumeType, + DiskType: m.DiskType, } rp, e := super_block.NewReplicaPlacementFromByte(byte(m.ReplicaPlacement)) if e != nil { @@ -92,7 +92,7 @@ func (vi VolumeInfo) ToVolumeInformationMessage() *master_pb.VolumeInformationMe ModifiedAtSecond: vi.ModifiedAtSecond, RemoteStorageName: vi.RemoteStorageName, RemoteStorageKey: vi.RemoteStorageKey, - VolumeType: vi.VolumeType, + DiskType: vi.DiskType, } } diff --git a/weed/storage/volume_type.go b/weed/storage/volume_type.go index 5504b4386..05cd6b2c3 100644 --- a/weed/storage/volume_type.go +++ b/weed/storage/volume_type.go @@ -2,22 +2,22 @@ package storage import "fmt" -type VolumeType string +type DiskType string const ( - HardDriveType VolumeType = "" + HardDriveType DiskType = "" SsdType = "ssd" ) -func ToVolumeType(vt string) (volumeType VolumeType, err error) { - volumeType = HardDriveType +func ToDiskType(vt string) (diskType DiskType, err error) { + diskType = HardDriveType switch vt { case "", "hdd": - volumeType = HardDriveType + diskType = HardDriveType case "ssd": - volumeType = SsdType + diskType = SsdType default: - err = fmt.Errorf("parse VolumeType %s: expecting hdd or ssd\n", vt) + err = fmt.Errorf("parse DiskType %s: expecting hdd or ssd\n", vt) } return } diff --git a/weed/topology/collection.go b/weed/topology/collection.go index d2bdeab62..0c5dc5db7 100644 --- a/weed/topology/collection.go +++ b/weed/topology/collection.go @@ -30,27 +30,27 @@ func (c *Collection) String() string { return fmt.Sprintf("Name:%s, volumeSizeLimit:%d, storageType2VolumeLayout:%v", c.Name, c.volumeSizeLimit, c.storageType2VolumeLayout) } -func (c *Collection) GetOrCreateVolumeLayout(rp *super_block.ReplicaPlacement, ttl *needle.TTL, volumeType storage.VolumeType) *VolumeLayout { +func (c *Collection) GetOrCreateVolumeLayout(rp *super_block.ReplicaPlacement, ttl *needle.TTL, diskType storage.DiskType) *VolumeLayout { keyString := rp.String() if ttl != nil { keyString += ttl.String() } - if volumeType != storage.HardDriveType { - keyString += string(volumeType) + if diskType != storage.HardDriveType { + keyString += string(diskType) } vl := c.storageType2VolumeLayout.Get(keyString, func() interface{} { - return NewVolumeLayout(rp, ttl, volumeType, c.volumeSizeLimit, c.replicationAsMin) + return NewVolumeLayout(rp, ttl, diskType, c.volumeSizeLimit, c.replicationAsMin) }) return vl.(*VolumeLayout) } -func (c *Collection) DeleteVolumeLayout(rp *super_block.ReplicaPlacement, ttl *needle.TTL, volumeType storage.VolumeType) { +func (c *Collection) DeleteVolumeLayout(rp *super_block.ReplicaPlacement, ttl *needle.TTL, diskType storage.DiskType) { keyString := rp.String() if ttl != nil { keyString += ttl.String() } - if volumeType != storage.HardDriveType { - keyString += string(volumeType) + if diskType != storage.HardDriveType { + keyString += string(diskType) } c.storageType2VolumeLayout.Delete(keyString) } diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go index 0ea234202..400e91455 100644 --- a/weed/topology/data_node.go +++ b/weed/topology/data_node.go @@ -50,7 +50,7 @@ func (dn *DataNode) AddOrUpdateVolume(v storage.VolumeInfo) (isNew, isChangedRO func (dn *DataNode) doAddOrUpdateVolume(v storage.VolumeInfo) (isNew, isChangedRO bool) { if oldV, ok := dn.volumes[v.Id]; !ok { dn.volumes[v.Id] = v - if v.VolumeType == storage.SsdType { + if v.DiskType == storage.SsdType { dn.UpAdjustSsdVolumeCountDelta(1) } else { dn.UpAdjustVolumeCountDelta(1) @@ -93,7 +93,7 @@ func (dn *DataNode) UpdateVolumes(actualVolumes []storage.VolumeInfo) (newVolume glog.V(0).Infoln("Deleting volume id:", vid) delete(dn.volumes, vid) deletedVolumes = append(deletedVolumes, v) - if v.VolumeType == storage.SsdType { + if v.DiskType == storage.SsdType { dn.UpAdjustSsdVolumeCountDelta(-1) } else { dn.UpAdjustVolumeCountDelta(-1) @@ -124,7 +124,7 @@ func (dn *DataNode) DeltaUpdateVolumes(newVolumes, deletedVolumes []storage.Volu for _, v := range deletedVolumes { delete(dn.volumes, v.Id) - if v.VolumeType == storage.SsdType { + if v.DiskType == storage.SsdType { dn.UpAdjustSsdVolumeCountDelta(-1) } else { dn.UpAdjustVolumeCountDelta(-1) diff --git a/weed/topology/topology.go b/weed/topology/topology.go index f5d335be5..486394f7a 100644 --- a/weed/topology/topology.go +++ b/weed/topology/topology.go @@ -121,12 +121,12 @@ func (t *Topology) NextVolumeId() (needle.VolumeId, error) { } func (t *Topology) HasWritableVolume(option *VolumeGrowOption) bool { - vl := t.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl, option.VolumeType) + vl := t.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl, option.DiskType) return vl.GetActiveVolumeCount(option) > 0 } func (t *Topology) PickForWrite(count uint64, option *VolumeGrowOption) (string, uint64, *DataNode, error) { - vid, count, datanodes, err := t.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl, option.VolumeType).PickForWrite(count, option) + vid, count, datanodes, err := t.GetVolumeLayout(option.Collection, option.ReplicaPlacement, option.Ttl, option.DiskType).PickForWrite(count, option) if err != nil { return "", 0, nil, fmt.Errorf("failed to find writable volumes for collection:%s replication:%s ttl:%s error: %v", option.Collection, option.ReplicaPlacement.String(), option.Ttl.String(), err) } @@ -137,10 +137,10 @@ func (t *Topology) PickForWrite(count uint64, option *VolumeGrowOption) (string, return needle.NewFileId(*vid, fileId, rand.Uint32()).String(), count, datanodes.Head(), nil } -func (t *Topology) GetVolumeLayout(collectionName string, rp *super_block.ReplicaPlacement, ttl *needle.TTL, volumeType storage.VolumeType) *VolumeLayout { +func (t *Topology) GetVolumeLayout(collectionName string, rp *super_block.ReplicaPlacement, ttl *needle.TTL, diskType storage.DiskType) *VolumeLayout { return t.collectionMap.Get(collectionName, func() interface{} { return NewCollection(collectionName, t.volumeSizeLimit, t.replicationAsMin) - }).(*Collection).GetOrCreateVolumeLayout(rp, ttl, volumeType) + }).(*Collection).GetOrCreateVolumeLayout(rp, ttl, diskType) } func (t *Topology) ListCollections(includeNormalVolumes, includeEcVolumes bool) (ret []string) { @@ -176,30 +176,30 @@ func (t *Topology) DeleteCollection(collectionName string) { t.collectionMap.Delete(collectionName) } -func (t *Topology) DeleteLayout(collectionName string, rp *super_block.ReplicaPlacement, ttl *needle.TTL, volumeType storage.VolumeType) { +func (t *Topology) DeleteLayout(collectionName string, rp *super_block.ReplicaPlacement, ttl *needle.TTL, diskType storage.DiskType) { collection, found := t.FindCollection(collectionName) if !found { return } - collection.DeleteVolumeLayout(rp, ttl, volumeType) + collection.DeleteVolumeLayout(rp, ttl, diskType) if len(collection.storageType2VolumeLayout.Items()) == 0 { t.DeleteCollection(collectionName) } } func (t *Topology) RegisterVolumeLayout(v storage.VolumeInfo, dn *DataNode) { - volumeType, _ := storage.ToVolumeType(v.VolumeType) - vl := t.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, volumeType) + diskType, _ := storage.ToDiskType(v.DiskType) + vl := t.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, diskType) vl.RegisterVolume(&v, dn) vl.EnsureCorrectWritables(&v) } func (t *Topology) UnRegisterVolumeLayout(v storage.VolumeInfo, dn *DataNode) { glog.Infof("removing volume info: %+v", v) - volumeType, _ := storage.ToVolumeType(v.VolumeType) - volumeLayout := t.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, volumeType) + diskType, _ := storage.ToDiskType(v.DiskType) + volumeLayout := t.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, diskType) volumeLayout.UnRegisterVolume(&v, dn) if volumeLayout.isEmpty() { - t.DeleteLayout(v.Collection, v.ReplicaPlacement, v.Ttl, volumeType) + t.DeleteLayout(v.Collection, v.ReplicaPlacement, v.Ttl, diskType) } } @@ -235,8 +235,8 @@ func (t *Topology) SyncDataNodeRegistration(volumes []*master_pb.VolumeInformati t.UnRegisterVolumeLayout(v, dn) } for _, v := range changedVolumes { - volumeType, _ := storage.ToVolumeType(v.VolumeType) - vl := t.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, volumeType) + diskType, _ := storage.ToDiskType(v.DiskType) + vl := t.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, diskType) vl.EnsureCorrectWritables(&v) } return diff --git a/weed/topology/topology_event_handling.go b/weed/topology/topology_event_handling.go index 076900069..5b9facc14 100644 --- a/weed/topology/topology_event_handling.go +++ b/weed/topology/topology_event_handling.go @@ -37,8 +37,8 @@ func (t *Topology) StartRefreshWritableVolumes(grpcDialOption grpc.DialOption, g }() } func (t *Topology) SetVolumeCapacityFull(volumeInfo storage.VolumeInfo) bool { - volumeType, _ := storage.ToVolumeType(volumeInfo.VolumeType) - vl := t.GetVolumeLayout(volumeInfo.Collection, volumeInfo.ReplicaPlacement, volumeInfo.Ttl, volumeType) + diskType, _ := storage.ToDiskType(volumeInfo.DiskType) + vl := t.GetVolumeLayout(volumeInfo.Collection, volumeInfo.ReplicaPlacement, volumeInfo.Ttl, diskType) if !vl.SetVolumeCapacityFull(volumeInfo.Id) { return false } @@ -56,8 +56,8 @@ func (t *Topology) SetVolumeCapacityFull(volumeInfo storage.VolumeInfo) bool { func (t *Topology) UnRegisterDataNode(dn *DataNode) { for _, v := range dn.GetVolumes() { glog.V(0).Infoln("Removing Volume", v.Id, "from the dead volume server", dn.Id()) - volumeType, _ := storage.ToVolumeType(v.VolumeType) - vl := t.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, volumeType) + diskType, _ := storage.ToDiskType(v.DiskType) + vl := t.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, diskType) vl.SetVolumeUnavailable(dn, v.Id) } dn.UpAdjustVolumeCountDelta(-dn.GetVolumeCount()) diff --git a/weed/topology/topology_test.go b/weed/topology/topology_test.go index 07dc22681..92dcb9a22 100644 --- a/weed/topology/topology_test.go +++ b/weed/topology/topology_test.go @@ -60,7 +60,7 @@ func TestHandlingVolumeServerHeartbeat(t *testing.T) { ReplicaPlacement: uint32(0), Version: uint32(needle.CurrentVersion), Ttl: 0, - VolumeType: "ssd", + DiskType: "ssd", } volumeMessages = append(volumeMessages, volumeMessage) } @@ -168,7 +168,7 @@ func TestAddRemoveVolume(t *testing.T) { Id: needle.VolumeId(1), Size: 100, Collection: "xcollection", - VolumeType: "ssd", + DiskType: "ssd", FileCount: 123, DeleteCount: 23, DeletedByteCount: 45, diff --git a/weed/topology/volume_growth.go b/weed/topology/volume_growth.go index 7a0f3beb6..b2f1fe3d5 100644 --- a/weed/topology/volume_growth.go +++ b/weed/topology/volume_growth.go @@ -27,7 +27,7 @@ type VolumeGrowOption struct { Collection string ReplicaPlacement *super_block.ReplicaPlacement Ttl *needle.TTL - VolumeType storage.VolumeType + DiskType storage.DiskType Prealloacte int64 DataCenter string Rack string diff --git a/weed/topology/volume_layout.go b/weed/topology/volume_layout.go index 3d391cd84..ba30eca49 100644 --- a/weed/topology/volume_layout.go +++ b/weed/topology/volume_layout.go @@ -103,7 +103,7 @@ func (v *volumesBinaryState) copyState(list *VolumeLocationList) copyState { type VolumeLayout struct { rp *super_block.ReplicaPlacement ttl *needle.TTL - volumeType storage.VolumeType + diskType storage.DiskType vid2location map[needle.VolumeId]*VolumeLocationList writables []needle.VolumeId // transient array of writable volume id readonlyVolumes *volumesBinaryState // readonly volumes @@ -119,11 +119,11 @@ type VolumeLayoutStats struct { FileCount uint64 } -func NewVolumeLayout(rp *super_block.ReplicaPlacement, ttl *needle.TTL, volumeType storage.VolumeType, volumeSizeLimit uint64, replicationAsMin bool) *VolumeLayout { +func NewVolumeLayout(rp *super_block.ReplicaPlacement, ttl *needle.TTL, diskType storage.DiskType, volumeSizeLimit uint64, replicationAsMin bool) *VolumeLayout { return &VolumeLayout{ rp: rp, ttl: ttl, - volumeType: volumeType, + diskType: diskType, vid2location: make(map[needle.VolumeId]*VolumeLocationList), writables: *new([]needle.VolumeId), readonlyVolumes: NewVolumesBinaryState(readOnlyState, rp, ExistCopies()),