Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 61B008B60 for ; Sun, 14 Aug 2011 09:00:36 +0000 (UTC) Received: (qmail 48755 invoked by uid 500); 14 Aug 2011 09:00:34 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 48126 invoked by uid 500); 14 Aug 2011 09:00:13 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 48095 invoked by uid 99); 14 Aug 2011 09:00:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Aug 2011 09:00:01 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,T_FRT_BELOW2 X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chasap@ics.forth.gr designates 139.91.1.2 as permitted sender) Received: from [139.91.1.2] (HELO mailgate.ics.forth.gr) (139.91.1.2) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Aug 2011 08:59:53 +0000 Received: from av1.ics.forth.gr (av1-in.ics.forth.gr [139.91.1.71]) by mailgate.ics.forth.gr (8.14.3/ICS-FORTH/V10-1.8-GATE) with ESMTP id p7E8xThT000781 for ; Sun, 14 Aug 2011 11:59:31 +0300 (EEST) X-AuditID: 8b5b9d47-b7b6cae000000bc9-56-4e478e673f96 Received: from enigma.ics.forth.gr (webmail.ics.forth.gr [139.91.1.30]) by av1.ics.forth.gr (SMTP Outbound / FORTH / ICS) with SMTP id EE.C4.03017.76E874E4; Sun, 14 Aug 2011 11:59:19 +0300 (EEST) Received: from [192.168.1.1] (adsl-15.79.107.5.tellas.gr [79.107.5.15]) (authenticated bits=0) by enigma.ics.forth.gr (8.14.3//ICS-FORTH/V10.3.0C-EXTNULL-SSL-SASL) with ESMTP id p7E8xScw024246 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Sun, 14 Aug 2011 11:59:29 +0300 X-ICS-AUTH-INFO: Authenticated user: chasap at ics.forth.gr Message-Id: <0C68CD0B-6943-47BA-85DA-6480D9C00CCB@ics.forth.gr> From: Konstantinos Chasapis To: user@cassandra.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: thrift c++ insert Exception [Column value is required] Date: Sun, 14 Aug 2011 11:59:28 +0300 References: X-Mailer: Apple Mail (2.936) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCIsWRmVeSWpSXmKPExsXSHc0op5ve5+5n8Pq2jsW5d/+YHRg9vl37 xh7AGMVlk5Kak1mWWqRvl8CV0XfiMXPBe5GKNa9PsjcwNvF1MXJySAiYSDQfXc0KYYtJXLi3 nq2LkYtDSOAoo8SG77OYIJwjTBKbf/awQFRZS/xZdR3M5hWwl3gxbS0ziM0mYCjx7thk9i5G Dg4RAVmJTQ9VQMKcAoES5yddZwexmQVcJFq3rWKDsOUltr+dwwwxxkCiqfkvK0irsICzxLWZ lSBhFgFVie/vl7GAhIUEJjJKrBeBOEBG4sLyW0wTGAVmIRk6C8nQWUiGLmBkXsUokFhmqJeZ XKyXll9UkqGXXrSJERx0c913MB6foXaIUYCDUYmH93S7u58Qa2JZcWXuIUZJDiYlUV7xXqAQ X1J+SmVGYnFGfFFpTmrxIUYJDmYlEd4l19z8hHhTEiurUovyYVIyHBxKEryXQdoEi1LTUyvS MnOAsQWTZuLgBGnnAWq/CFLDW1yQmFucmQ6RP8WoKCXOOwckIQCSyCjNg+sFRXb9////XzGK Ax0rzHscpIoHmBTgul8BDWYCGsx/zgVkcEkiQkqqgXEX86Kr+6ydeD4t1F/y3yh4J8PXv4vt GL1OZfzTPxfgsiPs/55ph9f5FAVfnGDj8Gyzbs9H84cse1nulrAk9wXz1fSqcBtNOJTs2HZ2 043aGP8D6SfXfznU6rbWoSaa95SGeWOAvzJXzpLn8aGiUbe5Z6uG/9nhpdVre0Re5sCsEys2 PM2dsEeJpTgj0VCLuag4EQAwbLi6xwIAAA== X-j-chkmail-Score: MSGID : 4E478E71.000 on mailgate : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-ICS-JCHK-SCL: Ham X-Virus-Checked: Checked by ClamAV on apache.org Hi, Thank you for your answer. Is there any documentation that describes all this values that I have to set? Konstantinos Chasapis On Aug 14, 2011, at 6:28 AM, Jonathan Ellis wrote: > In C++ you need to set .__isset.fieldname on optional fields (e.g. > .__isset.value). > > 2011/8/13 Hassapis Constantinos : >> 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: >> >> transport->open(); >> KsDef ks_def; >> >> ks_def.name = "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); >> client.set_keyspace("test_keyspace"); >> >> cout << "add column family.." << endl; >> CfDef cf_def; >> cf_def.keyspace= "test_keyspace"; >> cf_def.name = "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; >> c.name = "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"); >> >> transport->close(); >> >> 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 >> column. >> >> thank you in advance for your help. >> Konstantinos Chasapis >> p.s please cc me in the reply. >> >> >> >> > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of DataStax, the source for professional Cassandra support > http://www.datastax.com >