@Override public int delete(String table, String key) { try { db.remove(key.getBytes()); } catch (RocksDBException e) { System.out.format("[ERROR] caught the unexpceted exception -- %s\n", e); assert (false); } return 0; }
@Override public final void clear() { ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputViewStreamWrapper out = new DataOutputViewStreamWrapper(baos); try { writeKeyAndNamespace(out); byte[] key = baos.toByteArray(); db.remove(key); } catch (IOException | RocksDBException e) { throw new RuntimeException("Error while removing entry from RocksDB", e); } }