diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2016-06-25 22:53:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-25 22:53:38 -0700 |
| commit | b6de5f00b3046d792b2d7427fa50a87f9fa67a04 (patch) | |
| tree | e966a0a726f77ab52c8c25c4bba4252368abb913 /weed/server/common.go | |
| parent | 0647c75a06effcc33ee11ff38c33a2a3664d3c71 (diff) | |
| parent | 1f630945422953429eff852a6b6a03b9c004e9ca (diff) | |
| download | seaweedfs-b6de5f00b3046d792b2d7427fa50a87f9fa67a04.tar.xz seaweedfs-b6de5f00b3046d792b2d7427fa50a87f9fa67a04.zip | |
Merge pull request #329 from hxiaodon/master
refactor Assign func to accept main[dataCenter|rack|dataNode] params if needed
Diffstat (limited to 'weed/server/common.go')
| -rw-r--r-- | weed/server/common.go | 8 |
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 |
