@ThreadSafe public final class RetryHandlingFileSystemMasterClient extends AbstractMasterClient implements FileSystemMasterClient
AbstractClient.RpcCallable<V>FileSystemMasterClient.FactorymChannel, mClosed, mConnected, mContext, mServerAddress, mServiceVersion, mVersionService| Constructor and Description |
|---|
RetryHandlingFileSystemMasterClient(MasterClientContext conf)
Creates a new
RetryHandlingFileSystemMasterClient instance. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterConnect() |
void |
checkAccess(AlluxioURI path,
CheckAccessPOptions options)
Check access to a path.
|
java.util.List<AlluxioURI> |
checkConsistency(AlluxioURI path,
CheckConsistencyPOptions options)
Checks the consistency of Alluxio metadata against the under storage for all files and
directories in a given subtree.
|
void |
completeFile(AlluxioURI path,
CompleteFilePOptions options)
Marks a file as completed.
|
void |
createDirectory(AlluxioURI path,
CreateDirectoryPOptions options)
Creates a new directory.
|
URIStatus |
createFile(AlluxioURI path,
CreateFilePOptions options)
Creates a new file.
|
void |
delete(AlluxioURI path,
DeletePOptions options)
Deletes a file or a directory.
|
boolean |
exists(AlluxioURI path,
ExistsPOptions options)
Checks whether a file or directory exists.
|
void |
free(AlluxioURI path,
FreePOptions options)
Frees a file.
|
java.lang.String |
getFilePath(long fileId) |
java.util.Map<java.lang.String,MountPointInfo> |
getMountTable(boolean checkUfs)
Lists all mount points and their corresponding under storage addresses.
|
long |
getNewBlockIdForFile(AlluxioURI path) |
protected ServiceType |
getRemoteServiceType() |
protected java.lang.String |
getServiceName() |
protected long |
getServiceVersion() |
java.util.List<java.lang.String> |
getStateLockHolders() |
URIStatus |
getStatus(AlluxioURI path,
GetStatusPOptions options) |
java.util.List<SyncPointInfo> |
getSyncPathList()
get the list of paths that are currently being actively synced.
|
void |
iterateStatus(AlluxioURI path,
ListStatusPOptions options,
java.util.function.Consumer<? super URIStatus> action)
Performs a specific action on each
URIStatus in the result of FileSystemMasterClient.listStatus(alluxio.AlluxioURI, alluxio.grpc.ListStatusPOptions). |
java.util.List<URIStatus> |
listStatus(AlluxioURI path,
ListStatusPOptions options) |
ListStatusPartialResult |
listStatusPartial(AlluxioURI path,
ListStatusPartialPOptions options) |
void |
mount(AlluxioURI alluxioPath,
AlluxioURI ufsPath,
MountPOptions options)
Mounts the given UFS path under the given Alluxio path.
|
void |
needsSync(AlluxioURI path)
Mark a path as needed synchronization with the UFS, when this path or any
of its children are accessed, a sync with the UFS will be performed.
|
void |
rename(AlluxioURI src,
AlluxioURI dst)
Renames a file or a directory.
|
void |
rename(AlluxioURI src,
AlluxioURI dst,
RenamePOptions options)
Renames a file or a directory.
|
AlluxioURI |
reverseResolve(AlluxioURI ufsUri)
Reverse resolve a ufs uri.
|
void |
scheduleAsyncPersist(AlluxioURI path,
ScheduleAsyncPersistencePOptions options)
Schedules the async persistence of the given file.
|
void |
setAcl(AlluxioURI path,
SetAclAction action,
java.util.List<AclEntry> entries,
SetAclPOptions options)
Sets the ACL for a path.
|
void |
setAttribute(AlluxioURI path,
SetAttributePOptions options)
Sets the file or directory attributes.
|
void |
startSync(AlluxioURI path)
Start the active syncing process for a specified path.
|
void |
stopSync(AlluxioURI path)
Stop the active syncing process for a specified path.
|
void |
unmount(AlluxioURI alluxioPath)
Unmounts the given Alluxio path.
|
void |
updateMount(AlluxioURI alluxioPath,
MountPOptions options)
Updates options of a mount point for the given Alluxio path.
|
void |
updateUfsMode(AlluxioURI ufsUri,
UpdateUfsModePOptions options)
Updates the operation mode for the given ufs path.
|
afterDisconnect, beforeConnect, getConfAddress, queryGrpcServerAddressbeforeDisconnect, checkVersion, close, connect, connectWithRuntimeException, disconnect, getRemoteHostName, getRemoteServiceVersion, getRemoteSockAddress, isClosed, isConnected, retryRPC, retryRPCclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMountTableconnect, disconnect, getConfAddress, getRemoteHostName, getRemoteSockAddress, isClosed, isConnectedpublic RetryHandlingFileSystemMasterClient(MasterClientContext conf)
RetryHandlingFileSystemMasterClient instance.conf - master client configurationprotected ServiceType getRemoteServiceType()
getRemoteServiceType in class AbstractClientprotected java.lang.String getServiceName()
getServiceName in class AbstractClientprotected long getServiceVersion()
getServiceVersion in class AbstractClientprotected void afterConnect()
afterConnect in class AbstractClientpublic void checkAccess(AlluxioURI path, CheckAccessPOptions options) throws AlluxioStatusException
FileSystemMasterClientcheckAccess in interface FileSystemMasterClientpath - the path to checkoptions - method optionsAlluxioStatusExceptionpublic java.util.List<AlluxioURI> checkConsistency(AlluxioURI path, CheckConsistencyPOptions options) throws AlluxioStatusException
FileSystemMasterClientcheckConsistency in interface FileSystemMasterClientpath - the root of the subtree to checkoptions - method optionsAlluxioStatusExceptionpublic void createDirectory(AlluxioURI path, CreateDirectoryPOptions options) throws AlluxioStatusException
FileSystemMasterClientcreateDirectory in interface FileSystemMasterClientpath - the directory pathoptions - method optionsAlreadyExistsException - if the directory already existsAlluxioStatusExceptionpublic URIStatus createFile(AlluxioURI path, CreateFilePOptions options) throws AlluxioStatusException
FileSystemMasterClientcreateFile in interface FileSystemMasterClientpath - the file pathoptions - method optionsAlreadyExistsException - if the file already existsAlluxioStatusExceptionpublic void completeFile(AlluxioURI path, CompleteFilePOptions options) throws AlluxioStatusException
FileSystemMasterClientcompleteFile in interface FileSystemMasterClientpath - the file pathoptions - the method optionsAlluxioStatusExceptionpublic void delete(AlluxioURI path, DeletePOptions options) throws AlluxioStatusException
FileSystemMasterClientdelete in interface FileSystemMasterClientpath - the path to deleteoptions - method optionsAlluxioStatusExceptionpublic boolean exists(AlluxioURI path, ExistsPOptions options) throws AlluxioStatusException
FileSystemMasterClientexists in interface FileSystemMasterClientpath - the file path to check existenceoptions - the method optionsAlluxioStatusExceptionpublic void free(AlluxioURI path, FreePOptions options) throws AlluxioStatusException
FileSystemMasterClientfree in interface FileSystemMasterClientpath - the path to freeoptions - method optionsNotFoundException - if the path does not existAlluxioStatusExceptionpublic java.lang.String getFilePath(long fileId)
throws AlluxioStatusException
getFilePath in interface FileSystemMasterClientfileId - a file idAlluxioStatusExceptionpublic URIStatus getStatus(AlluxioURI path, GetStatusPOptions options) throws AlluxioStatusException
getStatus in interface FileSystemMasterClientpath - the file pathoptions - the getStatus optionsNotFoundException - if the path does not existAlluxioStatusExceptionpublic java.util.List<SyncPointInfo> getSyncPathList() throws AlluxioStatusException
FileSystemMasterClientgetSyncPathList in interface FileSystemMasterClientAlluxioStatusExceptionpublic long getNewBlockIdForFile(AlluxioURI path) throws AlluxioStatusException
getNewBlockIdForFile in interface FileSystemMasterClientpath - the file pathAlluxioStatusExceptionpublic java.util.Map<java.lang.String,MountPointInfo> getMountTable(boolean checkUfs) throws AlluxioStatusException
FileSystemMasterClientgetMountTable in interface FileSystemMasterClientcheckUfs - whether to get UFS usage infoMountPointInfoAlluxioStatusExceptionpublic void iterateStatus(AlluxioURI path, ListStatusPOptions options, java.util.function.Consumer<? super URIStatus> action) throws AlluxioStatusException
FileSystemMasterClientURIStatus in the result of FileSystemMasterClient.listStatus(alluxio.AlluxioURI, alluxio.grpc.ListStatusPOptions).
This method is preferred when iterating over directories with a large number of files or
sub-directories inside. The caller can proceed with partial result without waiting for all
result returned.iterateStatus in interface FileSystemMasterClientpath - the path to list information aboutoptions - options to associate with this operationaction - action to apply on each URIStatusNotFoundException - if the path does not existAlluxioStatusExceptionpublic java.util.List<URIStatus> listStatus(AlluxioURI path, ListStatusPOptions options) throws AlluxioStatusException
listStatus in interface FileSystemMasterClientpath - the path to listoptions - the listStatus optionsNotFoundException - if the path does not existAlluxioStatusExceptionpublic ListStatusPartialResult listStatusPartial(AlluxioURI path, ListStatusPartialPOptions options) throws AlluxioStatusException
listStatusPartial in interface FileSystemMasterClientpath - the path to listoptions - the listStatus partial optionsNotFoundException - if the path does not existAlluxioStatusExceptionpublic void mount(AlluxioURI alluxioPath, AlluxioURI ufsPath, MountPOptions options) throws AlluxioStatusException
FileSystemMasterClientmount in interface FileSystemMasterClientalluxioPath - the Alluxio pathufsPath - the UFS pathoptions - mount optionsAlluxioStatusExceptionpublic void updateMount(AlluxioURI alluxioPath, MountPOptions options) throws AlluxioStatusException
FileSystemMasterClientupdateMount in interface FileSystemMasterClientalluxioPath - the Alluxio pathoptions - mount optionsAlluxioStatusExceptionpublic void rename(AlluxioURI src, AlluxioURI dst) throws AlluxioStatusException
FileSystemMasterClientrename in interface FileSystemMasterClientsrc - the path to renamedst - new file pathNotFoundException - if the path does not existAlluxioStatusExceptionpublic void rename(AlluxioURI src, AlluxioURI dst, RenamePOptions options) throws AlluxioStatusException
FileSystemMasterClientrename in interface FileSystemMasterClientsrc - the path to renamedst - new file pathoptions - rename optionsNotFoundException - if the path does not existAlluxioStatusExceptionpublic AlluxioURI reverseResolve(AlluxioURI ufsUri) throws AlluxioStatusException
FileSystemMasterClientreverseResolve in interface FileSystemMasterClientufsUri - the ufs uriAlluxioStatusExceptionpublic void setAcl(AlluxioURI path, SetAclAction action, java.util.List<AclEntry> entries, SetAclPOptions options) throws AlluxioStatusException
FileSystemMasterClientsetAcl in interface FileSystemMasterClientpath - the file or directory pathaction - the set action to performentries - the ACL entries to useoptions - the options for setting ACLNotFoundException - if the path does not existAlluxioStatusExceptionpublic void setAttribute(AlluxioURI path, SetAttributePOptions options) throws AlluxioStatusException
FileSystemMasterClientsetAttribute in interface FileSystemMasterClientpath - the file or directory pathoptions - the file or directory attribute options to be setNotFoundException - if the path does not existAlluxioStatusExceptionpublic void scheduleAsyncPersist(AlluxioURI path, ScheduleAsyncPersistencePOptions options) throws AlluxioStatusException
FileSystemMasterClientscheduleAsyncPersist in interface FileSystemMasterClientpath - the file pathoptions - options to use when scheduling the persistAlluxioStatusExceptionpublic void startSync(AlluxioURI path) throws AlluxioStatusException
FileSystemMasterClientstartSync in interface FileSystemMasterClientpath - the file or directory to be syncedAlluxioStatusExceptionpublic void stopSync(AlluxioURI path) throws AlluxioStatusException
FileSystemMasterClientstopSync in interface FileSystemMasterClientpath - the file or directory to stop syncingAlluxioStatusExceptionpublic void unmount(AlluxioURI alluxioPath) throws AlluxioStatusException
FileSystemMasterClientunmount in interface FileSystemMasterClientalluxioPath - the Alluxio pathAlluxioStatusExceptionpublic void updateUfsMode(AlluxioURI ufsUri, UpdateUfsModePOptions options) throws AlluxioStatusException
FileSystemMasterClientupdateUfsMode in interface FileSystemMasterClientufsUri - the ufs pathoptions - the options to update ufs operation modeAlluxioStatusExceptionpublic java.util.List<java.lang.String> getStateLockHolders()
throws AlluxioStatusException
getStateLockHolders in interface FileSystemMasterClientAlluxioStatusExceptionpublic void needsSync(AlluxioURI path) throws AlluxioStatusException
FileSystemMasterClientneedsSync in interface FileSystemMasterClientpath - the path to invalidateAlluxioStatusExceptionCopyright © 2022. All Rights Reserved.