@Override public long getOnDiskFilePointer() { try { return fchannel.position(); } catch (IOException e) { throw new FSReadError(e, getPath()); } }
@Override public long getOnDiskFilePointer() { try { return fchannel.position(); } catch (IOException e) { throw new FSReadError(e, getPath()); } }
private void truncate(long toFileSize, long toBufferOffset) { try { fchannel.truncate(toFileSize); lastFlushOffset = toBufferOffset; } catch (IOException e) { throw new FSWriteError(e, getPath()); } }
@Override public long getOnDiskFilePointer() { try { return fchannel.position(); } catch (IOException e) { throw new FSReadError(e, getPath()); } }
@Override public long getOnDiskFilePointer() { try { return out.getFilePointer(); } catch (IOException e) { throw new FSReadError(e, getPath()); } }
private void truncate(long toFileSize, long toBufferOffset) { try { fchannel.truncate(toFileSize); lastFlushOffset = toBufferOffset; } catch (IOException e) { throw new FSWriteError(e, getPath()); } }
/** * Seek to the offset where next compressed data chunk should be stored. */ private void seekToChunkStart() { if (getOnDiskFilePointer() != chunkOffset) { try { fchannel.position(chunkOffset); } catch (IOException e) { throw new FSReadError(e, getPath()); } } }
/** * Seek to the offset where next compressed data chunk should be stored. */ private void seekToChunkStart() { if (getOnDiskFilePointer() != chunkOffset) { try { fchannel.position(chunkOffset); } catch (IOException e) { throw new FSReadError(e, getPath()); } } }
/** * Seek to the offset where next compressed data chunk should be stored. */ private void seekToChunkStart() { if (getOnDiskFilePointer() != chunkOffset) { try { fchannel.position(chunkOffset); } catch (IOException e) { throw new FSReadError(e, getPath()); } } }
/** * Seek to the offset where next compressed data chunk should be stored. */ private void seekToChunkStart() { if (getOnDiskFilePointer() != chunkOffset) { try { out.seek(chunkOffset); } catch (IOException e) { throw new FSReadError(e, getPath()); } } }
throw new FSWriteError(e, getPath());
throw new FSWriteError(e, getPath());
throw new FSWriteError(e, getPath());
throw new FSWriteError(e, getPath());
throw new CorruptBlockException(getPath(), chunkOffset, chunkSize, e); crcCheckBuffer.flip(); if (crcCheckBuffer.getInt() != (int) checksum.getValue()) throw new CorruptBlockException(getPath(), chunkOffset, chunkSize); throw new CorruptSSTableException(e, getPath()); throw new CorruptSSTableException(new CorruptBlockException(getPath(), chunkOffset, chunkSize), getPath()); throw new FSReadError(e, getPath());
throw new CorruptBlockException(getPath(), chunkOffset, chunkSize, e); crcCheckBuffer.flip(); if (crcCheckBuffer.getInt() != (int) checksum.getValue()) throw new CorruptBlockException(getPath(), chunkOffset, chunkSize); throw new CorruptSSTableException(e, getPath()); throw new CorruptSSTableException(new CorruptBlockException(getPath(), chunkOffset, chunkSize), getPath()); throw new FSReadError(e, getPath());
throw new CorruptBlockException(getPath(), chunkOffset, chunkSize, e); crcCheckBuffer.flip(); if (crcCheckBuffer.getInt() != (int) checksum.getValue()) throw new CorruptBlockException(getPath(), chunkOffset, chunkSize); throw new CorruptSSTableException(e, getPath()); throw new CorruptSSTableException(new CorruptBlockException(getPath(), chunkOffset, chunkSize), getPath()); throw new FSReadError(e, getPath());
throw new CorruptBlockException(getPath(), chunkOffset, chunkSize); throw new CorruptBlockException(getPath(), chunkOffset, chunkSize); throw new CorruptSSTableException(e, getPath()); throw new CorruptSSTableException(new CorruptBlockException(getPath(), chunkOffset, chunkSize), getPath()); throw new FSReadError(e, getPath());
@Override public void close() { if (buffer == null) return; // already closed super.close(); sstableMetadataCollector.addCompressionRatio(compressedSize, originalSize); try { metadataWriter.close(current, chunkCount); } catch (IOException e) { throw new FSWriteError(e, getPath()); } }
throw new FSWriteError(e, getPath());