@ThreadSafe public final class MasterUfsManager extends AbstractUfsManager implements JournalEntryIterable
Modifier and Type | Class and Description |
---|---|
static class |
MasterUfsManager.UfsState
UnderFileSystem.UfsMode and mount ids corresponding to a physical ufs. |
AbstractUfsManager.Key
UfsManager.UfsClient
mCloser, mUnderFileSystemMap
Constructor and Description |
---|
MasterUfsManager()
Constructs the instance of
MasterUfsManager . |
Modifier and Type | Method and 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.
|
protected void |
connectUfs(UnderFileSystem fs)
Takes any necessary actions required to establish a connection to the under file system.
|
Iterator<Journal.JournalEntry> |
getJournalEntryIterator() |
Map<String,UnderFileSystem.UfsMode> |
getPhysicalUfsState(List<String> physicalStores)
Get the physical ufs operation modes for the
UnderFileSystem under the given Mount
table resolution. |
void |
removeMount(long mountId)
Removes the association from a mount id to a UFS instance.
|
void |
setUfsMode(AlluxioURI ufsPath,
UnderFileSystem.UfsMode ufsMode,
RpcContext rpcContext)
Set the operation mode the given physical ufs.
|
close, get, getRoot
public MasterUfsManager()
MasterUfsManager
.protected void connectUfs(UnderFileSystem fs) throws IOException
AbstractUfsManager
UnderFileSystem.connectFromMaster(String)
or
UnderFileSystem.connectFromWorker(String)
depending on the running process.connectUfs
in class AbstractUfsManager
IOException
public void addMount(long mountId, AlluxioURI ufsUri, UnderFileSystemConfiguration ufsConf)
UfsManager
addMount
in interface UfsManager
addMount
in class AbstractUfsManager
mountId
- the mount idufsUri
- the UFS pathufsConf
- the UFS configurationpublic void removeMount(long mountId)
UfsManager
removeMount
in interface UfsManager
removeMount
in class AbstractUfsManager
mountId
- the mount idpublic Map<String,UnderFileSystem.UfsMode> getPhysicalUfsState(List<String> physicalStores)
UnderFileSystem
under the given Mount
table resolution.physicalStores
- the physical stores for the mount resolutionpublic void setUfsMode(AlluxioURI ufsPath, UnderFileSystem.UfsMode ufsMode, RpcContext rpcContext) throws InvalidPathException
ufsPath
- the physical ufs path (scheme and authority only)ufsMode
- the ufs operation moderpcContext
- rpc contextInvalidPathException
- if no managed ufs covers the given pathpublic Iterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator
in interface JournalEntryIterable
Iterator
that iterates all the journal entriesCopyright © 2023. All Rights Reserved.