mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-22 20:34:10 +08:00
filer: dynamically create bucket under /buckets folder
This commit is contained in:
@@ -67,7 +67,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
|
||||
glog.Fatal("master list is required!")
|
||||
}
|
||||
|
||||
fs.filer = filer2.NewFiler(option.Masters, fs.grpcDialOption)
|
||||
fs.filer = filer2.NewFiler(option.Masters, fs.grpcDialOption, option.DirBucketsPath)
|
||||
|
||||
go fs.filer.KeepConnectedToMaster()
|
||||
|
||||
@@ -83,6 +83,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
|
||||
util.LoadConfiguration("notification", false)
|
||||
|
||||
fs.option.recursiveDelete = v.GetBool("filer.options.recursive_delete")
|
||||
v.Set("filer.option.buckets_folder", "/buckets")
|
||||
fs.option.DirBucketsPath = v.GetString("filer.option.buckets_folder")
|
||||
fs.filer.LoadConfiguration(v)
|
||||
|
||||
@@ -96,6 +97,8 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
|
||||
readonlyMux.HandleFunc("/", fs.readonlyFilerHandler)
|
||||
}
|
||||
|
||||
fs.filer.LoadBuckets(fs.option.DirBucketsPath)
|
||||
|
||||
maybeStartMetrics(fs, option)
|
||||
|
||||
return fs, nil
|
||||
|
Reference in New Issue
Block a user