[RocksJava] Review comments - reformatted MergeTest

This commit is contained in:
fyrz 2014-10-31 00:41:04 +01:00
parent 171be0ed55
commit 85b04ca765

View File

@ -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);