aboutsummaryrefslogtreecommitdiff
path: root/weed/command/volume.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2017-05-26 22:51:25 -0700
committerChris Lu <chris.lu@gmail.com>2017-05-26 22:51:25 -0700
commit82c3ccc8ddb1fea27a15f0610cf7730deb4529bc (patch)
treeb1deba002de8d716ca395c3b29c43448a4522f7d /weed/command/volume.go
parent80cefade65ecf965cde769240594f17b0a562304 (diff)
downloadseaweedfs-82c3ccc8ddb1fea27a15f0610cf7730deb4529bc.tar.xz
seaweedfs-82c3ccc8ddb1fea27a15f0610cf7730deb4529bc.zip
add btree for volume index
Diffstat (limited to 'weed/command/volume.go')
-rw-r--r--weed/command/volume.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go
index 0e69325b6..a4e316ecb 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -52,7 +52,7 @@ func init() {
v.maxCpu = cmdVolume.Flag.Int("maxCpu", 0, "maximum number of CPUs. 0 means all available CPUs")
v.dataCenter = cmdVolume.Flag.String("dataCenter", "", "current volume server's data center name")
v.rack = cmdVolume.Flag.String("rack", "", "current volume server's rack name")
- v.indexType = cmdVolume.Flag.String("index", "memory", "Choose [memory|leveldb|boltdb] mode for memory~performance balance.")
+ v.indexType = cmdVolume.Flag.String("index", "memory", "Choose [memory|leveldb|boltdb|btree] mode for memory~performance balance.")
v.fixJpgOrientation = cmdVolume.Flag.Bool("images.fix.orientation", true, "Adjust jpg orientation when uploading.")
v.readRedirect = cmdVolume.Flag.Bool("read.redirect", true, "Redirect moved or non-local volumes.")
v.enableBytesCache = cmdVolume.Flag.Bool("cache.enable", false, "direct cache instead of OS cache, cost more memory.")
@@ -126,6 +126,8 @@ func runVolume(cmd *Command, args []string) bool {
volumeNeedleMapKind = storage.NeedleMapLevelDb
case "boltdb":
volumeNeedleMapKind = storage.NeedleMapBoltDb
+ case "btree":
+ volumeNeedleMapKind = storage.NeedleMapBtree
}
volumeServer := weed_server.NewVolumeServer(volumeMux, publicVolumeMux,
*v.ip, *v.port, *v.publicUrl,