2011-03-16 68 views

回答

0

我想你想的InclusiveStopFilter

s = new Scan(Bytes.toBytes("startRow")); 
s.setFilter(new InclusiveStopFilter(Bytes.toBytes("stopRow"))); 

http://svn.apache.org/repos/asf/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/filter/InclusiveStopFilter.java

+0

OK,但在這裏我也需要知道起始行和結束行權?那麼設置'where row-key> 4',那樣的事情呢? – 2011-03-17 04:58:48

+0

如果您沒有設置起始行,它將從頭開始。如果您沒有設置停止行,則會結束。 – David 2011-03-17 15:57:08

+0

好吧,如果我讀取一行並由數千列組成,那麼我想限制列值計數呢? – 2011-03-18 04:49:07

0

你可以有一個掃描的開始和停止行:

Scan s = new Scan(); 

s.setStartRow(Bytes.toBytes("startRow")); 
s.setStopRow(Bytes.toBytes("endRow")); 
相關問題