Search in sources :

Example 1 with CommitBlockPRequest

use of alluxio.grpc.CommitBlockPRequest in project alluxio by Alluxio.

the class BlockMasterClient method commitBlock.

/**
 * Commits a block on a worker.
 *
 * @param workerId the worker id committing the block
 * @param usedBytesOnTier the amount of used bytes on the tier the block is committing to
 * @param tierAlias the alias of the tier the block is being committed to
 * @param mediumType the medium type the block is being committed to
 * @param blockId the block id being committed
 * @param length the length of the block being committed
 */
public void commitBlock(final long workerId, final long usedBytesOnTier, final String tierAlias, final String mediumType, final long blockId, final long length) throws IOException {
    retryRPC(() -> {
        CommitBlockPRequest request = CommitBlockPRequest.newBuilder().setWorkerId(workerId).setUsedBytesOnTier(usedBytesOnTier).setTierAlias(tierAlias).setMediumType(mediumType).setBlockId(blockId).setLength(length).build();
        mClient.commitBlock(request);
        return null;
    }, LOG, "CommitBlock", "workerId=%d,usedBytesOnTier=%d,tierAlias=%s,mediumType=%s,blockId=%d,length=%d", workerId, usedBytesOnTier, tierAlias, mediumType, blockId, length);
}
Also used : CommitBlockPRequest(alluxio.grpc.CommitBlockPRequest)

Aggregations

CommitBlockPRequest (alluxio.grpc.CommitBlockPRequest)1