@ThreadSafe public final class RetryHandlingFileSystemMasterClient extends AbstractMasterClient implements FileSystemMasterClient
AbstractClient.RpcCallable<V>
FileSystemMasterClient.Factory
mAddress, mClosed, mConnected, mProtocol, mServiceVersion
Constructor and Description |
---|
RetryHandlingFileSystemMasterClient(MasterClientConfig conf)
Creates a new
RetryHandlingFileSystemMasterClient instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
afterConnect()
This method is called after the connection is made to the remote.
|
List<AlluxioURI> |
checkConsistency(AlluxioURI path,
CheckConsistencyOptions options)
Checks the consistency of Alluxio metadata against the under storage for all files and
directories in a given subtree.
|
void |
completeFile(AlluxioURI path,
CompleteFileOptions options)
Marks a file as completed.
|
void |
createDirectory(AlluxioURI path,
CreateDirectoryOptions options)
Creates a new directory.
|
void |
createFile(AlluxioURI path,
CreateFileOptions options)
Creates a new file.
|
void |
delete(AlluxioURI path,
DeleteOptions options)
Deletes a file or a directory.
|
void |
free(AlluxioURI path,
FreeOptions options)
Frees a file.
|
protected AlluxioService.Client |
getClient() |
String |
getFilePath(GetFilePathTOptions options) |
Map<String,MountPointInfo> |
getMountTable()
Lists all mount points and their corresponding under storage addresses.
|
long |
getNewBlockIdForFile(AlluxioURI path) |
protected String |
getServiceName() |
protected long |
getServiceVersion() |
URIStatus |
getStatus(AlluxioURI path,
GetStatusOptions options) |
List<URIStatus> |
listStatus(AlluxioURI path,
ListStatusOptions options) |
void |
loadMetadata(AlluxioURI path,
LoadMetadataOptions options)
Loads the metadata of a file from the under file system.
|
void |
mount(AlluxioURI alluxioPath,
AlluxioURI ufsPath,
MountOptions options)
Mounts the given UFS path under the given Alluxio path.
|
void |
rename(AlluxioURI src,
AlluxioURI dst)
Renames a file or a directory.
|
void |
rename(AlluxioURI src,
AlluxioURI dst,
RenameOptions options)
Renames a file or a directory.
|
void |
scheduleAsyncPersist(AlluxioURI path)
Schedules the async persistence of the given file.
|
void |
setAttribute(AlluxioURI path,
SetAttributeOptions options)
Sets the file or directory attributes.
|
void |
unmount(AlluxioURI alluxioPath)
Unmounts the given Alluxio path.
|
void |
updateUfsMode(AlluxioURI ufsUri,
UpdateUfsModeOptions options)
Updates the operation mode for the given ufs path.
|
getAddress
afterDisconnect, beforeDisconnect, checkVersion, close, connect, disconnect, isConnected, retryRPC, retryRPC
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connect, disconnect, getAddress, isConnected
public RetryHandlingFileSystemMasterClient(MasterClientConfig conf)
RetryHandlingFileSystemMasterClient
instance.conf
- master client configurationprotected AlluxioService.Client getClient()
getClient
in class AbstractClient
protected String getServiceName()
getServiceName
in class AbstractClient
protected long getServiceVersion()
getServiceVersion
in class AbstractClient
protected void afterConnect()
AbstractClient
afterConnect
in class AbstractClient
public List<AlluxioURI> checkConsistency(AlluxioURI path, CheckConsistencyOptions options) throws AlluxioStatusException
FileSystemMasterClient
checkConsistency
in interface FileSystemMasterClient
path
- the root of the subtree to checkoptions
- method optionsAlluxioStatusException
public void createDirectory(AlluxioURI path, CreateDirectoryOptions options) throws AlluxioStatusException
FileSystemMasterClient
createDirectory
in interface FileSystemMasterClient
path
- the directory pathoptions
- method optionsAlreadyExistsException
- if the directory already existsAlluxioStatusException
public void createFile(AlluxioURI path, CreateFileOptions options) throws AlluxioStatusException
FileSystemMasterClient
createFile
in interface FileSystemMasterClient
path
- the file pathoptions
- method optionsAlreadyExistsException
- if the file already existsAlluxioStatusException
public void completeFile(AlluxioURI path, CompleteFileOptions options) throws AlluxioStatusException
FileSystemMasterClient
completeFile
in interface FileSystemMasterClient
path
- the file pathoptions
- the method optionsAlluxioStatusException
public void delete(AlluxioURI path, DeleteOptions options) throws AlluxioStatusException
FileSystemMasterClient
delete
in interface FileSystemMasterClient
path
- the path to deleteoptions
- method optionsAlluxioStatusException
public void free(AlluxioURI path, FreeOptions options) throws AlluxioStatusException
FileSystemMasterClient
free
in interface FileSystemMasterClient
path
- the path to freeoptions
- method optionsNotFoundException
- if the path does not existAlluxioStatusException
public String getFilePath(GetFilePathTOptions options) throws AlluxioStatusException
getFilePath
in interface FileSystemMasterClient
options
- the getFilePath optionsAlluxioStatusException
public URIStatus getStatus(AlluxioURI path, GetStatusOptions options) throws AlluxioStatusException
getStatus
in interface FileSystemMasterClient
path
- the file pathoptions
- the getStatus optionsNotFoundException
- if the path does not existAlluxioStatusException
public long getNewBlockIdForFile(AlluxioURI path) throws AlluxioStatusException
getNewBlockIdForFile
in interface FileSystemMasterClient
path
- the file pathAlluxioStatusException
public Map<String,MountPointInfo> getMountTable() throws AlluxioStatusException
FileSystemMasterClient
getMountTable
in interface FileSystemMasterClient
MountPointInfo
AlluxioStatusException
public List<URIStatus> listStatus(AlluxioURI path, ListStatusOptions options) throws AlluxioStatusException
listStatus
in interface FileSystemMasterClient
path
- the path to listoptions
- the listStatus optionsNotFoundException
- if the path does not existAlluxioStatusException
public void loadMetadata(AlluxioURI path, LoadMetadataOptions options) throws AlluxioStatusException
FileSystemMasterClient
loadMetadata
in interface FileSystemMasterClient
path
- the path of the file to load metadata foroptions
- method optionsNotFoundException
- if the path does not existAlluxioStatusException
public void mount(AlluxioURI alluxioPath, AlluxioURI ufsPath, MountOptions options) throws AlluxioStatusException
FileSystemMasterClient
mount
in interface FileSystemMasterClient
alluxioPath
- the Alluxio pathufsPath
- the UFS pathoptions
- mount optionsAlluxioStatusException
public void rename(AlluxioURI src, AlluxioURI dst) throws AlluxioStatusException
FileSystemMasterClient
rename
in interface FileSystemMasterClient
src
- the path to renamedst
- new file pathNotFoundException
- if the path does not existAlluxioStatusException
public void rename(AlluxioURI src, AlluxioURI dst, RenameOptions options) throws AlluxioStatusException
FileSystemMasterClient
rename
in interface FileSystemMasterClient
src
- the path to renamedst
- new file pathoptions
- rename optionsNotFoundException
- if the path does not existAlluxioStatusException
public void setAttribute(AlluxioURI path, SetAttributeOptions options) throws AlluxioStatusException
FileSystemMasterClient
setAttribute
in interface FileSystemMasterClient
path
- the file or directory pathoptions
- the file or directory attribute options to be setNotFoundException
- if the path does not existAlluxioStatusException
public void scheduleAsyncPersist(AlluxioURI path) throws AlluxioStatusException
FileSystemMasterClient
scheduleAsyncPersist
in interface FileSystemMasterClient
path
- the file pathAlluxioStatusException
public void unmount(AlluxioURI alluxioPath) throws AlluxioStatusException
FileSystemMasterClient
unmount
in interface FileSystemMasterClient
alluxioPath
- the Alluxio pathAlluxioStatusException
public void updateUfsMode(AlluxioURI ufsUri, UpdateUfsModeOptions options) throws AlluxioStatusException
FileSystemMasterClient
updateUfsMode
in interface FileSystemMasterClient
ufsUri
- the ufs pathoptions
- the options to update ufs operation modeAlluxioStatusException
Copyright © 2023. All Rights Reserved.