Class RouterStoreImpl
java.lang.Object
org.apache.hadoop.hdfs.server.federation.store.RecordStore<R>
org.apache.hadoop.hdfs.server.federation.store.CachedRecordStore<RouterState>
org.apache.hadoop.hdfs.server.federation.store.RouterStore
org.apache.hadoop.hdfs.server.federation.store.impl.RouterStoreImpl
- All Implemented Interfaces:
StateStoreCache
Implementation of the
RouterStore state store API.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFetches the current router state object.Fetches all router status objects.routerHeartbeat(RouterHeartbeatRequest request) Update the state of this router in the State Store.Methods inherited from class org.apache.hadoop.hdfs.server.federation.store.CachedRecordStore
getCachedRecords, getCachedRecordsAndTimeStamp, loadCache, overrideExpiredRecord, overrideExpiredRecordsMethods inherited from class org.apache.hadoop.hdfs.server.federation.store.RecordStore
getDriver, getRecordClass, newInstance
-
Constructor Details
-
RouterStoreImpl
-
-
Method Details
-
getRouterRegistration
public GetRouterRegistrationResponse getRouterRegistration(GetRouterRegistrationRequest request) throws IOException Description copied from class:RouterStoreFetches the current router state object.- Specified by:
getRouterRegistrationin classRouterStore- Parameters:
request- Fully populated request object.- Returns:
- The matching router record or null if none exists.
- Throws:
IOException- Throws exception if unable to query the data store or if more than one matching record is found.
-
getRouterRegistrations
public GetRouterRegistrationsResponse getRouterRegistrations(GetRouterRegistrationsRequest request) throws IOException Description copied from class:RouterStoreFetches all router status objects.- Specified by:
getRouterRegistrationsin classRouterStore- Parameters:
request- Fully populated request object.- Returns:
- List of Router records present in the data store.
- Throws:
IOException- Throws exception if unable to query the data store
-
routerHeartbeat
Description copied from class:RouterStoreUpdate the state of this router in the State Store.- Specified by:
routerHeartbeatin classRouterStore- Parameters:
request- Fully populated request object.- Returns:
- True if the update was successfully recorded, false otherwise.
- Throws:
IOException- Throws exception if unable to query the data store
-