cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hassapis Constantinos" <>
Subject thrift c++ insert Exception [Column value is required]
Date Sat, 13 Aug 2011 22:13:09 GMT
Hi all,

I'm using Cassandra 0.8.3 and thrift for c++ and I can't insert column in
a column family. Starting from an empty keyspace first I add a new
keyspace and then a new column family and that works fine but I can't
insert a column.
The code that I have written is:

                KsDef ks_def;

       = "test_keyspace";
                ks_def.replication_factor = 0;
                ks_def.strategy_class = "LocalStrategy";
                std::string res;

                cout << "add keyspace.." << endl;
                client.system_add_keyspace( res, ks_def);

                cout << "add column family.." << endl;
                CfDef cf_def;
                cf_def.keyspace= "test_keyspace";
       = "cf_name_test";
                client.system_add_column_family( res, cf_def );

                const string& key="test_key";
                const string value="valueeee_";

                ColumnParent cparent;
                cparent.column_family = "cf_name_test";

                Column c;
       =  "column_namess";
                c.value =  value;
                c.timestamp = getTS();

                cout << "insert key value:"<< c.value << endl;
                client.insert( key, cparent, c, ConsistencyLevel::ONE);

                cout << "drop column family" << endl;
                client.system_drop_column_family( res, "cf_name_test");

                cout << "drop keyspace" << endl;
                client.system_drop_keyspace( res, "test_keyspace");


and I recive the bellow Exception: Default TException.  [Column value is
required] as you can see from the source code I have fill the value of the

thank you in advance for your help.
Konstantinos Chasapis
p.s please cc me in the reply.

View raw message