public interface DoraWorker extends DataWorker, SessionCleanable
Modifier and Type | Method and Description |
---|---|
void |
completeFile(String path,
CompleteFilePOptions options,
String uuid)
Complete writing a file.
|
com.google.common.util.concurrent.ListenableFuture<List<RouteFailure>> |
copy(List<Route> routes,
UfsReadOptions readOptions,
WriteOptions writeOptions)
Copies files from src to dst.
|
void |
createDirectory(String path,
CreateDirectoryPOptions options)
Create a directory.
|
OpenFileHandle |
createFile(String path,
CreateFilePOptions options)
Create File.
|
BlockReader |
createFileReader(String fileId,
long offset,
boolean positionShort,
Protocol.OpenUfsBlockOptions options)
Creates the file reader to read from Alluxio dora.
|
BlockWriter |
createFileWriter(String fileId,
String ufsPath)
Creates the file writer to write to Alluxio dora.
|
void |
delete(String path,
DeletePOptions options)
Delete a file.
|
boolean |
exists(String path,
ExistsPOptions options)
Check existence of a file or dir.
|
WorkerNetAddress |
getAddress()
Get the address of the Dora Worker.
|
FileInfo |
getFileInfo(String fileId,
GetStatusPOptions options)
Gets the file information.
|
UfsStatus[] |
listStatus(String path,
ListStatusPOptions options)
List status from Under File System.
|
com.google.common.util.concurrent.ListenableFuture<LoadFileResponse> |
load(boolean loadData,
boolean skipIfExists,
List<UfsStatus> ufsStatuses,
UfsReadOptions options)
Loads the metadata and data of files from UFS to Alluxio.
|
com.google.common.util.concurrent.ListenableFuture<List<RouteFailure>> |
move(List<Route> routes,
UfsReadOptions readOptions,
WriteOptions writeOptions)
Moves files from src to dst.
|
void |
rename(String src,
String dst,
RenamePOptions options)
Rename src to dst.
|
void |
setAttribute(String path,
SetAttributePOptions options)
Set Attributes for a file or dir.
|
getWorkerId
close, getDependencies, getName, getServices, start, stop
cleanupSession
FileInfo getFileInfo(String fileId, GetStatusPOptions options) throws IOException, AccessControlException
fileId
- the file idoptions
- the options for the GetStatusPRequestIOException
AccessControlException
@Nullable UfsStatus[] listStatus(String path, ListStatusPOptions options) throws IOException, AccessControlException
path
- the path of a dir or fileoptions
- the option for listStatus()null
if this abstract pathname does not denote a directory.IOException
AccessControlException
BlockReader createFileReader(String fileId, long offset, boolean positionShort, Protocol.OpenUfsBlockOptions options) throws IOException, AccessControlException
fileId
- the ID of the UFS fileoffset
- the offset within the blockpositionShort
- whether the operation is using positioned read to a small buffer sizeoptions
- the optionsIOException
- if it fails to get block readerAccessControlException
BlockWriter createFileWriter(String fileId, String ufsPath) throws AccessControlException, IOException
fileId
- the ID of the UFS fileufsPath
- the path of UFS fileAccessControlException
IOException
com.google.common.util.concurrent.ListenableFuture<LoadFileResponse> load(boolean loadData, boolean skipIfExists, List<UfsStatus> ufsStatuses, UfsReadOptions options) throws AccessControlException, IOException
loadData
- true if data should also be loaded, otherwise metadata onlyskipIfExists
- true if data loading should be skipped if it's already loadedufsStatuses
- the files to loadoptions
- AccessControlException
IOException
com.google.common.util.concurrent.ListenableFuture<List<RouteFailure>> copy(List<Route> routes, UfsReadOptions readOptions, WriteOptions writeOptions)
routes
- the files to copyreadOptions
- the options for readingwriteOptions
- the options for writingcom.google.common.util.concurrent.ListenableFuture<List<RouteFailure>> move(List<Route> routes, UfsReadOptions readOptions, WriteOptions writeOptions)
routes
- the files to movereadOptions
- the options for readingwriteOptions
- the options for writingOpenFileHandle createFile(String path, CreateFilePOptions options) throws AccessControlException, IOException
path
- the path of this fileoptions
- the options for this operationAccessControlException
IOException
void completeFile(String path, CompleteFilePOptions options, String uuid) throws IOException, AccessControlException
path
- the path of this fileoptions
- the options for this operationuuid
- the uuid string of its file open handleIOException
AccessControlException
void delete(String path, DeletePOptions options) throws IOException, AccessControlException
path
- the path of this fileoptions
- the options for this operationIOException
AccessControlException
void rename(String src, String dst, RenamePOptions options) throws IOException, AccessControlException
src
- the source file/dirdst
- the destination file/diroptions
- the options for this operationsIOException
AccessControlException
void createDirectory(String path, CreateDirectoryPOptions options) throws IOException, AccessControlException
path
- the directory nameoptions
- the options for this operationsIOException
AccessControlException
boolean exists(String path, ExistsPOptions options) throws IOException
path
- the path of this file or diroptions
- the options of this operationIOException
void setAttribute(String path, SetAttributePOptions options) throws IOException
path
- the pth of this file or diroptions
- the options of this operationIOException
WorkerNetAddress getAddress()
Copyright © 2023. All Rights Reserved.