Re: Re: Re: SuperColumns in C++ API

2010-03-16 Thread casablinca126.com
Juan, check the attached source file . Cao Jiguang 2010-03-17 casablinca126.com 发件人: Juan Manuel Garcia del Moral 发送时间: 2010-03-17 00:09:53 收件人: user@cassandra.apache.org 抄送: 主题: Re: Re: SuperColumns in C++ API Many thanks for your code, would you please send me the get_slice

Re: Re: SuperColumns in C++ API

2010-03-16 Thread Juan Manuel Garcia del Moral
g(chTmp); > col_path.column.assign(strCol); > client.insert(strKeyspace,strKey, col_path, strValue,time(NULL), ONE); >} > } > catch(TException &tx) > { >printf("ERROR: %s\n", tx.what()); >error_num ++ ; > } >

Re: Re: SuperColumns in C++ API

2010-03-15 Thread casablinca126.com
RLEN]; string str_zeros; while(iclose(); } //--- cheers, Cao Jiguang 2010-03-16 casablinca126.com 发件人: Juan Manuel Garcia del Moral 发送时间: 2010-03-16 05:16:50 收件人: user@cassandra.apache.org 抄送: 主题: Re: SuperColumns in C++ API Ok, I'll c

Re: SuperColumns in C++ API

2010-03-15 Thread Juan Manuel Garcia del Moral
Ok, I'll check out libcassandra in a while. I've been able to insert values with this: new_col.__isset.super_column = true; new_col.__isset.column = true; /* this is required! */ new_col.column_family.assign("Anonimos"); new_col.super_column.assign("Tag"); new_col.column.a

Re: SuperColumns in C++ API

2010-03-15 Thread Jonathan Ellis
you're still not setting isset on column_family. you need both isset and assign on each value you're sending. maybe you should use http://github.com/posulliv/libcassandra ? On Mon, Mar 15, 2010 at 3:29 PM, Juan Manuel Garcia del Moral wrote: > Ok, > > Now I've changed to: > >     ColumnPath new

Re: SuperColumns in C++ API

2010-03-15 Thread Juan Manuel Garcia del Moral
Sorry I was testing wrong, the values are there: cassandra> get SocialAds.Anonimos['1']['Tag']; => (column=300, value=200, timestamp=12345678) Thank you so much for your help. 2010/3/15 Juan Manuel Garcia del Moral > Ok, > > Now I've changed to: > > ColumnPath new_col; > new_col.__i

Re: SuperColumns in C++ API

2010-03-15 Thread Juan Manuel Garcia del Moral
Ok, Now I've changed to: ColumnPath new_col; new_col.__isset.super_column = true; new_col.__isset.column = true; /* this is required! */ new_col.column_family.assign("Anonimos"); new_col.super_column.assign("Tag"); new_col.column.assign("300"); client.insert("Soc

Re: SuperColumns in C++ API

2010-03-15 Thread Jonathan Ellis
Ah, thrift is letting you set something to be null, that shouldn't be legal. This is fixed in 0.6 svn, btw. it looks like you are setting new_col.__isset.column to true, but not actually assigning it a value. On Mon, Mar 15, 2010 at 3:14 PM, Juan Manuel Garcia del Moral wrote: > This is what th

Re: SuperColumns in C++ API

2010-03-15 Thread Juan Manuel Garcia del Moral
This is what the log says: ERROR [pool-1-thread-8] 2010-03-15 15:54:06,753 Cassandra.java (line 1482) Internal error processing insert java.lang.AssertionError: QueryPath(columnFamilyName='Anonimos', superColumnName='[...@d0357a', columnName='null') at org.apache.cassandra.db.ColumnFamily.

Re: SuperColumns in C++ API

2010-03-15 Thread Jonathan Ellis
check the server log for exception. and if you are not on 0.5.1 or 0.6 svn branch, upgrade. On Mon, Mar 15, 2010 at 12:47 PM, Juan Manuel Garcia del Moral wrote: > Many thanks! > > That seems to be useful, > > But now I'm getting >  The error message: "Internal error processing insert" > > I'm n

Re: SuperColumns in C++ API

2010-03-15 Thread Juan Manuel Garcia del Moral
Many thanks! That seems to be useful, But now I'm getting The error message: "Internal error processing insert" I'm not sure if I'm setting the timestamp properly 2010/3/15 Padraig O'Sullivan > You need to manually set the __isset fields when using the thift API > in C++. Since you are try

Re: SuperColumns in C++ API

2010-03-15 Thread Padraig O'Sullivan
You need to manually set the __isset fields when using the thift API in C++. Since you are trying to insert a super column, you need to set the super_column __isset field. So this: new_col.__isset.column = true; should become: new_col.__isset.super_column = true; -Padraig On Mon, Mar 15, 2010