Class RouterStore
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
- All Implemented Interfaces:
StateStoreCache
- Direct Known Subclasses:
RouterStoreImpl
Management API for
RouterState records in the state store. Accesses the data store via the
StateStoreDriver interface. No data is cached.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract GetRouterRegistrationResponseFetches the current router state object.abstract GetRouterRegistrationsResponseFetches all router status objects.abstract RouterHeartbeatResponserouterHeartbeat(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
-
RouterStore
-
-
Method Details
-
getRouterRegistration
public abstract GetRouterRegistrationResponse getRouterRegistration(GetRouterRegistrationRequest request) throws IOException Fetches the current router state object.- 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 abstract GetRouterRegistrationsResponse getRouterRegistrations(GetRouterRegistrationsRequest request) throws IOException Fetches all router status objects.- 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
public abstract RouterHeartbeatResponse routerHeartbeat(RouterHeartbeatRequest request) throws IOException Update the state of this router in the State Store.- 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
-