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

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

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

origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

private void seekToCurrentRangeStart()
{
  long indexPosition = sstable.getIndexScanPosition(currentRange.left);
  ifile.seek(indexPosition);
  try
  {
    while (!ifile.isEOF())
    {
      indexPosition = ifile.getFilePointer();
      DecoratedKey indexDecoratedKey = sstable.decorateKey(ByteBufferUtil.readWithShortLength(ifile));
      if (indexDecoratedKey.compareTo(currentRange.left) > 0 || currentRange.contains(indexDecoratedKey))
      {
        // Found, just read the dataPosition and seek into index and data files
        long dataPosition = RowIndexEntry.Serializer.readPosition(ifile, sstable.descriptor.version);
        ifile.seek(indexPosition);
        dfile.seek(dataPosition);
        break;
      }
      else
      {
        RowIndexEntry.Serializer.skip(ifile, sstable.descriptor.version);
      }
    }
  }
  catch (IOException e)
  {
    sstable.markSuspect();
    throw new CorruptSSTableException(e, sstable.getFilename());
  }
}
origin: jsevellec/cassandra-unit

private void seekToCurrentRangeStart()
{
  long indexPosition = sstable.getIndexScanPosition(currentRange.left);
  ifile.seek(indexPosition);
  try
  {
    while (!ifile.isEOF())
    {
      indexPosition = ifile.getFilePointer();
      DecoratedKey indexDecoratedKey = sstable.decorateKey(ByteBufferUtil.readWithShortLength(ifile));
      if (indexDecoratedKey.compareTo(currentRange.left) > 0 || currentRange.contains(indexDecoratedKey))
      {
        // Found, just read the dataPosition and seek into index and data files
        long dataPosition = RowIndexEntry.Serializer.readPosition(ifile, sstable.descriptor.version);
        ifile.seek(indexPosition);
        dfile.seek(dataPosition);
        break;
      }
      else
      {
        RowIndexEntry.Serializer.skip(ifile, sstable.descriptor.version);
      }
    }
  }
  catch (IOException e)
  {
    sstable.markSuspect();
    throw new CorruptSSTableException(e, sstable.getFilename());
  }
}
origin: org.apache.cassandra/cassandra-all

private void seekToCurrentRangeStart()
{
  long indexPosition = sstable.getIndexScanPosition(currentRange.left);
  ifile.seek(indexPosition);
  try
  {
    while (!ifile.isEOF())
    {
      indexPosition = ifile.getFilePointer();
      DecoratedKey indexDecoratedKey = sstable.decorateKey(ByteBufferUtil.readWithShortLength(ifile));
      if (indexDecoratedKey.compareTo(currentRange.left) > 0 || currentRange.contains(indexDecoratedKey))
      {
        // Found, just read the dataPosition and seek into index and data files
        long dataPosition = RowIndexEntry.Serializer.readPosition(ifile, sstable.descriptor.version);
        ifile.seek(indexPosition);
        dfile.seek(dataPosition);
        break;
      }
      else
      {
        RowIndexEntry.Serializer.skip(ifile, sstable.descriptor.version);
      }
    }
  }
  catch (IOException e)
  {
    sstable.markSuspect();
    throw new CorruptSSTableException(e, sstable.getFilename());
  }
}
origin: com.strapdata.cassandra/cassandra-all

private void seekToCurrentRangeStart()
{
  long indexPosition = sstable.getIndexScanPosition(currentRange.left);
  ifile.seek(indexPosition);
  try
  {
    while (!ifile.isEOF())
    {
      indexPosition = ifile.getFilePointer();
      DecoratedKey indexDecoratedKey = sstable.decorateKey(ByteBufferUtil.readWithShortLength(ifile));
      if (indexDecoratedKey.compareTo(currentRange.left) > 0 || currentRange.contains(indexDecoratedKey))
      {
        // Found, just read the dataPosition and seek into index and data files
        long dataPosition = RowIndexEntry.Serializer.readPosition(ifile, sstable.descriptor.version);
        ifile.seek(indexPosition);
        dfile.seek(dataPosition);
        break;
      }
      else
      {
        RowIndexEntry.Serializer.skip(ifile, sstable.descriptor.version);
      }
    }
  }
  catch (IOException e)
  {
    sstable.markSuspect();
    throw new CorruptSSTableException(e, sstable.getFilename());
  }
}
origin: com.strapdata.cassandra/cassandra-all

public static void skip(DataInputPlus in, Version version) throws IOException
{
  readPosition(in, version);
  skipPromotedIndex(in, version);
}
origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra

public static void skip(DataInputPlus in, Version version) throws IOException
{
  readPosition(in, version);
  skipPromotedIndex(in, version);
}
origin: org.apache.cassandra/cassandra-all

public static void skip(DataInputPlus in, Version version) throws IOException
{
  readPosition(in, version);
  skipPromotedIndex(in, version);
}
origin: jsevellec/cassandra-unit

public static void skip(DataInputPlus in, Version version) throws IOException
{
  readPosition(in, version);
  skipPromotedIndex(in, version);
}
org.apache.cassandra.dbRowIndexEntry$SerializerreadPosition

Javadoc

Reads only the data 'position' of the index entry and returns it. Note that this left 'in' in the middle of reading an entry, so this is only useful if you know what you are doing and in most case 'deserialize' should be used instead.

Popular methods of RowIndexEntry$Serializer

  • <init>
  • skip
  • skipPromotedIndex
  • serializeOffsets
  • skipForCache
  • deserialize
  • serialize

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Reference (javax.naming)
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Best IntelliJ 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