use of io.pravega.segmentstore.storage.chunklayer.ChunkNotFoundException in project pravega by pravega.
the class NoOpChunkStorage method doConcat.
@Override
protected int doConcat(ConcatArgument[] chunks) throws ChunkStorageException {
int total = 0;
for (ConcatArgument chunk : chunks) {
val chunkData = chunkMetadata.get(chunk.getName());
if (null == chunkData) {
throw new ChunkNotFoundException(chunk.getName(), "NoOpChunkStorage::doConcat");
}
Preconditions.checkState(chunkData.length >= chunk.getLength());
total += chunk.getLength();
}
val targetChunkData = chunkMetadata.get(chunks[0].getName());
targetChunkData.length = total;
return total;
}
Aggregations