I think you can assign keys so that they sort by x. You can 0-pad number strings on the left to get a consistent sortable format (assuming HBase still only does an alphabetical sort of keys; if it supports integer keys now you can just divide the upper and lower parts of the integer to store the pair).
On Thu, Dec 18, 2008 at 8:51 PM, Edward J. Yoon <[email protected]>wrote: > My key is a Segment(x, y). And, put(new Segment(int x, int > y).getBytes(), columnName, data) to table. > > Segment.write() { > out.writeInt(this.x); > out.writeInt(this.y); > } > > Then, key set is : > > [ (0, 0), > (1, 0), > (2, 0), > (0, 1), > (1, 1), > ...] > > Could anyone give me some advice on how to get sorted set as grouped by x? > > [ (0, 0), > (0, 1), > (0, 2), > (1, 0), > (1, 1), > ...] > > -- > Best Regards, Edward J. Yoon @ NHN, corp. > [email protected] > http://blog.udanax.org >
