diff options
| author | Chris Lu <chris.lu@gmail.com> | 2013-09-01 23:58:21 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2013-09-01 23:58:21 -0700 |
| commit | 82b74c7940d958c4244cbc67d495b8156a17d2b3 (patch) | |
| tree | 69c0fcee0f49e027a1f2bc0c9d012b2e4328475a /go/replication | |
| parent | 2e70cc8be77d0047139ea56864df74477387f2f3 (diff) | |
| download | seaweedfs-82b74c7940d958c4244cbc67d495b8156a17d2b3.tar.xz seaweedfs-82b74c7940d958c4244cbc67d495b8156a17d2b3.zip | |
issue 43 "go fmt" chagnes from "Ryan S. Brown" <sb@ryansb.com>
some basic changes to parse upload url
Diffstat (limited to 'go/replication')
| -rw-r--r-- | go/replication/store_replicate.go | 4 | ||||
| -rw-r--r-- | go/replication/volume_growth.go | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/go/replication/store_replicate.go b/go/replication/store_replicate.go index de2f3fcd8..bc630c5d1 100644 --- a/go/replication/store_replicate.go +++ b/go/replication/store_replicate.go @@ -2,9 +2,9 @@ package replication import ( "bytes" + "code.google.com/p/weed-fs/go/glog" "code.google.com/p/weed-fs/go/operation" "code.google.com/p/weed-fs/go/storage" - "code.google.com/p/weed-fs/go/glog" "net/http" "strconv" ) @@ -25,7 +25,7 @@ func ReplicatedWrite(masterNode string, s *storage.Store, volumeId storage.Volum if needToReplicate { //send to other replica locations if r.FormValue("type") != "replicate" { if !distributedOperation(masterNode, s, volumeId, func(location operation.Location) bool { - _, err := operation.Upload("http://"+location.Url+r.URL.Path+"?type=replicate&ts="+strconv.FormatUint(needle.LastModified,10), string(needle.Name), bytes.NewReader(needle.Data), needle.IsGzipped(), string(needle.Mime)) + _, err := operation.Upload("http://"+location.Url+r.URL.Path+"?type=replicate&ts="+strconv.FormatUint(needle.LastModified, 10), string(needle.Name), bytes.NewReader(needle.Data), needle.IsGzipped(), string(needle.Mime)) return err == nil }) { ret = 0 diff --git a/go/replication/volume_growth.go b/go/replication/volume_growth.go index 18295498e..2adf72dee 100644 --- a/go/replication/volume_growth.go +++ b/go/replication/volume_growth.go @@ -1,12 +1,12 @@ package replication import ( + "code.google.com/p/weed-fs/go/glog" "code.google.com/p/weed-fs/go/operation" "code.google.com/p/weed-fs/go/storage" "code.google.com/p/weed-fs/go/topology" "errors" "fmt" - "code.google.com/p/weed-fs/go/glog" "math/rand" "sync" ) @@ -39,13 +39,13 @@ func (vg *VolumeGrowth) AutomaticGrowByType(repType storage.ReplicationType, dat factor = 1 count, err = vg.GrowByCountAndType(vg.copy1factor, repType, dataCenter, topo) case storage.Copy001: - factor = 2 + factor = 2 count, err = vg.GrowByCountAndType(vg.copy2factor, repType, dataCenter, topo) case storage.Copy010: - factor = 2 + factor = 2 count, err = vg.GrowByCountAndType(vg.copy2factor, repType, dataCenter, topo) case storage.Copy100: - factor = 2 + factor = 2 count, err = vg.GrowByCountAndType(vg.copy2factor, repType, dataCenter, topo) case storage.Copy110: factor = 3 |
