aboutsummaryrefslogtreecommitdiff
path: root/weed/operation/assign_file_id.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2021-12-22 12:49:15 -0800
committerGitHub <noreply@github.com>2021-12-22 12:49:15 -0800
commit4e73705533c1a8510cd6b3308af37fc851803ed3 (patch)
treec31e8e1bd5c216a6a0cd2af8bd8e9f79b72ca926 /weed/operation/assign_file_id.go
parentb7cd52636b5af34130dfa01314dd3ba8163cad3f (diff)
parent08336be92e6b01ad5ec290c7f395b77dcb9f3174 (diff)
downloadseaweedfs-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.go5
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,
}
}