aboutsummaryrefslogtreecommitdiff
path: root/weed/operation/assign_file_id.go
diff options
context:
space:
mode:
authorbanjiaojuhao <banjiaojuhao@qq.com>2021-12-22 21:57:26 +0800
committerbanjiaojuhao <banjiaojuhao@qq.com>2021-12-22 21:57:26 +0800
commit08336be92e6b01ad5ec290c7f395b77dcb9f3174 (patch)
tree023d5a5931766eedfcfb14241b10db0910fb8498 /weed/operation/assign_file_id.go
parentc3b73ec23b9c7831e31503ebf3a64cc2f0a3c33d (diff)
downloadseaweedfs-08336be92e6b01ad5ec290c7f395b77dcb9f3174.tar.xz
seaweedfs-08336be92e6b01ad5ec290c7f395b77dcb9f3174.zip
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,
}
}