public static CorruptColumnException create(DataInput in, ByteBuffer name) { assert name.remaining() <= 0; String format = "invalid column name length %d%s"; String details = ""; if (in instanceof FileDataInput) { FileDataInput fdis = (FileDataInput)in; long remaining; try { remaining = fdis.bytesRemaining(); } catch (IOException e) { throw new FSReadError(e, fdis.getPath()); } details = String.format(" (%s, %d bytes remaining)", fdis.getPath(), remaining); } return new CorruptColumnException(String.format(format, name.remaining(), details)); } }
public boolean hasNext() { try { return hasNextInternal(); } catch (IOException | IndexOutOfBoundsException e) { try { closeInternal(); } catch (IOException suppressed) { e.addSuppressed(suppressed); } 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 void close() { try { closeInternal(); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public boolean hasNext() { try { return hasNextInternal(); } catch (IOException | IndexOutOfBoundsException e) { try { closeInternal(); } catch (IOException suppressed) { e.addSuppressed(suppressed); } sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public boolean hasNext() { try { return hasNextInternal(); } catch (IOException | IndexOutOfBoundsException e) { try { closeInternal(); } catch (IOException suppressed) { e.addSuppressed(suppressed); } sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public boolean hasNext() { try { return hasNextInternal(); } catch (IOException | IndexOutOfBoundsException e) { try { closeInternal(); } catch (IOException suppressed) { e.addSuppressed(suppressed); } sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public Unfiltered next() { try { return nextInternal(); } catch (IOException e) { try { closeInternal(); } catch (IOException suppressed) { e.addSuppressed(suppressed); } sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public Unfiltered next() { try { return nextInternal(); } catch (IOException e) { try { closeInternal(); } catch (IOException suppressed) { e.addSuppressed(suppressed); } sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public Unfiltered next() { try { return nextInternal(); } catch (IOException e) { try { closeInternal(); } catch (IOException suppressed) { e.addSuppressed(suppressed); } sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public Unfiltered next() { try { return nextInternal(); } catch (IOException e) { try { closeInternal(); } catch (IOException suppressed) { e.addSuppressed(suppressed); } sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public static SSTableIdentityIterator create(SSTableReader sstable, FileDataInput dfile, RowIndexEntry<?> indexEntry, DecoratedKey key, boolean tombstoneOnly) { try { dfile.seek(indexEntry.position); ByteBufferUtil.skipShortLength(dfile); // Skip partition key DeletionTime partitionLevelDeletion = DeletionTime.serializer.deserialize(dfile); SerializationHelper helper = new SerializationHelper(sstable.metadata, sstable.descriptor.version.correspondingMessagingVersion(), SerializationHelper.Flag.LOCAL); SSTableSimpleIterator iterator = tombstoneOnly ? SSTableSimpleIterator.createTombstoneOnly(sstable.metadata, dfile, sstable.header, helper, partitionLevelDeletion) : SSTableSimpleIterator.create(sstable.metadata, dfile, sstable.header, helper, partitionLevelDeletion); return new SSTableIdentityIterator(sstable, key, partitionLevelDeletion, dfile.getPath(), iterator); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, dfile.getPath()); } }
private void slice(Slice slice) { try { if (reader != null) reader.setForSlice(slice); } catch (IOException e) { try { closeInternal(); } catch (IOException suppressed) { e.addSuppressed(suppressed); } sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public static SSTableIdentityIterator create(SSTableReader sstable, FileDataInput dfile, RowIndexEntry<?> indexEntry, DecoratedKey key, boolean tombstoneOnly) { try { dfile.seek(indexEntry.position); ByteBufferUtil.skipShortLength(dfile); // Skip partition key DeletionTime partitionLevelDeletion = DeletionTime.serializer.deserialize(dfile); SerializationHelper helper = new SerializationHelper(sstable.metadata, sstable.descriptor.version.correspondingMessagingVersion(), SerializationHelper.Flag.LOCAL); SSTableSimpleIterator iterator = tombstoneOnly ? SSTableSimpleIterator.createTombstoneOnly(sstable.metadata, dfile, sstable.header, helper, partitionLevelDeletion) : SSTableSimpleIterator.create(sstable.metadata, dfile, sstable.header, helper, partitionLevelDeletion); return new SSTableIdentityIterator(sstable, key, partitionLevelDeletion, dfile.getPath(), iterator); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, dfile.getPath()); } }
private void slice(Slice slice) { try { if (reader != null) reader.setForSlice(slice); } catch (IOException e) { try { closeInternal(); } catch (IOException suppressed) { e.addSuppressed(suppressed); } sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }
public static SSTableIdentityIterator create(SSTableReader sstable, FileDataInput dfile, RowIndexEntry<?> indexEntry, DecoratedKey key, boolean tombstoneOnly) { try { dfile.seek(indexEntry.position); ByteBufferUtil.skipShortLength(dfile); // Skip partition key DeletionTime partitionLevelDeletion = DeletionTime.serializer.deserialize(dfile); SerializationHelper helper = new SerializationHelper(sstable.metadata, sstable.descriptor.version.correspondingMessagingVersion(), SerializationHelper.Flag.LOCAL); SSTableSimpleIterator iterator = tombstoneOnly ? SSTableSimpleIterator.createTombstoneOnly(sstable.metadata, dfile, sstable.header, helper, partitionLevelDeletion) : SSTableSimpleIterator.create(sstable.metadata, dfile, sstable.header, helper, partitionLevelDeletion); return new SSTableIdentityIterator(sstable, key, partitionLevelDeletion, dfile.getPath(), iterator); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, dfile.getPath()); } }
public static SSTableIdentityIterator create(SSTableReader sstable, FileDataInput dfile, RowIndexEntry<?> indexEntry, DecoratedKey key, boolean tombstoneOnly) { try { dfile.seek(indexEntry.position); ByteBufferUtil.skipShortLength(dfile); // Skip partition key DeletionTime partitionLevelDeletion = DeletionTime.serializer.deserialize(dfile); SerializationHelper helper = new SerializationHelper(sstable.metadata, sstable.descriptor.version.correspondingMessagingVersion(), SerializationHelper.Flag.LOCAL); SSTableSimpleIterator iterator = tombstoneOnly ? SSTableSimpleIterator.createTombstoneOnly(sstable.metadata, dfile, sstable.header, helper, partitionLevelDeletion) : SSTableSimpleIterator.create(sstable.metadata, dfile, sstable.header, helper, partitionLevelDeletion); return new SSTableIdentityIterator(sstable, key, partitionLevelDeletion, dfile.getPath(), iterator); } catch (IOException e) { sstable.markSuspect(); throw new CorruptSSTableException(e, dfile.getPath()); } }
private void slice(Slice slice) { try { if (reader != null) reader.setForSlice(slice); } catch (IOException e) { try { closeInternal(); } catch (IOException suppressed) { e.addSuppressed(suppressed); } sstable.markSuspect(); throw new CorruptSSTableException(e, reader.file.getPath()); } }