private void validate() { if (this.first.compareTo(this.last) > 0) { throw new CorruptSSTableException(new IllegalStateException(String.format("SSTable first key %s > last key %s", this.first, this.last)), getFilename()); } }
private void validate() { if (this.first.compareTo(this.last) > 0) { throw new CorruptSSTableException(new IllegalStateException(String.format("SSTable first key %s > last key %s", this.first, this.last)), getFilename()); } }
private void validate() { if (this.first.compareTo(this.last) > 0) { throw new CorruptSSTableException(new IllegalStateException(String.format("SSTable first key %s > last key %s", this.first, this.last)), getFilename()); } }
public OnDiskAtom next() { try { OnDiskAtom atom = atomIterator.next(); if (validateColumns) atom.validateFields(columnFamily.metadata()); return atom; } catch (MarshalException me) { throw new CorruptSSTableException(me, filename); } }
private static DeletionTime readDeletionTime(DataInput in, SSTableReader sstable, String filename) { try { return DeletionTime.serializer.deserialize(in); } catch (IOException e) { if (sstable != null) sstable.markSuspect(); throw new CorruptSSTableException(e, filename); } }
public void close() { try { if (isClosed.compareAndSet(false, true)) FileUtils.close(dfile, ifile); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, sstable.getFilename()); } }
public void close() { try { if (isClosed.compareAndSet(false, true)) FileUtils.close(dfile, ifile); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, sstable.getFilename()); } }
public void close() { try { if (isClosed.compareAndSet(false, true)) FileUtils.close(dfile, ifile); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, sstable.getFilename()); } }
public void close() { try { if (isClosed.compareAndSet(false, true)) FileUtils.close(dfile, ifile); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, sstable.getFilename()); } }
public void close() { try { closeInternal(); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public void close() { try { closeInternal(); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public void close() { try { closeInternal(); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public void close() { try { closeInternal(); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public SSTableNamesIterator(SSTableReader sstable, FileDataInput file, DecoratedKey key, SortedSet<CellName> columns, RowIndexEntry indexEntry) { assert columns != null; this.sstable = sstable; this.columns = columns; this.key = key; try { read(sstable, file, indexEntry); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, sstable.getFilename()); } }
private void markAndThrow(boolean mutateRepaired) throws IOException { if (mutateRepaired) // if we are able to mutate repaired flag, an incremental repair should be enough { try { sstable.descriptor.getMetadataSerializer().mutateRepairedAt(sstable.descriptor, ActiveRepairService.UNREPAIRED_SSTABLE); sstable.reloadSSTableMetadata(); cfs.getTracker().notifySSTableRepairedStatusChanged(Collections.singleton(sstable)); } catch(IOException ioe) { outputHandler.output("Error mutating repairedAt for SSTable " + sstable.getFilename() + ", as part of markAndThrow"); } } throw new CorruptSSTableException(new Exception(String.format("Invalid SSTable %s, please force %srepair", sstable.getFilename(), mutateRepaired ? "" : "a full ")), sstable.getFilename()); }
private void markAndThrow(boolean mutateRepaired) throws IOException { if (mutateRepaired) // if we are able to mutate repaired flag, an incremental repair should be enough { try { sstable.descriptor.getMetadataSerializer().mutateRepairedAt(sstable.descriptor, ActiveRepairService.UNREPAIRED_SSTABLE); sstable.reloadSSTableMetadata(); cfs.getTracker().notifySSTableRepairedStatusChanged(Collections.singleton(sstable)); } catch(IOException ioe) { outputHandler.output("Error mutating repairedAt for SSTable " + sstable.getFilename() + ", as part of markAndThrow"); } } throw new CorruptSSTableException(new Exception(String.format("Invalid SSTable %s, please force %srepair", sstable.getFilename(), mutateRepaired ? "" : "a full ")), sstable.getFilename()); }
@Override protected void reBuffer() { try { decompressChunk(metadata.chunkFor(current)); } catch (CorruptBlockException e) { throw new CorruptSSTableException(e, getPath()); } catch (IOException e) { throw new FSReadError(e, getPath()); } }
public static SSTableIdentityIterator create(SSTableReader sstable, RandomAccessReader file, DecoratedKey key) { try { DeletionTime partitionLevelDeletion = DeletionTime.serializer.deserialize(file); SerializationHelper helper = new SerializationHelper(sstable.metadata, sstable.descriptor.version.correspondingMessagingVersion(), SerializationHelper.Flag.LOCAL); SSTableSimpleIterator iterator = SSTableSimpleIterator.create(sstable.metadata, file, sstable.header, helper, partitionLevelDeletion); return new SSTableIdentityIterator(sstable, key, partitionLevelDeletion, file.getPath(), iterator); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, file.getPath()); } }
public static SSTableIdentityIterator create(SSTableReader sstable, RandomAccessReader file, DecoratedKey key) { try { DeletionTime partitionLevelDeletion = DeletionTime.serializer.deserialize(file); SerializationHelper helper = new SerializationHelper(sstable.metadata, sstable.descriptor.version.correspondingMessagingVersion(), SerializationHelper.Flag.LOCAL); SSTableSimpleIterator iterator = SSTableSimpleIterator.create(sstable.metadata, file, sstable.header, helper, partitionLevelDeletion); return new SSTableIdentityIterator(sstable, key, partitionLevelDeletion, file.getPath(), iterator); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, file.getPath()); } }
public static SSTableIdentityIterator create(SSTableReader sstable, RandomAccessReader file, DecoratedKey key) { try { DeletionTime partitionLevelDeletion = DeletionTime.serializer.deserialize(file); SerializationHelper helper = new SerializationHelper(sstable.metadata, sstable.descriptor.version.correspondingMessagingVersion(), SerializationHelper.Flag.LOCAL); SSTableSimpleIterator iterator = SSTableSimpleIterator.create(sstable.metadata, file, sstable.header, helper, partitionLevelDeletion); return new SSTableIdentityIterator(sstable, key, partitionLevelDeletion, file.getPath(), iterator); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, file.getPath()); } }