@ThreadSafe public final class MasterUfsManager extends AbstractUfsManager implements DelegatingJournaled
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.
|
Journaled |
getDelegate() |
CloseableIterator<Journal.JournalEntry> |
getJournalEntryIterator() |
Map<String,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(java.util.function.Supplier<JournalContext> journalContext,
AlluxioURI ufsPath,
UfsMode ufsMode)
Set the operation mode the given physical ufs.
|
close, get, getJournal, getRoot
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyAndJournal, getCheckpointName, processJournalEntry, resetState, restoreFromCheckpoint, writeToCheckpoint
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,UfsMode> getPhysicalUfsState(List<String> physicalStores)
UnderFileSystem
under the given Mount
table resolution.physicalStores
- the physical stores for the mount resolutionpublic void setUfsMode(java.util.function.Supplier<JournalContext> journalContext, AlluxioURI ufsPath, UfsMode ufsMode) throws InvalidPathException
journalContext
- the journal contextufsPath
- the physical ufs path (scheme and authority only)ufsMode
- the ufs operation modeInvalidPathException
- if no managed ufs covers the given pathpublic Journaled getDelegate()
getDelegate
in interface DelegatingJournaled
public CloseableIterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator
in interface DelegatingJournaled
getJournalEntryIterator
in interface JournalEntryIterable
CloseableIterator
that iterates all the journal entriesCopyright © 2023. All Rights Reserved.