Codota Logo
RangeSliceCommand
Code IndexAdd Codota to your IDE (free)

How to use
RangeSliceCommand
in
org.apache.cassandra.db

Best Java code snippets using org.apache.cassandra.db.RangeSliceCommand (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: thinkaurelius/titan

IDiskAtomFilter filter = ThriftValidation.asIFilter(predicate, cfm, null);
RangeSliceCommand cmd = new RangeSliceCommand(keyspace, columnFamily, nowMillis, filter, new Bounds<RowPosition>(startPosition, endPosition), pageSize);
origin: com.facebook.presto.cassandra/cassandra-server

protected List<Row> queryNextPage(int pageSize, ConsistencyLevel consistencyLevel, boolean localQuery)
throws RequestExecutionException
{
  AbstractRangeCommand pageCmd = command.withUpdatedLimit(pageSize);
  if (lastReturnedKey != null)
    pageCmd = pageCmd.forSubRange(makeExcludingKeyBounds(lastReturnedKey));
  return localQuery
     ? pageCmd.executeLocally()
     : StorageProxy.getRangeSlice(pageCmd, consistencyLevel);
}
origin: com.facebook.presto.cassandra/cassandra-server

: (command instanceof Pageable.ReadCommands
 ? readLocally(keyspace(), ((Pageable.ReadCommands)command).commands)
 : ((RangeSliceCommand)command).executeLocally());
origin: com.facebook.presto.cassandra/cassandra-server

public AbstractRangeCommand forSubRange(AbstractBounds<RowPosition> subRange)
{
  return new RangeSliceCommand(keyspace,
                 columnFamily,
                 timestamp,
                 predicate.cloneShallow(),
                 subRange,
                 rowFilter,
                 maxResults,
                 countCQL3Rows,
                 isPaging);
}
origin: com.facebook.presto.cassandra/cassandra-server

public AbstractRangeCommand withUpdatedLimit(int newLimit)
{
  return new RangeSliceCommand(keyspace,
                 columnFamily,
                 timestamp,
                 predicate.cloneShallow(),
                 keyRange,
                 rowFilter,
                 newLimit,
                 countCQL3Rows,
                 isPaging);
}
origin: com.facebook.presto.cassandra/cassandra-server

public RangeSliceCommand deserialize(DataInput in, int version) throws IOException
{
  String keyspace = in.readUTF();
  String columnFamily = in.readUTF();
  long timestamp = in.readLong();
  CFMetaData metadata = Schema.instance.getCFMetaData(keyspace, columnFamily);
  if (metadata == null)
  {
    String message = String.format("Got range slice command for nonexistent table %s.%s.  If the table was just " +
        "created, this is likely due to the schema not being fully propagated.  Please wait for schema " +
        "agreement on table creation." , keyspace, columnFamily);
    throw new UnknownColumnFamilyException(message, null);
  }
  IDiskAtomFilter predicate = metadata.comparator.diskAtomFilterSerializer().deserialize(in, version);
  List<IndexExpression> rowFilter;
  int filterCount = in.readInt();
  rowFilter = new ArrayList<>(filterCount);
  for (int i = 0; i < filterCount; i++)
  {
    rowFilter.add(IndexExpression.readFrom(in));
  }
  AbstractBounds<RowPosition> range = AbstractBounds.serializer.deserialize(in, version).toRowBounds();
  int maxResults = in.readInt();
  boolean countCQL3Rows = in.readBoolean();
  boolean isPaging = in.readBoolean();
  return new RangeSliceCommand(keyspace, columnFamily, timestamp, predicate, range, rowFilter, maxResults, countCQL3Rows, isPaging);
}
origin: com.facebook.presto.cassandra/cassandra-server

private List<Row> getHintsSlice(int columnCount)
{
  // Get count # of columns...
  SliceQueryFilter predicate = new SliceQueryFilter(ColumnSlice.ALL_COLUMNS_ARRAY,
                           false,
                           columnCount);
  // From keys "" to ""...
  IPartitioner partitioner = StorageService.getPartitioner();
  RowPosition minPos = partitioner.getMinimumToken().minKeyBound();
  Range<RowPosition> range = new Range<>(minPos, minPos);
  try
  {
    RangeSliceCommand cmd = new RangeSliceCommand(Keyspace.SYSTEM_KS,
                           SystemKeyspace.HINTS_CF,
                           System.currentTimeMillis(),
                           predicate,
                           range,
                           null,
                           LARGE_NUMBER);
    return StorageProxy.getRangeSlice(cmd, ConsistencyLevel.ONE);
  }
  catch (Exception e)
  {
    logger.info("HintsCF getEPPendingHints timed out.");
    throw new RuntimeException(e);
  }
}
origin: com.facebook.presto.cassandra/cassandra-server

private RangeSliceCommand getRangeCommand(QueryOptions options, int limit, long now) throws RequestValidationException
{
  IDiskAtomFilter filter = makeFilter(options, limit);
  if (filter == null)
    return null;
  List<IndexExpression> expressions = getValidatedIndexExpressions(options);
  // The LIMIT provided by the user is the number of CQL row he wants returned.
  // We want to have getRangeSlice to count the number of columns, not the number of keys.
  AbstractBounds<RowPosition> keyBounds = getKeyBounds(options);
  return keyBounds == null
     ? null
     : new RangeSliceCommand(keyspace(), columnFamily(), now,  filter, keyBounds, expressions, limit, !parameters.isDistinct, false);
}
origin: com.facebook.presto.cassandra/cassandra-server

     : select.getNumRecords();
List<org.apache.cassandra.db.Row> rows = StorageProxy.getRangeSlice(new RangeSliceCommand(metadata.ksName,
                                             select.getColumnFamily(),
                                             now,
origin: com.facebook.presto.cassandra/cassandra-server

RangeSliceCommand command = new RangeSliceCommand(keyspace,
                         column_parent.column_family,
                         now,
origin: com.thinkaurelius.titan/titan-cassandra

IDiskAtomFilter filter = ThriftValidation.asIFilter(predicate, cfm, null);
RangeSliceCommand cmd = new RangeSliceCommand(keyspace, columnFamily, nowMillis, filter, new Bounds<RowPosition>(startPosition, endPosition), pageSize);
origin: org.hawkular.titan/titan-cassandra

IDiskAtomFilter filter = ThriftValidation.asIFilter(predicate, cfm, null);
RangeSliceCommand cmd = new RangeSliceCommand(keyspace, columnFamily, nowMillis, filter, new Bounds<RowPosition>(startPosition, endPosition), pageSize);
origin: com.facebook.presto.cassandra/cassandra-server

rows = StorageProxy.getRangeSlice(new RangeSliceCommand(keyspace, column_family, now, filter, bounds, null, range.count, true, true), consistencyLevel);
origin: com.facebook.presto.cassandra/cassandra-server

rows = StorageProxy.getRangeSlice(new RangeSliceCommand(keyspace,
                            column_parent.column_family,
                            now,
org.apache.cassandra.dbRangeSliceCommand

Most used methods

  • <init>
  • executeLocally
  • withUpdatedLimit

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • JLabel (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Table (org.hibernate.mapping)
    A relational table
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now