You haven't told Cassandra to treat your columns as anything but bytes. If you want it to know that email is a string, you need to write
create column family User with comparator=UTF8Type and column_metadata=[{column_name:email, validation_class:UTF8Type}] On Wed, Nov 17, 2010 at 6:04 AM, Antonio Serrano <aserr...@aserrano.com> wrote: > Hi from Spain: > > I'm just doing some samples and I'm obtaining long values instead of the > correct value > > This tests were done in an ubuntu server 10.10 (x86_64) with cassandra 0.7 > beta 3 and oracle java 1.6.0_22 > > What am I doing wrong? > > Thanks. > > [defa...@mykeyspace] aserr...@ubuntu:/opt/ > cassandra$ bin/cassandra-cli > Welcome to cassandra CLI. > > Type 'help' or '?' for help. Type 'quit' or 'exit' to quit. > [defa...@unknown] connect localhost/9160 > Connected to: "Test Cluster" on localhost/9160 > [defa...@unknown] create keyspace MyKeyspace with replication_factor=1 > 5c7ea1e9-f237-11df-9937-e700f669bcfc > [defa...@unknown] use MyKeyspace > Authenticated to keyspace: MyKeyspace > [defa...@mykeyspace] create column family User > 728b9f1a-f237-11df-9937-e700f669bcfc > [defa...@mykeyspace] describe keyspace MyKeyspace > Keyspace: MyKeyspace: > Replication Factor: 1 > Column Families: > ColumnFamily: User > Columns sorted by: org.apache.cassandra.db.marshal.BytesType > Row cache size / save period: 0.0/0 > Key cache size / save period: 200000.0/3600 > Memtable thresholds: 0.0703125/15/60 > GC grace seconds: 864000 > Compaction min/max thresholds: 4/32 > [defa...@mykeyspace] set User['aserrano']['name']='Antonio Serrano' > Value inserted. > [defa...@mykeyspace] set User['aserrano']['email']='pru...@localhost' > Value inserted. > [defa...@mykeyspace] get User['aserrano'] > => (column=6e616d65, value=416e746f6e696f2053657272616e6f, > timestamp=1289990636020000) > => (column=656d61696c, value=707275656261406c6f63616c686f7374, > timestamp=1289990653416000) > Returned 2 results. -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com