[RocksJava] Review comments - reformatted MergeTest

main
fyrz 10 years ago
parent 171be0ed55
commit 85b04ca765
  1. 18
      java/org/rocksdb/test/MergeTest.java

@ -51,12 +51,15 @@ public class MergeTest {
new ArrayList<ColumnFamilyHandle>();
cfNames.add("default");
cfNames.add("new_cf");
RocksDB db = RocksDB.open(opt, db_cf_path_string, cfNames, columnFamilyHandleList);
RocksDB db = RocksDB.open(opt, db_cf_path_string,
cfNames, columnFamilyHandleList);
// writing aa under key
db.put(columnFamilyHandleList.get(1), "cfkey".getBytes(), "aa".getBytes());
db.put(columnFamilyHandleList.get(1),
"cfkey".getBytes(), "aa".getBytes());
// merge bb under key
db.merge(columnFamilyHandleList.get(1), "cfkey".getBytes(), "bb".getBytes());
db.merge(columnFamilyHandleList.get(1),
"cfkey".getBytes(), "bb".getBytes());
byte[] value = db.get(columnFamilyHandleList.get(1), "cfkey".getBytes());
String strValue = new String(value);
@ -105,12 +108,15 @@ public class MergeTest {
new ArrayList<ColumnFamilyHandle>();
cfNames.add("default");
cfNames.add("new_cf");
RocksDB db = RocksDB.open(opt, db_path_operator, cfNames, columnFamilyHandleList);
RocksDB db = RocksDB.open(opt, db_path_operator,
cfNames, columnFamilyHandleList);
// writing aa under key
db.put(columnFamilyHandleList.get(1), "cfkey".getBytes(), "aa".getBytes());
db.put(columnFamilyHandleList.get(1),
"cfkey".getBytes(), "aa".getBytes());
// merge bb under key
db.merge(columnFamilyHandleList.get(1), "cfkey".getBytes(), "bb".getBytes());
db.merge(columnFamilyHandleList.get(1),
"cfkey".getBytes(), "bb".getBytes());
byte[] value = db.get(columnFamilyHandleList.get(1), "cfkey".getBytes());
String strValue = new String(value);

Loading…
Cancel
Save