mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-27 06:29:42 -08:00
Merge pull request #423 from prometheus/u-c-l/adjust-to-new-goleveldb
Adjust to the new version of goleveldb.
This commit is contained in:
commit
f2052c9c0d
|
@ -17,7 +17,6 @@ import (
|
||||||
"encoding"
|
"encoding"
|
||||||
|
|
||||||
"github.com/syndtr/goleveldb/leveldb"
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
leveldb_cache "github.com/syndtr/goleveldb/leveldb/cache"
|
|
||||||
leveldb_filter "github.com/syndtr/goleveldb/leveldb/filter"
|
leveldb_filter "github.com/syndtr/goleveldb/leveldb/filter"
|
||||||
leveldb_iterator "github.com/syndtr/goleveldb/leveldb/iterator"
|
leveldb_iterator "github.com/syndtr/goleveldb/leveldb/iterator"
|
||||||
leveldb_opt "github.com/syndtr/goleveldb/leveldb/opt"
|
leveldb_opt "github.com/syndtr/goleveldb/leveldb/opt"
|
||||||
|
@ -52,9 +51,8 @@ type LevelDBOptions struct {
|
||||||
// use.
|
// use.
|
||||||
func NewLevelDB(o LevelDBOptions) (KeyValueStore, error) {
|
func NewLevelDB(o LevelDBOptions) (KeyValueStore, error) {
|
||||||
options := &leveldb_opt.Options{
|
options := &leveldb_opt.Options{
|
||||||
Compression: leveldb_opt.SnappyCompression,
|
BlockCacheCapacity: o.CacheSizeBytes,
|
||||||
BlockCache: leveldb_cache.NewLRUCache(o.CacheSizeBytes),
|
Filter: leveldb_filter.NewBloomFilter(10),
|
||||||
Filter: leveldb_filter.NewBloomFilter(10),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
storage, err := leveldb.OpenFile(o.Path, options)
|
storage, err := leveldb.OpenFile(o.Path, options)
|
||||||
|
|
Loading…
Reference in a new issue