StateStoreCacheMembershipStoreImpl@Private @Evolving public abstract class MembershipStore extends CachedRecordStore<MembershipState>
MembershipState records. The RouterHeartbeatService periodically polls each NN to update the NameNode
metadata(addresses, operational) and HA state(active, standby). Each
NameNode may be polled by multiple
Router
instances.
Once fetched from the
StateStoreDriver, NameNode registrations are cached until the next query.
The fetched registration data is aggregated using a quorum to determine the
best/most accurate state for each NameNode. The cache is periodically updated
by the StateStoreCacheUpdateService.
| Modifier | Constructor | Description |
|---|---|---|
protected |
MembershipStore(StateStoreDriver driver) |
| Modifier and Type | Method | Description |
|---|---|---|
abstract GetNamenodeRegistrationsResponse |
getExpiredNamenodeRegistrations(GetNamenodeRegistrationsRequest request) |
Get the expired registrations from the registration cache.
|
abstract GetNamenodeRegistrationsResponse |
getNamenodeRegistrations(GetNamenodeRegistrationsRequest request) |
Queries for a single cached registration entry matching the given
parameters.
|
abstract GetNamespaceInfoResponse |
getNamespaceInfo(GetNamespaceInfoRequest request) |
Retrieves a list of registered nameservices and their associated info.
|
abstract NamenodeHeartbeatResponse |
namenodeHeartbeat(NamenodeHeartbeatRequest request) |
Inserts or updates a namenode membership entry into the table.
|
abstract UpdateNamenodeRegistrationResponse |
updateNamenodeRegistration(UpdateNamenodeRegistrationRequest request) |
Overrides a cached namenode state with an updated state.
|
getCachedRecords, getCachedRecordsAndTimeStamp, loadCache, overrideExpiredRecord, overrideExpiredRecordsgetDriver, getRecordClass, newInstanceprotected MembershipStore(StateStoreDriver driver)
public abstract NamenodeHeartbeatResponse namenodeHeartbeat(NamenodeHeartbeatRequest request) throws java.io.IOException
request - Fully populated NamenodeHeartbeatRequest request.StateStoreUnavailableException - Throws exception if the data store
is not initialized.java.io.IOException - if the data store could not be queried or the query is
invalid.public abstract GetNamenodeRegistrationsResponse getNamenodeRegistrations(GetNamenodeRegistrationsRequest request) throws java.io.IOException
request - Fully populated GetNamenodeRegistrationsRequest request.StateStoreUnavailableException - Throws exception if the data store
is not initialized.java.io.IOException - if the data store could not be queried or the query is
invalid.public abstract GetNamenodeRegistrationsResponse getExpiredNamenodeRegistrations(GetNamenodeRegistrationsRequest request) throws java.io.IOException
request - Request to get the expired registrations.StateStoreUnavailableException - Throws exception if the data store
is not initialized.java.io.IOException - if the data store could not be queried or the query is
invalid.public abstract GetNamespaceInfoResponse getNamespaceInfo(GetNamespaceInfoRequest request) throws java.io.IOException
request - Request to get the name spaces.java.io.IOException - if the data store could not be queried or the query is
invalid.public abstract UpdateNamenodeRegistrationResponse updateNamenodeRegistration(UpdateNamenodeRegistrationRequest request) throws java.io.IOException
request - Fully populated OverrideNamenodeRegistrationRequest request.StateStoreUnavailableException - if the data store is not
initialized.java.io.IOException - if the data store could not be queried or the query is
invalid.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.