org.apache.hadoop.hdfs.server.federation.store (Apache Hadoop HDFS-RBF 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.federation.store

# Package org.apache.hadoop.hdfs.server.federation.store

@Private @Evolving package org.apache.hadoop.hdfs.server.federation.store
The federation state store tracks persistent values that are shared between multiple routers.

Data is stored in data records that inherit from a common class. Data records are serialized when written to the data store using a modular serialization implementation. The default is profobuf serialization. Data is stored as rows of records of the same type with each data member in a record representing a column.

The state store uses a modular data storage `StateStoreDriver` to handle querying, updating and deleting data records. The data storage driver is initialized and maintained by the `StateStoreService`. The state store supports fetching all records of a type, filtering by column values or fetching a single record by its primary key.

The state store contains several API interfaces, one for each data records type.

- MembershipStore: state of all Namenodes in the federation. Uses the MembershipState record.
- MountTableStore: Mount table mapping paths in the global namespace to individual subcluster paths. Uses the MountTable record.
- RouterStore: State of all routers in the federation. Uses the RouterState record.
- DisabledNameserviceStore: state of all disabled nameservice in the federation. Uses the DisabledNameservice record.

Each API is defined in a separate interface. The implementations of these interfaces are responsible for accessing the `StateStoreDriver` to query, update and delete data records.

- Related Packages
  Package
  Description
  org.apache.hadoop.hdfs.server.federation.store.driver
  The state store uses modular data storage classes derived from StateStoreDriver to handle querying, updating and deleting data records.
  org.apache.hadoop.hdfs.server.federation.store.impl
  Contains implementations of the state store API interfaces.
  org.apache.hadoop.hdfs.server.federation.store.protocol
  Contains the abstract definitions of the API request and response objects for the various state store APIs.
  org.apache.hadoop.hdfs.server.federation.store.records
  Contains the abstract definitions of the state store data records.
- Class
  Description
  CachedRecordStore<R extends BaseRecord>
  Record store that takes care of caching the records in memory.
  DisabledNameserviceStore
  State store record to track disabled name services.
  MembershipStore
  Management API for NameNode registrations stored in `MembershipState` records.
  MountTableStore
  Management API for the HDFS mount table information stored in `MountTable` records.
  RecordStore<R extends BaseRecord>
  Store records in the State Store.
  RouterStore
  Management API for `RouterState` records in the state store.
  StateStoreCache
  Interface for a cached copy of the State Store.
  StateStoreCacheUpdateService
  Service to periodically update the `StateStoreService` cached information in the `Router`.
  StateStoreConnectionMonitorService
  Service to periodically monitor the connection of the StateStore `StateStoreService` data store and to re-open the connection to the data store if required.
  StateStoreService
  A service to initialize a `StateStoreDriver` and maintain the connection to the data store.
  StateStoreUnavailableException
  Thrown when the state store is not reachable or available.
  StateStoreUtils
  Set of utility functions used to work with the State Store.