I just saw this question about thrift in the Hadoop / Cassandra integration in the discussion on the user list about freezing thrift. I have been working on a project to integrate Hadoop 2 and Cassandra 2 and have been trying to move all of the way over to the Java driver and away from thrift.
I have finished most of the driver. It is still pretty rough, but I have been using it for testing a prototype of the Kiji platfrom (www.kiji.org) that uses Cassandra instead of HBase. One thing I have not been able to figure out is how to calculate input splits without thrift. I am currently doing the following: map = client.describe_ring(myKeyspace); (where client is of type Cassandra.Client). This call returns a list of token ranges (max and min token values) for different nodes in the cluster. We then use this information, along with another thrift call, client.describe_splits_ex(cfName, range.start_token, range.end_token, splitSize); to estimate the number of rows in each token range, etc. I have looked all over the Java driver documentation and pinged the user list and have not gotten any proposals that work for the Java driver. Does anyone here have any suggestions? Thanks! Best regards, Clint On Tue, Mar 11, 2014 at 12:41 PM, Shao-Chuan Wang < shaochuan.w...@bloomreach.com> wrote: > Hi, > > I just received this email from Jonathan regarding this deprecation of > thrift in 2.1 in dev emailing list. > > In fact, we migrated from thrift client to native one several months ago; > however, in the Cassandra.hadoop, there are still a lot of dependencies on > thrift interface, for example describe_splits_ex in > org.apache.cassandra.hadoop.AbstractColumnFamilyInputFormat. > > Therefore, we had to keep thrift and native in our server but mainly, the > CRUD query are through native protocol. > However, Jonathan says "*I don't know of any use cases for Thrift that > can't be **done in CQL"*. This statement makes me wonder maybe there is > something I don't know about native protocol yet. > > So, does anyone know how to do "describing the splits" and "describing the > local rings" using native protocol? > > Also, cqlsh uses python client, which is talking via thrift protocol too. > Does it mean that it will be migrated to native protocol soon as well? > > Comments, pointers, suggestions are much appreciated. > > Many thanks, > > Shao-Chuan >