mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
filer: move buckets folder to filer.toml since it should not be changed often
This commit is contained in:
parent
d8dec2323b
commit
5bcb44eda9
|
@ -33,7 +33,6 @@ type FilerOptions struct {
|
||||||
dataCenter *string
|
dataCenter *string
|
||||||
enableNotification *bool
|
enableNotification *bool
|
||||||
disableHttp *bool
|
disableHttp *bool
|
||||||
dirBucketsPath *string
|
|
||||||
|
|
||||||
// default leveldb directory, used in "weed server" mode
|
// default leveldb directory, used in "weed server" mode
|
||||||
defaultLevelDbDirectory *string
|
defaultLevelDbDirectory *string
|
||||||
|
@ -53,7 +52,6 @@ func init() {
|
||||||
f.dirListingLimit = cmdFiler.Flag.Int("dirListLimit", 100000, "limit sub dir listing size")
|
f.dirListingLimit = cmdFiler.Flag.Int("dirListLimit", 100000, "limit sub dir listing size")
|
||||||
f.dataCenter = cmdFiler.Flag.String("dataCenter", "", "prefer to write to volumes in this data center")
|
f.dataCenter = cmdFiler.Flag.String("dataCenter", "", "prefer to write to volumes in this data center")
|
||||||
f.disableHttp = cmdFiler.Flag.Bool("disableHttp", false, "disable http request, only gRpc operations are allowed")
|
f.disableHttp = cmdFiler.Flag.Bool("disableHttp", false, "disable http request, only gRpc operations are allowed")
|
||||||
f.dirBucketsPath = cmdFiler.Flag.String("dir.buckets", "/buckets", "folder to store all buckets")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var cmdFiler = &Command{
|
var cmdFiler = &Command{
|
||||||
|
@ -111,7 +109,6 @@ func (fo *FilerOptions) startFiler() {
|
||||||
DataCenter: *fo.dataCenter,
|
DataCenter: *fo.dataCenter,
|
||||||
DefaultLevelDbDir: defaultLevelDbDirectory,
|
DefaultLevelDbDir: defaultLevelDbDirectory,
|
||||||
DisableHttp: *fo.disableHttp,
|
DisableHttp: *fo.disableHttp,
|
||||||
DirBucketsPath: *fo.dirBucketsPath,
|
|
||||||
Port: *fo.port,
|
Port: *fo.port,
|
||||||
})
|
})
|
||||||
if nfs_err != nil {
|
if nfs_err != nil {
|
||||||
|
|
|
@ -74,7 +74,8 @@ const (
|
||||||
# with http DELETE, by default the filer would check whether a folder is empty.
|
# with http DELETE, by default the filer would check whether a folder is empty.
|
||||||
# recursive_delete will delete all sub folders and files, similar to "rm -Rf"
|
# recursive_delete will delete all sub folders and files, similar to "rm -Rf"
|
||||||
recursive_delete = false
|
recursive_delete = false
|
||||||
|
# directories under this folder will be automatically creating a separate bucket
|
||||||
|
buckets_folder = /buckets
|
||||||
|
|
||||||
####################################################
|
####################################################
|
||||||
# The following are filer store options
|
# The following are filer store options
|
||||||
|
|
|
@ -82,7 +82,6 @@ func init() {
|
||||||
filerOptions.disableDirListing = cmdServer.Flag.Bool("filer.disableDirListing", false, "turn off directory listing")
|
filerOptions.disableDirListing = cmdServer.Flag.Bool("filer.disableDirListing", false, "turn off directory listing")
|
||||||
filerOptions.maxMB = cmdServer.Flag.Int("filer.maxMB", 32, "split files larger than the limit")
|
filerOptions.maxMB = cmdServer.Flag.Int("filer.maxMB", 32, "split files larger than the limit")
|
||||||
filerOptions.dirListingLimit = cmdServer.Flag.Int("filer.dirListLimit", 1000, "limit sub dir listing size")
|
filerOptions.dirListingLimit = cmdServer.Flag.Int("filer.dirListLimit", 1000, "limit sub dir listing size")
|
||||||
filerOptions.dirBucketsPath = cmdServer.Flag.String("filer.dir.buckets", "/buckets", "folder to store all buckets")
|
|
||||||
|
|
||||||
serverOptions.v.port = cmdServer.Flag.Int("volume.port", 8080, "volume server http listen port")
|
serverOptions.v.port = cmdServer.Flag.Int("volume.port", 8080, "volume server http listen port")
|
||||||
serverOptions.v.publicPort = cmdServer.Flag.Int("volume.port.public", 0, "volume server public port")
|
serverOptions.v.publicPort = cmdServer.Flag.Int("volume.port.public", 0, "volume server public port")
|
||||||
|
|
|
@ -83,6 +83,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
|
||||||
util.LoadConfiguration("notification", false)
|
util.LoadConfiguration("notification", false)
|
||||||
|
|
||||||
fs.option.recursiveDelete = v.GetBool("filer.options.recursive_delete")
|
fs.option.recursiveDelete = v.GetBool("filer.options.recursive_delete")
|
||||||
|
fs.option.DirBucketsPath = v.GetString("filer.option.buckets_folder")
|
||||||
fs.filer.LoadConfiguration(v)
|
fs.filer.LoadConfiguration(v)
|
||||||
|
|
||||||
notification.LoadConfiguration(v, "notification.")
|
notification.LoadConfiguration(v, "notification.")
|
||||||
|
|
Loading…
Reference in a new issue