开发者

How do you check for the existence of a column family in hector?

I have code that uses Hector to access Cassandra and needs to create column families on the fly if and only if they don't already exist. What is the proper way to check for the existence of a column family i开发者_Go百科n a keyspace?


I posted some info in our Hector wiki.

https://github.com/rantav/hector/wiki/Getting-started-%285-minutes%29

Basically once you get the KeyspaceDef you can call:

keyspaceDef.getCfDefs() and see if the CF is there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜