@nxtedition/rocksdb 5.2.2 → 5.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/binding.gyp CHANGED
@@ -23,7 +23,8 @@
23
23
  }
24
24
  }
25
25
  }, { # OS != 'win'
26
- 'cflags!': [ '-fno-rtti' ]
26
+ 'cflags': [ '-std=c++17' ]
27
+ , 'cflags!': [ '-fno-rtti' ]
27
28
  , 'cflags_cc!': [ '-fno-rtti' ]
28
29
  , 'cflags_cc+': [ '-frtti' ]
29
30
  }]
@@ -38,8 +39,8 @@
38
39
  , '-Wno-ignored-qualifiers'
39
40
  ]
40
41
  , 'OTHER_CPLUSPLUSFLAGS': [
41
- '-mmacosx-version-min=10.8'
42
- , '-std=c++20'
42
+ '-mmacosx-version-min=10.14'
43
+ , '-std=c++17'
43
44
  , '-stdlib=libc++'
44
45
  , '-arch x86_64'
45
46
  , '-arch arm64'
@@ -51,7 +52,7 @@
51
52
  ]
52
53
  , 'GCC_ENABLE_CPP_RTTI': 'YES'
53
54
  , 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
54
- , 'MACOSX_DEPLOYMENT_TARGET': '10.8'
55
+ , 'MACOSX_DEPLOYMENT_TARGET': '10.14'
55
56
  }
56
57
  }]
57
58
  , ['OS == "linux"', {
package/chained-batch.js CHANGED
@@ -1,44 +1,39 @@
1
1
  'use strict'
2
2
 
3
- const { AbstractChainedBatch } = require('abstract-leveldown')
3
+ const { AbstractChainedBatch } = require('abstract-level')
4
4
  const binding = require('./binding')
5
5
 
6
6
  const kDbContext = Symbol('db')
7
7
  const kBatchContext = Symbol('context')
8
- const kHasData = Symbol('hasData')
9
8
 
10
9
  class ChainedBatch extends AbstractChainedBatch {
11
- constructor (db) {
10
+ constructor (db, context) {
12
11
  super(db)
13
- this[kDbContext] = db.context
14
- this[kBatchContext] = binding.batch_init(db.context)
15
- this[kHasData] = false
12
+
13
+ this[kDbContext] = context
14
+ this[kBatchContext] = binding.batch_init(context)
16
15
  }
17
16
 
18
17
  _put (key, value) {
19
18
  binding.batch_put(this[kBatchContext], key, value)
20
- this[kHasData] = true
21
19
  }
22
20
 
23
21
  _del (key) {
24
22
  binding.batch_del(this[kBatchContext], key)
25
- this[kHasData] = true
26
23
  }
27
24
 
28
25
  _clear () {
29
- if (this[kHasData]) {
30
- binding.batch_clear(this[kBatchContext])
31
- this[kHasData] = false
32
- }
26
+ binding.batch_clear(this[kBatchContext])
33
27
  }
34
28
 
35
29
  _write (options, callback) {
36
- if (this[kHasData]) {
37
- binding.batch_write(this[kDbContext], this[kBatchContext], options, callback)
38
- } else {
39
- process.nextTick(callback)
40
- }
30
+ binding.batch_write(this[kDbContext], this[kBatchContext], options, callback)
31
+ }
32
+
33
+ _close (callback) {
34
+ // TODO: close native batch (currently done on GC)
35
+ process.nextTick(callback)
41
36
  }
42
37
  }
43
38
 
44
- module.exports = ChainedBatch
39
+ exports.ChainedBatch = ChainedBatch
@@ -0,0 +1,32 @@
1
+ ## RocksDB: A Persistent Key-Value Store for Flash and RAM Storage
2
+
3
+ [![CircleCI Status](https://circleci.com/gh/facebook/rocksdb.svg?style=svg)](https://circleci.com/gh/facebook/rocksdb)
4
+ [![TravisCI Status](https://travis-ci.org/facebook/rocksdb.svg?branch=master)](https://travis-ci.org/facebook/rocksdb)
5
+ [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/fbgfu0so3afcno78/branch/master?svg=true)](https://ci.appveyor.com/project/Facebook/rocksdb/branch/master)
6
+ [![PPC64le Build Status](http://140-211-168-68-openstack.osuosl.org:8080/buildStatus/icon?job=rocksdb&style=plastic)](http://140-211-168-68-openstack.osuosl.org:8080/job/rocksdb)
7
+
8
+ RocksDB is developed and maintained by Facebook Database Engineering Team.
9
+ It is built on earlier work on [LevelDB](https://github.com/google/leveldb) by Sanjay Ghemawat (sanjay@google.com)
10
+ and Jeff Dean (jeff@google.com)
11
+
12
+ This code is a library that forms the core building block for a fast
13
+ key-value server, especially suited for storing data on flash drives.
14
+ It has a Log-Structured-Merge-Database (LSM) design with flexible tradeoffs
15
+ between Write-Amplification-Factor (WAF), Read-Amplification-Factor (RAF)
16
+ and Space-Amplification-Factor (SAF). It has multi-threaded compactions,
17
+ making it especially suitable for storing multiple terabytes of data in a
18
+ single database.
19
+
20
+ Start with example usage here: https://github.com/facebook/rocksdb/tree/master/examples
21
+
22
+ See the [github wiki](https://github.com/facebook/rocksdb/wiki) for more explanation.
23
+
24
+ The public interface is in `include/`. Callers should not include or
25
+ rely on the details of any other header files in this package. Those
26
+ internal APIs may be changed without warning.
27
+
28
+ Design discussions are conducted in https://www.facebook.com/groups/rocksdb.dev/ and https://rocksdb.slack.com/
29
+
30
+ ## License
31
+
32
+ RocksDB is dual-licensed under both the GPLv2 (found in the COPYING file in the root directory) and Apache 2.0 License (found in the LICENSE.Apache file in the root directory). You may select, at your option, one of the above-listed licenses.
@@ -0,0 +1,23 @@
1
+ This directory contains the hdfs extensions needed to make rocksdb store
2
+ files in HDFS.
3
+
4
+ It has been compiled and testing against CDH 4.4 (2.0.0+1475-1.cdh4.4.0.p0.23~precise-cdh4.4.0).
5
+
6
+ The configuration assumes that packages libhdfs0, libhdfs0-dev are
7
+ installed which basically means that hdfs.h is in /usr/include and libhdfs in /usr/lib
8
+
9
+ The env_hdfs.h file defines the rocksdb objects that are needed to talk to an
10
+ underlying filesystem.
11
+
12
+ If you want to compile rocksdb with hdfs support, please set the following
13
+ environment variables appropriately (also defined in setup.sh for convenience)
14
+ USE_HDFS=1
15
+ JAVA_HOME=/usr/local/jdk-7u79-64
16
+ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/jdk-7u79-64/jre/lib/amd64/server:/usr/local/jdk-7u79-64/jre/lib/amd64/:./snappy/libs
17
+ make clean all db_bench
18
+
19
+ To run dbbench,
20
+ set CLASSPATH to include your hadoop distribution
21
+ db_bench --hdfs="hdfs://hbaseudbperf001.snc1.facebook.com:9000"
22
+
23
+
@@ -0,0 +1,10 @@
1
+ This directory contains interfaces and implementations that isolate the
2
+ rest of the package from platform details.
3
+
4
+ Code in the rest of the package includes "port.h" from this directory.
5
+ "port.h" in turn includes a platform specific "port_<platform>.h" file
6
+ that provides the platform specific implementation.
7
+
8
+ See port_posix.h for an example of what must be provided in a platform
9
+ specific header file.
10
+