Examples of ColumnParent


Examples of org.apache.cassandra.service.ColumnParent

        DecoratedKey startKey = DecoratedKey.serializer().deserialize(dis);
        DecoratedKey finishKey = DecoratedKey.serializer().deserialize(dis);
        int max_keys = dis.readInt();
        return new RangeSliceCommand(keyspace,
                                     new ColumnParent(column_family, super_column),
                                     pred,
                                     startKey,
                                     finishKey,
                                     max_keys);
View Full Code Here

Examples of org.apache.cassandra.service.ColumnParent

    }

    public RangeSliceCommand(RangeSliceCommand cmd, int max_keys)
    {
        this(cmd.keyspace,
             new ColumnParent(cmd.column_family, cmd.super_column),
             new SlicePredicate(cmd.predicate),
             cmd.start_key,
             cmd.finish_key,
             max_keys);
View Full Code Here

Examples of org.apache.cassandra.service.ColumnParent

        String start_key = dis.readUTF();
        String finish_key = dis.readUTF();
        int max_keys = dis.readInt();
        return new RangeSliceCommand(keyspace,
                                     new ColumnParent(column_family, super_column),
                                     pred,
                                     start_key,
                                     finish_key,
                                     max_keys);
View Full Code Here

Examples of org.apache.cassandra.thrift.ColumnParent

        for (int nRows = minRow; nRows < maxRow; nRows++)
        {
            ByteBuffer row = ByteBufferUtil.bytes((rowPrefix + nRows));
            ColumnPath col = new ColumnPath("Standard1").setSuper_column((ByteBuffer)null).setColumn("col1".getBytes());
            ColumnParent parent = new ColumnParent("Standard1").setSuper_column((ByteBuffer)null);

            Collection<InetAddress> endpoints = tester.ringCache.getEndpoint(row);
            InetAddress firstEndpoint = endpoints.iterator().next();
            System.out.printf("hosts with key %s : %s; choose %s%n",
                              new String(row.array()), StringUtils.join(endpoints, ","), firstEndpoint);
View Full Code Here

Examples of org.apache.cassandra.thrift.ColumnParent

   
    Client client = clientProvider.getThriftClient();
    // set target keyspace.
    client.set_keyspace(keyspaceName);
    // set target column family
    ColumnParent parent = new ColumnParent(columnFamilyName);
    // create target range
    SliceRange sliceRange = new SliceRange();
    sliceRange.setStart(new byte[0]);
    sliceRange.setFinish(new byte[0]);
    sliceRange.setCount(columnCount + 1);
View Full Code Here

Examples of org.apache.cassandra.thrift.ColumnParent

        for (int nRows = minRow; nRows < maxRow; nRows++)
        {
            ByteBuffer row = ByteBufferUtil.bytes((rowPrefix + nRows));
            ColumnPath col = new ColumnPath("Standard1").setSuper_column((ByteBuffer)null).setColumn("col1".getBytes());
            ColumnParent parent = new ColumnParent("Standard1").setSuper_column((ByteBuffer)null);

            Collection<InetAddress> endpoints = tester.ringCache.getEndpoint(row);
            InetAddress firstEndpoint = endpoints.iterator().next();
            System.out.printf("hosts with key %s : %s; choose %s%n",
                              new String(row.array()), StringUtils.join(endpoints, ","), firstEndpoint);
View Full Code Here

Examples of org.apache.cassandra.thrift.ColumnParent

        // to make sure we have SSTable
        cfs.forceBlockingFlush();

        // reads to cache key position
        cfs.getColumnFamily(QueryFilter.getSliceFilter(key1,
                                                       new QueryPath(new ColumnParent(COLUMN_FAMILY1)),
                                                       ByteBufferUtil.EMPTY_BYTE_BUFFER,
                                                       ByteBufferUtil.EMPTY_BYTE_BUFFER,
                                                       false,
                                                       10));

        cfs.getColumnFamily(QueryFilter.getSliceFilter(key2,
                                                       new QueryPath(new ColumnParent(COLUMN_FAMILY1)),
                                                       ByteBufferUtil.EMPTY_BYTE_BUFFER,
                                                       ByteBufferUtil.EMPTY_BYTE_BUFFER,
                                                       false,
                                                       10));

        assert CacheService.instance.keyCache.size() == 2;

        Util.compactAll(cfs).get();
        keyCacheSize = CacheService.instance.keyCache.size();
        // after compaction cache should have entries for
        // new SSTables, if we had 2 keys in cache previously it should become 4
        assert keyCacheSize == 4 : keyCacheSize;

        // re-read same keys to verify that key cache didn't grow further
        cfs.getColumnFamily(QueryFilter.getSliceFilter(key1,
                                                       new QueryPath(new ColumnParent(COLUMN_FAMILY1)),
                                                       ByteBufferUtil.EMPTY_BYTE_BUFFER,
                                                       ByteBufferUtil.EMPTY_BYTE_BUFFER,
                                                       false,
                                                       10));

        cfs.getColumnFamily(QueryFilter.getSliceFilter(key2,
                                                       new QueryPath(new ColumnParent(COLUMN_FAMILY1)),
                                                       ByteBufferUtil.EMPTY_BYTE_BUFFER,
                                                       ByteBufferUtil.EMPTY_BYTE_BUFFER,
                                                       false,
                                                       10));
View Full Code Here

Examples of org.apache.cassandra.thrift.ColumnParent

       String tableName = CliCompiler.getTableName(columnFamilySpec);
       String key = CliCompiler.getKey(columnFamilySpec);
       String columnFamily = CliCompiler.getColumnFamily(columnFamilySpec);
       int columnSpecCnt = CliCompiler.numColumnSpecifiers(columnFamilySpec);
      
       ColumnParent colParent;
      
       if (columnSpecCnt == 0)
       {
           colParent = createColumnParent(columnFamily, null);
       }
View Full Code Here

Examples of org.apache.cassandra.thrift.ColumnParent

       String tableName = CliCompiler.getTableName(columnFamilySpec);
       String key = CliCompiler.getKey(columnFamilySpec);
       String columnFamily = CliCompiler.getColumnFamily(columnFamilySpec);
       int columnSpecCnt = CliCompiler.numColumnSpecifiers(columnFamilySpec);
      
       ColumnParent colParent;
      
       if (columnSpecCnt == 0)
       {
           colParent = createColumnParent(columnFamily, null);
       }
View Full Code Here

Examples of org.apache.cassandra.thrift.ColumnParent

    }

    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
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.