aboutsummaryrefslogtreecommitdiff
path: root/go/operation/sync_volume.go
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2016-04-10 00:24:22 -0700
committerchrislusf <chris.lu@gmail.com>2016-04-10 00:24:22 -0700
commitb39c384d6dfa63133990a1e190525ef3133f1530 (patch)
treed39b3ce93533f57ea8992ef782289d9ce58a3804 /go/operation/sync_volume.go
parent113392bce88fbb2f3191ff1dfe8d8675c9c8b119 (diff)
downloadseaweedfs-b39c384d6dfa63133990a1e190525ef3133f1530.tar.xz
seaweedfs-b39c384d6dfa63133990a1e190525ef3133f1530.zip
Revert "Merge pull request #284 from thinxer/binary"
This reverts commit 3523ad523929870aa8d4a7741ee8e152cfd40489, reversing changes made to 5d100994b1b9c6679113c8dd73f97aff85397f02.
Diffstat (limited to 'go/operation/sync_volume.go')
-rw-r--r--go/operation/sync_volume.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/go/operation/sync_volume.go b/go/operation/sync_volume.go
index 626b2a7ba..54944a64e 100644
--- a/go/operation/sync_volume.go
+++ b/go/operation/sync_volume.go
@@ -1,7 +1,6 @@
package operation
import (
- "encoding/binary"
"encoding/json"
"fmt"
"net/url"
@@ -43,9 +42,9 @@ func GetVolumeIdxEntries(server string, vid string, eachEntryFn func(key uint64,
values.Add("volume", vid)
line := make([]byte, 16)
err := util.GetBufferStream("http://"+server+"/admin/sync/index", values, line, func(bytes []byte) {
- key := binary.BigEndian.Uint64(bytes[:8])
- offset := binary.BigEndian.Uint32(bytes[8:12])
- size := binary.BigEndian.Uint32(bytes[12:16])
+ key := util.BytesToUint64(bytes[:8])
+ offset := util.BytesToUint32(bytes[8:12])
+ size := util.BytesToUint32(bytes[12:16])
eachEntryFn(key, offset, size)
})
if err != nil {