C++ Interface Issues
Hi! I was curious if anyone has had success using the C++ interface to Cassandra? I've been having some difficulties and just wanted to check if I was doing something wrong before debugging further or if there was any known issues with C++ interface. I have a simple test program to demonstrate my issue (headers and using namespace declarations omitted for clarity): int main() { shared_ptr socket(new TSocket(host, port)); shared_ptr transport(new TBufferedTransport(socket)); shared_ptr protocol(new TBinaryProtocol(transport)); CassandraClient client(protocol); try { transport->open(); ColumnPath old_col; old_col.column_family.assign("Data"); old_col.super_column.assign(""); old_col.column.assign("first"); ColumnOrSuperColumn ret_val; client.get(ret_val, "drizzle", "padraig", old_col, ZERO); transport->close(); } catch (InvalidRequestException &re) { printf("ERROR: %s\n", re.why.c_str()); } catch (TException &tx) { printf("ERROR: %s\n", tx.what()); } } Now, when I run this, I get the following (from the InvalidRequestException): $ ./simple_get ERROR: column parameter is not optional for standard CF Data $ When I look at the relevant piece of code in the method validateColumnPath() in ThriftValidation.java, I see the following: if (column_path.column == null) { throw new InvalidRequestException("column parameter is not optional for standard CF " + column_path.column_family); } and I can confirm that the super_column and column members of the ColumnPath object are appearing as null strings in this method but the column parameter is not being passed as a null parameter from my C++ program. So basically, I'm just wondering if anyone has successfully used the C++ interface generated by thrift to Cassandra? Are there any issues with it that I am not aware of? Has anyone else encountered this problem? I should mention that I checked out the latest version of thrift from SVN and used that to generate the C++ files for interfacing with cassandra and I used git to clone the latest version of Cassandra (the output of show version from the CLI shows the Cassandra version as 0.5-beta1). Thanks, Padraig
Re: Re: about load balance
Thanks for your answer:-) 2009-12-11 Baidu STL 潘晓雷| (+86 10) 59926720| panxiao...@baidu.com | Hi: pan_edward | F7-BE185 发件人: Jonathan Ellis 发送时间: 2009-12-09 23:49:13 收件人: cassandra-user 抄送: 主题: Re: about load balance LoadBalance is implemented as (1) leave the ring, (2) rejoin in the new position. Look at StorageService.loadBalance. StorageLoadBalancer is there for when we automate the balance process for nodes that are under-loaded relative to the rest of the cluster. It won't be hard to turn on, but we want to get the core node movement stuff very solid before enabling that. -Jonathan On Tue, Dec 8, 2009 at 10:30 PM, XL.Pan wrote: > hi: > Does cassandra support the load balance? Is StorageLoadBalancer in charge > of this job? I find so many codes have beed commented out in this class. > > > 2009-12-09 > > XL.Pan
0.5.0-beta2 Exception: Reached an EOL or something bizzare occured.
Just got this exception while loading up a bunch of data on a fresh 0.5.0-beta2 install. I haven't been able to reproduce it yet. WARN - Problem reading from socket connected to : java.nio.channels.SocketChannel[connected local=/127.0.0.1:7000 remote=/ 127.0.0.1:51199] WARN - Exception was generated at : 12/10/2009 09:33:33 on thread MESSAGING-SERVICE-POOL:1 Reached an EOL or something bizzare occured. Reading from: /127.0.0.1BufferSizeRemaining: 16 java.io.IOException: Reached an EOL or something bizzare occured. Reading from: /127.0.0.1 BufferSizeRemaining: 16 at org.apache.cassandra.net.io.StartState.doRead(StartState.java:44) at org.apache.cassandra.net.io.ProtocolState.read(ProtocolState.java:39) at org.apache.cassandra.net.io.TcpReader.read(TcpReader.java:96) at org.apache.cassandra.net.TcpConnection$ReadWorkItem.run(TcpConnection.java:445) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) INFO - Closing errored connection java.nio.channels.SocketChannel[connected local=/127.0.0.1:7000 remote=/127.0.0.1:51199]
Re: Why does Cassandra not support some method?
these are all part of https://issues.apache.org/jira/browse/CASSANDRA-336, which is being worked on On Thu, Dec 10, 2009 at 3:26 AM, JKnight JKnight wrote: > Dear all, > > I wonder why Cassandra do not support the following method: > - multi_insert: insert multi keys > - multi_remove: remove multi keys > - multi_batchInsert: batch insert multi keys > > And how can I add above method? > Thanks in advance. > > -- > Best regards, > JKnight
Re: Why does Cassandra not support some method?
2009/12/10 JKnight JKnight > Dear all, > > I wonder why Cassandra do not support the following method: > - multi_insert: insert multi keys > - multi_remove: remove multi keys > - multi_batchInsert: batch insert multi keys > I'm not sure how the 1st and 3rd are different, but my understanding is that this is all planned for the (near) future; there is certainly an issue for doing range removes (With the OrderPreservingPartitioner) which is being actively worked on. Multi-key inserts are also likely to be available soon if they aren't already. Mark
Why does Cassandra not support some method?
Dear all, I wonder why Cassandra do not support the following method: - multi_insert: insert multi keys - multi_remove: remove multi keys - multi_batchInsert: batch insert multi keys And how can I add above method? Thanks in advance. -- Best regards, JKnight
Re: looking for Cassandra developers
you look for local people only ? On Thu, Dec 10, 2009 at 1:42 AM, Adam Fisk wrote: > Apologies for the plug, but we're looking for Cassandra devs for a > project I'm working on at ReachLocal. We're deploying a Cassandra > instance from scratch now with fresh new data, and we're located in > sunny Southern California (LA). > > Shoot me an e-mail if you're free and interested. > > Thanks. > > -Adam >