Class MountTableStoreImpl

All Implemented Interfaces:
MountTableManager, StateStoreCache

@Private @Evolving public class MountTableStoreImpl extends MountTableStore
Implementation of the MountTableStore state store API.
  • Constructor Details

  • 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: MountTableManager
      Add 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: MountTableManager
      Updates 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: MountTableManager
      Remove 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: MountTableManager
      List 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: MountTableManager
      Refresh 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

      public GetDestinationResponse getDestination(GetDestinationRequest request) throws IOException
      Description copied from interface: MountTableManager
      Get 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.