Class MountTableStoreImpl
java.lang.Object
org.apache.hadoop.hdfs.server.federation.store.RecordStore<R>
org.apache.hadoop.hdfs.server.federation.store.CachedRecordStore<MountTable>
org.apache.hadoop.hdfs.server.federation.store.MountTableStore
org.apache.hadoop.hdfs.server.federation.store.impl.MountTableStoreImpl
- All Implemented Interfaces:
MountTableManager,StateStoreCache
Implementation of the
MountTableStore state store API.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd multiple entries to the mount table.When add mount table entry, it needs WRITE permission of the nearest parent entry if exist, and EXECUTE permission of other ancestor entries.getDestination(GetDestinationRequest request) Get the destination subcluster (namespace) of a file/directory.List all mount table entries present at or below the path.Refresh mount table entries cache from the state store.Remove an entry from the mount table.Updates an existing entry in the mount table.Methods inherited from class org.apache.hadoop.hdfs.server.federation.store.MountTableStore
getQuotaManager, setQuotaManager, setRefreshService, updateCacheAllRoutersMethods 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
-
MountTableStoreImpl
-
-
Method Details
-
addMountTableEntry
public AddMountTableEntryResponse addMountTableEntry(AddMountTableEntryRequest request) throws IOException When add mount table entry, it needs WRITE permission of the nearest parent entry if exist, and EXECUTE permission of other ancestor entries.- Parameters:
request- add mount table entry request- Returns:
- add mount table entry response
- Throws:
IOException- if mount table cannot be accessed
-
addMountTableEntries
public AddMountTableEntriesResponse addMountTableEntries(AddMountTableEntriesRequest request) throws IOException Description copied from interface:MountTableManagerAdd multiple entries to the mount table.- Parameters:
request- Request object with fully populated list of mount point entries.- Returns:
- True if all the mount table entries were successfully committed to the data store.
- Throws:
IOException- Throws exception if the data store is not initialized.
-
updateMountTableEntry
public UpdateMountTableEntryResponse updateMountTableEntry(UpdateMountTableEntryRequest request) throws IOException Description copied from interface:MountTableManagerUpdates an existing entry in the mount table.- Parameters:
request- Fully populated request object.- Returns:
- True if the mount table entry was successfully committed to the data store.
- Throws:
IOException- Throws exception if the data store is not initialized.
-
removeMountTableEntry
public RemoveMountTableEntryResponse removeMountTableEntry(RemoveMountTableEntryRequest request) throws IOException Description copied from interface:MountTableManagerRemove an entry from the mount table.- Parameters:
request- Fully populated request object.- Returns:
- True the mount table entry was removed from the data store.
- Throws:
IOException- Throws exception if the data store is not initialized.
-
getMountTableEntries
public GetMountTableEntriesResponse getMountTableEntries(GetMountTableEntriesRequest request) throws IOException Description copied from interface:MountTableManagerList all mount table entries present at or below the path. Fetches from the state store.- Parameters:
request- Fully populated request object.- Returns:
- List of all mount table entries under the path. Zero-length list if none are found.
- Throws:
IOException- Throws exception if the data store cannot be queried.
-
refreshMountTableEntries
public RefreshMountTableEntriesResponse refreshMountTableEntries(RefreshMountTableEntriesRequest request) throws IOException Description copied from interface:MountTableManagerRefresh mount table entries cache from the state store. Cache is updated periodically but with this API cache can be refreshed immediately. This API is primarily meant to be called from the Admin Server. Admin Server will call this API and refresh mount table cache of all the routers while changing mount table entries.- Parameters:
request- Fully populated request object.- Returns:
- True the mount table entry was updated without any error.
- Throws:
IOException- Throws exception if the data store is not initialized.
-
getDestination
Description copied from interface:MountTableManagerGet the destination subcluster (namespace) of a file/directory.- Parameters:
request- Fully populated request object including the file to check.- Returns:
- The response including the subcluster where the input file is.
- Throws:
IOException- Throws exception if the data store is not initialized.
-