@ThreadSafe public final class FileSystemMasterView extends Object
FileSystemMaster
.Constructor and Description |
---|
FileSystemMasterView(FileSystemMaster fileSystemMaster)
Constructs a view of the
FileSystemMaster . |
Modifier and Type | Method and Description |
---|---|
List<FileBlockInfo> |
getFileBlockInfoList(AlluxioURI path) |
long |
getFileId(AlluxioURI path)
Returns the file id for a given path.
|
FileInfo |
getFileInfo(long fileId)
Returns the
FileInfo for a given path. |
PersistenceState |
getFilePersistenceState(long fileId)
Returns the persistence state of a given file.
|
List<Long> |
getLostFiles() |
AlluxioURI |
getPath(long fileId)
Gets the path of a file with the given id.
|
List<WorkerInfo> |
getWorkerInfoList() |
public FileSystemMasterView(FileSystemMaster fileSystemMaster)
FileSystemMaster
.fileSystemMaster
- the file system masterpublic PersistenceState getFilePersistenceState(long fileId) throws FileDoesNotExistException
fileId
- the file idFileDoesNotExistException
- if the file does not existpublic FileInfo getFileInfo(long fileId) throws FileDoesNotExistException, AccessControlException, UnavailableException
FileInfo
for a given path. Called via RPC, as well as internal masters.fileId
- the file id to get the FileInfo
forFileInfo
for the given file idFileDoesNotExistException
- if the file does not existAccessControlException
- if permission deniedUnavailableException
public long getFileId(AlluxioURI path) throws AccessControlException, FileDoesNotExistException, UnavailableException
path
- the path to get the file id forAccessControlException
- if permission checking failsFileDoesNotExistException
- if file does not existUnavailableException
public List<FileBlockInfo> getFileBlockInfoList(AlluxioURI path) throws FileDoesNotExistException, InvalidPathException, AccessControlException, UnavailableException
path
- the path to get the info forFileBlockInfo
for all the blocks of the given fileFileDoesNotExistException
- if the file does not existInvalidPathException
- if the path of the given file is invalidAccessControlException
- if permission checking failsUnavailableException
public AlluxioURI getPath(long fileId) throws FileDoesNotExistException
fileId
- the id of the file to look upFileDoesNotExistException
- raise if the file does not existpublic List<WorkerInfo> getWorkerInfoList() throws UnavailableException
WorkerInfo
objects representing the workers in AlluxioUnavailableException
Copyright © 2023. All Rights Reserved.