Migrating C # code from Cassandra.5 to .6

I have some simple code derived from an example which is to quickly write to the Cassandra db, then loop back and read all the current records, everything works fine. When 0.6 came out, I updated Cassandra and lean, which threw bugs in my code (www [dot] copypastecode [dot] com / 26760 /) - I was able to iron out the bugs by converting the types I needed, however to a version that now only compiles seems to be reading one item back, im not sure if its not saving db is changing or if its only reading back is 1. "fixed" code is here: http://www.copypastecode.com/26752/ . Any help would be greatly appreciated.

+2


a source to share


1 answer


First of all, let me tell you what you should use TBufferedStream

instead TSocket

for TBinaryProtocol

, which will have a huge impact on the performance of your application.

For the Apache Thrift API documentation that the methods BATCH_INSERT

are deprecated, so it could introduce a buggy error in this operation, which actually only inserts the first column. Said why don't you try instead BATCH_MUTATE

?



By the way, why are you trying to use Thrift directly? There are some good C # clients for Cassandra that work really well. A complete list can be found at http://wiki.apache.org/cassandra/ClientOptions .

I am the author of one of these heavily updated Apache and is used by some companies in a production environment. Take a look at my home page.

+2


a source







All Articles