Examples of SliceRange


Examples of org.apache.cassandra.thrift.SliceRange

  public Mutate deleteAll(String columnFamily) {
    Deletion deletion = new Deletion();
    deletion.setTimestamp(Long.MAX_VALUE); //TODO: check this
    deletion.predicate = new SlicePredicate();
    SliceRange sliceRange =
      new SliceRange(new byte[0], new byte[0], false, Integer.MAX_VALUE);
    deletion.predicate.slice_range = sliceRange;
    Mutation mutation = new Mutation();
    mutation.deletion = deletion;
    addToMutationMap(columnFamily, mutation);
    return this;
View Full Code Here

Examples of org.apache.cassandra.thrift.SliceRange

    @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,
                                state.settings.columns.maxColumnsPerKey
                        )
View Full Code Here

Examples of org.apache.cassandra.thrift.SliceRange

            throw new IllegalStateException("Variable column counts not supported for counters");
    }

    public void run(final ThriftClient client) throws IOException
    {
        SliceRange sliceRange = new SliceRange();
        // start/finish
        sliceRange.setStart(new byte[] {}).setFinish(new byte[] {});
        // reversed/count
        sliceRange.setReversed(false).setCount(state.settings.columns.maxColumnsPerKey);
        // initialize SlicePredicate with existing SliceRange
        final SlicePredicate predicate = new SlicePredicate().setSlice_range(sliceRange);

        final ByteBuffer key = getKey();
        for (final ColumnParent parent : state.columnParents)
View Full Code Here

Examples of org.apache.cassandra.thrift.SliceRange

    public void run(final ThriftClient client) throws IOException
    {
        final SlicePredicate predicate = new SlicePredicate();
        if (state.settings.columns.names == null)
            predicate.setSlice_range(new SliceRange()
                    .setStart(new byte[] {})
                    .setFinish(new byte[] {})
                    .setReversed(false)
                    .setCount(state.settings.columns.maxColumnsPerKey)
            );
View Full Code Here

Examples of org.apache.cassandra.thrift.SliceRange

    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,
                        state.settings.columns.maxColumnsPerKey
                )
View Full Code Here

Examples of org.apache.cassandra.thrift.SliceRange

            final SortedSet<ByteBuffer> columnNameSet = new TreeSet<ByteBuffer>(comparator);
            columnNameSet.addAll(predicate.column_names);
            return new NamesQueryFilter(columnNameSet);
        }

        SliceRange range = predicate.slice_range;
        return new SliceQueryFilter(range.start, range.finish, range.reversed, range.count);
    }
View Full Code Here

Examples of org.apache.cassandra.thrift.SliceRange

            final SortedSet<ByteBuffer> columnNameSet = new TreeSet<ByteBuffer>(comparator);
            columnNameSet.addAll(predicate.column_names);
            return new NamesQueryFilter(columnNameSet);
        }

        SliceRange range = predicate.slice_range;
        return new SliceQueryFilter(range.start, range.finish, range.reversed, range.count);
    }
View Full Code Here

Examples of org.apache.cassandra.thrift.SliceRange

            final SortedSet<ByteBuffer> columnNameSet = new TreeSet<ByteBuffer>(comparator);
            columnNameSet.addAll(predicate.column_names);
            return new NamesQueryFilter(columnNameSet);
        }

        SliceRange range = predicate.slice_range;
        return new SliceQueryFilter(range.start, range.finish, range.reversed, range.count);
    }
View Full Code Here

Examples of org.apache.cassandra.thrift.SliceRange

    {
        SlicePredicate thriftSlicePredicate = new SlicePredicate();

        if (isColumnRange())
        {
            SliceRange sliceRange = new SliceRange();
            sliceRange.start = getRequestedBound(Bound.START, variables);
            sliceRange.finish = getRequestedBound(Bound.END, variables);
            sliceRange.reversed = isReversed;
            sliceRange.count = -1; // We use this for range slices, where the count is ignored in favor of the global column count
            thriftSlicePredicate.slice_range = sliceRange;
View Full Code Here

Examples of org.apache.cassandra.thrift.SliceRange

            sp.setColumn_names(new ArrayList<ByteBuffer>(((NamesQueryFilter)predicate).columns));
        }
        else
        {
            SliceQueryFilter sqf = (SliceQueryFilter)predicate;
            sp.setSlice_range(new SliceRange(sqf.start(), sqf.finish(), sqf.reversed, sqf.count));
        }
        return sp;
    }
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.