Examples of SlicePredicate


Examples of org.apache.cassandra.thrift.SlicePredicate

        this.cfName = cfName;
    }

    public List<KeySlice> indexGet(ByteBuffer columnName, ByteBuffer value, ByteBuffer startOffset, int limit, boolean isReverse) throws Exception
    {
        SlicePredicate predicate = new SlicePredicate().setSlice_range(new SliceRange(ByteBufferUtil.EMPTY_BYTE_BUFFER, ByteBufferUtil.EMPTY_BYTE_BUFFER, isReverse, limit));
        ColumnParent parent = new ColumnParent(cfName);
        IndexExpression expression = new IndexExpression(columnName, IndexOperator.EQ, value);
        IndexClause clause = new IndexClause(Arrays.asList(expression), startOffset, limit);
        return client.get_indexed_slices(parent, clause, predicate, cl);
    }
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate

        return client.get_indexed_slices(parent, clause, predicate, cl);
    }

    public Map<ByteBuffer, List<ColumnOrSuperColumn>> multiGet(List<ByteBuffer> keys, int limit) throws Exception
    {
        SlicePredicate predicate = new SlicePredicate().setSlice_range(new SliceRange(ByteBufferUtil.EMPTY_BYTE_BUFFER, ByteBufferUtil.EMPTY_BYTE_BUFFER, false, limit));
        ColumnParent parent = new ColumnParent(cfName);
        return client.multiget_slice(keys, parent, predicate, cl);
    }
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate

        return client.multiget_slice(keys, parent, predicate, cl);
    }

    public List<KeySlice> getRangeSlice(ByteBuffer start, ByteBuffer end, int limit) throws Exception
    {
        SlicePredicate predicate = new SlicePredicate().setSlice_range(new SliceRange(ByteBufferUtil.EMPTY_BYTE_BUFFER, ByteBufferUtil.EMPTY_BYTE_BUFFER, false, limit));
        ColumnParent parent = new ColumnParent(cfName);
        KeyRange range = new KeyRange(limit).setStart_key(start).setEnd_key(end);
        return client.get_range_slices(parent, predicate, range, cl);
    }
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate

    public List<ColumnOrSuperColumn> getSlice(ByteBuffer key, ByteBuffer start, ByteBuffer end, int limit, boolean isReverse) throws Exception
    {
        SliceRange sliceRange = new SliceRange().setStart(start).setFinish(end).setReversed(isReverse).setCount(limit);
        // initialize SlicePredicate with existing SliceRange
        SlicePredicate predicate = new SlicePredicate().setSlice_range(sliceRange);
        ColumnParent parent = new ColumnParent(cfName);
        return client.get_slice(key, parent, predicate, cl);
    }
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate

        // start/finish
        sliceRange.setStart(start).setFinish(finish);
        // reversed/count
        sliceRange.setReversed(false).setCount(order);
        // initialize SlicePredicate with existing SliceRange
        SlicePredicate predicate = new SlicePredicate().setSlice_range(sliceRange);
        ColumnParent parent = new ColumnParent(cfName);
        return client.get_slice(keyBuffer, parent, predicate, cl);
    }
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate

    private List<Row> multiRangeSlice(List<ByteBuffer> variables) throws InvalidRequestException, TimedOutException, UnavailableException
    {
        List<Row> rows;

        // XXX: Our use of Thrift structs internally makes me Sad. :(
        SlicePredicate thriftSlicePredicate = makeSlicePredicate(variables);
        QueryProcessor.validateSlicePredicate(cfDef.cfm, thriftSlicePredicate);

        List<IndexExpression> expressions = getIndexExpressions(variables);

        try
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate

    }

    private SlicePredicate makeSlicePredicate(List<ByteBuffer> variables)
    throws InvalidRequestException
    {
        SlicePredicate thriftSlicePredicate = new SlicePredicate();

        if (isColumnRange())
        {
            SliceRange sliceRange = new SliceRange();
            sliceRange.start = getRequestedBound(isReversed ? Bound.END : Bound.START, variables);
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate

    }

    @Override
    public void run(final ThriftClient client) throws IOException
    {
        final SlicePredicate predicate = new SlicePredicate()
                .setSlice_range(
                        new SliceRange(
                                ByteBufferUtil.EMPTY_BYTE_BUFFER,
                                ByteBufferUtil.EMPTY_BYTE_BUFFER,
                                false,
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate

        super(state, index);
    }

    public void run(final ThriftClient client) throws IOException
    {
        final SlicePredicate predicate = slicePredicate();
        final ByteBuffer key = getKey();
        for (final ColumnParent parent : state.columnParents)
        {

            timeWithRetry(new RunOp()
View Full Code Here

Examples of org.apache.cassandra.thrift.SlicePredicate

        super(state, index);
    }

    public void run(final ThriftClient client) throws IOException
    {
        final SlicePredicate predicate = slicePredicate();
        final ByteBuffer key = getKey();
        final List<ByteBuffer> expect = state.rowGen.isDeterministic() ? generateColumnValues(key) : null;
        for (final ColumnParent parent : state.columnParents)
        {
            timeWithRetry(new RunOp()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.