aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-05-03 22:39:00 -0700
committerChris Lu <chris.lu@gmail.com>2019-05-03 22:39:00 -0700
commit4b27f892e65717efb78d1ddddb51f6e69478ec65 (patch)
tree1bf6eac18e822e6d47090f23e84caaa2573cd661
parent3fbe22b203841ea7b5cc13d9aecaa42efefcb8ed (diff)
downloadseaweedfs-4b27f892e65717efb78d1ddddb51f6e69478ec65.tar.xz
seaweedfs-4b27f892e65717efb78d1ddddb51f6e69478ec65.zip
remove 128 bit needle id build option
fix https://github.com/chrislusf/seaweedfs/issues/949
-rw-r--r--weed/storage/types/needle_id_128bit.go44
-rw-r--r--weed/storage/types/needle_id_type.go2
2 files changed, 0 insertions, 46 deletions
diff --git a/weed/storage/types/needle_id_128bit.go b/weed/storage/types/needle_id_128bit.go
deleted file mode 100644
index 3af0b7285..000000000
--- a/weed/storage/types/needle_id_128bit.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// +build 128BitNeedleId
-
-package types
-
-import (
- "encoding/hex"
-)
-
-const (
- NeedleIdSize = 16
- NeedleIdEmpty = ""
-)
-
-// this is a 128 bit needle id implementation.
-// Usually a FileId has 32bit volume id, 64bit needle id, 32 bit cookie.
-// But when your system is using UUID, which is 128 bit, a custom 128-bit needle id can be easier to manage.
-// Caveat: In this mode, the fildId from master /dir/assign can not be directly used.
-// Only the volume id and cookie from the fileId are usuable.
-type NeedleId string
-
-func NeedleIdToBytes(bytes []byte, needleId NeedleId) {
- hex.Decode(bytes, []byte(needleId))
-}
-
-// NeedleIdToUint64 used to send max needle id to master
-func NeedleIdToUint64(needleId NeedleId) uint64 {
- return 0
-}
-
-func Uint64ToNeedleId(needleId uint64) NeedleId {
- return NeedleId("")
-}
-
-func BytesToNeedleId(bytes []byte) (needleId NeedleId) {
- return NeedleId(hex.EncodeToString(bytes))
-}
-
-func (k NeedleId) String() string {
- return string(k)
-}
-
-func ParseNeedleId(idString string) (NeedleId, error) {
- return NeedleId(idString), nil
-}
diff --git a/weed/storage/types/needle_id_type.go b/weed/storage/types/needle_id_type.go
index 4a890cd16..32a296613 100644
--- a/weed/storage/types/needle_id_type.go
+++ b/weed/storage/types/needle_id_type.go
@@ -1,5 +1,3 @@
-// +build !128BitNeedleId
-
package types
import (