Package org.apache.bookkeeper.metastore
Interface MetastoreScannableTable
- All Superinterfaces:
MetastoreTable
- All Known Implementing Classes:
InMemoryMetastoreTable
Metastore Scannable Table.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe order to loop over a table. -
Field Summary
FieldsFields inherited from interface org.apache.bookkeeper.metastore.MetastoreTable
ALL_FIELDS, NON_FIELDS -
Method Summary
Modifier and TypeMethodDescriptionvoidopenCursor(String firstKey, boolean firstInclusive, String lastKey, boolean lastInclusive, MetastoreScannableTable.Order order, Set<String> fields, MetastoreCallback<MetastoreCursor> cb, Object ctx) Open a cursor to loop over the entries belonging to a key range, which returns the specifiedfieldsfor each entry.voidopenCursor(String firstKey, boolean firstInclusive, String lastKey, boolean lastInclusive, MetastoreScannableTable.Order order, MetastoreCallback<MetastoreCursor> cb, Object ctx) Open a cursor to loop over the entries belonging to a key range, which returns all fields for each entry.Methods inherited from interface org.apache.bookkeeper.metastore.MetastoreTable
close, get, get, get, getName, openCursor, openCursor, put, remove
-
Field Details
-
EMPTY_START_KEY
-
EMPTY_END_KEY
-
-
Method Details
-
openCursor
void openCursor(String firstKey, boolean firstInclusive, String lastKey, boolean lastInclusive, MetastoreScannableTable.Order order, MetastoreCallback<MetastoreCursor> cb, Object ctx) Open a cursor to loop over the entries belonging to a key range, which returns all fields for each entry.Return Code:
MSException.Code.OK: an opened cursor
MSException.Code.IllegalOp/MSException.Code.ServiceDown: other issues- Parameters:
firstKey- Key to start scanning. If it isEMPTY_START_KEY, it starts from first key (inclusive).firstInclusive- true if firstKey is to be included in the returned view.lastKey- Key to stop scanning. If it isEMPTY_END_KEY, scan ends at the lastKey of the table (inclusive).lastInclusive- true if lastKey is to be included in the returned view.order- the order to loop over the entriescb- Callback to return an opened cursor.ctx- Callback context
-
openCursor
void openCursor(String firstKey, boolean firstInclusive, String lastKey, boolean lastInclusive, MetastoreScannableTable.Order order, Set<String> fields, MetastoreCallback<MetastoreCursor> cb, Object ctx) Open a cursor to loop over the entries belonging to a key range, which returns the specifiedfieldsfor each entry.Return Code:
MSException.Code.OK: an opened cursor
MSException.Code.IllegalOp/MSException.Code.ServiceDown: other issues- Parameters:
firstKey- Key to start scanning. If it isEMPTY_START_KEY, it starts from first key (inclusive).firstInclusive- true if firstKey is to be included in the returned view.lastKey- Key to stop scanning. If it isEMPTY_END_KEY, scan ends at the lastKey of the table (inclusive).lastInclusive- true if lastKey is to be included in the returned view.order- the order to loop over the entriesfields- Fields to selectcb- Callback to return an opened cursor.ctx- Callback context
-