filer server: allow upload file to specific dataNode

This commit is contained in:
banjiaojuhao
2021-12-22 21:57:26 +08:00
parent c3b73ec23b
commit 08336be92e
8 changed files with 345 additions and 326 deletions

View File

@@ -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,
}
}