@Override protected void loadSingleBlockToOutputStream(Transaction t, Long streamId, long blockId, OutputStream os) { SnapshotsStreamValueTable.SnapshotsStreamValueRow row = SnapshotsStreamValueTable.SnapshotsStreamValueRow.of(streamId, blockId); try { os.write(getBlock(t, row)); } catch (RuntimeException e) { log.error("Error storing block {} for stream id {}", row.getBlockId(), row.getId(), e); throw e; } catch (IOException e) { log.error("Error writing block {} to file when getting stream id {}", row.getBlockId(), row.getId(), e); throw Throwables.rewrapAndThrowUncheckedException("Error writing blocks to file when creating stream.", e); } }
@Override protected void loadSingleBlockToOutputStream(Transaction t, Long streamId, long blockId, OutputStream os) { SnapshotsStreamValueTable.SnapshotsStreamValueRow row = SnapshotsStreamValueTable.SnapshotsStreamValueRow.of(streamId, blockId); try { os.write(getBlock(t, row)); } catch (RuntimeException e) { log.error("Error storing block {} for stream id {}", row.getBlockId(), row.getId(), e); throw e; } catch (IOException e) { log.error("Error writing block {} to file when getting stream id {}", row.getBlockId(), row.getId(), e); throw Throwables.rewrapAndThrowUncheckedException("Error writing blocks to file when creating stream.", e); } }