diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-07-14 13:36:28 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-07-14 13:36:28 -0700 |
| commit | 842dab07b4e0cdf31e534b40afce5c64c19d646e (patch) | |
| tree | 0c9e7d7a3df3542bdd636b081f9c5d04257052fb /weed/filesys/wfs.go | |
| parent | a51aa4c5868d4c5165b35a3fda05419e1345bf97 (diff) | |
| download | seaweedfs-842dab07b4e0cdf31e534b40afce5c64c19d646e.tar.xz seaweedfs-842dab07b4e0cdf31e534b40afce5c64c19d646e.zip | |
weed mount can request to prioritize to write to a data center
Diffstat (limited to 'weed/filesys/wfs.go')
| -rw-r--r-- | weed/filesys/wfs.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index d7e133483..56b69a8ac 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -18,6 +18,7 @@ type WFS struct { replication string ttlSec int32 chunkSizeLimit int64 + dataCenter string // contains all open handles handles []*FileHandle @@ -25,7 +26,7 @@ type WFS struct { pathToHandleLock sync.Mutex } -func NewSeaweedFileSystem(filerGrpcAddress string, collection string, replication string, ttlSec int32, chunkSizeLimitMB int) *WFS { +func NewSeaweedFileSystem(filerGrpcAddress string, collection string, replication string, ttlSec int32, chunkSizeLimitMB int, dataCenter string) *WFS { return &WFS{ filerGrpcAddress: filerGrpcAddress, listDirectoryEntriesCache: ccache.New(ccache.Configure().MaxSize(6000).ItemsToPrune(100)), @@ -33,6 +34,7 @@ func NewSeaweedFileSystem(filerGrpcAddress string, collection string, replicatio replication: replication, ttlSec: ttlSec, chunkSizeLimit: int64(chunkSizeLimitMB) * 1024 * 1024, + dataCenter: dataCenter, pathToHandleIndex: make(map[string]int), } } |
