Package org.apache.cassandra.thrift

Examples of org.apache.cassandra.thrift.SliceRange$SliceRangeStandardScheme


  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


    @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

            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

    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

    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

            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

            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

            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

    {
        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

            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

Related Classes of org.apache.cassandra.thrift.SliceRange$SliceRangeStandardScheme

Copyright © 2018 www.massapicom. 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.