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.