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.
StateStoreDriver to query, update and delete data records.-
ClassDescriptionCachedRecordStore<R extends BaseRecord>Record store that takes care of caching the records in memory.State store record to track disabled name services.Management API for NameNode registrations stored in
MembershipStaterecords.Management API for the HDFS mount table information stored inMountTablerecords.RecordStore<R extends BaseRecord>Store records in the State Store.Management API forRouterStaterecords in the state store.Interface for a cached copy of the State Store.Service to periodically update theStateStoreServicecached information in theRouter.Service to periodically monitor the connection of the StateStoreStateStoreServicedata store and to re-open the connection to the data store if required.A service to initialize aStateStoreDriverand maintain the connection to the data store.Thrown when the state store is not reachable or available.Set of utility functions used to work with the State Store.