|
|
@ -472,8 +472,9 @@ public class RocksDBTest { |
|
|
|
rand.nextBytes(b); |
|
|
|
rand.nextBytes(b); |
|
|
|
db.put((String.valueOf(i)).getBytes(), b); |
|
|
|
db.put((String.valueOf(i)).getBytes(), b); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
db.flush(new FlushOptions().setWaitForFlush(true)); |
|
|
|
db.compactRange("0".getBytes(), "201".getBytes(), |
|
|
|
db.compactRange("0".getBytes(), "201".getBytes(), |
|
|
|
true, 0, -1); |
|
|
|
true, -1, 0); |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|
if (db != null) { |
|
|
|
if (db != null) { |
|
|
|
db.close(); |
|
|
|
db.close(); |
|
|
@ -580,7 +581,7 @@ public class RocksDBTest { |
|
|
|
String.valueOf(i).getBytes(), b); |
|
|
|
String.valueOf(i).getBytes(), b); |
|
|
|
} |
|
|
|
} |
|
|
|
db.compactRange(columnFamilyHandles.get(1), "0".getBytes(), |
|
|
|
db.compactRange(columnFamilyHandles.get(1), "0".getBytes(), |
|
|
|
"201".getBytes(), true, 0, -1); |
|
|
|
"201".getBytes(), true, -1, 0); |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|
for (ColumnFamilyHandle handle : columnFamilyHandles) { |
|
|
|
for (ColumnFamilyHandle handle : columnFamilyHandles) { |
|
|
|
handle.dispose(); |
|
|
|
handle.dispose(); |
|
|
|