Interface Ample
-
- All Known Implementing Classes:
AmpleImpl
public interface Ample
Accumulo Metadata Persistence Layer. Entry point and abstractions layer for reading and updating persisted Accumulo metadata. This metadata may be stored in Zookeeper or in Accumulo system tables.This interface seeks to satisfy the following goals.
- Provide a single entry point for all reading and writing of Accumulo Metadata.
- The root tablet persists its data in Zookeeper. Metadata tablets persist their data in root tablet. All other tablets persist their data in the metadata table. This interface abstracts how and where information for a tablet is actually persisted.
- Before the creation of this interface, many concurrent metadata table updates resulted in separate synchronous RPCs. The design of this interface allows batching of metadata table updates within a tablet server for cluster wide efficiencies. Batching is not required by implementations, but the design of the interface makes it possible.
- Make code that updates Accumulo persistent metadata more concise. Before this interface existed, there was a lot of redundant and verbose code for updating metadata.
- Reduce specialized code for the root tablet. Currently there is specialized code to manage the root tablets files that is different from all other tablets. This interface is the beginning of an effort to remove this specialized code. See #936
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Ample.DataLevel
Accumulo is a distributed tree with three levels.static interface
Ample.FileMeta
Temporary interface, place holder for the server side type FileRef.static interface
Ample.TabletMutator
Interface for changing a tablets persistent data.static interface
Ample.TabletsMutator
This interface allows efficiently updating multiple tablets.static interface
Ample.TServer
Temporary interface, place holder for some server side types like TServerInstance.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
deleteGcCandidates(Ample.DataLevel level, Collection<String> paths)
default Iterator<String>
getGcCandidates(Ample.DataLevel level, String continuePoint)
default Ample.TabletMutator
mutateTablet(KeyExtent extent)
Initiates mutating a single tablets persistent metadata.default Ample.TabletsMutator
mutateTablets()
Use this when updating multiple tablets.default void
putGcCandidates(TableId tableId, Collection<StoredTabletFile> candidates)
TabletMetadata
readTablet(KeyExtent extent, TabletMetadata.ColumnType... colsToFetch)
Read a single tablets metadata.
-
-
-
Method Detail
-
readTablet
TabletMetadata readTablet(KeyExtent extent, TabletMetadata.ColumnType... colsToFetch)
Read a single tablets metadata. No checking is done for prev row, so it could differ.- Parameters:
extent
- Reads tablet metadata using the table id and end row from this extent.colsToFetch
- What tablets columns to fetch. If empty, then everything is fetched.
-
mutateTablet
default Ample.TabletMutator mutateTablet(KeyExtent extent)
Initiates mutating a single tablets persistent metadata. No data is persisted until themutate()
method is called on the returned object. If updating multiple tablets, consider usingmutateTablets()
- Parameters:
extent
- Mutates a tablet that has this table id and end row. The prev end row is not considered or checked.
-
mutateTablets
default Ample.TabletsMutator mutateTablets()
Use this when updating multiple tablets. Ensure the returns TabletsMutator is closed, or data may not be persisted.
-
putGcCandidates
default void putGcCandidates(TableId tableId, Collection<StoredTabletFile> candidates)
-
deleteGcCandidates
default void deleteGcCandidates(Ample.DataLevel level, Collection<String> paths)
-
getGcCandidates
default Iterator<String> getGcCandidates(Ample.DataLevel level, String continuePoint)
-
-