Presumably you mean " there are more than one UNIQUE key" (only one pk per table, even in rdbms..)
Thats a core difference between rdbms and hbase: secondary indexes are not suppoted per se in the latter. There are various options here, one of which may be to: - you might see whether you can combine your disparate unique keys into one combined one for use in hbase. may likely not be possible, but at least consider. - denormalize by creating separate htable's corresponding to each of the unique keys. in that case you may not want to store all columns in both tables: just the columns needed when you query by the specific unique key for that table. - partition your data well in terms of the regions and then do full scan on just the regions you need in order to achieve the queries by the secondary indexes - export your hbase data into an external full text searchable module (a la lucene) 2012/3/14 韶隆吴 <[email protected]> > Hi all: > I'm trying to import data from oracle to hbase and now I have a problem. > In some tables,there have more than one primary key and they all use a > lot. > How to design the rowkey in these tables to make them searched quickly? >
