Column name is a composite, so you should use
MultigetSliceQuery<String, Composite, String> and pass CompositeSerializer.


*Tamar Fraenkel *
Senior Software Engineer, TOK Media

[image: Inline image 1]

ta...@tok-media.com
Tel:   +972 2 6409736
Mob:  +972 54 8356490
Fax:   +972 2 5612956





On Thu, May 3, 2012 at 3:57 AM, Sunit Randhawa <sunit.randh...@gmail.com>wrote:

> Hello,
>
> Code snippet below is printing out column names and values:
>
> MultigetSliceQuery<String, String, String> multigetSliceQuery =
>                     HFactory.createMultigetSliceQuery(keyspace,
> stringSerializer, stringSerializer, stringSerializer);
>
> for (HColumn<String, String> column : c){
>                        System.out.println("Col
> name:"+column.getName()+",Col Value:"+column.getValue());
>                        columnData.put(column.getName(), column.getValue());
>                    }
>
>
> The output for column name is printing some special characters that I
> cannot copy and paste in the email also.
>
> Below is the definition of that CF:
> create column family XYZ
>         with comparator =
> 'CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type)'
>     and key_validation_class = UTF8Type
>     and default_validation_class = UTF8Type;
>
>
> Any suggestion as to why these special characters I am seeing in column
> name only when I display using Thrift API (cassandra-cli does not show
> that).
>
> Thanks,
> Sunit.
>

<<tokLogo.png>>

Reply via email to