GitXplorerGitXplorer
a

dedupfs

public
4 stars
5 forks
1 issues

Commits

List of commits on branch master.
Unverified
c8d1563f06fef24299c8851264f8fbd19d1e44da

RocksDB 7.0+ compatibility

aajkr committed 2 years ago
Verified
27ecfd8c6d1bcf44278f1dc80c4b318f0daed8e2

Merge pull request #1 from riversand963/cmake-dedupfs

aajkr committed 3 years ago
Verified
496e688b2a57e3880749888ca1521389161304a4

Merge branch 'master' into cmake-dedupfs

rriversand963 committed 3 years ago
Unverified
40e5578d5e21feb46c5ccd520dc2eb27fdd26de9

cmake support

aajkr committed 3 years ago
Unverified
d885fdcf17de26f7b51b3abb46db7de14341dac1

Add CMakeLists.txt for dedupfs

rriversand963 committed 3 years ago
Unverified
55523a8dae4eece182fc10924cbc47fbe38f4184

link static registration variable with `-u`

aajkr committed 4 years ago

README

The README file for this repository.

dedupfs

DedupFileSystem is for demonstrating how to integrate external plugins with RocksDB. It depends on libcrypto to show how an external plugin can bring its dependencies into the RocksDB build. It provides a factory function in a header file to show integration with RocksDB header includes. It can also be enabled in text-based options to demonstrate use of the static registration framework.

Build

The code first needs to be linked under RocksDB's "plugin/" directory. In your RocksDB directory, run:

$ pushd ./plugin/
$ git clone https://github.com/ajkr/dedupfs.git

Next, we can build and install RocksDB with this plugin as follows:

$ popd
$ make clean && DEBUG_LEVEL=0 ROCKSDB_PLUGINS="dedupfs" make -j48 db_bench install

Tool usage

For RocksDB binaries (such as the db_bench we built above), the plugin can be enabled through configuration. db_bench in particular takes a --fs_uri where we can specify "dedupfs" , which is the name registered by this plugin. Example usage:

$ ./db_bench --benchmarks=fillrandom --fs_uri=dedupfs --compression_type=none

Application usage

The plugin's interface is also exposed to applications, which can enable it either through configuration or through code. Here is an example instantiating the plugin in code.

$ cat <<EOF >./tmp.cc
#include <rocksdb/plugin/dedupfs/dedupfs.h>

int main() {
  auto fs = ROCKSDB_NAMESPACE::NewDedupFileSystem();
  return 0;
}
EOF
$ g++ $(pkg-config --cflags rocksdb) -c ./tmp.cc -o ./tmp.o
$ g++ $(pkg-config --static --libs rocksdb) ./tmp.o -o ./tmp
$ ./tmp