HBASE-10778 Unique keys accounting in MultiThreadedReader is incorrect

git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/hbase-10070@1578672 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2014-03-18 00:02:14 +00:00 committed by Enis Soztutar
parent ffabf9ba9b
commit f09ab44cc6
1 changed files with 2 additions and 2 deletions

View File

@ -180,8 +180,8 @@ public class MultiThreadedReader extends MultiThreadedAction
startTimeMs = System.currentTimeMillis();
curKey = startKey;
long [] keysForThisReader = new long[batchSize];
int readingRandomKeyStartIndex = -1;
while (curKey < endKey && !aborted) {
int readingRandomKeyStartIndex = -1;
int numKeys = 0;
// if multiGet, loop until we have the number of keys equal to the batch size
do {
@ -204,7 +204,7 @@ public class MultiThreadedReader extends MultiThreadedAction
readingRandomKeyStartIndex = numKeys;
}
numKeys++;
} while (numKeys < batchSize);
} while (numKeys < batchSize && curKey < endKey && !aborted);
if (numKeys > 0) { //meaning there is some key to read
readKey(keysForThisReader);