@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.cc +597 -100
- package/binding.gyp +5 -4
- package/chained-batch.js +13 -18
- package/deps/rocksdb/rocksdb/README.md +32 -0
- package/deps/rocksdb/rocksdb/hdfs/README +23 -0
- package/deps/rocksdb/rocksdb/port/README +10 -0
- package/deps/rocksdb/rocksdb/third-party/folly/folly/synchronization/test/DistributedMutexTest.cpp +1145 -0
- package/deps/rocksdb/rocksdb/utilities/transactions/lock/range/range_tree/lib/README +13 -0
- package/deps/rocksdb/rocksdb.gyp +44 -62
- package/deps/snappy/snappy-1.1.7/README.md +149 -0
- package/index.js +189 -0
- package/iterator.js +88 -24
- package/package.json +23 -17
- package/prebuilds/darwin-x64+arm64/node.napi.node +0 -0
- package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
- package/deps/rocksdb/rocksdb/cmake/modules/CxxFlags.cmake +0 -7
- package/deps/rocksdb/rocksdb/cmake/modules/FindJeMalloc.cmake +0 -29
- package/deps/rocksdb/rocksdb/cmake/modules/FindNUMA.cmake +0 -29
- package/deps/rocksdb/rocksdb/cmake/modules/FindSnappy.cmake +0 -29
- package/deps/rocksdb/rocksdb/cmake/modules/FindTBB.cmake +0 -33
- package/deps/rocksdb/rocksdb/cmake/modules/Findgflags.cmake +0 -29
- package/deps/rocksdb/rocksdb/cmake/modules/Findlz4.cmake +0 -29
- package/deps/rocksdb/rocksdb/cmake/modules/Findzstd.cmake +0 -29
- package/deps/rocksdb/rocksdb/cmake/modules/ReadVersion.cmake +0 -10
- package/leveldown.js +0 -113
- package/package-lock.json +0 -23687
package/binding.gyp
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}, { # OS != 'win'
|
|
26
|
-
'cflags
|
|
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.
|
|
42
|
-
, '-std=c++
|
|
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.
|
|
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-
|
|
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
|
-
|
|
14
|
-
this[
|
|
15
|
-
this[
|
|
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
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
39
|
+
exports.ChainedBatch = ChainedBatch
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
## RocksDB: A Persistent Key-Value Store for Flash and RAM Storage
|
|
2
|
+
|
|
3
|
+
[](https://circleci.com/gh/facebook/rocksdb)
|
|
4
|
+
[](https://travis-ci.org/facebook/rocksdb)
|
|
5
|
+
[](https://ci.appveyor.com/project/Facebook/rocksdb/branch/master)
|
|
6
|
+
[](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
|
+
|