diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-12-22 12:49:15 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-22 12:49:15 -0800 |
| commit | 4e73705533c1a8510cd6b3308af37fc851803ed3 (patch) | |
| tree | c31e8e1bd5c216a6a0cd2af8bd8e9f79b72ca926 /weed/operation/assign_file_id.go | |
| parent | b7cd52636b5af34130dfa01314dd3ba8163cad3f (diff) | |
| parent | 08336be92e6b01ad5ec290c7f395b77dcb9f3174 (diff) | |
| download | seaweedfs-4e73705533c1a8510cd6b3308af37fc851803ed3.tar.xz seaweedfs-4e73705533c1a8510cd6b3308af37fc851803ed3.zip | |
Merge pull request #2530 from banjiaojuhao/filer-upload-file-to-node
filer server: allow upload file to specific dataNode
Diffstat (limited to 'weed/operation/assign_file_id.go')
| -rw-r--r-- | weed/operation/assign_file_id.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/operation/assign_file_id.go b/weed/operation/assign_file_id.go index b4d44eccf..f0f7581f3 100644 --- a/weed/operation/assign_file_id.go +++ b/weed/operation/assign_file_id.go @@ -133,6 +133,7 @@ type StorageOption struct { Collection string DataCenter string Rack string + DataNode string TtlSeconds int32 Fsync bool VolumeGrowthCount uint32 @@ -151,9 +152,10 @@ func (so *StorageOption) ToAssignRequests(count int) (ar *VolumeAssignRequest, a DiskType: so.DiskType, DataCenter: so.DataCenter, Rack: so.Rack, + DataNode: so.DataNode, WritableVolumeCount: so.VolumeGrowthCount, } - if so.DataCenter != "" || so.Rack != "" { + if so.DataCenter != "" || so.Rack != "" || so.DataNode != "" { altRequest = &VolumeAssignRequest{ Count: uint64(count), Replication: so.Replication, @@ -162,6 +164,7 @@ func (so *StorageOption) ToAssignRequests(count int) (ar *VolumeAssignRequest, a DiskType: so.DiskType, DataCenter: "", Rack: "", + DataNode: "", WritableVolumeCount: so.VolumeGrowthCount, } } |
