Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ public void deleteRange(KEY beginKey, KEY endKey) throws RocksDatabaseException,
}

@Override
public void deleteWithBatch(BatchOperation batch, KEY key) throws CodecException {
public void deleteWithBatch(BatchOperation batch, KEY key) throws CodecException, RocksDatabaseException {
table.deleteWithBatch(batch, key);
}

@Override
public void deleteRangeWithBatch(BatchOperation batch, KEY beginKey, KEY endKey) throws CodecException {
public void deleteRangeWithBatch(BatchOperation batch, KEY beginKey, KEY endKey)
throws CodecException, RocksDatabaseException {
table.deleteRangeWithBatch(batch, beginKey, endKey);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void delete(String key) throws RocksDatabaseException, CodecException {
}

@Override
public void deleteWithBatch(BatchOperation batch, String key) throws CodecException {
public void deleteWithBatch(BatchOperation batch, String key) throws CodecException, RocksDatabaseException {
super.deleteWithBatch(batch, prefix(key));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,19 @@

package org.apache.hadoop.hdds.scm.metadata;

import java.io.Closeable;
import org.apache.hadoop.hdds.utils.db.CodecException;
import org.apache.hadoop.hdds.utils.db.RocksDatabaseException;
import org.apache.hadoop.hdds.utils.db.Table;

/**
* DB transaction that abstracts the updates to the underlying datastore.
*/
public interface DBTransactionBuffer {
public interface DBTransactionBuffer extends Closeable {

<KEY, VALUE> void addToBuffer(Table<KEY, VALUE> table, KEY key, VALUE value)
throws RocksDatabaseException, CodecException;

<KEY, VALUE> void removeFromBuffer(Table<KEY, VALUE> table, KEY key)
throws RocksDatabaseException, CodecException;

void close() throws RocksDatabaseException;
}
Loading