hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [28/51] [partial] hbase-site git commit: Published site at .
Date Fri, 26 Jan 2018 15:14:13 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/96e5e102/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.html
index ca8be5e..b8e6dfa 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.html
@@ -6398,514 +6398,514 @@
 <span class="sourceLineNo">6390</span>      int initialBatchProgress = scannerContext.getBatchProgress();<a name="line.6390"></a>
 <span class="sourceLineNo">6391</span>      long initialSizeProgress = scannerContext.getDataSizeProgress();<a name="line.6391"></a>
 <span class="sourceLineNo">6392</span>      long initialHeapSizeProgress = scannerContext.getHeapSizeProgress();<a name="line.6392"></a>
-<span class="sourceLineNo">6393</span>      long initialTimeProgress = scannerContext.getTimeProgress();<a name="line.6393"></a>
-<span class="sourceLineNo">6394</span><a name="line.6394"></a>
-<span class="sourceLineNo">6395</span>      // The loop here is used only when at some point during the next we determine<a name="line.6395"></a>
-<span class="sourceLineNo">6396</span>      // that due to effects of filters or otherwise, we have an empty row in the result.<a name="line.6396"></a>
-<span class="sourceLineNo">6397</span>      // Then we loop and try again. Otherwise, we must get out on the first iteration via return,<a name="line.6397"></a>
-<span class="sourceLineNo">6398</span>      // "true" if there's more data to read, "false" if there isn't (storeHeap is at a stop row,<a name="line.6398"></a>
-<span class="sourceLineNo">6399</span>      // and joinedHeap has no more data to read for the last row (if set, joinedContinuationRow).<a name="line.6399"></a>
-<span class="sourceLineNo">6400</span>      while (true) {<a name="line.6400"></a>
-<span class="sourceLineNo">6401</span>        // Starting to scan a new row. Reset the scanner progress according to whether or not<a name="line.6401"></a>
-<span class="sourceLineNo">6402</span>        // progress should be kept.<a name="line.6402"></a>
-<span class="sourceLineNo">6403</span>        if (scannerContext.getKeepProgress()) {<a name="line.6403"></a>
-<span class="sourceLineNo">6404</span>          // Progress should be kept. Reset to initial values seen at start of method invocation.<a name="line.6404"></a>
-<span class="sourceLineNo">6405</span>          scannerContext.setProgress(initialBatchProgress, initialSizeProgress,<a name="line.6405"></a>
-<span class="sourceLineNo">6406</span>              initialHeapSizeProgress, initialTimeProgress);<a name="line.6406"></a>
-<span class="sourceLineNo">6407</span>        } else {<a name="line.6407"></a>
-<span class="sourceLineNo">6408</span>          scannerContext.clearProgress();<a name="line.6408"></a>
-<span class="sourceLineNo">6409</span>        }<a name="line.6409"></a>
-<span class="sourceLineNo">6410</span>        if (rpcCall.isPresent()) {<a name="line.6410"></a>
-<span class="sourceLineNo">6411</span>          // If a user specifies a too-restrictive or too-slow scanner, the<a name="line.6411"></a>
-<span class="sourceLineNo">6412</span>          // client might time out and disconnect while the server side<a name="line.6412"></a>
-<span class="sourceLineNo">6413</span>          // is still processing the request. We should abort aggressively<a name="line.6413"></a>
-<span class="sourceLineNo">6414</span>          // in that case.<a name="line.6414"></a>
-<span class="sourceLineNo">6415</span>          long afterTime = rpcCall.get().disconnectSince();<a name="line.6415"></a>
-<span class="sourceLineNo">6416</span>          if (afterTime &gt;= 0) {<a name="line.6416"></a>
-<span class="sourceLineNo">6417</span>            throw new CallerDisconnectedException(<a name="line.6417"></a>
-<span class="sourceLineNo">6418</span>                "Aborting on region " + getRegionInfo().getRegionNameAsString() + ", call " +<a name="line.6418"></a>
-<span class="sourceLineNo">6419</span>                    this + " after " + afterTime + " ms, since " +<a name="line.6419"></a>
-<span class="sourceLineNo">6420</span>                    "caller disconnected");<a name="line.6420"></a>
-<span class="sourceLineNo">6421</span>          }<a name="line.6421"></a>
-<span class="sourceLineNo">6422</span>        }<a name="line.6422"></a>
-<span class="sourceLineNo">6423</span><a name="line.6423"></a>
-<span class="sourceLineNo">6424</span>        // Let's see what we have in the storeHeap.<a name="line.6424"></a>
-<span class="sourceLineNo">6425</span>        Cell current = this.storeHeap.peek();<a name="line.6425"></a>
-<span class="sourceLineNo">6426</span><a name="line.6426"></a>
-<span class="sourceLineNo">6427</span>        boolean shouldStop = shouldStop(current);<a name="line.6427"></a>
-<span class="sourceLineNo">6428</span>        // When has filter row is true it means that the all the cells for a particular row must be<a name="line.6428"></a>
-<span class="sourceLineNo">6429</span>        // read before a filtering decision can be made. This means that filters where hasFilterRow<a name="line.6429"></a>
-<span class="sourceLineNo">6430</span>        // run the risk of enLongAddering out of memory errors in the case that they are applied to a<a name="line.6430"></a>
-<span class="sourceLineNo">6431</span>        // table that has very large rows.<a name="line.6431"></a>
-<span class="sourceLineNo">6432</span>        boolean hasFilterRow = this.filter != null &amp;&amp; this.filter.hasFilterRow();<a name="line.6432"></a>
-<span class="sourceLineNo">6433</span><a name="line.6433"></a>
-<span class="sourceLineNo">6434</span>        // If filter#hasFilterRow is true, partial results are not allowed since allowing them<a name="line.6434"></a>
-<span class="sourceLineNo">6435</span>        // would prevent the filters from being evaluated. Thus, if it is true, change the<a name="line.6435"></a>
-<span class="sourceLineNo">6436</span>        // scope of any limits that could potentially create partial results to<a name="line.6436"></a>
-<span class="sourceLineNo">6437</span>        // LimitScope.BETWEEN_ROWS so that those limits are not reached mid-row<a name="line.6437"></a>
-<span class="sourceLineNo">6438</span>        if (hasFilterRow) {<a name="line.6438"></a>
-<span class="sourceLineNo">6439</span>          if (LOG.isTraceEnabled()) {<a name="line.6439"></a>
-<span class="sourceLineNo">6440</span>            LOG.trace("filter#hasFilterRow is true which prevents partial results from being "<a name="line.6440"></a>
-<span class="sourceLineNo">6441</span>                + " formed. Changing scope of limits that may create partials");<a name="line.6441"></a>
-<span class="sourceLineNo">6442</span>          }<a name="line.6442"></a>
-<span class="sourceLineNo">6443</span>          scannerContext.setSizeLimitScope(LimitScope.BETWEEN_ROWS);<a name="line.6443"></a>
-<span class="sourceLineNo">6444</span>          scannerContext.setTimeLimitScope(LimitScope.BETWEEN_ROWS);<a name="line.6444"></a>
-<span class="sourceLineNo">6445</span>        }<a name="line.6445"></a>
-<span class="sourceLineNo">6446</span><a name="line.6446"></a>
-<span class="sourceLineNo">6447</span>        // Check if we were getting data from the joinedHeap and hit the limit.<a name="line.6447"></a>
-<span class="sourceLineNo">6448</span>        // If not, then it's main path - getting results from storeHeap.<a name="line.6448"></a>
-<span class="sourceLineNo">6449</span>        if (joinedContinuationRow == null) {<a name="line.6449"></a>
-<span class="sourceLineNo">6450</span>          // First, check if we are at a stop row. If so, there are no more results.<a name="line.6450"></a>
-<span class="sourceLineNo">6451</span>          if (shouldStop) {<a name="line.6451"></a>
-<span class="sourceLineNo">6452</span>            if (hasFilterRow) {<a name="line.6452"></a>
-<span class="sourceLineNo">6453</span>              filter.filterRowCells(results);<a name="line.6453"></a>
-<span class="sourceLineNo">6454</span>            }<a name="line.6454"></a>
-<span class="sourceLineNo">6455</span>            return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6455"></a>
-<span class="sourceLineNo">6456</span>          }<a name="line.6456"></a>
-<span class="sourceLineNo">6457</span><a name="line.6457"></a>
-<span class="sourceLineNo">6458</span>          // Check if rowkey filter wants to exclude this row. If so, loop to next.<a name="line.6458"></a>
-<span class="sourceLineNo">6459</span>          // Technically, if we hit limits before on this row, we don't need this call.<a name="line.6459"></a>
-<span class="sourceLineNo">6460</span>          if (filterRowKey(current)) {<a name="line.6460"></a>
-<span class="sourceLineNo">6461</span>            incrementCountOfRowsFilteredMetric(scannerContext);<a name="line.6461"></a>
-<span class="sourceLineNo">6462</span>            // early check, see HBASE-16296<a name="line.6462"></a>
-<span class="sourceLineNo">6463</span>            if (isFilterDoneInternal()) {<a name="line.6463"></a>
-<span class="sourceLineNo">6464</span>              return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6464"></a>
-<span class="sourceLineNo">6465</span>            }<a name="line.6465"></a>
-<span class="sourceLineNo">6466</span>            // Typically the count of rows scanned is incremented inside #populateResult. However,<a name="line.6466"></a>
-<span class="sourceLineNo">6467</span>            // here we are filtering a row based purely on its row key, preventing us from calling<a name="line.6467"></a>
-<span class="sourceLineNo">6468</span>            // #populateResult. Thus, perform the necessary increment here to rows scanned metric<a name="line.6468"></a>
-<span class="sourceLineNo">6469</span>            incrementCountOfRowsScannedMetric(scannerContext);<a name="line.6469"></a>
-<span class="sourceLineNo">6470</span>            boolean moreRows = nextRow(scannerContext, current);<a name="line.6470"></a>
-<span class="sourceLineNo">6471</span>            if (!moreRows) {<a name="line.6471"></a>
-<span class="sourceLineNo">6472</span>              return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6472"></a>
-<span class="sourceLineNo">6473</span>            }<a name="line.6473"></a>
-<span class="sourceLineNo">6474</span>            results.clear();<a name="line.6474"></a>
-<span class="sourceLineNo">6475</span>            continue;<a name="line.6475"></a>
-<span class="sourceLineNo">6476</span>          }<a name="line.6476"></a>
-<span class="sourceLineNo">6477</span><a name="line.6477"></a>
-<span class="sourceLineNo">6478</span>          // Ok, we are good, let's try to get some results from the main heap.<a name="line.6478"></a>
-<span class="sourceLineNo">6479</span>          populateResult(results, this.storeHeap, scannerContext, current);<a name="line.6479"></a>
-<span class="sourceLineNo">6480</span>          if (scannerContext.checkAnyLimitReached(LimitScope.BETWEEN_CELLS)) {<a name="line.6480"></a>
-<span class="sourceLineNo">6481</span>            if (hasFilterRow) {<a name="line.6481"></a>
-<span class="sourceLineNo">6482</span>              throw new IncompatibleFilterException(<a name="line.6482"></a>
-<span class="sourceLineNo">6483</span>                  "Filter whose hasFilterRow() returns true is incompatible with scans that must "<a name="line.6483"></a>
-<span class="sourceLineNo">6484</span>                      + " stop mid-row because of a limit. ScannerContext:" + scannerContext);<a name="line.6484"></a>
+<span class="sourceLineNo">6393</span><a name="line.6393"></a>
+<span class="sourceLineNo">6394</span>      // Used to check time limit<a name="line.6394"></a>
+<span class="sourceLineNo">6395</span>      LimitScope limitScope = LimitScope.BETWEEN_CELLS;<a name="line.6395"></a>
+<span class="sourceLineNo">6396</span><a name="line.6396"></a>
+<span class="sourceLineNo">6397</span>      // The loop here is used only when at some point during the next we determine<a name="line.6397"></a>
+<span class="sourceLineNo">6398</span>      // that due to effects of filters or otherwise, we have an empty row in the result.<a name="line.6398"></a>
+<span class="sourceLineNo">6399</span>      // Then we loop and try again. Otherwise, we must get out on the first iteration via return,<a name="line.6399"></a>
+<span class="sourceLineNo">6400</span>      // "true" if there's more data to read, "false" if there isn't (storeHeap is at a stop row,<a name="line.6400"></a>
+<span class="sourceLineNo">6401</span>      // and joinedHeap has no more data to read for the last row (if set, joinedContinuationRow).<a name="line.6401"></a>
+<span class="sourceLineNo">6402</span>      while (true) {<a name="line.6402"></a>
+<span class="sourceLineNo">6403</span>        // Starting to scan a new row. Reset the scanner progress according to whether or not<a name="line.6403"></a>
+<span class="sourceLineNo">6404</span>        // progress should be kept.<a name="line.6404"></a>
+<span class="sourceLineNo">6405</span>        if (scannerContext.getKeepProgress()) {<a name="line.6405"></a>
+<span class="sourceLineNo">6406</span>          // Progress should be kept. Reset to initial values seen at start of method invocation.<a name="line.6406"></a>
+<span class="sourceLineNo">6407</span>          scannerContext.setProgress(initialBatchProgress, initialSizeProgress,<a name="line.6407"></a>
+<span class="sourceLineNo">6408</span>              initialHeapSizeProgress);<a name="line.6408"></a>
+<span class="sourceLineNo">6409</span>        } else {<a name="line.6409"></a>
+<span class="sourceLineNo">6410</span>          scannerContext.clearProgress();<a name="line.6410"></a>
+<span class="sourceLineNo">6411</span>        }<a name="line.6411"></a>
+<span class="sourceLineNo">6412</span>        if (rpcCall.isPresent()) {<a name="line.6412"></a>
+<span class="sourceLineNo">6413</span>          // If a user specifies a too-restrictive or too-slow scanner, the<a name="line.6413"></a>
+<span class="sourceLineNo">6414</span>          // client might time out and disconnect while the server side<a name="line.6414"></a>
+<span class="sourceLineNo">6415</span>          // is still processing the request. We should abort aggressively<a name="line.6415"></a>
+<span class="sourceLineNo">6416</span>          // in that case.<a name="line.6416"></a>
+<span class="sourceLineNo">6417</span>          long afterTime = rpcCall.get().disconnectSince();<a name="line.6417"></a>
+<span class="sourceLineNo">6418</span>          if (afterTime &gt;= 0) {<a name="line.6418"></a>
+<span class="sourceLineNo">6419</span>            throw new CallerDisconnectedException(<a name="line.6419"></a>
+<span class="sourceLineNo">6420</span>                "Aborting on region " + getRegionInfo().getRegionNameAsString() + ", call " +<a name="line.6420"></a>
+<span class="sourceLineNo">6421</span>                    this + " after " + afterTime + " ms, since " +<a name="line.6421"></a>
+<span class="sourceLineNo">6422</span>                    "caller disconnected");<a name="line.6422"></a>
+<span class="sourceLineNo">6423</span>          }<a name="line.6423"></a>
+<span class="sourceLineNo">6424</span>        }<a name="line.6424"></a>
+<span class="sourceLineNo">6425</span><a name="line.6425"></a>
+<span class="sourceLineNo">6426</span>        // Let's see what we have in the storeHeap.<a name="line.6426"></a>
+<span class="sourceLineNo">6427</span>        Cell current = this.storeHeap.peek();<a name="line.6427"></a>
+<span class="sourceLineNo">6428</span><a name="line.6428"></a>
+<span class="sourceLineNo">6429</span>        boolean shouldStop = shouldStop(current);<a name="line.6429"></a>
+<span class="sourceLineNo">6430</span>        // When has filter row is true it means that the all the cells for a particular row must be<a name="line.6430"></a>
+<span class="sourceLineNo">6431</span>        // read before a filtering decision can be made. This means that filters where hasFilterRow<a name="line.6431"></a>
+<span class="sourceLineNo">6432</span>        // run the risk of enLongAddering out of memory errors in the case that they are applied to a<a name="line.6432"></a>
+<span class="sourceLineNo">6433</span>        // table that has very large rows.<a name="line.6433"></a>
+<span class="sourceLineNo">6434</span>        boolean hasFilterRow = this.filter != null &amp;&amp; this.filter.hasFilterRow();<a name="line.6434"></a>
+<span class="sourceLineNo">6435</span><a name="line.6435"></a>
+<span class="sourceLineNo">6436</span>        // If filter#hasFilterRow is true, partial results are not allowed since allowing them<a name="line.6436"></a>
+<span class="sourceLineNo">6437</span>        // would prevent the filters from being evaluated. Thus, if it is true, change the<a name="line.6437"></a>
+<span class="sourceLineNo">6438</span>        // scope of any limits that could potentially create partial results to<a name="line.6438"></a>
+<span class="sourceLineNo">6439</span>        // LimitScope.BETWEEN_ROWS so that those limits are not reached mid-row<a name="line.6439"></a>
+<span class="sourceLineNo">6440</span>        if (hasFilterRow) {<a name="line.6440"></a>
+<span class="sourceLineNo">6441</span>          if (LOG.isTraceEnabled()) {<a name="line.6441"></a>
+<span class="sourceLineNo">6442</span>            LOG.trace("filter#hasFilterRow is true which prevents partial results from being "<a name="line.6442"></a>
+<span class="sourceLineNo">6443</span>                + " formed. Changing scope of limits that may create partials");<a name="line.6443"></a>
+<span class="sourceLineNo">6444</span>          }<a name="line.6444"></a>
+<span class="sourceLineNo">6445</span>          scannerContext.setSizeLimitScope(LimitScope.BETWEEN_ROWS);<a name="line.6445"></a>
+<span class="sourceLineNo">6446</span>          scannerContext.setTimeLimitScope(LimitScope.BETWEEN_ROWS);<a name="line.6446"></a>
+<span class="sourceLineNo">6447</span>          limitScope = LimitScope.BETWEEN_ROWS;<a name="line.6447"></a>
+<span class="sourceLineNo">6448</span>        }<a name="line.6448"></a>
+<span class="sourceLineNo">6449</span><a name="line.6449"></a>
+<span class="sourceLineNo">6450</span>        if (scannerContext.checkTimeLimit(LimitScope.BETWEEN_CELLS)) {<a name="line.6450"></a>
+<span class="sourceLineNo">6451</span>          if (hasFilterRow) {<a name="line.6451"></a>
+<span class="sourceLineNo">6452</span>            throw new IncompatibleFilterException(<a name="line.6452"></a>
+<span class="sourceLineNo">6453</span>                "Filter whose hasFilterRow() returns true is incompatible with scans that must " +<a name="line.6453"></a>
+<span class="sourceLineNo">6454</span>                    " stop mid-row because of a limit. ScannerContext:" + scannerContext);<a name="line.6454"></a>
+<span class="sourceLineNo">6455</span>          }<a name="line.6455"></a>
+<span class="sourceLineNo">6456</span>          return true;<a name="line.6456"></a>
+<span class="sourceLineNo">6457</span>        }<a name="line.6457"></a>
+<span class="sourceLineNo">6458</span><a name="line.6458"></a>
+<span class="sourceLineNo">6459</span>        // Check if we were getting data from the joinedHeap and hit the limit.<a name="line.6459"></a>
+<span class="sourceLineNo">6460</span>        // If not, then it's main path - getting results from storeHeap.<a name="line.6460"></a>
+<span class="sourceLineNo">6461</span>        if (joinedContinuationRow == null) {<a name="line.6461"></a>
+<span class="sourceLineNo">6462</span>          // First, check if we are at a stop row. If so, there are no more results.<a name="line.6462"></a>
+<span class="sourceLineNo">6463</span>          if (shouldStop) {<a name="line.6463"></a>
+<span class="sourceLineNo">6464</span>            if (hasFilterRow) {<a name="line.6464"></a>
+<span class="sourceLineNo">6465</span>              filter.filterRowCells(results);<a name="line.6465"></a>
+<span class="sourceLineNo">6466</span>            }<a name="line.6466"></a>
+<span class="sourceLineNo">6467</span>            return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6467"></a>
+<span class="sourceLineNo">6468</span>          }<a name="line.6468"></a>
+<span class="sourceLineNo">6469</span><a name="line.6469"></a>
+<span class="sourceLineNo">6470</span>          // Check if rowkey filter wants to exclude this row. If so, loop to next.<a name="line.6470"></a>
+<span class="sourceLineNo">6471</span>          // Technically, if we hit limits before on this row, we don't need this call.<a name="line.6471"></a>
+<span class="sourceLineNo">6472</span>          if (filterRowKey(current)) {<a name="line.6472"></a>
+<span class="sourceLineNo">6473</span>            incrementCountOfRowsFilteredMetric(scannerContext);<a name="line.6473"></a>
+<span class="sourceLineNo">6474</span>            // early check, see HBASE-16296<a name="line.6474"></a>
+<span class="sourceLineNo">6475</span>            if (isFilterDoneInternal()) {<a name="line.6475"></a>
+<span class="sourceLineNo">6476</span>              return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6476"></a>
+<span class="sourceLineNo">6477</span>            }<a name="line.6477"></a>
+<span class="sourceLineNo">6478</span>            // Typically the count of rows scanned is incremented inside #populateResult. However,<a name="line.6478"></a>
+<span class="sourceLineNo">6479</span>            // here we are filtering a row based purely on its row key, preventing us from calling<a name="line.6479"></a>
+<span class="sourceLineNo">6480</span>            // #populateResult. Thus, perform the necessary increment here to rows scanned metric<a name="line.6480"></a>
+<span class="sourceLineNo">6481</span>            incrementCountOfRowsScannedMetric(scannerContext);<a name="line.6481"></a>
+<span class="sourceLineNo">6482</span>            boolean moreRows = nextRow(scannerContext, current);<a name="line.6482"></a>
+<span class="sourceLineNo">6483</span>            if (!moreRows) {<a name="line.6483"></a>
+<span class="sourceLineNo">6484</span>              return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6484"></a>
 <span class="sourceLineNo">6485</span>            }<a name="line.6485"></a>
-<span class="sourceLineNo">6486</span>            return true;<a name="line.6486"></a>
-<span class="sourceLineNo">6487</span>          }<a name="line.6487"></a>
-<span class="sourceLineNo">6488</span><a name="line.6488"></a>
-<span class="sourceLineNo">6489</span>          Cell nextKv = this.storeHeap.peek();<a name="line.6489"></a>
-<span class="sourceLineNo">6490</span>          shouldStop = shouldStop(nextKv);<a name="line.6490"></a>
-<span class="sourceLineNo">6491</span>          // save that the row was empty before filters applied to it.<a name="line.6491"></a>
-<span class="sourceLineNo">6492</span>          final boolean isEmptyRow = results.isEmpty();<a name="line.6492"></a>
-<span class="sourceLineNo">6493</span><a name="line.6493"></a>
-<span class="sourceLineNo">6494</span>          // We have the part of the row necessary for filtering (all of it, usually).<a name="line.6494"></a>
-<span class="sourceLineNo">6495</span>          // First filter with the filterRow(List).<a name="line.6495"></a>
-<span class="sourceLineNo">6496</span>          FilterWrapper.FilterRowRetCode ret = FilterWrapper.FilterRowRetCode.NOT_CALLED;<a name="line.6496"></a>
-<span class="sourceLineNo">6497</span>          if (hasFilterRow) {<a name="line.6497"></a>
-<span class="sourceLineNo">6498</span>            ret = filter.filterRowCellsWithRet(results);<a name="line.6498"></a>
-<span class="sourceLineNo">6499</span><a name="line.6499"></a>
-<span class="sourceLineNo">6500</span>            // We don't know how the results have changed after being filtered. Must set progress<a name="line.6500"></a>
-<span class="sourceLineNo">6501</span>            // according to contents of results now. However, a change in the results should not<a name="line.6501"></a>
-<span class="sourceLineNo">6502</span>            // affect the time progress. Thus preserve whatever time progress has been made<a name="line.6502"></a>
-<span class="sourceLineNo">6503</span>            long timeProgress = scannerContext.getTimeProgress();<a name="line.6503"></a>
-<span class="sourceLineNo">6504</span>            if (scannerContext.getKeepProgress()) {<a name="line.6504"></a>
-<span class="sourceLineNo">6505</span>              scannerContext.setProgress(initialBatchProgress, initialSizeProgress,<a name="line.6505"></a>
-<span class="sourceLineNo">6506</span>                  initialHeapSizeProgress, initialTimeProgress);<a name="line.6506"></a>
-<span class="sourceLineNo">6507</span>            } else {<a name="line.6507"></a>
-<span class="sourceLineNo">6508</span>              scannerContext.clearProgress();<a name="line.6508"></a>
-<span class="sourceLineNo">6509</span>            }<a name="line.6509"></a>
-<span class="sourceLineNo">6510</span>            scannerContext.setTimeProgress(timeProgress);<a name="line.6510"></a>
-<span class="sourceLineNo">6511</span>            scannerContext.incrementBatchProgress(results.size());<a name="line.6511"></a>
-<span class="sourceLineNo">6512</span>            for (Cell cell : results) {<a name="line.6512"></a>
-<span class="sourceLineNo">6513</span>              scannerContext.incrementSizeProgress(PrivateCellUtil.estimatedSerializedSizeOf(cell),<a name="line.6513"></a>
-<span class="sourceLineNo">6514</span>                PrivateCellUtil.estimatedHeapSizeOf(cell));<a name="line.6514"></a>
-<span class="sourceLineNo">6515</span>            }<a name="line.6515"></a>
-<span class="sourceLineNo">6516</span>          }<a name="line.6516"></a>
-<span class="sourceLineNo">6517</span><a name="line.6517"></a>
-<span class="sourceLineNo">6518</span>          if (isEmptyRow || ret == FilterWrapper.FilterRowRetCode.EXCLUDE || filterRow()) {<a name="line.6518"></a>
-<span class="sourceLineNo">6519</span>            incrementCountOfRowsFilteredMetric(scannerContext);<a name="line.6519"></a>
-<span class="sourceLineNo">6520</span>            results.clear();<a name="line.6520"></a>
-<span class="sourceLineNo">6521</span>            boolean moreRows = nextRow(scannerContext, current);<a name="line.6521"></a>
-<span class="sourceLineNo">6522</span>            if (!moreRows) {<a name="line.6522"></a>
-<span class="sourceLineNo">6523</span>              return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6523"></a>
+<span class="sourceLineNo">6486</span>            results.clear();<a name="line.6486"></a>
+<span class="sourceLineNo">6487</span><a name="line.6487"></a>
+<span class="sourceLineNo">6488</span>            // Read nothing as the rowkey was filtered, but still need to check time limit<a name="line.6488"></a>
+<span class="sourceLineNo">6489</span>            if (scannerContext.checkTimeLimit(limitScope)) {<a name="line.6489"></a>
+<span class="sourceLineNo">6490</span>              return true;<a name="line.6490"></a>
+<span class="sourceLineNo">6491</span>            }<a name="line.6491"></a>
+<span class="sourceLineNo">6492</span>            continue;<a name="line.6492"></a>
+<span class="sourceLineNo">6493</span>          }<a name="line.6493"></a>
+<span class="sourceLineNo">6494</span><a name="line.6494"></a>
+<span class="sourceLineNo">6495</span>          // Ok, we are good, let's try to get some results from the main heap.<a name="line.6495"></a>
+<span class="sourceLineNo">6496</span>          populateResult(results, this.storeHeap, scannerContext, current);<a name="line.6496"></a>
+<span class="sourceLineNo">6497</span>          if (scannerContext.checkAnyLimitReached(LimitScope.BETWEEN_CELLS)) {<a name="line.6497"></a>
+<span class="sourceLineNo">6498</span>            if (hasFilterRow) {<a name="line.6498"></a>
+<span class="sourceLineNo">6499</span>              throw new IncompatibleFilterException(<a name="line.6499"></a>
+<span class="sourceLineNo">6500</span>                  "Filter whose hasFilterRow() returns true is incompatible with scans that must "<a name="line.6500"></a>
+<span class="sourceLineNo">6501</span>                      + " stop mid-row because of a limit. ScannerContext:" + scannerContext);<a name="line.6501"></a>
+<span class="sourceLineNo">6502</span>            }<a name="line.6502"></a>
+<span class="sourceLineNo">6503</span>            return true;<a name="line.6503"></a>
+<span class="sourceLineNo">6504</span>          }<a name="line.6504"></a>
+<span class="sourceLineNo">6505</span><a name="line.6505"></a>
+<span class="sourceLineNo">6506</span>          Cell nextKv = this.storeHeap.peek();<a name="line.6506"></a>
+<span class="sourceLineNo">6507</span>          shouldStop = shouldStop(nextKv);<a name="line.6507"></a>
+<span class="sourceLineNo">6508</span>          // save that the row was empty before filters applied to it.<a name="line.6508"></a>
+<span class="sourceLineNo">6509</span>          final boolean isEmptyRow = results.isEmpty();<a name="line.6509"></a>
+<span class="sourceLineNo">6510</span><a name="line.6510"></a>
+<span class="sourceLineNo">6511</span>          // We have the part of the row necessary for filtering (all of it, usually).<a name="line.6511"></a>
+<span class="sourceLineNo">6512</span>          // First filter with the filterRow(List).<a name="line.6512"></a>
+<span class="sourceLineNo">6513</span>          FilterWrapper.FilterRowRetCode ret = FilterWrapper.FilterRowRetCode.NOT_CALLED;<a name="line.6513"></a>
+<span class="sourceLineNo">6514</span>          if (hasFilterRow) {<a name="line.6514"></a>
+<span class="sourceLineNo">6515</span>            ret = filter.filterRowCellsWithRet(results);<a name="line.6515"></a>
+<span class="sourceLineNo">6516</span><a name="line.6516"></a>
+<span class="sourceLineNo">6517</span>            // We don't know how the results have changed after being filtered. Must set progress<a name="line.6517"></a>
+<span class="sourceLineNo">6518</span>            // according to contents of results now.<a name="line.6518"></a>
+<span class="sourceLineNo">6519</span>            if (scannerContext.getKeepProgress()) {<a name="line.6519"></a>
+<span class="sourceLineNo">6520</span>              scannerContext.setProgress(initialBatchProgress, initialSizeProgress,<a name="line.6520"></a>
+<span class="sourceLineNo">6521</span>                  initialHeapSizeProgress);<a name="line.6521"></a>
+<span class="sourceLineNo">6522</span>            } else {<a name="line.6522"></a>
+<span class="sourceLineNo">6523</span>              scannerContext.clearProgress();<a name="line.6523"></a>
 <span class="sourceLineNo">6524</span>            }<a name="line.6524"></a>
-<span class="sourceLineNo">6525</span><a name="line.6525"></a>
-<span class="sourceLineNo">6526</span>            // This row was totally filtered out, if this is NOT the last row,<a name="line.6526"></a>
-<span class="sourceLineNo">6527</span>            // we should continue on. Otherwise, nothing else to do.<a name="line.6527"></a>
-<span class="sourceLineNo">6528</span>            if (!shouldStop) continue;<a name="line.6528"></a>
-<span class="sourceLineNo">6529</span>            return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6529"></a>
+<span class="sourceLineNo">6525</span>            scannerContext.incrementBatchProgress(results.size());<a name="line.6525"></a>
+<span class="sourceLineNo">6526</span>            for (Cell cell : results) {<a name="line.6526"></a>
+<span class="sourceLineNo">6527</span>              scannerContext.incrementSizeProgress(PrivateCellUtil.estimatedSerializedSizeOf(cell),<a name="line.6527"></a>
+<span class="sourceLineNo">6528</span>                PrivateCellUtil.estimatedHeapSizeOf(cell));<a name="line.6528"></a>
+<span class="sourceLineNo">6529</span>            }<a name="line.6529"></a>
 <span class="sourceLineNo">6530</span>          }<a name="line.6530"></a>
 <span class="sourceLineNo">6531</span><a name="line.6531"></a>
-<span class="sourceLineNo">6532</span>          // Ok, we are done with storeHeap for this row.<a name="line.6532"></a>
-<span class="sourceLineNo">6533</span>          // Now we may need to fetch additional, non-essential data into row.<a name="line.6533"></a>
-<span class="sourceLineNo">6534</span>          // These values are not needed for filter to work, so we postpone their<a name="line.6534"></a>
-<span class="sourceLineNo">6535</span>          // fetch to (possibly) reduce amount of data loads from disk.<a name="line.6535"></a>
-<span class="sourceLineNo">6536</span>          if (this.joinedHeap != null) {<a name="line.6536"></a>
-<span class="sourceLineNo">6537</span>            boolean mayHaveData = joinedHeapMayHaveData(current);<a name="line.6537"></a>
-<span class="sourceLineNo">6538</span>            if (mayHaveData) {<a name="line.6538"></a>
-<span class="sourceLineNo">6539</span>              joinedContinuationRow = current;<a name="line.6539"></a>
-<span class="sourceLineNo">6540</span>              populateFromJoinedHeap(results, scannerContext);<a name="line.6540"></a>
-<span class="sourceLineNo">6541</span><a name="line.6541"></a>
-<span class="sourceLineNo">6542</span>              if (scannerContext.checkAnyLimitReached(LimitScope.BETWEEN_CELLS)) {<a name="line.6542"></a>
-<span class="sourceLineNo">6543</span>                return true;<a name="line.6543"></a>
-<span class="sourceLineNo">6544</span>              }<a name="line.6544"></a>
-<span class="sourceLineNo">6545</span>            }<a name="line.6545"></a>
-<span class="sourceLineNo">6546</span>          }<a name="line.6546"></a>
-<span class="sourceLineNo">6547</span>        } else {<a name="line.6547"></a>
-<span class="sourceLineNo">6548</span>          // Populating from the joined heap was stopped by limits, populate some more.<a name="line.6548"></a>
-<span class="sourceLineNo">6549</span>          populateFromJoinedHeap(results, scannerContext);<a name="line.6549"></a>
-<span class="sourceLineNo">6550</span>          if (scannerContext.checkAnyLimitReached(LimitScope.BETWEEN_CELLS)) {<a name="line.6550"></a>
-<span class="sourceLineNo">6551</span>            return true;<a name="line.6551"></a>
-<span class="sourceLineNo">6552</span>          }<a name="line.6552"></a>
-<span class="sourceLineNo">6553</span>        }<a name="line.6553"></a>
-<span class="sourceLineNo">6554</span>        // We may have just called populateFromJoinedMap and hit the limits. If that is<a name="line.6554"></a>
-<span class="sourceLineNo">6555</span>        // the case, we need to call it again on the next next() invocation.<a name="line.6555"></a>
-<span class="sourceLineNo">6556</span>        if (joinedContinuationRow != null) {<a name="line.6556"></a>
-<span class="sourceLineNo">6557</span>          return scannerContext.setScannerState(NextState.MORE_VALUES).hasMoreValues();<a name="line.6557"></a>
-<span class="sourceLineNo">6558</span>        }<a name="line.6558"></a>
-<span class="sourceLineNo">6559</span><a name="line.6559"></a>
-<span class="sourceLineNo">6560</span>        // Finally, we are done with both joinedHeap and storeHeap.<a name="line.6560"></a>
-<span class="sourceLineNo">6561</span>        // Double check to prevent empty rows from appearing in result. It could be<a name="line.6561"></a>
-<span class="sourceLineNo">6562</span>        // the case when SingleColumnValueExcludeFilter is used.<a name="line.6562"></a>
-<span class="sourceLineNo">6563</span>        if (results.isEmpty()) {<a name="line.6563"></a>
-<span class="sourceLineNo">6564</span>          incrementCountOfRowsFilteredMetric(scannerContext);<a name="line.6564"></a>
-<span class="sourceLineNo">6565</span>          boolean moreRows = nextRow(scannerContext, current);<a name="line.6565"></a>
-<span class="sourceLineNo">6566</span>          if (!moreRows) {<a name="line.6566"></a>
-<span class="sourceLineNo">6567</span>            return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6567"></a>
-<span class="sourceLineNo">6568</span>          }<a name="line.6568"></a>
-<span class="sourceLineNo">6569</span>          if (!shouldStop) continue;<a name="line.6569"></a>
-<span class="sourceLineNo">6570</span>        }<a name="line.6570"></a>
-<span class="sourceLineNo">6571</span><a name="line.6571"></a>
-<span class="sourceLineNo">6572</span>        if (shouldStop) {<a name="line.6572"></a>
-<span class="sourceLineNo">6573</span>          return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6573"></a>
-<span class="sourceLineNo">6574</span>        } else {<a name="line.6574"></a>
-<span class="sourceLineNo">6575</span>          return scannerContext.setScannerState(NextState.MORE_VALUES).hasMoreValues();<a name="line.6575"></a>
-<span class="sourceLineNo">6576</span>        }<a name="line.6576"></a>
-<span class="sourceLineNo">6577</span>      }<a name="line.6577"></a>
-<span class="sourceLineNo">6578</span>    }<a name="line.6578"></a>
+<span class="sourceLineNo">6532</span>          if (isEmptyRow || ret == FilterWrapper.FilterRowRetCode.EXCLUDE || filterRow()) {<a name="line.6532"></a>
+<span class="sourceLineNo">6533</span>            incrementCountOfRowsFilteredMetric(scannerContext);<a name="line.6533"></a>
+<span class="sourceLineNo">6534</span>            results.clear();<a name="line.6534"></a>
+<span class="sourceLineNo">6535</span>            boolean moreRows = nextRow(scannerContext, current);<a name="line.6535"></a>
+<span class="sourceLineNo">6536</span>            if (!moreRows) {<a name="line.6536"></a>
+<span class="sourceLineNo">6537</span>              return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6537"></a>
+<span class="sourceLineNo">6538</span>            }<a name="line.6538"></a>
+<span class="sourceLineNo">6539</span><a name="line.6539"></a>
+<span class="sourceLineNo">6540</span>            // This row was totally filtered out, if this is NOT the last row,<a name="line.6540"></a>
+<span class="sourceLineNo">6541</span>            // we should continue on. Otherwise, nothing else to do.<a name="line.6541"></a>
+<span class="sourceLineNo">6542</span>            if (!shouldStop) {<a name="line.6542"></a>
+<span class="sourceLineNo">6543</span>              // Read nothing as the cells was filtered, but still need to check time limit<a name="line.6543"></a>
+<span class="sourceLineNo">6544</span>              if (scannerContext.checkTimeLimit(limitScope)) {<a name="line.6544"></a>
+<span class="sourceLineNo">6545</span>                return true;<a name="line.6545"></a>
+<span class="sourceLineNo">6546</span>              }<a name="line.6546"></a>
+<span class="sourceLineNo">6547</span>              continue;<a name="line.6547"></a>
+<span class="sourceLineNo">6548</span>            }<a name="line.6548"></a>
+<span class="sourceLineNo">6549</span>            return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6549"></a>
+<span class="sourceLineNo">6550</span>          }<a name="line.6550"></a>
+<span class="sourceLineNo">6551</span><a name="line.6551"></a>
+<span class="sourceLineNo">6552</span>          // Ok, we are done with storeHeap for this row.<a name="line.6552"></a>
+<span class="sourceLineNo">6553</span>          // Now we may need to fetch additional, non-essential data into row.<a name="line.6553"></a>
+<span class="sourceLineNo">6554</span>          // These values are not needed for filter to work, so we postpone their<a name="line.6554"></a>
+<span class="sourceLineNo">6555</span>          // fetch to (possibly) reduce amount of data loads from disk.<a name="line.6555"></a>
+<span class="sourceLineNo">6556</span>          if (this.joinedHeap != null) {<a name="line.6556"></a>
+<span class="sourceLineNo">6557</span>            boolean mayHaveData = joinedHeapMayHaveData(current);<a name="line.6557"></a>
+<span class="sourceLineNo">6558</span>            if (mayHaveData) {<a name="line.6558"></a>
+<span class="sourceLineNo">6559</span>              joinedContinuationRow = current;<a name="line.6559"></a>
+<span class="sourceLineNo">6560</span>              populateFromJoinedHeap(results, scannerContext);<a name="line.6560"></a>
+<span class="sourceLineNo">6561</span><a name="line.6561"></a>
+<span class="sourceLineNo">6562</span>              if (scannerContext.checkAnyLimitReached(LimitScope.BETWEEN_CELLS)) {<a name="line.6562"></a>
+<span class="sourceLineNo">6563</span>                return true;<a name="line.6563"></a>
+<span class="sourceLineNo">6564</span>              }<a name="line.6564"></a>
+<span class="sourceLineNo">6565</span>            }<a name="line.6565"></a>
+<span class="sourceLineNo">6566</span>          }<a name="line.6566"></a>
+<span class="sourceLineNo">6567</span>        } else {<a name="line.6567"></a>
+<span class="sourceLineNo">6568</span>          // Populating from the joined heap was stopped by limits, populate some more.<a name="line.6568"></a>
+<span class="sourceLineNo">6569</span>          populateFromJoinedHeap(results, scannerContext);<a name="line.6569"></a>
+<span class="sourceLineNo">6570</span>          if (scannerContext.checkAnyLimitReached(LimitScope.BETWEEN_CELLS)) {<a name="line.6570"></a>
+<span class="sourceLineNo">6571</span>            return true;<a name="line.6571"></a>
+<span class="sourceLineNo">6572</span>          }<a name="line.6572"></a>
+<span class="sourceLineNo">6573</span>        }<a name="line.6573"></a>
+<span class="sourceLineNo">6574</span>        // We may have just called populateFromJoinedMap and hit the limits. If that is<a name="line.6574"></a>
+<span class="sourceLineNo">6575</span>        // the case, we need to call it again on the next next() invocation.<a name="line.6575"></a>
+<span class="sourceLineNo">6576</span>        if (joinedContinuationRow != null) {<a name="line.6576"></a>
+<span class="sourceLineNo">6577</span>          return scannerContext.setScannerState(NextState.MORE_VALUES).hasMoreValues();<a name="line.6577"></a>
+<span class="sourceLineNo">6578</span>        }<a name="line.6578"></a>
 <span class="sourceLineNo">6579</span><a name="line.6579"></a>
-<span class="sourceLineNo">6580</span>    protected void incrementCountOfRowsFilteredMetric(ScannerContext scannerContext) {<a name="line.6580"></a>
-<span class="sourceLineNo">6581</span>      filteredReadRequestsCount.increment();<a name="line.6581"></a>
-<span class="sourceLineNo">6582</span><a name="line.6582"></a>
-<span class="sourceLineNo">6583</span>      if (scannerContext == null || !scannerContext.isTrackingMetrics()) return;<a name="line.6583"></a>
-<span class="sourceLineNo">6584</span><a name="line.6584"></a>
-<span class="sourceLineNo">6585</span>      scannerContext.getMetrics().countOfRowsFiltered.incrementAndGet();<a name="line.6585"></a>
-<span class="sourceLineNo">6586</span>    }<a name="line.6586"></a>
-<span class="sourceLineNo">6587</span><a name="line.6587"></a>
-<span class="sourceLineNo">6588</span>    protected void incrementCountOfRowsScannedMetric(ScannerContext scannerContext) {<a name="line.6588"></a>
-<span class="sourceLineNo">6589</span>      if (scannerContext == null || !scannerContext.isTrackingMetrics()) return;<a name="line.6589"></a>
-<span class="sourceLineNo">6590</span><a name="line.6590"></a>
-<span class="sourceLineNo">6591</span>      scannerContext.getMetrics().countOfRowsScanned.incrementAndGet();<a name="line.6591"></a>
-<span class="sourceLineNo">6592</span>    }<a name="line.6592"></a>
-<span class="sourceLineNo">6593</span><a name="line.6593"></a>
-<span class="sourceLineNo">6594</span>    /**<a name="line.6594"></a>
-<span class="sourceLineNo">6595</span>     * @param currentRowCell<a name="line.6595"></a>
-<span class="sourceLineNo">6596</span>     * @return true when the joined heap may have data for the current row<a name="line.6596"></a>
-<span class="sourceLineNo">6597</span>     * @throws IOException<a name="line.6597"></a>
-<span class="sourceLineNo">6598</span>     */<a name="line.6598"></a>
-<span class="sourceLineNo">6599</span>    private boolean joinedHeapMayHaveData(Cell currentRowCell)<a name="line.6599"></a>
-<span class="sourceLineNo">6600</span>        throws IOException {<a name="line.6600"></a>
-<span class="sourceLineNo">6601</span>      Cell nextJoinedKv = joinedHeap.peek();<a name="line.6601"></a>
-<span class="sourceLineNo">6602</span>      boolean matchCurrentRow =<a name="line.6602"></a>
-<span class="sourceLineNo">6603</span>          nextJoinedKv != null &amp;&amp; CellUtil.matchingRows(nextJoinedKv, currentRowCell);<a name="line.6603"></a>
-<span class="sourceLineNo">6604</span>      boolean matchAfterSeek = false;<a name="line.6604"></a>
-<span class="sourceLineNo">6605</span><a name="line.6605"></a>
-<span class="sourceLineNo">6606</span>      // If the next value in the joined heap does not match the current row, try to seek to the<a name="line.6606"></a>
-<span class="sourceLineNo">6607</span>      // correct row<a name="line.6607"></a>
-<span class="sourceLineNo">6608</span>      if (!matchCurrentRow) {<a name="line.6608"></a>
-<span class="sourceLineNo">6609</span>        Cell firstOnCurrentRow = PrivateCellUtil.createFirstOnRow(currentRowCell);<a name="line.6609"></a>
-<span class="sourceLineNo">6610</span>        boolean seekSuccessful = this.joinedHeap.requestSeek(firstOnCurrentRow, true, true);<a name="line.6610"></a>
-<span class="sourceLineNo">6611</span>        matchAfterSeek =<a name="line.6611"></a>
-<span class="sourceLineNo">6612</span>            seekSuccessful &amp;&amp; joinedHeap.peek() != null<a name="line.6612"></a>
-<span class="sourceLineNo">6613</span>                &amp;&amp; CellUtil.matchingRows(joinedHeap.peek(), currentRowCell);<a name="line.6613"></a>
-<span class="sourceLineNo">6614</span>      }<a name="line.6614"></a>
-<span class="sourceLineNo">6615</span><a name="line.6615"></a>
-<span class="sourceLineNo">6616</span>      return matchCurrentRow || matchAfterSeek;<a name="line.6616"></a>
-<span class="sourceLineNo">6617</span>    }<a name="line.6617"></a>
-<span class="sourceLineNo">6618</span><a name="line.6618"></a>
-<span class="sourceLineNo">6619</span>    /**<a name="line.6619"></a>
-<span class="sourceLineNo">6620</span>     * This function is to maintain backward compatibility for 0.94 filters. HBASE-6429 combines<a name="line.6620"></a>
-<span class="sourceLineNo">6621</span>     * both filterRow &amp; filterRow({@code List&lt;KeyValue&gt; kvs}) functions. While 0.94 code or older,<a name="line.6621"></a>
-<span class="sourceLineNo">6622</span>     * it may not implement hasFilterRow as HBase-6429 expects because 0.94 hasFilterRow() only<a name="line.6622"></a>
-<span class="sourceLineNo">6623</span>     * returns true when filterRow({@code List&lt;KeyValue&gt; kvs}) is overridden not the filterRow().<a name="line.6623"></a>
-<span class="sourceLineNo">6624</span>     * Therefore, the filterRow() will be skipped.<a name="line.6624"></a>
-<span class="sourceLineNo">6625</span>     */<a name="line.6625"></a>
-<span class="sourceLineNo">6626</span>    private boolean filterRow() throws IOException {<a name="line.6626"></a>
-<span class="sourceLineNo">6627</span>      // when hasFilterRow returns true, filter.filterRow() will be called automatically inside<a name="line.6627"></a>
-<span class="sourceLineNo">6628</span>      // filterRowCells(List&lt;Cell&gt; kvs) so we skip that scenario here.<a name="line.6628"></a>
-<span class="sourceLineNo">6629</span>      return filter != null &amp;&amp; (!filter.hasFilterRow())<a name="line.6629"></a>
-<span class="sourceLineNo">6630</span>          &amp;&amp; filter.filterRow();<a name="line.6630"></a>
-<span class="sourceLineNo">6631</span>    }<a name="line.6631"></a>
-<span class="sourceLineNo">6632</span><a name="line.6632"></a>
-<span class="sourceLineNo">6633</span>    private boolean filterRowKey(Cell current) throws IOException {<a name="line.6633"></a>
-<span class="sourceLineNo">6634</span>      return filter != null &amp;&amp; filter.filterRowKey(current);<a name="line.6634"></a>
-<span class="sourceLineNo">6635</span>    }<a name="line.6635"></a>
-<span class="sourceLineNo">6636</span><a name="line.6636"></a>
-<span class="sourceLineNo">6637</span>    protected boolean nextRow(ScannerContext scannerContext, Cell curRowCell) throws IOException {<a name="line.6637"></a>
-<span class="sourceLineNo">6638</span>      assert this.joinedContinuationRow == null: "Trying to go to next row during joinedHeap read.";<a name="line.6638"></a>
-<span class="sourceLineNo">6639</span>      Cell next;<a name="line.6639"></a>
-<span class="sourceLineNo">6640</span>      while ((next = this.storeHeap.peek()) != null &amp;&amp;<a name="line.6640"></a>
-<span class="sourceLineNo">6641</span>             CellUtil.matchingRows(next, curRowCell)) {<a name="line.6641"></a>
-<span class="sourceLineNo">6642</span>        this.storeHeap.next(MOCKED_LIST);<a name="line.6642"></a>
-<span class="sourceLineNo">6643</span>      }<a name="line.6643"></a>
-<span class="sourceLineNo">6644</span>      resetFilters();<a name="line.6644"></a>
-<span class="sourceLineNo">6645</span><a name="line.6645"></a>
-<span class="sourceLineNo">6646</span>      // Calling the hook in CP which allows it to do a fast forward<a name="line.6646"></a>
-<span class="sourceLineNo">6647</span>      return this.region.getCoprocessorHost() == null<a name="line.6647"></a>
-<span class="sourceLineNo">6648</span>          || this.region.getCoprocessorHost()<a name="line.6648"></a>
-<span class="sourceLineNo">6649</span>              .postScannerFilterRow(this, curRowCell);<a name="line.6649"></a>
-<span class="sourceLineNo">6650</span>    }<a name="line.6650"></a>
-<span class="sourceLineNo">6651</span><a name="line.6651"></a>
-<span class="sourceLineNo">6652</span>    protected boolean shouldStop(Cell currentRowCell) {<a name="line.6652"></a>
-<span class="sourceLineNo">6653</span>      if (currentRowCell == null) {<a name="line.6653"></a>
-<span class="sourceLineNo">6654</span>        return true;<a name="line.6654"></a>
-<span class="sourceLineNo">6655</span>      }<a name="line.6655"></a>
-<span class="sourceLineNo">6656</span>      if (stopRow == null || Bytes.equals(stopRow, HConstants.EMPTY_END_ROW)) {<a name="line.6656"></a>
-<span class="sourceLineNo">6657</span>        return false;<a name="line.6657"></a>
-<span class="sourceLineNo">6658</span>      }<a name="line.6658"></a>
-<span class="sourceLineNo">6659</span>      int c = comparator.compareRows(currentRowCell, stopRow, 0, stopRow.length);<a name="line.6659"></a>
-<span class="sourceLineNo">6660</span>      return c &gt; 0 || (c == 0 &amp;&amp; !includeStopRow);<a name="line.6660"></a>
-<span class="sourceLineNo">6661</span>    }<a name="line.6661"></a>
-<span class="sourceLineNo">6662</span><a name="line.6662"></a>
-<span class="sourceLineNo">6663</span>    @Override<a name="line.6663"></a>
-<span class="sourceLineNo">6664</span>    public synchronized void close() {<a name="line.6664"></a>
-<span class="sourceLineNo">6665</span>      if (storeHeap != null) {<a name="line.6665"></a>
-<span class="sourceLineNo">6666</span>        storeHeap.close();<a name="line.6666"></a>
-<span class="sourceLineNo">6667</span>        storeHeap = null;<a name="line.6667"></a>
-<span class="sourceLineNo">6668</span>      }<a name="line.6668"></a>
-<span class="sourceLineNo">6669</span>      if (joinedHeap != null) {<a name="line.6669"></a>
-<span class="sourceLineNo">6670</span>        joinedHeap.close();<a name="line.6670"></a>
-<span class="sourceLineNo">6671</span>        joinedHeap = null;<a name="line.6671"></a>
-<span class="sourceLineNo">6672</span>      }<a name="line.6672"></a>
-<span class="sourceLineNo">6673</span>      // no need to synchronize here.<a name="line.6673"></a>
-<span class="sourceLineNo">6674</span>      scannerReadPoints.remove(this);<a name="line.6674"></a>
-<span class="sourceLineNo">6675</span>      this.filterClosed = true;<a name="line.6675"></a>
-<span class="sourceLineNo">6676</span>    }<a name="line.6676"></a>
-<span class="sourceLineNo">6677</span><a name="line.6677"></a>
-<span class="sourceLineNo">6678</span>    KeyValueHeap getStoreHeapForTesting() {<a name="line.6678"></a>
-<span class="sourceLineNo">6679</span>      return storeHeap;<a name="line.6679"></a>
-<span class="sourceLineNo">6680</span>    }<a name="line.6680"></a>
-<span class="sourceLineNo">6681</span><a name="line.6681"></a>
-<span class="sourceLineNo">6682</span>    @Override<a name="line.6682"></a>
-<span class="sourceLineNo">6683</span>    public synchronized boolean reseek(byte[] row) throws IOException {<a name="line.6683"></a>
-<span class="sourceLineNo">6684</span>      if (row == null) {<a name="line.6684"></a>
-<span class="sourceLineNo">6685</span>        throw new IllegalArgumentException("Row cannot be null.");<a name="line.6685"></a>
-<span class="sourceLineNo">6686</span>      }<a name="line.6686"></a>
-<span class="sourceLineNo">6687</span>      boolean result = false;<a name="line.6687"></a>
-<span class="sourceLineNo">6688</span>      startRegionOperation();<a name="line.6688"></a>
-<span class="sourceLineNo">6689</span>      Cell kv = PrivateCellUtil.createFirstOnRow(row, 0, (short) row.length);<a name="line.6689"></a>
-<span class="sourceLineNo">6690</span>      try {<a name="line.6690"></a>
-<span class="sourceLineNo">6691</span>        // use request seek to make use of the lazy seek option. See HBASE-5520<a name="line.6691"></a>
-<span class="sourceLineNo">6692</span>        result = this.storeHeap.requestSeek(kv, true, true);<a name="line.6692"></a>
-<span class="sourceLineNo">6693</span>        if (this.joinedHeap != null) {<a name="line.6693"></a>
-<span class="sourceLineNo">6694</span>          result = this.joinedHeap.requestSeek(kv, true, true) || result;<a name="line.6694"></a>
-<span class="sourceLineNo">6695</span>        }<a name="line.6695"></a>
-<span class="sourceLineNo">6696</span>      } finally {<a name="line.6696"></a>
-<span class="sourceLineNo">6697</span>        closeRegionOperation();<a name="line.6697"></a>
-<span class="sourceLineNo">6698</span>      }<a name="line.6698"></a>
-<span class="sourceLineNo">6699</span>      return result;<a name="line.6699"></a>
+<span class="sourceLineNo">6580</span>        // Finally, we are done with both joinedHeap and storeHeap.<a name="line.6580"></a>
+<span class="sourceLineNo">6581</span>        // Double check to prevent empty rows from appearing in result. It could be<a name="line.6581"></a>
+<span class="sourceLineNo">6582</span>        // the case when SingleColumnValueExcludeFilter is used.<a name="line.6582"></a>
+<span class="sourceLineNo">6583</span>        if (results.isEmpty()) {<a name="line.6583"></a>
+<span class="sourceLineNo">6584</span>          incrementCountOfRowsFilteredMetric(scannerContext);<a name="line.6584"></a>
+<span class="sourceLineNo">6585</span>          boolean moreRows = nextRow(scannerContext, current);<a name="line.6585"></a>
+<span class="sourceLineNo">6586</span>          if (!moreRows) {<a name="line.6586"></a>
+<span class="sourceLineNo">6587</span>            return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6587"></a>
+<span class="sourceLineNo">6588</span>          }<a name="line.6588"></a>
+<span class="sourceLineNo">6589</span>          if (!shouldStop) continue;<a name="line.6589"></a>
+<span class="sourceLineNo">6590</span>        }<a name="line.6590"></a>
+<span class="sourceLineNo">6591</span><a name="line.6591"></a>
+<span class="sourceLineNo">6592</span>        if (shouldStop) {<a name="line.6592"></a>
+<span class="sourceLineNo">6593</span>          return scannerContext.setScannerState(NextState.NO_MORE_VALUES).hasMoreValues();<a name="line.6593"></a>
+<span class="sourceLineNo">6594</span>        } else {<a name="line.6594"></a>
+<span class="sourceLineNo">6595</span>          return scannerContext.setScannerState(NextState.MORE_VALUES).hasMoreValues();<a name="line.6595"></a>
+<span class="sourceLineNo">6596</span>        }<a name="line.6596"></a>
+<span class="sourceLineNo">6597</span>      }<a name="line.6597"></a>
+<span class="sourceLineNo">6598</span>    }<a name="line.6598"></a>
+<span class="sourceLineNo">6599</span><a name="line.6599"></a>
+<span class="sourceLineNo">6600</span>    protected void incrementCountOfRowsFilteredMetric(ScannerContext scannerContext) {<a name="line.6600"></a>
+<span class="sourceLineNo">6601</span>      filteredReadRequestsCount.increment();<a name="line.6601"></a>
+<span class="sourceLineNo">6602</span><a name="line.6602"></a>
+<span class="sourceLineNo">6603</span>      if (scannerContext == null || !scannerContext.isTrackingMetrics()) return;<a name="line.6603"></a>
+<span class="sourceLineNo">6604</span><a name="line.6604"></a>
+<span class="sourceLineNo">6605</span>      scannerContext.getMetrics().countOfRowsFiltered.incrementAndGet();<a name="line.6605"></a>
+<span class="sourceLineNo">6606</span>    }<a name="line.6606"></a>
+<span class="sourceLineNo">6607</span><a name="line.6607"></a>
+<span class="sourceLineNo">6608</span>    protected void incrementCountOfRowsScannedMetric(ScannerContext scannerContext) {<a name="line.6608"></a>
+<span class="sourceLineNo">6609</span>      if (scannerContext == null || !scannerContext.isTrackingMetrics()) return;<a name="line.6609"></a>
+<span class="sourceLineNo">6610</span><a name="line.6610"></a>
+<span class="sourceLineNo">6611</span>      scannerContext.getMetrics().countOfRowsScanned.incrementAndGet();<a name="line.6611"></a>
+<span class="sourceLineNo">6612</span>    }<a name="line.6612"></a>
+<span class="sourceLineNo">6613</span><a name="line.6613"></a>
+<span class="sourceLineNo">6614</span>    /**<a name="line.6614"></a>
+<span class="sourceLineNo">6615</span>     * @param currentRowCell<a name="line.6615"></a>
+<span class="sourceLineNo">6616</span>     * @return true when the joined heap may have data for the current row<a name="line.6616"></a>
+<span class="sourceLineNo">6617</span>     * @throws IOException<a name="line.6617"></a>
+<span class="sourceLineNo">6618</span>     */<a name="line.6618"></a>
+<span class="sourceLineNo">6619</span>    private boolean joinedHeapMayHaveData(Cell currentRowCell)<a name="line.6619"></a>
+<span class="sourceLineNo">6620</span>        throws IOException {<a name="line.6620"></a>
+<span class="sourceLineNo">6621</span>      Cell nextJoinedKv = joinedHeap.peek();<a name="line.6621"></a>
+<span class="sourceLineNo">6622</span>      boolean matchCurrentRow =<a name="line.6622"></a>
+<span class="sourceLineNo">6623</span>          nextJoinedKv != null &amp;&amp; CellUtil.matchingRows(nextJoinedKv, currentRowCell);<a name="line.6623"></a>
+<span class="sourceLineNo">6624</span>      boolean matchAfterSeek = false;<a name="line.6624"></a>
+<span class="sourceLineNo">6625</span><a name="line.6625"></a>
+<span class="sourceLineNo">6626</span>      // If the next value in the joined heap does not match the current row, try to seek to the<a name="line.6626"></a>
+<span class="sourceLineNo">6627</span>      // correct row<a name="line.6627"></a>
+<span class="sourceLineNo">6628</span>      if (!matchCurrentRow) {<a name="line.6628"></a>
+<span class="sourceLineNo">6629</span>        Cell firstOnCurrentRow = PrivateCellUtil.createFirstOnRow(currentRowCell);<a name="line.6629"></a>
+<span class="sourceLineNo">6630</span>        boolean seekSuccessful = this.joinedHeap.requestSeek(firstOnCurrentRow, true, true);<a name="line.6630"></a>
+<span class="sourceLineNo">6631</span>        matchAfterSeek =<a name="line.6631"></a>
+<span class="sourceLineNo">6632</span>            seekSuccessful &amp;&amp; joinedHeap.peek() != null<a name="line.6632"></a>
+<span class="sourceLineNo">6633</span>                &amp;&amp; CellUtil.matchingRows(joinedHeap.peek(), currentRowCell);<a name="line.6633"></a>
+<span class="sourceLineNo">6634</span>      }<a name="line.6634"></a>
+<span class="sourceLineNo">6635</span><a name="line.6635"></a>
+<span class="sourceLineNo">6636</span>      return matchCurrentRow || matchAfterSeek;<a name="line.6636"></a>
+<span class="sourceLineNo">6637</span>    }<a name="line.6637"></a>
+<span class="sourceLineNo">6638</span><a name="line.6638"></a>
+<span class="sourceLineNo">6639</span>    /**<a name="line.6639"></a>
+<span class="sourceLineNo">6640</span>     * This function is to maintain backward compatibility for 0.94 filters. HBASE-6429 combines<a name="line.6640"></a>
+<span class="sourceLineNo">6641</span>     * both filterRow &amp; filterRow({@code List&lt;KeyValue&gt; kvs}) functions. While 0.94 code or older,<a name="line.6641"></a>
+<span class="sourceLineNo">6642</span>     * it may not implement hasFilterRow as HBase-6429 expects because 0.94 hasFilterRow() only<a name="line.6642"></a>
+<span class="sourceLineNo">6643</span>     * returns true when filterRow({@code List&lt;KeyValue&gt; kvs}) is overridden not the filterRow().<a name="line.6643"></a>
+<span class="sourceLineNo">6644</span>     * Therefore, the filterRow() will be skipped.<a name="line.6644"></a>
+<span class="sourceLineNo">6645</span>     */<a name="line.6645"></a>
+<span class="sourceLineNo">6646</span>    private boolean filterRow() throws IOException {<a name="line.6646"></a>
+<span class="sourceLineNo">6647</span>      // when hasFilterRow returns true, filter.filterRow() will be called automatically inside<a name="line.6647"></a>
+<span class="sourceLineNo">6648</span>      // filterRowCells(List&lt;Cell&gt; kvs) so we skip that scenario here.<a name="line.6648"></a>
+<span class="sourceLineNo">6649</span>      return filter != null &amp;&amp; (!filter.hasFilterRow())<a name="line.6649"></a>
+<span class="sourceLineNo">6650</span>          &amp;&amp; filter.filterRow();<a name="line.6650"></a>
+<span class="sourceLineNo">6651</span>    }<a name="line.6651"></a>
+<span class="sourceLineNo">6652</span><a name="line.6652"></a>
+<span class="sourceLineNo">6653</span>    private boolean filterRowKey(Cell current) throws IOException {<a name="line.6653"></a>
+<span class="sourceLineNo">6654</span>      return filter != null &amp;&amp; filter.filterRowKey(current);<a name="line.6654"></a>
+<span class="sourceLineNo">6655</span>    }<a name="line.6655"></a>
+<span class="sourceLineNo">6656</span><a name="line.6656"></a>
+<span class="sourceLineNo">6657</span>    protected boolean nextRow(ScannerContext scannerContext, Cell curRowCell) throws IOException {<a name="line.6657"></a>
+<span class="sourceLineNo">6658</span>      assert this.joinedContinuationRow == null: "Trying to go to next row during joinedHeap read.";<a name="line.6658"></a>
+<span class="sourceLineNo">6659</span>      Cell next;<a name="line.6659"></a>
+<span class="sourceLineNo">6660</span>      while ((next = this.storeHeap.peek()) != null &amp;&amp;<a name="line.6660"></a>
+<span class="sourceLineNo">6661</span>             CellUtil.matchingRows(next, curRowCell)) {<a name="line.6661"></a>
+<span class="sourceLineNo">6662</span>        this.storeHeap.next(MOCKED_LIST);<a name="line.6662"></a>
+<span class="sourceLineNo">6663</span>      }<a name="line.6663"></a>
+<span class="sourceLineNo">6664</span>      resetFilters();<a name="line.6664"></a>
+<span class="sourceLineNo">6665</span><a name="line.6665"></a>
+<span class="sourceLineNo">6666</span>      // Calling the hook in CP which allows it to do a fast forward<a name="line.6666"></a>
+<span class="sourceLineNo">6667</span>      return this.region.getCoprocessorHost() == null<a name="line.6667"></a>
+<span class="sourceLineNo">6668</span>          || this.region.getCoprocessorHost()<a name="line.6668"></a>
+<span class="sourceLineNo">6669</span>              .postScannerFilterRow(this, curRowCell);<a name="line.6669"></a>
+<span class="sourceLineNo">6670</span>    }<a name="line.6670"></a>
+<span class="sourceLineNo">6671</span><a name="line.6671"></a>
+<span class="sourceLineNo">6672</span>    protected boolean shouldStop(Cell currentRowCell) {<a name="line.6672"></a>
+<span class="sourceLineNo">6673</span>      if (currentRowCell == null) {<a name="line.6673"></a>
+<span class="sourceLineNo">6674</span>        return true;<a name="line.6674"></a>
+<span class="sourceLineNo">6675</span>      }<a name="line.6675"></a>
+<span class="sourceLineNo">6676</span>      if (stopRow == null || Bytes.equals(stopRow, HConstants.EMPTY_END_ROW)) {<a name="line.6676"></a>
+<span class="sourceLineNo">6677</span>        return false;<a name="line.6677"></a>
+<span class="sourceLineNo">6678</span>      }<a name="line.6678"></a>
+<span class="sourceLineNo">6679</span>      int c = comparator.compareRows(currentRowCell, stopRow, 0, stopRow.length);<a name="line.6679"></a>
+<span class="sourceLineNo">6680</span>      return c &gt; 0 || (c == 0 &amp;&amp; !includeStopRow);<a name="line.6680"></a>
+<span class="sourceLineNo">6681</span>    }<a name="line.6681"></a>
+<span class="sourceLineNo">6682</span><a name="line.6682"></a>
+<span class="sourceLineNo">6683</span>    @Override<a name="line.6683"></a>
+<span class="sourceLineNo">6684</span>    public synchronized void close() {<a name="line.6684"></a>
+<span class="sourceLineNo">6685</span>      if (storeHeap != null) {<a name="line.6685"></a>
+<span class="sourceLineNo">6686</span>        storeHeap.close();<a name="line.6686"></a>
+<span class="sourceLineNo">6687</span>        storeHeap = null;<a name="line.6687"></a>
+<span class="sourceLineNo">6688</span>      }<a name="line.6688"></a>
+<span class="sourceLineNo">6689</span>      if (joinedHeap != null) {<a name="line.6689"></a>
+<span class="sourceLineNo">6690</span>        joinedHeap.close();<a name="line.6690"></a>
+<span class="sourceLineNo">6691</span>        joinedHeap = null;<a name="line.6691"></a>
+<span class="sourceLineNo">6692</span>      }<a name="line.6692"></a>
+<span class="sourceLineNo">6693</span>      // no need to synchronize here.<a name="line.6693"></a>
+<span class="sourceLineNo">6694</span>      scannerReadPoints.remove(this);<a name="line.6694"></a>
+<span class="sourceLineNo">6695</span>      this.filterClosed = true;<a name="line.6695"></a>
+<span class="sourceLineNo">6696</span>    }<a name="line.6696"></a>
+<span class="sourceLineNo">6697</span><a name="line.6697"></a>
+<span class="sourceLineNo">6698</span>    KeyValueHeap getStoreHeapForTesting() {<a name="line.6698"></a>
+<span class="sourceLineNo">6699</span>      return storeHeap;<a name="line.6699"></a>
 <span class="sourceLineNo">6700</span>    }<a name="line.6700"></a>
 <span class="sourceLineNo">6701</span><a name="line.6701"></a>
 <span class="sourceLineNo">6702</span>    @Override<a name="line.6702"></a>
-<span class="sourceLineNo">6703</span>    public void shipped() throws IOException {<a name="line.6703"></a>
-<span class="sourceLineNo">6704</span>      if (storeHeap != null) {<a name="line.6704"></a>
-<span class="sourceLineNo">6705</span>        storeHeap.shipped();<a name="line.6705"></a>
+<span class="sourceLineNo">6703</span>    public synchronized boolean reseek(byte[] row) throws IOException {<a name="line.6703"></a>
+<span class="sourceLineNo">6704</span>      if (row == null) {<a name="line.6704"></a>
+<span class="sourceLineNo">6705</span>        throw new IllegalArgumentException("Row cannot be null.");<a name="line.6705"></a>
 <span class="sourceLineNo">6706</span>      }<a name="line.6706"></a>
-<span class="sourceLineNo">6707</span>      if (joinedHeap != null) {<a name="line.6707"></a>
-<span class="sourceLineNo">6708</span>        joinedHeap.shipped();<a name="line.6708"></a>
-<span class="sourceLineNo">6709</span>      }<a name="line.6709"></a>
-<span class="sourceLineNo">6710</span>    }<a name="line.6710"></a>
-<span class="sourceLineNo">6711</span><a name="line.6711"></a>
-<span class="sourceLineNo">6712</span>    @Override<a name="line.6712"></a>
-<span class="sourceLineNo">6713</span>    public void run() throws IOException {<a name="line.6713"></a>
-<span class="sourceLineNo">6714</span>      // This is the RPC callback method executed. We do the close in of the scanner in this<a name="line.6714"></a>
-<span class="sourceLineNo">6715</span>      // callback<a name="line.6715"></a>
-<span class="sourceLineNo">6716</span>      this.close();<a name="line.6716"></a>
-<span class="sourceLineNo">6717</span>    }<a name="line.6717"></a>
-<span class="sourceLineNo">6718</span>  }<a name="line.6718"></a>
-<span class="sourceLineNo">6719</span><a name="line.6719"></a>
-<span class="sourceLineNo">6720</span>  // Utility methods<a name="line.6720"></a>
-<span class="sourceLineNo">6721</span>  /**<a name="line.6721"></a>
-<span class="sourceLineNo">6722</span>   * A utility method to create new instances of HRegion based on the<a name="line.6722"></a>
-<span class="sourceLineNo">6723</span>   * {@link HConstants#REGION_IMPL} configuration property.<a name="line.6723"></a>
-<span class="sourceLineNo">6724</span>   * @param tableDir qualified path of directory where region should be located,<a name="line.6724"></a>
-<span class="sourceLineNo">6725</span>   * usually the table directory.<a name="line.6725"></a>
-<span class="sourceLineNo">6726</span>   * @param wal The WAL is the outbound log for any updates to the HRegion<a name="line.6726"></a>
-<span class="sourceLineNo">6727</span>   * The wal file is a logfile from the previous execution that's<a name="line.6727"></a>
-<span class="sourceLineNo">6728</span>   * custom-computed for this HRegion. The HRegionServer computes and sorts the<a name="line.6728"></a>
-<span class="sourceLineNo">6729</span>   * appropriate wal info for this HRegion. If there is a previous file<a name="line.6729"></a>
-<span class="sourceLineNo">6730</span>   * (implying that the HRegion has been written-to before), then read it from<a name="line.6730"></a>
-<span class="sourceLineNo">6731</span>   * the supplied path.<a name="line.6731"></a>
-<span class="sourceLineNo">6732</span>   * @param fs is the filesystem.<a name="line.6732"></a>
-<span class="sourceLineNo">6733</span>   * @param conf is global configuration settings.<a name="line.6733"></a>
-<span class="sourceLineNo">6734</span>   * @param regionInfo - RegionInfo that describes the region<a name="line.6734"></a>
-<span class="sourceLineNo">6735</span>   * is new), then read them from the supplied path.<a name="line.6735"></a>
-<span class="sourceLineNo">6736</span>   * @param htd the table descriptor<a name="line.6736"></a>
-<span class="sourceLineNo">6737</span>   * @return the new instance<a name="line.6737"></a>
-<span class="sourceLineNo">6738</span>   */<a name="line.6738"></a>
-<span class="sourceLineNo">6739</span>  static HRegion newHRegion(Path tableDir, WAL wal, FileSystem fs,<a name="line.6739"></a>
-<span class="sourceLineNo">6740</span>      Configuration conf, RegionInfo regionInfo, final TableDescriptor htd,<a name="line.6740"></a>
-<span class="sourceLineNo">6741</span>      RegionServerServices rsServices) {<a name="line.6741"></a>
-<span class="sourceLineNo">6742</span>    try {<a name="line.6742"></a>
-<span class="sourceLineNo">6743</span>      @SuppressWarnings("unchecked")<a name="line.6743"></a>
-<span class="sourceLineNo">6744</span>      Class&lt;? extends HRegion&gt; regionClass =<a name="line.6744"></a>
-<span class="sourceLineNo">6745</span>          (Class&lt;? extends HRegion&gt;) conf.getClass(HConstants.REGION_IMPL, HRegion.class);<a name="line.6745"></a>
-<span class="sourceLineNo">6746</span><a name="line.6746"></a>
-<span class="sourceLineNo">6747</span>      Constructor&lt;? extends HRegion&gt; c =<a name="line.6747"></a>
-<span class="sourceLineNo">6748</span>          regionClass.getConstructor(Path.class, WAL.class, FileSystem.class,<a name="line.6748"></a>
-<span class="sourceLineNo">6749</span>              Configuration.class, RegionInfo.class, TableDescriptor.class,<a name="line.6749"></a>
-<span class="sourceLineNo">6750</span>              RegionServerServices.class);<a name="line.6750"></a>
-<span class="sourceLineNo">6751</span><a name="line.6751"></a>
-<span class="sourceLineNo">6752</span>      return c.newInstance(tableDir, wal, fs, conf, regionInfo, htd, rsServices);<a name="line.6752"></a>
-<span class="sourceLineNo">6753</span>    } catch (Throwable e) {<a name="line.6753"></a>
-<span class="sourceLineNo">6754</span>      // todo: what should I throw here?<a name="line.6754"></a>
-<span class="sourceLineNo">6755</span>      throw new IllegalStateException("Could not instantiate a region instance.", e);<a name="line.6755"></a>
-<span class="sourceLineNo">6756</span>    }<a name="line.6756"></a>
-<span class="sourceLineNo">6757</span>  }<a name="line.6757"></a>
-<span class="sourceLineNo">6758</span><a name="line.6758"></a>
-<span class="sourceLineNo">6759</span>  /**<a name="line.6759"></a>
-<span class="sourceLineNo">6760</span>   * Convenience method creating new HRegions. Used by createTable.<a name="line.6760"></a>
-<span class="sourceLineNo">6761</span>   *<a name="line.6761"></a>
-<span class="sourceLineNo">6762</span>   * @param info Info for region to create.<a name="line.6762"></a>
-<span class="sourceLineNo">6763</span>   * @param rootDir Root directory for HBase instance<a name="line.6763"></a>
-<span class="sourceLineNo">6764</span>   * @param wal shared WAL<a name="line.6764"></a>
-<span class="sourceLineNo">6765</span>   * @param initialize - true to initialize the region<a name="line.6765"></a>
-<span class="sourceLineNo">6766</span>   * @return new HRegion<a name="line.6766"></a>
-<span class="sourceLineNo">6767</span>   * @throws IOException<a name="line.6767"></a>
-<span class="sourceLineNo">6768</span>   */<a name="line.6768"></a>
-<span class="sourceLineNo">6769</span>  public static HRegion createHRegion(final RegionInfo info, final Path rootDir,<a name="line.6769"></a>
-<span class="sourceLineNo">6770</span>        final Configuration conf, final TableDescriptor hTableDescriptor,<a name="line.6770"></a>
-<span class="sourceLineNo">6771</span>        final WAL wal, final boolean initialize)<a name="line.6771"></a>
-<span class="sourceLineNo">6772</span>  throws IOException {<a name="line.6772"></a>
-<span class="sourceLineNo">6773</span>    LOG.info("creating HRegion " + info.getTable().getNameAsString()<a name="line.6773"></a>
-<span class="sourceLineNo">6774</span>        + " HTD == " + hTableDescriptor + " RootDir = " + rootDir +<a name="line.6774"></a>
-<span class="sourceLineNo">6775</span>        " Table name == " + info.getTable().getNameAsString());<a name="line.6775"></a>
-<span class="sourceLineNo">6776</span>    FileSystem fs = FileSystem.get(conf);<a name="line.6776"></a>
-<span class="sourceLineNo">6777</span>    Path tableDir = FSUtils.getTableDir(rootDir, info.getTable());<a name="line.6777"></a>
-<span class="sourceLineNo">6778</span>    HRegionFileSystem.createRegionOnFileSystem(conf, fs, tableDir, info);<a name="line.6778"></a>
-<span class="sourceLineNo">6779</span>    HRegion region = HRegion.newHRegion(tableDir, wal, fs, conf, info, hTableDescriptor, null);<a name="line.6779"></a>
-<span class="sourceLineNo">6780</span>    if (initialize) region.initialize(null);<a name="line.6780"></a>
-<span class="sourceLineNo">6781</span>    return region;<a name="line.6781"></a>
-<span class="sourceLineNo">6782</span>  }<a name="line.6782"></a>
-<span class="sourceLineNo">6783</span><a name="line.6783"></a>
-<span class="sourceLineNo">6784</span>  public static HRegion createHRegion(final RegionInfo info, final Path rootDir,<a name="line.6784"></a>
-<span class="sourceLineNo">6785</span>                                      final Configuration conf,<a name="line.6785"></a>
-<span class="sourceLineNo">6786</span>                                      final TableDescriptor hTableDescriptor,<a name="line.6786"></a>
-<span class="sourceLineNo">6787</span>                                      final WAL wal)<a name="line.6787"></a>
-<span class="sourceLineNo">6788</span>    throws IOException {<a name="line.6788"></a>
-<span class="sourceLineNo">6789</span>    return createHRegion(info, rootDir, conf, hTableDescriptor, wal, true);<a name="line.6789"></a>
-<span class="sourceLineNo">6790</span>  }<a name="line.6790"></a>
-<span class="sourceLineNo">6791</span><a name="line.6791"></a>
-<span class="sourceLineNo">6792</span><a name="line.6792"></a>
-<span class="sourceLineNo">6793</span>  /**<a name="line.6793"></a>
-<span class="sourceLineNo">6794</span>   * Open a Region.<a name="line.6794"></a>
-<span class="sourceLineNo">6795</span>   * @param info Info for region to be opened.<a name="line.6795"></a>
-<span class="sourceLineNo">6796</span>   * @param wal WAL for region to use. This method will call<a name="line.6796"></a>
-<span class="sourceLineNo">6797</span>   * WAL#setSequenceNumber(long) passing the result of the call to<a name="line.6797"></a>
-<span class="sourceLineNo">6798</span>   * HRegion#getMinSequenceId() to ensure the wal id is properly kept<a name="line.6798"></a>
-<span class="sourceLineNo">6799</span>   * up.  HRegionStore does this every time it opens a new region.<a name="line.6799"></a>
-<span class="sourceLineNo">6800</span>   * @return new HRegion<a name="line.6800"></a>
-<span class="sourceLineNo">6801</span>   *<a name="line.6801"></a>
-<span class="sourceLineNo">6802</span>   * @throws IOException<a name="line.6802"></a>
-<span class="sourceLineNo">6803</span>   */<a name="line.6803"></a>
-<span class="sourceLineNo">6804</span>  public static HRegion openHRegion(final RegionInfo info,<a name="line.6804"></a>
-<span class="sourceLineNo">6805</span>      final TableDescriptor htd, final WAL wal,<a name="line.6805"></a>
-<span class="sourceLineNo">6806</span>      final Configuration conf)<a name="line.6806"></a>
-<span class="sourceLineNo">6807</span>  throws IOException {<a name="line.6807"></a>
-<span class="sourceLineNo">6808</span>    return openHRegion(info, htd, wal, conf, null, null);<a name="line.6808"></a>
-<span class="sourceLineNo">6809</span>  }<a name="line.6809"></a>
-<span class="sourceLineNo">6810</span><a name="line.6810"></a>
-<span class="sourceLineNo">6811</span>  /**<a name="line.6811"></a>
-<span class="sourceLineNo">6812</span>   * Open a Region.<a name="line.6812"></a>
-<span class="sourceLineNo">6813</span>   * @param info Info for region to be opened<a name="line.6813"></a>
-<span class="sourceLineNo">6814</span>   * @param htd the table descriptor<a name="line.6814"></a>
-<span class="sourceLineNo">6815</span>   * @param wal WAL for region to use. This method will call<a name="line.6815"></a>
-<span class="sourceLineNo">6816</span>   * WAL#setSequenceNumber(long) passing the result of the call to<a name="line.6816"></a>
-<span class="sourceLineNo">6817</span>   * HRegion#getMinSequenceId() to ensure the wal id is properly kept<a name="line.6817"></a>
-<span class="sourceLineNo">6818</span>   * up.  HRegionStore does this every time it opens a new region.<a name="line.6818"></a>
-<span class="sourceLineNo">6819</span>   * @param conf The Configuration object to use.<a name="line.6819"></a>
-<span class="sourceLineNo">6820</span>   * @param rsServices An interface we can request flushes against.<a name="line.6820"></a>
-<span class="sourceLineNo">6821</span>   * @param reporter An interface we can report progress against.<a name="line.6821"></a>
-<span class="sourceLineNo">6822</span>   * @return new HRegion<a name="line.6822"></a>
-<span class="sourceLineNo">6823</span>   *<a name="line.6823"></a>
-<span class="sourceLineNo">6824</span>   * @throws IOException<a name="line.6824"></a>
-<span class="sourceLineNo">6825</span>   */<a name="line.6825"></a>
-<span class="sourceLineNo">6826</span>  public static HRegion openHRegion(final RegionInfo info,<a name="line.6826"></a>
-<span class="sourceLineNo">6827</span>    final TableDescriptor htd, final WAL wal, final Configuration conf,<a name="line.6827"></a>
-<span class="sourceLineNo">6828</span>    final RegionServerServices rsServices,<a name="line.6828"></a>
-<span class="sourceLineNo">6829</span>    final CancelableProgressable reporter)<a name="line.6829"></a>
-<span class="sourceLineNo">6830</span>  throws IOException {<a name="line.6830"></a>
-<span class="sourceLineNo">6831</span>    return openHRegion(FSUtils.getRootDir(conf), info, htd, wal, conf, rsServices, reporter);<a name="line.6831"></a>
-<span class="sourceLineNo">6832</span>  }<a name="line.6832"></a>
-<span class="sourceLineNo">6833</span><a name="line.6833"></a>
-<span class="sourceLineNo">6834</span>  /**<a name="line.6834"></a>
-<span class="sourceLineNo">6835</span>   * Open a Region.<a name="line.6835"></a>
-<span class="sourceLineNo">6836</span>   * @param rootDir Root directory for HBase instance<a name="line.6836"></a>
-<span class="sourceLineNo">6837</span>   * @param info Info for region to be opened.<a name="line.6837"></a>
-<span class="sourceLineNo">6838</span>   * @param htd the table descriptor<a name="line.6838"></a>
-<span class="sourceLineNo">6839</span>   * @param wal WAL for region to use. This method will call<a name="line.6839"></a>
-<span class="sourceLineNo">6840</span>   * WAL#setSequenceNumber(long) passing the result of the call to<a name="line.6840"></a>
-<span class="sourceLineNo">6841</span>   * HRegion#getMinSequenceId() to ensure the wal id is properly kept<a name="line.6841"></a>
-<span class="sourceLineNo">6842</span>   * up.  HRegionStore does this every time it opens a new region.<a name="line.6842"></a>
-<span class="sourceLineNo">6843</span>   * @param conf The Configuration object to use.<a name="line.6843"></a>
-<span class="sourceLineNo">6844</span>   * @return new HRegion<a name="line.6844"></a>
-<span class="sourceLineNo">6845</span>   * @throws IOException<a name="line.6845"></a>
-<span class="sourceLineNo">6846</span>   */<a name="line.6846"></a>
-<span class="sourceLineNo">6847</span>  public static HRegion openHRegion(Path rootDir, final RegionInfo info,<a name="line.6847"></a>
-<span class="sourceLineNo">6848</span>      final TableDescriptor htd, final WAL wal, final Configuration conf)<a name="line.6848"></a>
-<span class="sourceLineNo">6849</span>  throws IOException {<a name="line.6849"></a>
-<span class="sourceLineNo">6850</span>    return openHRegion(rootDir, info, htd, wal, conf, null, null);<a name="line.6850"></a>
-<span class="sourceLineNo">6851</span>  }<a name="line.6851"></a>
-<span class="sourceLineNo">6852</span><a name="line.6852"></a>
-<span class="sourceLineNo">6853</span>  /**<a name="line.6853"></a>
-<span class="sourceLineNo">6854</span>   * Open a Region.<a name="line.6854"></a>
-<span class="sourceLineNo">6855</span>   * @param rootDir Root directory for HBase instance<a name="line.6855"></a>
-<span class="sourceLineNo">6856</span>   * @param info Info for region to be opened.<a name="line.6856"></a>
-<span class="sourceLineNo">6857</span>   * @param htd the table descriptor<a name="line.6857"></a>
-<span class="sourceLineNo">6858</span>   * @param wal WAL for region to use. This method will call<a name="line.6858"></a>
-<span class="sourceLineNo">6859</span>   * WAL#setSequenceNumber(long) passing the result of the call to<a name="line.6859"></a>
-<span class="sourceLineNo">6860</span>   * HRegion#getMinSequenceId() to ensure the wal id is properly kept<a name="line.6860"></a>
-<span class="sourceLineNo">6861</span>   * up.  HRegionStore does this every time it opens a new region.<a name="line.6861"></a>
-<span class="sourceLineNo">6862</span>   * @param conf The Configuration object to use.<a name="line.6862"></a>
-<span class="sourceLineNo">6863</span>   * @param rsServices An interface we can request flushes against.<a name="line.6863"></a>
-<span class="sourceLineNo">6864</span>   * @param reporter An interface we can report progress against.<a name="line.6864"></a>
-<span class="sourceLineNo">6865</span>   * @return new HRegion<a name="line.6865"></a>
-<span class="sourceLineNo">6866</span>   * @throws IOException<a name="line.6866"></a>
-<span class="sourceLineNo">6867</span>   */<a name="line.6867"></a>
-<span class="sourceLineNo">6868</span>  public static HRegion openHRegion(final Path rootDir, final RegionInfo info,<a name="line.6868"></a>
-<span class="sourceLineNo">6869</span>      final TableDescriptor htd, final WAL wal, final Configuration conf,<a name="line.6869"></a>
-<span class="sourceLineNo">6870</span>      final RegionServerServices rsServices,<a name="line.6870"></a>
-<span class="sourceLineNo">6871</span>      final CancelableProgressable reporter)<a name="line.6871"></a>
-<span class="sourceLineNo">6872</span>  throws IOException {<a name="line.6872"></a>
-<span class="sourceLineNo">6873</span>    FileSystem fs = null;<a name="line.6873"></a>
-<span class="sourceLineNo">6874</span>    if (rsServices != null) {<a name="line.6874"></a>
-<span class="sourceLineNo">6875</span>      fs = rsServices.getFileSystem();<a name="line.6875"></a>
-<span class="sourceLineNo">6876</span>    }<a name="line.6876"></a>
-<span class="sourceLineNo">6877</span>    if (fs == null) {<a name="line.6877"></a>
-<span class="sourceLineNo">6878</span>      fs = FileSystem.get(conf);<a name="line.6878"></a>
-<span class="sourceLineNo">6879</span>    }<a name="line.6879"></a>
-<span class="sourceLineNo">6880</span>    return openHRegion(conf, fs, rootDir, info, htd, wal, rsServices, reporter);<a name="line.6880"></a>
-<span class="sourceLineNo">6881</span>  }<a name="line.6881"></a>
-<span class="sourceLineNo">6882</span><a name="line.6882"></a>
-<span class="sourceLineNo">6883</span>  /**<a name="line.6883"></a>
-<span class="sourceLineNo">6884</span>   * Open a Region.<a name="line.6884"></a>
-<span class="sourceLineNo">6885</span>   * @param conf The Configuration object to use.<a name="line.6885"></a>
-<span class="sourceLineNo">6886</span>   * @param fs Filesystem to use<a name="line.6886"></a>
-<span class="sourceLineNo">6887</span>   * @param rootDir Root directory for HBase instance<a name="line.6887"></a>
-<span class="sourceLineNo">6888</span>   * @param info Info for region to be opened.<a name="line.6888"></a>
-<span class="sourceLineNo">6889</span>   * @param htd the table descriptor<a name="line.6889"></a>
-<span class="sourceLineNo">6890</span>   * @param wal WAL for region to use. This method will call<a name="line.6890"></a>
-<span class="sourceLineNo">6891</span>   * WAL#setSequenceNumber(long) passing the result of the call to<a name="line.6891"></a>
-<span class="sourceLineNo">6892</span>   * HRegion#getMinSequenceId() to ensure the wal id is properly kept<a name="line.6892"></a>
-<span class="sourceLineNo">6893</span>   * up.  HRegionStore does this every time it opens a new region.<a name="line.6893"></a>
-<span class="sourceLineNo">6894</span>   * @return new HRegion<a name="line.6894"></a>
-<span class="sourceLineNo">6895</span>   * @throws IOException<a name="line.6895"></a>
-<span class="sourceLineNo">6896</span>   */<a name="line.6896"></a>
-<span class="sourceLineNo">6897</span>  public static HRegion openHRegion(final Configuration conf, final FileSystem fs,<a name="line.6897"></a>
-<span class="sourceLineNo">6898</span>      final Path rootDir, final RegionInfo info, final TableDescriptor htd, final WAL wal)<a name="line.6898"></a>
-<span class="sourceLineNo">6899</span>      throws IOException {<a name="line.6899"></a>
-<span class="sourceLineNo">6900</span>    return openHRegion(conf, fs, rootDir, info, htd, wal, null, null);<a name="line.6900"></a>
+<span class="sourceLineNo">6707</span>      boolean result = false;<a name="line.6707"></a>
+<span class="sourceLineNo">6708</span>      startRegionOperation();<a name="line.6708"></a>
+<span class="sourceLineNo">6709</span>      Cell kv = PrivateCellUtil.createFirstOnRow(row, 0, (short) row.length);<a name="line.6709"></a>
+<span class="sourceLineNo">6710</span>      try {<a name="line.6710"></a>
+<span class="sourceLineNo">6711</span>        // use request seek to make use of the lazy seek option. See HBASE-5520<a name="line.6711"></a>
+<span class="sourceLineNo">6712</span>        result = this.storeHeap.requestSeek(kv, true, true);<a name="line.6712"></a>
+<span class="sourceLineNo">6713</span>        if (this.joinedHeap != null) {<a name="line.6713"></a>
+<span class="sourceLineNo">6714</span>          result = this.joinedHeap.requestSeek(kv, true, true) || result;<a name="line.6714"

<TRUNCATED>

Mime
View raw message