public static interface WorkerService.Iface
| Modifier and Type | Method and Description |
|---|---|
void |
accessBlock(long blockId) |
boolean |
asyncCheckpoint(long fileId) |
void |
cacheBlock(long sessionId,
long blockId)
Used to cache a block into Tachyon space, worker will move the temporary block file from session
folder to data folder, and update the space usage information related.
|
void |
cancelBlock(long sessionId,
long blockId)
Used to cancel a block which is being written.
|
String |
lockBlock(long blockId,
long sessionId)
Lock the file in Tachyon's space while the session 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.
|
void |
persistFile(long fileId,
long nonce,
String path) |
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 sessionId,
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 sessionId,
long blockId,
long requestBytes)
Used to request space for some block file.
|
void |
sessionHeartbeat(long sessionId,
List<Long> metrics)
Local session send heartbeat to local worker to keep its temporary folder.
|
boolean |
unlockBlock(long blockId,
long sessionId)
Used to unlock a block after the block is accessed, if the block is to be removed, delete the
block file.
|
void accessBlock(long blockId)
throws org.apache.thrift.TException
org.apache.thrift.TExceptionboolean asyncCheckpoint(long fileId)
throws TachyonTException,
org.apache.thrift.TException
TachyonTExceptionorg.apache.thrift.TExceptionvoid cacheBlock(long sessionId,
long blockId)
throws TachyonTException,
ThriftIOException,
org.apache.thrift.TException
sessionId - blockId - TachyonTExceptionThriftIOExceptionorg.apache.thrift.TExceptionvoid cancelBlock(long sessionId,
long blockId)
throws TachyonTException,
ThriftIOException,
org.apache.thrift.TException
sessionId - blockId - TachyonTExceptionThriftIOExceptionorg.apache.thrift.TExceptionString lockBlock(long blockId, long sessionId) throws TachyonTException, org.apache.thrift.TException
blockId - sessionId - TachyonTExceptionorg.apache.thrift.TExceptionvoid persistFile(long fileId,
long nonce,
String path)
throws TachyonTException,
org.apache.thrift.TException
TachyonTExceptionorg.apache.thrift.TExceptionboolean promoteBlock(long blockId)
throws TachyonTException,
ThriftIOException,
org.apache.thrift.TException
blockId - TachyonTExceptionThriftIOExceptionorg.apache.thrift.TExceptionString requestBlockLocation(long sessionId, long blockId, long initialBytes) throws TachyonTException, ThriftIOException, org.apache.thrift.TException
sessionId - blockId - initialBytes - TachyonTExceptionThriftIOExceptionorg.apache.thrift.TExceptionboolean requestSpace(long sessionId,
long blockId,
long requestBytes)
throws TachyonTException,
org.apache.thrift.TException
sessionId - blockId - requestBytes - TachyonTExceptionorg.apache.thrift.TExceptionvoid sessionHeartbeat(long sessionId,
List<Long> metrics)
throws org.apache.thrift.TException
sessionId - metrics - org.apache.thrift.TExceptionboolean unlockBlock(long blockId,
long sessionId)
throws org.apache.thrift.TException
blockId - sessionId - org.apache.thrift.TExceptionCopyright © 2015. All Rights Reserved.