diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-12-04 22:39:43 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-12-04 22:39:43 -0800 |
| commit | 263eb29e9f6aa7aaa8b6da45244ce75f712f358e (patch) | |
| tree | db9078aa007ead36f00f055efc94cd86209198a7 /weed/command/filer.go | |
| parent | d171d9f988130eb1517e6d7609dbedbae1fa58bc (diff) | |
| download | seaweedfs-263eb29e9f6aa7aaa8b6da45244ce75f712f358e.tar.xz seaweedfs-263eb29e9f6aa7aaa8b6da45244ce75f712f358e.zip | |
filer: add option to cache small files to filer store
Diffstat (limited to 'weed/command/filer.go')
| -rw-r--r-- | weed/command/filer.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/command/filer.go b/weed/command/filer.go index 017427335..10dfdffad 100644 --- a/weed/command/filer.go +++ b/weed/command/filer.go @@ -42,6 +42,7 @@ type FilerOptions struct { cipher *bool peers *string metricsHttpPort *int + cacheToFilerLimit *int // default leveldb directory, used in "weed server" mode defaultLevelDbDirectory *string @@ -65,6 +66,7 @@ func init() { f.cipher = cmdFiler.Flag.Bool("encryptVolumeData", false, "encrypt data on volume servers") f.peers = cmdFiler.Flag.String("peers", "", "all filers sharing the same filer store in comma separated ip:port list") f.metricsHttpPort = cmdFiler.Flag.Int("metricsPort", 0, "Prometheus metrics listen port") + f.cacheToFilerLimit = cmdFiler.Flag.Int("cacheToFilerLimit", 0, "Small files smaller than this limit can be cached in filer store.") // start s3 on filer filerStartS3 = cmdFiler.Flag.Bool("s3", false, "whether to start S3 gateway") @@ -149,6 +151,7 @@ func (fo *FilerOptions) startFiler() { Host: *fo.ip, Port: uint32(*fo.port), Cipher: *fo.cipher, + CacheToFilerLimit: int64(*fo.cacheToFilerLimit), Filers: peers, }) if nfs_err != nil { |
