@ThreadSafe public final class MasterUfsManager extends AbstractUfsManager implements DelegatingJournaled
AbstractUfsManager.Key
UfsManager.UfsClient
mCloser, mUnderFileSystemMap
Constructor and Description |
---|
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.
|
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.
|
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. |
boolean |
hasMount(long mountId)
Checks if a mountId exists.
|
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
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 addMountWithRecorder(long mountId, AlluxioURI ufsUri, UnderFileSystemConfiguration ufsConf, Recorder recorder)
UfsManager
addMountWithRecorder
in interface UfsManager
addMountWithRecorder
in class AbstractUfsManager
mountId
- the mount idufsUri
- the UFS pathufsConf
- the UFS configurationrecorder
- recorder used to record the detailed execution processpublic void removeMount(long mountId)
UfsManager
removeMount
in interface UfsManager
removeMount
in class AbstractUfsManager
mountId
- the mount idpublic boolean hasMount(long mountId)
UfsManager
hasMount
in interface UfsManager
hasMount
in class AbstractUfsManager
mountId
- the mountId to checkpublic 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.