Package alluxio.underfs
Interface UfsManager
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
public interface UfsManager extends java.io.Closeable
A class that manages the UFS used by different services.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
UfsManager.UfsClient
Container for a UFS and the URI for that UFS.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addMount(long mountId, AlluxioURI ufsUri, UnderFileSystemConfiguration ufsConf)
Keeps track of a mount id and maps it to its URI in Alluxio and configuration.void
addMountWithRecorder(long mountId, AlluxioURI ufsUri, UnderFileSystemConfiguration ufsConf, Recorder recorder)
Keeps track of a mount id and maps it to its URI in Alluxio and configuration and records the execution process.UfsManager.UfsClient
get(long mountId)
Gets UFS information from the manager if this mount ID exists, or throws exception otherwise.UfsManager.UfsClient
getJournal(java.net.URI location)
UfsManager.UfsClient
getRoot()
boolean
hasMount(long mountId)
Checks if a mountId exists.void
removeMount(long mountId)
Removes the association from a mount id to a UFS instance.
-
-
-
Method Detail
-
addMount
void addMount(long mountId, AlluxioURI ufsUri, UnderFileSystemConfiguration ufsConf)
Keeps track of a mount id and maps it to its URI in Alluxio and configuration. This is an Alluxio-only operation and no interaction to UFS will be made.- Parameters:
mountId
- the mount idufsUri
- the UFS pathufsConf
- the UFS configuration
-
addMountWithRecorder
void addMountWithRecorder(long mountId, AlluxioURI ufsUri, UnderFileSystemConfiguration ufsConf, Recorder recorder)
Keeps track of a mount id and maps it to its URI in Alluxio and configuration and records the execution process. This is an Alluxio-only operation and no interaction to UFS will be made.- Parameters:
mountId
- the mount idufsUri
- the UFS pathufsConf
- the UFS configurationrecorder
- recorder used to record the detailed execution process
-
removeMount
void removeMount(long mountId)
Removes the association from a mount id to a UFS instance. If the mount id is not known, this is a noop.- Parameters:
mountId
- the mount id
-
get
UfsManager.UfsClient get(long mountId) throws NotFoundException, UnavailableException
Gets UFS information from the manager if this mount ID exists, or throws exception otherwise.- Parameters:
mountId
- the mount id- Returns:
- the UFS information
- Throws:
NotFoundException
- if mount id is not found in mount tableUnavailableException
- if master is not available to query for mount table
-
getRoot
UfsManager.UfsClient getRoot()
- Returns:
- the UFS client associated with root
-
getJournal
UfsManager.UfsClient getJournal(java.net.URI location)
- Parameters:
location
- the journal location- Returns:
- the UFS client associated with journal location
-
hasMount
boolean hasMount(long mountId)
Checks if a mountId exists.- Parameters:
mountId
- the mountId to check- Returns:
- whether the mountId has been occupied
-
-