public static interface WorkerService.Iface
| Modifier and Type | Method and Description |
|---|---|
void |
accessBlock(long blockId) |
void |
addCheckpoint(long userId,
int fileId) |
boolean |
asyncCheckpoint(int fileId) |
void |
cacheBlock(long userId,
long blockId)
Used to cache a block into Tachyon space, worker will move the temporary block file from user
folder to data folder, and update the space usage information related.
|
void |
cancelBlock(long userId,
long blockId)
Used to cancel a block which is being written.
|
String |
getUserUfsTempFolder(long userId)
Used to get user's temporary folder on under file system, and the path of the user's temporary
folder will be returned.
|
String |
lockBlock(long blockId,
long userId)
Lock the file in Tachyon's space while the user is reading it, and the path of the block file
locked will be returned, if the block file is not found, FileDoesNotExistException will be
thrown.
|
boolean |
promoteBlock(long blockId)
Used to promote block on under storage layer to top storage layer when there are more than one
storage layers in Tachyon's space.
|
String |
requestBlockLocation(long userId,
long blockId,
long initialBytes)
Used to allocate location and space for a new coming block, worker will choose the appropriate
storage directory which fits the initial block size by some allocation strategy, and the
temporary file path of the block file will be returned.
|
boolean |
requestSpace(long userId,
long blockId,
long requestBytes)
Used to request space for some block file.
|
boolean |
unlockBlock(long blockId,
long userId)
Used to unlock a block after the block is accessed, if the block is to be removed, delete the
block file.
|
void |
userHeartbeat(long userId)
Local user send heartbeat to local worker to keep its temporary folder.
|
void accessBlock(long blockId)
throws org.apache.thrift.TException
org.apache.thrift.TExceptionvoid addCheckpoint(long userId,
int fileId)
throws FileDoesNotExistException,
SuspectedFileSizeException,
FailedToCheckpointException,
BlockInfoException,
org.apache.thrift.TException
FileDoesNotExistExceptionSuspectedFileSizeExceptionFailedToCheckpointExceptionBlockInfoExceptionorg.apache.thrift.TExceptionboolean asyncCheckpoint(int fileId)
throws TachyonException,
org.apache.thrift.TException
TachyonExceptionorg.apache.thrift.TExceptionvoid cacheBlock(long userId,
long blockId)
throws FileDoesNotExistException,
SuspectedFileSizeException,
BlockInfoException,
org.apache.thrift.TException
userId - blockId - FileDoesNotExistExceptionSuspectedFileSizeExceptionBlockInfoExceptionorg.apache.thrift.TExceptionvoid cancelBlock(long userId,
long blockId)
throws org.apache.thrift.TException
userId - blockId - org.apache.thrift.TExceptionString getUserUfsTempFolder(long userId) throws org.apache.thrift.TException
userId - org.apache.thrift.TExceptionString lockBlock(long blockId, long userId) throws FileDoesNotExistException, org.apache.thrift.TException
blockId - userId - FileDoesNotExistExceptionorg.apache.thrift.TExceptionboolean promoteBlock(long blockId)
throws org.apache.thrift.TException
blockId - org.apache.thrift.TExceptionString requestBlockLocation(long userId, long blockId, long initialBytes) throws OutOfSpaceException, FileAlreadyExistException, org.apache.thrift.TException
userId - blockId - initialBytes - OutOfSpaceExceptionFileAlreadyExistExceptionorg.apache.thrift.TExceptionboolean requestSpace(long userId,
long blockId,
long requestBytes)
throws FileDoesNotExistException,
org.apache.thrift.TException
userId - blockId - requestBytes - FileDoesNotExistExceptionorg.apache.thrift.TExceptionboolean unlockBlock(long blockId,
long userId)
throws org.apache.thrift.TException
blockId - userId - org.apache.thrift.TExceptionvoid userHeartbeat(long userId)
throws org.apache.thrift.TException
userId - org.apache.thrift.TExceptionCopyright © 2015. All Rights Reserved.