Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Programming practices for implementing composite row keys

Copy link to this message
Programming practices for implementing composite row keys
Hello people,

I have a scenario which requires creating composite row keys for my hbase

Basically it would be <entity1,entity2,entity3>.

Search would be based by entity1 and then entity2 and 3.. I know I can do
row <start-stop>scan on entity1 first and then put row filters on entity2
and entity3.

My question is what are the best programming principles to implement these

1. Just use simple delimiters <entity1:entity2:entity3>.

2. Create complex datatypes like java structures. I don't know if anyone
uses structures as keys and if they do, can someone please highlight me for
which scenarios they would be good fit. Does they fit good for this

3. What are the pros and cons for both 1 and 2, when it comes for data

4. My <entity1> can be negative also. Does it make any special difference
when hbase ordering is concerned. How can I tackle this scenario.

Any help on how to implement composite row keys would be highly helpful. I
want to understand how the community deals with implementing composite row