@NotThreadSafe public final class BlockWorkerClientServiceHandler extends Object implements BlockWorkerClientService.Iface
UnsupportedOperationException
.Constructor and Description |
---|
BlockWorkerClientServiceHandler(BlockWorker worker)
Creates a new instance of
BlockWorkerClientServiceHandler . |
Modifier and Type | Method and Description |
---|---|
AccessBlockTResponse |
accessBlock(long blockId,
AccessBlockTOptions options)
Accesses a block given the block id.
|
CacheBlockTResponse |
cacheBlock(long sessionId,
long blockId,
CacheBlockTOptions options)
Used to cache a block into Alluxio space, worker will move the temporary block file from session
folder to data folder, and update the space usage information related.
|
CancelBlockTResponse |
cancelBlock(long sessionId,
long blockId,
CancelBlockTOptions options)
Used to cancel a block which is being written.
|
GetServiceVersionTResponse |
getServiceVersion(GetServiceVersionTOptions options)
Returns the version of the master service.
|
LockBlockTResponse |
lockBlock(long blockId,
long sessionId,
LockBlockTOptions options)
Locks the file in Alluxio's space while the session is reading it.
|
PromoteBlockTResponse |
promoteBlock(long blockId,
PromoteBlockTOptions options)
Used to promote block on under storage layer to top storage layer when there are more than one
storage layers in Alluxio's space.
|
RemoveBlockTResponse |
removeBlock(long blockId,
RemoveBlockTOptions options)
Used to remove a block from an Alluxio worker.
|
RequestBlockLocationTResponse |
requestBlockLocation(long sessionId,
long blockId,
long initialBytes,
int writeTier,
RequestBlockLocationTOptions options)
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.
|
RequestSpaceTResponse |
requestSpace(long sessionId,
long blockId,
long requestBytes,
RequestSpaceTOptions options)
Used to request space for some block file.
|
SessionBlockHeartbeatTResponse |
sessionBlockHeartbeat(long sessionId,
List<Long> metrics,
SessionBlockHeartbeatTOptions options)
Local session send heartbeat to local worker to keep its temporary folder.
|
UnlockBlockTResponse |
unlockBlock(long blockId,
long sessionId,
UnlockBlockTOptions options)
Used to unlock a block after the block is accessed, if the block is to be removed, delete the
block file.
|
public BlockWorkerClientServiceHandler(BlockWorker worker)
BlockWorkerClientServiceHandler
.worker
- block worker handlerpublic GetServiceVersionTResponse getServiceVersion(GetServiceVersionTOptions options)
AlluxioService.Iface
getServiceVersion
in interface AlluxioService.Iface
options
- the method optionspublic AccessBlockTResponse accessBlock(long blockId, AccessBlockTOptions options) throws AlluxioTException
BlockWorkerClientService.Iface
accessBlock
in interface BlockWorkerClientService.Iface
blockId
- the id of the block being accessedoptions
- the method optionsAlluxioTException
public CacheBlockTResponse cacheBlock(long sessionId, long blockId, CacheBlockTOptions options) throws AlluxioTException
BlockWorkerClientService.Iface
cacheBlock
in interface BlockWorkerClientService.Iface
sessionId
- the id of the current sessionblockId
- the id of the block being accessedoptions
- the method optionsAlluxioTException
public CancelBlockTResponse cancelBlock(long sessionId, long blockId, CancelBlockTOptions options) throws AlluxioTException
BlockWorkerClientService.Iface
cancelBlock
in interface BlockWorkerClientService.Iface
sessionId
- the id of the current sessionblockId
- the id of the block being accessedoptions
- the method optionsAlluxioTException
public LockBlockTResponse lockBlock(long blockId, long sessionId, LockBlockTOptions options) throws AlluxioTException
BlockWorkerClientService.Iface
lockBlock
in interface BlockWorkerClientService.Iface
blockId
- the id of the block being accessedsessionId
- the id of the current sessionoptions
- the lock method optionsAlluxioTException
public PromoteBlockTResponse promoteBlock(long blockId, PromoteBlockTOptions options) throws AlluxioTException
BlockWorkerClientService.Iface
promoteBlock
in interface BlockWorkerClientService.Iface
blockId
- the id of the block being accessedoptions
- the method optionsAlluxioTException
public RemoveBlockTResponse removeBlock(long blockId, RemoveBlockTOptions options) throws AlluxioTException
BlockWorkerClientService.Iface
removeBlock
in interface BlockWorkerClientService.Iface
blockId
- the id of the block being removedoptions
- the method optionsAlluxioTException
public RequestBlockLocationTResponse requestBlockLocation(long sessionId, long blockId, long initialBytes, int writeTier, RequestBlockLocationTOptions options) throws AlluxioTException
BlockWorkerClientService.Iface
requestBlockLocation
in interface BlockWorkerClientService.Iface
sessionId
- the id of the current sessionblockId
- the id of the block being accessedinitialBytes
- initial number of bytes requestedwriteTier
- the target tier to write tooptions
- the method optionsAlluxioTException
public RequestSpaceTResponse requestSpace(long sessionId, long blockId, long requestBytes, RequestSpaceTOptions options) throws AlluxioTException
BlockWorkerClientService.Iface
requestSpace
in interface BlockWorkerClientService.Iface
sessionId
- the id of the current sessionblockId
- the id of the block being accessedrequestBytes
- the number of bytes requestedoptions
- the method optionsAlluxioTException
public SessionBlockHeartbeatTResponse sessionBlockHeartbeat(long sessionId, List<Long> metrics, SessionBlockHeartbeatTOptions options) throws AlluxioTException
BlockWorkerClientService.Iface
sessionBlockHeartbeat
in interface BlockWorkerClientService.Iface
sessionId
- the id of the current sessionmetrics
- deprecated since 1.3.0 and will be removed in 2.0options
- the method optionsAlluxioTException
public UnlockBlockTResponse unlockBlock(long blockId, long sessionId, UnlockBlockTOptions options) throws AlluxioTException
BlockWorkerClientService.Iface
unlockBlock
in interface BlockWorkerClientService.Iface
blockId
- the id of the block being accessedsessionId
- the id of the current sessionoptions
- the method optionsAlluxioTException
Copyright © 2023. All Rights Reserved.