diff options
| author | chrislusf <chris.lu@gmail.com> | 2015-03-09 01:10:01 -0700 |
|---|---|---|
| committer | chrislusf <chris.lu@gmail.com> | 2015-03-09 01:10:04 -0700 |
| commit | f511b507a5230e931d0250b446f744073be879b3 (patch) | |
| tree | e9728b47902fc4f31aa93d24a937cb2654becc6c /go/operation | |
| parent | d48d76cb4f419a58539fb84c7a45c7eb863b854f (diff) | |
| download | seaweedfs-f511b507a5230e931d0250b446f744073be879b3.tar.xz seaweedfs-f511b507a5230e931d0250b446f744073be879b3.zip | |
Add read only public port on volume server
Add read only public port on volume server
Diffstat (limited to 'go/operation')
| -rw-r--r-- | go/operation/assign_file_id.go | 3 | ||||
| -rw-r--r-- | go/operation/submit.go | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/go/operation/assign_file_id.go b/go/operation/assign_file_id.go index 672bfa99c..8b6dfe5ba 100644 --- a/go/operation/assign_file_id.go +++ b/go/operation/assign_file_id.go @@ -3,6 +3,7 @@ package operation import ( "encoding/json" "errors" + "fmt" "net/url" "strconv" @@ -38,7 +39,7 @@ func Assign(server string, count int, replication string, collection string, ttl var ret AssignResult err = json.Unmarshal(jsonBlob, &ret) if err != nil { - return nil, err + return nil, fmt.Errorf("JSON unmarshal error:%v, json:%s", err, string(jsonBlob)) } if ret.Count <= 0 { return nil, errors.New(ret.Error) diff --git a/go/operation/submit.go b/go/operation/submit.go index 03551b1e8..16304d2bd 100644 --- a/go/operation/submit.go +++ b/go/operation/submit.go @@ -55,7 +55,7 @@ func SubmitFiles(master string, files []FilePart, if index > 0 { file.Fid = file.Fid + "_" + strconv.Itoa(index) } - file.Server = ret.PublicUrl + file.Server = ret.Url file.Replication = replication file.Collection = collection results[index].Size, err = file.Upload(maxMB, master, secret) |
