Hello,

I am tyring to retrieve a list of Column Names (that are defined as
Integer) from a CF with RowKey as Integer as well. (I don't care for
the column values that are just nulls)

Following is snippet of my Astyanax code. I am getting 0 columns but I
know the key that I am querying contains a few hundred columns. Any
idea what part of the code below is incorrect ?

Thanks.

Astyanax code:
============
        ColumnFamily<Integer, Integer> CF1 =
                new ColumnFamily<Integer, Integer>(
                "CF1",                 // Column Family Name
                IntegerSerializer.get(),   // Key Serializer
                IntegerSerializer.get());  // Column Serializer

        //Reading data
        int NUM_EVENTS = 9;

        StopWatch clock = new StopWatch();
        clock.start();
        for (int i = 0; i < NUM_EVENTS; ++i) {
                ColumnList<Integer> result = keyspace.prepareQuery(CF1)
                        .getKey(1919)
                        .execute().getResult();
        System.out.println( "results are: " + result.size() );
        }
        clock.stop();



CF definition:
===========
[default@ks1] describe CF1;
    ColumnFamily: CF1
      Key Validation Class: org.apache.cassandra.db.marshal.IntegerType
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Columns sorted by: org.apache.cassandra.db.marshal.IntegerType

Reply via email to