0

The documentation is not clear about how to use the merge operation while using rocksdb-jni, and I am not familiar with C++ API, how could I define an merge operator?

buhtz
  • 10,774
  • 18
  • 76
  • 149

1 Answers1

0

You can't define new merge operators in java. They need to be implemented in C++ and then compiled and brought in Java

Eg how to use the built in uint64add operator val options = Options().setMergeOperator(UInt64AddOperator())

and then you can use rocksDB.merge(keyByteArray, longValueByteArray)

Asad Awadia
  • 1,417
  • 2
  • 9
  • 15