Anyone knows a good Java ORM implementation for HBase. This one looks really nice for Ruby
http://www.stanford.edu/~sqs/rhino/doc/
But could not find one for Java.
Thanks.
Recently a new release of kundera-2.0.4 which is ORM over Hbase. It provides ample of other things which are very useful, like indexing, cross data store persistence etc.
I suggest give it a try https://github.com/impetus-opensource/Kundera
Executable jar is at:
https://github.com/impetus-opensource/Kundera
The strength of HBase as I see it is in keeping dynamic columns into static column families. From my experience developing applications with HBase I find that it is not as easy as SQL to determine cell qualifiers and values.
For example, a book as many authors, depending on your access patterns, author edits, app-layer cache implementation you might want to choose to save whole author in the book table (that is author resides in 2 table, author table and book table) or just the author id. Further more the collection of author can be saved into one cell as XML/JSON or individual cells for individual authors.
With this understanding I concluded writing a full-blown ORM such as Hibernate will not only be very difficult might not actually be conclusive. So I took a different approach, much more like as iBatis is to Hibernate.
Let me try to explain how it works. For this I will use source codes from here and here.
And thats it. How they are used are available here. It basically uses CommonReadDao, CommonWriteDao to read and write data to and from HBase. The common read dao implements multithreaded row to object conversion on queries, multithreaded get by ids, get by id and has its Hibernate Criteria like API to query to HBase via Scan (no aggregation functions available). Common write dao implements common write related code with some added facilities, such as optimistic/pessimistic locking, cell override/merge checking entity (non)-existence on save, update, delete etc.
This ORM has been developed for our internal purpose and I have been upto my neck and hence can not yet do some documentation. But if you are interested let me know and I will make time for documentation with priority.
Hibernate OGM is a fine solution for non SQL Databases. Try it out.
http://www.hibernate.org/subprojects/ogm.html
How about datanucleus: you can use JPA or JDO as your API and hbase as the backend store: http://www.datanucleus.org/plugins/store.hbase.html
you can try this: http://code.google.com/p/hbase-ormlite/ . This is a orm for HBase in Java.
There is pigi and parhely and I have used none of them. IMO HBase is fast key/value store engine, but if you need another layer of abstractions, you should check them out.
We are using HBase ORM - Surus https://github.com/mushkevych/surus/wiki
Probably worth mentioning
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With