incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From A J <>
Subject Astyanax error
Date Mon, 17 Sep 2012 14:51:10 GMT

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 ?


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();
        for (int i = 0; i < NUM_EVENTS; ++i) {
                ColumnList<Integer> result = keyspace.prepareQuery(CF1)
        System.out.println( "results are: " + result.size() );

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

View raw message