Search in sources :

Example 1 with StoreBlockReader

use of alluxio.worker.block.io.StoreBlockReader in project alluxio by Alluxio.

the class TieredBlockStore method getBlockReader.

@Override
public BlockReader getBlockReader(long sessionId, long blockId, long lockId) throws BlockDoesNotExistException, InvalidWorkerStateException, IOException {
    LOG.debug("getBlockReader: sessionId={}, blockId={}, lockId={}", sessionId, blockId, lockId);
    mLockManager.validateLock(sessionId, blockId, lockId);
    try (LockResource r = new LockResource(mMetadataReadLock)) {
        BlockMeta blockMeta = mMetaManager.getBlockMeta(blockId);
        return new StoreBlockReader(sessionId, blockMeta);
    }
}
Also used : LockResource(alluxio.resource.LockResource) StoreBlockReader(alluxio.worker.block.io.StoreBlockReader) BlockMeta(alluxio.worker.block.meta.BlockMeta) TempBlockMeta(alluxio.worker.block.meta.TempBlockMeta)

Aggregations

LockResource (alluxio.resource.LockResource)1 StoreBlockReader (alluxio.worker.block.io.StoreBlockReader)1 BlockMeta (alluxio.worker.block.meta.BlockMeta)1 TempBlockMeta (alluxio.worker.block.meta.TempBlockMeta)1