aboutsummaryrefslogtreecommitdiff
path: root/weed/server/common.go
diff options
context:
space:
mode:
author霍晓栋 <huoxd@jiedaibao.com>2016-06-26 10:50:18 +0800
committer霍晓栋 <huoxd@jiedaibao.com>2016-06-26 10:50:18 +0800
commit1f630945422953429eff852a6b6a03b9c004e9ca (patch)
treee966a0a726f77ab52c8c25c4bba4252368abb913 /weed/server/common.go
parentc601ef03b15d30e726ea86c070a2cb79035c37c9 (diff)
downloadseaweedfs-1f630945422953429eff852a6b6a03b9c004e9ca.tar.xz
seaweedfs-1f630945422953429eff852a6b6a03b9c004e9ca.zip
refactor Volume Assign function
Diffstat (limited to 'weed/server/common.go')
-rw-r--r--weed/server/common.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/weed/server/common.go b/weed/server/common.go
index 312bcea14..dcd31f823 100644
--- a/weed/server/common.go
+++ b/weed/server/common.go
@@ -94,7 +94,13 @@ func submitForClientHandler(w http.ResponseWriter, r *http.Request, masterUrl st
debug("assigning file id for", fname)
r.ParseForm()
- assignResult, ae := operation.Assign(masterUrl, 1, r.FormValue("replication"), r.FormValue("collection"), r.FormValue("ttl"))
+ ar := &operation.VolumeAssignRequest{
+ Count: 1,
+ Replication: r.FormValue("replication"),
+ Collection: r.FormValue("collection"),
+ Ttl: r.FormValue("ttl"),
+ }
+ assignResult, ae := operation.Assign(masterUrl, ar)
if ae != nil {
writeJsonError(w, r, http.StatusInternalServerError, ae)
return