HBASE-959 Be able to get multiple RowResult at one time from client side

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@708435 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-10-28 05:03:13 +00:00
parent 918c3a4e7a
commit fa829b301e
2 changed files with 21 additions and 0 deletions

View File

@ -74,6 +74,8 @@ Release 0.19.0 - Unreleased
HBASE-940 Make the TableOutputFormat batching-aware
HBASE-967 [Optimization] Cache cell maximum length (HCD.getMaxValueLength);
its used checking batch size
HBASE-959 Be able to get multiple RowResult at one time from client side
(Sishen Freecity via Stack)
NEW FEATURES
HBASE-875 Use MurmurHash instead of JenkinsHash [in bloomfilters]

View File

@ -1338,6 +1338,25 @@ public class HTable {
return null;
}
/**
* @param nbRows number of rows to return
* @return Between zero and <param>nbRows</param> RowResults
* @throws IOException
*/
public RowResult[] next(int nbRows) throws IOException {
// Collect values to be returned here
ArrayList<RowResult> resultSets = new ArrayList<RowResult>(nbRows);
for(int i = 0; i < nbRows; i++) {
RowResult next = next();
if (next != null) {
resultSets.add(next);
} else {
break;
}
}
return resultSets.toArray(new RowResult[resultSets.size()]);
}
public void close() {
if (callable != null) {
callable.setClose();