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
    • 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 the mutate() method is called on the returned object. If updating multiple tablets, consider using mutateTablets()
        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.