@ThreadSafe public final class MountTable extends Object implements JournalEntryIterable
Modifier and Type | Class and Description |
---|---|
class |
MountTable.Resolution
This class represents a UFS path after resolution.
|
Constructor and Description |
---|
MountTable(UfsManager ufsManager)
Creates a new instance of
MountTable . |
Modifier and Type | Method and Description |
---|---|
void |
add(AlluxioURI alluxioUri,
AlluxioURI ufsUri,
long mountId,
MountOptions options)
Mounts the given UFS path at the given Alluxio path.
|
void |
checkUnderWritableMountPoint(AlluxioURI alluxioUri)
Checks to see if a write operation is allowed for the specified Alluxio path, by determining
if it is under a readonly mount point.
|
void |
clear()
Clears all the mount points except the root.
|
boolean |
containsMountPoint(AlluxioURI uri) |
boolean |
delete(AlluxioURI uri)
Unmounts the given Alluxio path.
|
Iterator<Journal.JournalEntry> |
getJournalEntryIterator() |
MountInfo |
getMountInfo(long mountId) |
String |
getMountPoint(AlluxioURI uri)
Returns the closest ancestor mount point the given path is nested under.
|
Map<String,MountInfo> |
getMountTable()
Returns a copy of the current mount table, the mount table is a map from Alluxio file system
URIs to the corresponding mount point information.
|
boolean |
isMountPoint(AlluxioURI uri) |
MountTable.Resolution |
resolve(AlluxioURI uri)
Resolves the given Alluxio path.
|
public static final String ROOT
public MountTable(UfsManager ufsManager)
MountTable
.ufsManager
- the UFS managerpublic Iterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator
in interface JournalEntryIterable
Iterator
that iterates all the journal entriespublic void add(AlluxioURI alluxioUri, AlluxioURI ufsUri, long mountId, MountOptions options) throws FileAlreadyExistsException, InvalidPathException
alluxioUri
- an Alluxio path URIufsUri
- a UFS path URImountId
- the mount idoptions
- the mount optionsFileAlreadyExistsException
- if the mount point already existsInvalidPathException
- if an invalid path is encounteredpublic void clear()
public boolean delete(AlluxioURI uri)
uri
- an Alluxio path URIpublic String getMountPoint(AlluxioURI uri) throws InvalidPathException
uri
- an Alluxio path URIInvalidPathException
- if an invalid path is encounteredpublic Map<String,MountInfo> getMountTable()
public boolean containsMountPoint(AlluxioURI uri) throws InvalidPathException
uri
- the Alluxio uri to checkInvalidPathException
public boolean isMountPoint(AlluxioURI uri)
uri
- an Alluxio path URIpublic MountTable.Resolution resolve(AlluxioURI uri) throws InvalidPathException
uri
- an Alluxio path URIMountTable.Resolution
representing the UFS pathInvalidPathException
- if an invalid path is encounteredpublic void checkUnderWritableMountPoint(AlluxioURI alluxioUri) throws InvalidPathException, AccessControlException
alluxioUri
- an Alluxio path URIInvalidPathException
- if the Alluxio path is invalidAccessControlException
- if the Alluxio path is under a readonly mount pointCopyright © 2023. All Rights Reserved.