Tabnine Logo
RowIndexEntry$Serializer.skipForCache
Code IndexAdd Tabnine to your IDE (free)

How to use
skipForCache
method
in
org.apache.cassandra.db.RowIndexEntry$Serializer

Best Java code snippets using org.apache.cassandra.db.RowIndexEntry$Serializer.skipForCache (Showing top 3 results out of 315)

origin: com.strapdata.cassandra/cassandra-all

public Future<Pair<KeyCacheKey, RowIndexEntry>> deserialize(DataInputPlus input, ColumnFamilyStore cfs) throws IOException
{
  //Keyspace and CF name are deserialized by AutoSaving cache and used to fetch the CFS provided as a
  //parameter so they aren't deserialized here, even though they are serialized by this serializer
  int keyLength = input.readInt();
  if (keyLength > FBUtilities.MAX_UNSIGNED_SHORT)
  {
    throw new IOException(String.format("Corrupted key cache. Key length of %d is longer than maximum of %d",
                      keyLength, FBUtilities.MAX_UNSIGNED_SHORT));
  }
  ByteBuffer key = ByteBufferUtil.read(input, keyLength);
  int generation = input.readInt();
  input.readBoolean(); // backwards compatibility for "promoted indexes" boolean
  SSTableReader reader;
  if (cfs == null || !cfs.isKeyCacheEnabled() || (reader = findDesc(generation, cfs.getSSTables(SSTableSet.CANONICAL))) == null)
  {
    // The sstable doesn't exist anymore, so we can't be sure of the exact version and assume its the current version. The only case where we'll be
    // wrong is during upgrade, in which case we fail at deserialization. This is not a huge deal however since 1) this is unlikely enough that
    // this won't affect many users (if any) and only once, 2) this doesn't prevent the node from starting and 3) CASSANDRA-10219 shows that this
    // part of the code has been broken for a while without anyone noticing (it is, btw, still broken until CASSANDRA-10219 is fixed).
    RowIndexEntry.Serializer.skipForCache(input, BigFormat.instance.getLatestVersion());
    return null;
  }
  RowIndexEntry.IndexSerializer<?> indexSerializer = reader.descriptor.getFormat().getIndexSerializer(reader.metadata,
                                                    reader.descriptor.version,
                                                    reader.header);
  RowIndexEntry<?> entry = indexSerializer.deserializeForCache(input);
  return Futures.immediateFuture(Pair.create(new KeyCacheKey(cfs.metadata.ksAndCFName, reader.descriptor, key), entry));
}
origin: org.apache.cassandra/cassandra-all

public Future<Pair<KeyCacheKey, RowIndexEntry>> deserialize(DataInputPlus input, ColumnFamilyStore cfs) throws IOException
{
  //Keyspace and CF name are deserialized by AutoSaving cache and used to fetch the CFS provided as a
  //parameter so they aren't deserialized here, even though they are serialized by this serializer
  int keyLength = input.readInt();
  if (keyLength > FBUtilities.MAX_UNSIGNED_SHORT)
  {
    throw new IOException(String.format("Corrupted key cache. Key length of %d is longer than maximum of %d",
                      keyLength, FBUtilities.MAX_UNSIGNED_SHORT));
  }
  ByteBuffer key = ByteBufferUtil.read(input, keyLength);
  int generation = input.readInt();
  input.readBoolean(); // backwards compatibility for "promoted indexes" boolean
  SSTableReader reader;
  if (cfs == null || !cfs.isKeyCacheEnabled() || (reader = findDesc(generation, cfs.getSSTables(SSTableSet.CANONICAL))) == null)
  {
    // The sstable doesn't exist anymore, so we can't be sure of the exact version and assume its the current version. The only case where we'll be
    // wrong is during upgrade, in which case we fail at deserialization. This is not a huge deal however since 1) this is unlikely enough that
    // this won't affect many users (if any) and only once, 2) this doesn't prevent the node from starting and 3) CASSANDRA-10219 shows that this
    // part of the code has been broken for a while without anyone noticing (it is, btw, still broken until CASSANDRA-10219 is fixed).
    RowIndexEntry.Serializer.skipForCache(input, BigFormat.instance.getLatestVersion());
    return null;
  }
  RowIndexEntry.IndexSerializer<?> indexSerializer = reader.descriptor.getFormat().getIndexSerializer(reader.metadata,
                                                    reader.descriptor.version,
                                                    reader.header);
  RowIndexEntry<?> entry = indexSerializer.deserializeForCache(input);
  return Futures.immediateFuture(Pair.create(new KeyCacheKey(cfs.metadata.ksAndCFName, reader.descriptor, key), entry));
}
origin: jsevellec/cassandra-unit

public Future<Pair<KeyCacheKey, RowIndexEntry>> deserialize(DataInputPlus input, ColumnFamilyStore cfs) throws IOException
{
  //Keyspace and CF name are deserialized by AutoSaving cache and used to fetch the CFS provided as a
  //parameter so they aren't deserialized here, even though they are serialized by this serializer
  int keyLength = input.readInt();
  if (keyLength > FBUtilities.MAX_UNSIGNED_SHORT)
  {
    throw new IOException(String.format("Corrupted key cache. Key length of %d is longer than maximum of %d",
                      keyLength, FBUtilities.MAX_UNSIGNED_SHORT));
  }
  ByteBuffer key = ByteBufferUtil.read(input, keyLength);
  int generation = input.readInt();
  input.readBoolean(); // backwards compatibility for "promoted indexes" boolean
  SSTableReader reader;
  if (cfs == null || !cfs.isKeyCacheEnabled() || (reader = findDesc(generation, cfs.getSSTables(SSTableSet.CANONICAL))) == null)
  {
    // The sstable doesn't exist anymore, so we can't be sure of the exact version and assume its the current version. The only case where we'll be
    // wrong is during upgrade, in which case we fail at deserialization. This is not a huge deal however since 1) this is unlikely enough that
    // this won't affect many users (if any) and only once, 2) this doesn't prevent the node from starting and 3) CASSANDRA-10219 shows that this
    // part of the code has been broken for a while without anyone noticing (it is, btw, still broken until CASSANDRA-10219 is fixed).
    RowIndexEntry.Serializer.skipForCache(input, BigFormat.instance.getLatestVersion());
    return null;
  }
  RowIndexEntry.IndexSerializer<?> indexSerializer = reader.descriptor.getFormat().getIndexSerializer(reader.metadata,
                                                    reader.descriptor.version,
                                                    reader.header);
  RowIndexEntry<?> entry = indexSerializer.deserializeForCache(input);
  return Futures.immediateFuture(Pair.create(new KeyCacheKey(cfs.metadata.ksAndCFName, reader.descriptor, key), entry));
}
org.apache.cassandra.dbRowIndexEntry$SerializerskipForCache

Popular methods of RowIndexEntry$Serializer

  • <init>
  • skip
  • skipPromotedIndex
  • readPosition
    Reads only the data 'position' of the index entry and returns it. Note that this left 'in' in the mi
  • serializeOffsets
  • deserialize
  • serialize

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • BoxLayout (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now