use of alluxio.worker.block.io.StoreBlockWriter in project alluxio by Alluxio.
the class TieredBlockStore method getBlockWriter.
@Override
public BlockWriter getBlockWriter(long sessionId, long blockId) throws BlockDoesNotExistException, BlockAlreadyExistsException, InvalidWorkerStateException, IOException {
LOG.debug("getBlockWriter: sessionId={}, blockId={}", sessionId, blockId);
// TODO(bin): Handle the case where multiple writers compete for the same block.
try (LockResource r = new LockResource(mMetadataReadLock)) {
checkTempBlockOwnedBySession(sessionId, blockId);
TempBlockMeta tempBlockMeta = mMetaManager.getTempBlockMeta(blockId);
return new StoreBlockWriter(tempBlockMeta);
}
}
Aggregations