hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [09/51] [partial] hbase-site git commit: Published site at 82d554e3783372cc6b05489452c815b57c06f6cd.
Date Wed, 26 Jul 2017 15:07:56 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/21766f4a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/Compactor.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/Compactor.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/Compactor.html
index 908935e..d7cec98 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/Compactor.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/Compactor.html
@@ -308,228 +308,229 @@
 <span class="sourceLineNo">300</span>        return new ArrayList&lt;&gt;();<a name="line.300"></a>
 <span class="sourceLineNo">301</span>      }<a name="line.301"></a>
 <span class="sourceLineNo">302</span>      boolean cleanSeqId = false;<a name="line.302"></a>
-<span class="sourceLineNo">303</span>      if (fd.minSeqIdToKeep &gt; 0) {<a name="line.303"></a>
-<span class="sourceLineNo">304</span>        smallestReadPoint = Math.min(fd.minSeqIdToKeep, smallestReadPoint);<a name="line.304"></a>
-<span class="sourceLineNo">305</span>        cleanSeqId = true;<a name="line.305"></a>
-<span class="sourceLineNo">306</span>      }<a name="line.306"></a>
-<span class="sourceLineNo">307</span>      writer = sinkFactory.createWriter(scanner, fd, dropCache);<a name="line.307"></a>
-<span class="sourceLineNo">308</span>      finished = performCompaction(fd, scanner, writer, smallestReadPoint, cleanSeqId,<a name="line.308"></a>
-<span class="sourceLineNo">309</span>        throughputController, request.isAllFiles(), request.getFiles().size());<a name="line.309"></a>
-<span class="sourceLineNo">310</span>      if (!finished) {<a name="line.310"></a>
-<span class="sourceLineNo">311</span>        throw new InterruptedIOException("Aborting compaction of store " + store + " in region "<a name="line.311"></a>
-<span class="sourceLineNo">312</span>            + store.getRegionInfo().getRegionNameAsString() + " because it was interrupted.");<a name="line.312"></a>
-<span class="sourceLineNo">313</span>      }<a name="line.313"></a>
-<span class="sourceLineNo">314</span>    } finally {<a name="line.314"></a>
-<span class="sourceLineNo">315</span>      Closeables.close(scanner, true);<a name="line.315"></a>
-<span class="sourceLineNo">316</span>      if (!finished &amp;&amp; writer != null) {<a name="line.316"></a>
-<span class="sourceLineNo">317</span>        abortWriter(writer);<a name="line.317"></a>
-<span class="sourceLineNo">318</span>      }<a name="line.318"></a>
-<span class="sourceLineNo">319</span>    }<a name="line.319"></a>
-<span class="sourceLineNo">320</span>    assert finished : "We should have exited the method on all error paths";<a name="line.320"></a>
-<span class="sourceLineNo">321</span>    assert writer != null : "Writer should be non-null if no error";<a name="line.321"></a>
-<span class="sourceLineNo">322</span>    return commitWriter(writer, fd, request);<a name="line.322"></a>
-<span class="sourceLineNo">323</span>  }<a name="line.323"></a>
-<span class="sourceLineNo">324</span><a name="line.324"></a>
-<span class="sourceLineNo">325</span>  protected abstract List&lt;Path&gt; commitWriter(T writer, FileDetails fd, CompactionRequest request)<a name="line.325"></a>
-<span class="sourceLineNo">326</span>      throws IOException;<a name="line.326"></a>
-<span class="sourceLineNo">327</span><a name="line.327"></a>
-<span class="sourceLineNo">328</span>  protected abstract void abortWriter(T writer) throws IOException;<a name="line.328"></a>
-<span class="sourceLineNo">329</span><a name="line.329"></a>
-<span class="sourceLineNo">330</span>  /**<a name="line.330"></a>
-<span class="sourceLineNo">331</span>   * Calls coprocessor, if any, to create compaction scanner - before normal scanner creation.<a name="line.331"></a>
-<span class="sourceLineNo">332</span>   * @param request Compaction request.<a name="line.332"></a>
-<span class="sourceLineNo">333</span>   * @param scanType Scan type.<a name="line.333"></a>
-<span class="sourceLineNo">334</span>   * @param earliestPutTs Earliest put ts.<a name="line.334"></a>
-<span class="sourceLineNo">335</span>   * @param scanners File scanners for compaction files.<a name="line.335"></a>
-<span class="sourceLineNo">336</span>   * @param user the User<a name="line.336"></a>
-<span class="sourceLineNo">337</span>   * @param readPoint the read point to help create scanner by Coprocessor if required.<a name="line.337"></a>
-<span class="sourceLineNo">338</span>   * @return Scanner override by coprocessor; null if not overriding.<a name="line.338"></a>
-<span class="sourceLineNo">339</span>   */<a name="line.339"></a>
-<span class="sourceLineNo">340</span>  protected InternalScanner preCreateCoprocScanner(final CompactionRequest request,<a name="line.340"></a>
-<span class="sourceLineNo">341</span>      final ScanType scanType, final long earliestPutTs, final List&lt;StoreFileScanner&gt; scanners,<a name="line.341"></a>
-<span class="sourceLineNo">342</span>      User user, final long readPoint) throws IOException {<a name="line.342"></a>
-<span class="sourceLineNo">343</span>    if (store.getCoprocessorHost() == null) {<a name="line.343"></a>
-<span class="sourceLineNo">344</span>      return null;<a name="line.344"></a>
-<span class="sourceLineNo">345</span>    }<a name="line.345"></a>
-<span class="sourceLineNo">346</span>    return store.getCoprocessorHost().preCompactScannerOpen(store, scanners, scanType,<a name="line.346"></a>
-<span class="sourceLineNo">347</span>        earliestPutTs, request, user, readPoint);<a name="line.347"></a>
-<span class="sourceLineNo">348</span>  }<a name="line.348"></a>
-<span class="sourceLineNo">349</span><a name="line.349"></a>
-<span class="sourceLineNo">350</span>  /**<a name="line.350"></a>
-<span class="sourceLineNo">351</span>   * Calls coprocessor, if any, to create scanners - after normal scanner creation.<a name="line.351"></a>
-<span class="sourceLineNo">352</span>   * @param request Compaction request.<a name="line.352"></a>
-<span class="sourceLineNo">353</span>   * @param scanType Scan type.<a name="line.353"></a>
-<span class="sourceLineNo">354</span>   * @param scanner The default scanner created for compaction.<a name="line.354"></a>
-<span class="sourceLineNo">355</span>   * @return Scanner scanner to use (usually the default); null if compaction should not proceed.<a name="line.355"></a>
-<span class="sourceLineNo">356</span>   */<a name="line.356"></a>
-<span class="sourceLineNo">357</span>  protected InternalScanner postCreateCoprocScanner(final CompactionRequest request,<a name="line.357"></a>
-<span class="sourceLineNo">358</span>      final ScanType scanType, final InternalScanner scanner, User user) throws IOException {<a name="line.358"></a>
-<span class="sourceLineNo">359</span>    if (store.getCoprocessorHost() == null) {<a name="line.359"></a>
-<span class="sourceLineNo">360</span>      return scanner;<a name="line.360"></a>
-<span class="sourceLineNo">361</span>    }<a name="line.361"></a>
-<span class="sourceLineNo">362</span>    return store.getCoprocessorHost().preCompact(store, scanner, scanType, request, user);<a name="line.362"></a>
-<span class="sourceLineNo">363</span>  }<a name="line.363"></a>
-<span class="sourceLineNo">364</span><a name="line.364"></a>
-<span class="sourceLineNo">365</span>  /**<a name="line.365"></a>
-<span class="sourceLineNo">366</span>   * Performs the compaction.<a name="line.366"></a>
-<span class="sourceLineNo">367</span>   * @param fd FileDetails of cell sink writer<a name="line.367"></a>
-<span class="sourceLineNo">368</span>   * @param scanner Where to read from.<a name="line.368"></a>
-<span class="sourceLineNo">369</span>   * @param writer Where to write to.<a name="line.369"></a>
-<span class="sourceLineNo">370</span>   * @param smallestReadPoint Smallest read point.<a name="line.370"></a>
-<span class="sourceLineNo">371</span>   * @param cleanSeqId When true, remove seqId(used to be mvcc) value which is &amp;lt;=<a name="line.371"></a>
-<span class="sourceLineNo">372</span>   *          smallestReadPoint<a name="line.372"></a>
-<span class="sourceLineNo">373</span>   * @param major Is a major compaction.<a name="line.373"></a>
-<span class="sourceLineNo">374</span>   * @param numofFilesToCompact the number of files to compact<a name="line.374"></a>
-<span class="sourceLineNo">375</span>   * @return Whether compaction ended; false if it was interrupted for some reason.<a name="line.375"></a>
-<span class="sourceLineNo">376</span>   */<a name="line.376"></a>
-<span class="sourceLineNo">377</span>  protected boolean performCompaction(FileDetails fd, InternalScanner scanner, CellSink writer,<a name="line.377"></a>
-<span class="sourceLineNo">378</span>      long smallestReadPoint, boolean cleanSeqId, ThroughputController throughputController,<a name="line.378"></a>
-<span class="sourceLineNo">379</span>      boolean major, int numofFilesToCompact) throws IOException {<a name="line.379"></a>
-<span class="sourceLineNo">380</span>    assert writer instanceof ShipperListener;<a name="line.380"></a>
-<span class="sourceLineNo">381</span>    long bytesWrittenProgressForCloseCheck = 0;<a name="line.381"></a>
-<span class="sourceLineNo">382</span>    long bytesWrittenProgressForLog = 0;<a name="line.382"></a>
-<span class="sourceLineNo">383</span>    long bytesWrittenProgressForShippedCall = 0;<a name="line.383"></a>
-<span class="sourceLineNo">384</span>    // Since scanner.next() can return 'false' but still be delivering data,<a name="line.384"></a>
-<span class="sourceLineNo">385</span>    // we have to use a do/while loop.<a name="line.385"></a>
-<span class="sourceLineNo">386</span>    List&lt;Cell&gt; cells = new ArrayList&lt;&gt;();<a name="line.386"></a>
-<span class="sourceLineNo">387</span>    long closeCheckSizeLimit = HStore.getCloseCheckInterval();<a name="line.387"></a>
-<span class="sourceLineNo">388</span>    long lastMillis = 0;<a name="line.388"></a>
-<span class="sourceLineNo">389</span>    if (LOG.isDebugEnabled()) {<a name="line.389"></a>
-<span class="sourceLineNo">390</span>      lastMillis = EnvironmentEdgeManager.currentTime();<a name="line.390"></a>
-<span class="sourceLineNo">391</span>    }<a name="line.391"></a>
-<span class="sourceLineNo">392</span>    String compactionName = ThroughputControlUtil.getNameForThrottling(store, "compaction");<a name="line.392"></a>
-<span class="sourceLineNo">393</span>    long now = 0;<a name="line.393"></a>
-<span class="sourceLineNo">394</span>    boolean hasMore;<a name="line.394"></a>
-<span class="sourceLineNo">395</span>    ScannerContext scannerContext =<a name="line.395"></a>
-<span class="sourceLineNo">396</span>        ScannerContext.newBuilder().setBatchLimit(compactionKVMax).build();<a name="line.396"></a>
-<span class="sourceLineNo">397</span><a name="line.397"></a>
-<span class="sourceLineNo">398</span>    throughputController.start(compactionName);<a name="line.398"></a>
-<span class="sourceLineNo">399</span>    KeyValueScanner kvs = (scanner instanceof KeyValueScanner)? (KeyValueScanner)scanner : null;<a name="line.399"></a>
-<span class="sourceLineNo">400</span>    long shippedCallSizeLimit = (long) numofFilesToCompact * this.store.getColumnFamilyDescriptor().getBlocksize();<a name="line.400"></a>
-<span class="sourceLineNo">401</span>    try {<a name="line.401"></a>
-<span class="sourceLineNo">402</span>      do {<a name="line.402"></a>
-<span class="sourceLineNo">403</span>        hasMore = scanner.next(cells, scannerContext);<a name="line.403"></a>
-<span class="sourceLineNo">404</span>        if (LOG.isDebugEnabled()) {<a name="line.404"></a>
-<span class="sourceLineNo">405</span>          now = EnvironmentEdgeManager.currentTime();<a name="line.405"></a>
-<span class="sourceLineNo">406</span>        }<a name="line.406"></a>
-<span class="sourceLineNo">407</span>        // output to writer:<a name="line.407"></a>
-<span class="sourceLineNo">408</span>        Cell lastCleanCell = null;<a name="line.408"></a>
-<span class="sourceLineNo">409</span>        long lastCleanCellSeqId = 0;<a name="line.409"></a>
-<span class="sourceLineNo">410</span>        for (Cell c : cells) {<a name="line.410"></a>
-<span class="sourceLineNo">411</span>          if (cleanSeqId &amp;&amp; c.getSequenceId() &lt;= smallestReadPoint) {<a name="line.411"></a>
-<span class="sourceLineNo">412</span>            lastCleanCell = c;<a name="line.412"></a>
-<span class="sourceLineNo">413</span>            lastCleanCellSeqId = c.getSequenceId();<a name="line.413"></a>
-<span class="sourceLineNo">414</span>            CellUtil.setSequenceId(c, 0);<a name="line.414"></a>
-<span class="sourceLineNo">415</span>          } else {<a name="line.415"></a>
-<span class="sourceLineNo">416</span>            lastCleanCell = null;<a name="line.416"></a>
-<span class="sourceLineNo">417</span>            lastCleanCellSeqId = 0;<a name="line.417"></a>
-<span class="sourceLineNo">418</span>          }<a name="line.418"></a>
-<span class="sourceLineNo">419</span>          writer.append(c);<a name="line.419"></a>
-<span class="sourceLineNo">420</span>          int len = KeyValueUtil.length(c);<a name="line.420"></a>
-<span class="sourceLineNo">421</span>          ++progress.currentCompactedKVs;<a name="line.421"></a>
-<span class="sourceLineNo">422</span>          progress.totalCompactedSize += len;<a name="line.422"></a>
-<span class="sourceLineNo">423</span>          bytesWrittenProgressForShippedCall += len;<a name="line.423"></a>
-<span class="sourceLineNo">424</span>          if (LOG.isDebugEnabled()) {<a name="line.424"></a>
-<span class="sourceLineNo">425</span>            bytesWrittenProgressForLog += len;<a name="line.425"></a>
-<span class="sourceLineNo">426</span>          }<a name="line.426"></a>
-<span class="sourceLineNo">427</span>          throughputController.control(compactionName, len);<a name="line.427"></a>
-<span class="sourceLineNo">428</span>          // check periodically to see if a system stop is requested<a name="line.428"></a>
-<span class="sourceLineNo">429</span>          if (closeCheckSizeLimit &gt; 0) {<a name="line.429"></a>
-<span class="sourceLineNo">430</span>            bytesWrittenProgressForCloseCheck += len;<a name="line.430"></a>
-<span class="sourceLineNo">431</span>            if (bytesWrittenProgressForCloseCheck &gt; closeCheckSizeLimit) {<a name="line.431"></a>
-<span class="sourceLineNo">432</span>              bytesWrittenProgressForCloseCheck = 0;<a name="line.432"></a>
-<span class="sourceLineNo">433</span>              if (!store.areWritesEnabled()) {<a name="line.433"></a>
-<span class="sourceLineNo">434</span>                progress.cancel();<a name="line.434"></a>
-<span class="sourceLineNo">435</span>                return false;<a name="line.435"></a>
-<span class="sourceLineNo">436</span>              }<a name="line.436"></a>
-<span class="sourceLineNo">437</span>            }<a name="line.437"></a>
-<span class="sourceLineNo">438</span>          }<a name="line.438"></a>
-<span class="sourceLineNo">439</span>          if (kvs != null &amp;&amp; bytesWrittenProgressForShippedCall &gt; shippedCallSizeLimit) {<a name="line.439"></a>
-<span class="sourceLineNo">440</span>            if (lastCleanCell != null) {<a name="line.440"></a>
-<span class="sourceLineNo">441</span>              // HBASE-16931, set back sequence id to avoid affecting scan order unexpectedly.<a name="line.441"></a>
-<span class="sourceLineNo">442</span>              // ShipperListener will do a clone of the last cells it refer, so need to set back<a name="line.442"></a>
-<span class="sourceLineNo">443</span>              // sequence id before ShipperListener.beforeShipped<a name="line.443"></a>
-<span class="sourceLineNo">444</span>              CellUtil.setSequenceId(lastCleanCell, lastCleanCellSeqId);<a name="line.444"></a>
-<span class="sourceLineNo">445</span>            }<a name="line.445"></a>
-<span class="sourceLineNo">446</span>            // Clone the cells that are in the writer so that they are freed of references,<a name="line.446"></a>
-<span class="sourceLineNo">447</span>            // if they are holding any.<a name="line.447"></a>
-<span class="sourceLineNo">448</span>            ((ShipperListener)writer).beforeShipped();<a name="line.448"></a>
-<span class="sourceLineNo">449</span>            // The SHARED block references, being read for compaction, will be kept in prevBlocks<a name="line.449"></a>
-<span class="sourceLineNo">450</span>            // list(See HFileScannerImpl#prevBlocks). In case of scan flow, after each set of cells<a name="line.450"></a>
-<span class="sourceLineNo">451</span>            // being returned to client, we will call shipped() which can clear this list. Here by<a name="line.451"></a>
-<span class="sourceLineNo">452</span>            // we are doing the similar thing. In between the compaction (after every N cells<a name="line.452"></a>
-<span class="sourceLineNo">453</span>            // written with collective size of 'shippedCallSizeLimit') we will call shipped which<a name="line.453"></a>
-<span class="sourceLineNo">454</span>            // may clear prevBlocks list.<a name="line.454"></a>
-<span class="sourceLineNo">455</span>            kvs.shipped();<a name="line.455"></a>
-<span class="sourceLineNo">456</span>            bytesWrittenProgressForShippedCall = 0;<a name="line.456"></a>
-<span class="sourceLineNo">457</span>          }<a name="line.457"></a>
-<span class="sourceLineNo">458</span>        }<a name="line.458"></a>
-<span class="sourceLineNo">459</span>        if (lastCleanCell != null) {<a name="line.459"></a>
-<span class="sourceLineNo">460</span>          // HBASE-16931, set back sequence id to avoid affecting scan order unexpectedly<a name="line.460"></a>
-<span class="sourceLineNo">461</span>          CellUtil.setSequenceId(lastCleanCell, lastCleanCellSeqId);<a name="line.461"></a>
-<span class="sourceLineNo">462</span>        }<a name="line.462"></a>
-<span class="sourceLineNo">463</span>        // Log the progress of long running compactions every minute if<a name="line.463"></a>
-<span class="sourceLineNo">464</span>        // logging at DEBUG level<a name="line.464"></a>
-<span class="sourceLineNo">465</span>        if (LOG.isDebugEnabled()) {<a name="line.465"></a>
-<span class="sourceLineNo">466</span>          if ((now - lastMillis) &gt;= COMPACTION_PROGRESS_LOG_INTERVAL) {<a name="line.466"></a>
-<span class="sourceLineNo">467</span>            LOG.debug("Compaction progress: "<a name="line.467"></a>
-<span class="sourceLineNo">468</span>                + compactionName<a name="line.468"></a>
-<span class="sourceLineNo">469</span>                + " "<a name="line.469"></a>
-<span class="sourceLineNo">470</span>                + progress<a name="line.470"></a>
-<span class="sourceLineNo">471</span>                + String.format(", rate=%.2f kB/sec", (bytesWrittenProgressForLog / 1024.0)<a name="line.471"></a>
-<span class="sourceLineNo">472</span>                    / ((now - lastMillis) / 1000.0)) + ", throughputController is "<a name="line.472"></a>
-<span class="sourceLineNo">473</span>                + throughputController);<a name="line.473"></a>
-<span class="sourceLineNo">474</span>            lastMillis = now;<a name="line.474"></a>
-<span class="sourceLineNo">475</span>            bytesWrittenProgressForLog = 0;<a name="line.475"></a>
-<span class="sourceLineNo">476</span>          }<a name="line.476"></a>
-<span class="sourceLineNo">477</span>        }<a name="line.477"></a>
-<span class="sourceLineNo">478</span>        cells.clear();<a name="line.478"></a>
-<span class="sourceLineNo">479</span>      } while (hasMore);<a name="line.479"></a>
-<span class="sourceLineNo">480</span>    } catch (InterruptedException e) {<a name="line.480"></a>
-<span class="sourceLineNo">481</span>      progress.cancel();<a name="line.481"></a>
-<span class="sourceLineNo">482</span>      throw new InterruptedIOException("Interrupted while control throughput of compacting "<a name="line.482"></a>
-<span class="sourceLineNo">483</span>          + compactionName);<a name="line.483"></a>
-<span class="sourceLineNo">484</span>    } finally {<a name="line.484"></a>
-<span class="sourceLineNo">485</span>      throughputController.finish(compactionName);<a name="line.485"></a>
-<span class="sourceLineNo">486</span>    }<a name="line.486"></a>
-<span class="sourceLineNo">487</span>    progress.complete();<a name="line.487"></a>
-<span class="sourceLineNo">488</span>    return true;<a name="line.488"></a>
-<span class="sourceLineNo">489</span>  }<a name="line.489"></a>
-<span class="sourceLineNo">490</span><a name="line.490"></a>
-<span class="sourceLineNo">491</span>  /**<a name="line.491"></a>
-<span class="sourceLineNo">492</span>   * @param store store<a name="line.492"></a>
-<span class="sourceLineNo">493</span>   * @param scanners Store file scanners.<a name="line.493"></a>
-<span class="sourceLineNo">494</span>   * @param scanType Scan type.<a name="line.494"></a>
-<span class="sourceLineNo">495</span>   * @param smallestReadPoint Smallest MVCC read point.<a name="line.495"></a>
-<span class="sourceLineNo">496</span>   * @param earliestPutTs Earliest put across all files.<a name="line.496"></a>
-<span class="sourceLineNo">497</span>   * @return A compaction scanner.<a name="line.497"></a>
-<span class="sourceLineNo">498</span>   */<a name="line.498"></a>
-<span class="sourceLineNo">499</span>  protected InternalScanner createScanner(Store store, List&lt;StoreFileScanner&gt; scanners,<a name="line.499"></a>
-<span class="sourceLineNo">500</span>      ScanType scanType, long smallestReadPoint, long earliestPutTs) throws IOException {<a name="line.500"></a>
-<span class="sourceLineNo">501</span>    Scan scan = new Scan();<a name="line.501"></a>
-<span class="sourceLineNo">502</span>    scan.setMaxVersions(store.getColumnFamilyDescriptor().getMaxVersions());<a name="line.502"></a>
-<span class="sourceLineNo">503</span>    return new StoreScanner(store, store.getScanInfo(), scan, scanners,<a name="line.503"></a>
-<span class="sourceLineNo">504</span>        scanType, smallestReadPoint, earliestPutTs);<a name="line.504"></a>
-<span class="sourceLineNo">505</span>  }<a name="line.505"></a>
-<span class="sourceLineNo">506</span><a name="line.506"></a>
-<span class="sourceLineNo">507</span>  /**<a name="line.507"></a>
-<span class="sourceLineNo">508</span>   * @param store The store.<a name="line.508"></a>
-<span class="sourceLineNo">509</span>   * @param scanners Store file scanners.<a name="line.509"></a>
-<span class="sourceLineNo">510</span>   * @param smallestReadPoint Smallest MVCC read point.<a name="line.510"></a>
-<span class="sourceLineNo">511</span>   * @param earliestPutTs Earliest put across all files.<a name="line.511"></a>
-<span class="sourceLineNo">512</span>   * @param dropDeletesFromRow Drop deletes starting with this row, inclusive. Can be null.<a name="line.512"></a>
-<span class="sourceLineNo">513</span>   * @param dropDeletesToRow Drop deletes ending with this row, exclusive. Can be null.<a name="line.513"></a>
-<span class="sourceLineNo">514</span>   * @return A compaction scanner.<a name="line.514"></a>
-<span class="sourceLineNo">515</span>   */<a name="line.515"></a>
-<span class="sourceLineNo">516</span>  protected InternalScanner createScanner(Store store, List&lt;StoreFileScanner&gt; scanners,<a name="line.516"></a>
-<span class="sourceLineNo">517</span>     long smallestReadPoint, long earliestPutTs, byte[] dropDeletesFromRow,<a name="line.517"></a>
-<span class="sourceLineNo">518</span>     byte[] dropDeletesToRow) throws IOException {<a name="line.518"></a>
-<span class="sourceLineNo">519</span>    Scan scan = new Scan();<a name="line.519"></a>
-<span class="sourceLineNo">520</span>    scan.setMaxVersions(store.getColumnFamilyDescriptor().getMaxVersions());<a name="line.520"></a>
-<span class="sourceLineNo">521</span>    return new StoreScanner(store, store.getScanInfo(), scan, scanners, smallestReadPoint,<a name="line.521"></a>
-<span class="sourceLineNo">522</span>        earliestPutTs, dropDeletesFromRow, dropDeletesToRow);<a name="line.522"></a>
-<span class="sourceLineNo">523</span>  }<a name="line.523"></a>
-<span class="sourceLineNo">524</span>}<a name="line.524"></a>
+<span class="sourceLineNo">303</span>      if (fd.minSeqIdToKeep &gt; 0 &amp;&amp; !store.getColumnFamilyDescriptor().isNewVersionBehavior()) {<a name="line.303"></a>
+<span class="sourceLineNo">304</span>        // For mvcc-sensitive family, we never set mvcc to 0.<a name="line.304"></a>
+<span class="sourceLineNo">305</span>        smallestReadPoint = Math.min(fd.minSeqIdToKeep, smallestReadPoint);<a name="line.305"></a>
+<span class="sourceLineNo">306</span>        cleanSeqId = true;<a name="line.306"></a>
+<span class="sourceLineNo">307</span>      }<a name="line.307"></a>
+<span class="sourceLineNo">308</span>      writer = sinkFactory.createWriter(scanner, fd, dropCache);<a name="line.308"></a>
+<span class="sourceLineNo">309</span>      finished = performCompaction(fd, scanner, writer, smallestReadPoint, cleanSeqId,<a name="line.309"></a>
+<span class="sourceLineNo">310</span>        throughputController, request.isAllFiles(), request.getFiles().size());<a name="line.310"></a>
+<span class="sourceLineNo">311</span>      if (!finished) {<a name="line.311"></a>
+<span class="sourceLineNo">312</span>        throw new InterruptedIOException("Aborting compaction of store " + store + " in region "<a name="line.312"></a>
+<span class="sourceLineNo">313</span>            + store.getRegionInfo().getRegionNameAsString() + " because it was interrupted.");<a name="line.313"></a>
+<span class="sourceLineNo">314</span>      }<a name="line.314"></a>
+<span class="sourceLineNo">315</span>    } finally {<a name="line.315"></a>
+<span class="sourceLineNo">316</span>      Closeables.close(scanner, true);<a name="line.316"></a>
+<span class="sourceLineNo">317</span>      if (!finished &amp;&amp; writer != null) {<a name="line.317"></a>
+<span class="sourceLineNo">318</span>        abortWriter(writer);<a name="line.318"></a>
+<span class="sourceLineNo">319</span>      }<a name="line.319"></a>
+<span class="sourceLineNo">320</span>    }<a name="line.320"></a>
+<span class="sourceLineNo">321</span>    assert finished : "We should have exited the method on all error paths";<a name="line.321"></a>
+<span class="sourceLineNo">322</span>    assert writer != null : "Writer should be non-null if no error";<a name="line.322"></a>
+<span class="sourceLineNo">323</span>    return commitWriter(writer, fd, request);<a name="line.323"></a>
+<span class="sourceLineNo">324</span>  }<a name="line.324"></a>
+<span class="sourceLineNo">325</span><a name="line.325"></a>
+<span class="sourceLineNo">326</span>  protected abstract List&lt;Path&gt; commitWriter(T writer, FileDetails fd, CompactionRequest request)<a name="line.326"></a>
+<span class="sourceLineNo">327</span>      throws IOException;<a name="line.327"></a>
+<span class="sourceLineNo">328</span><a name="line.328"></a>
+<span class="sourceLineNo">329</span>  protected abstract void abortWriter(T writer) throws IOException;<a name="line.329"></a>
+<span class="sourceLineNo">330</span><a name="line.330"></a>
+<span class="sourceLineNo">331</span>  /**<a name="line.331"></a>
+<span class="sourceLineNo">332</span>   * Calls coprocessor, if any, to create compaction scanner - before normal scanner creation.<a name="line.332"></a>
+<span class="sourceLineNo">333</span>   * @param request Compaction request.<a name="line.333"></a>
+<span class="sourceLineNo">334</span>   * @param scanType Scan type.<a name="line.334"></a>
+<span class="sourceLineNo">335</span>   * @param earliestPutTs Earliest put ts.<a name="line.335"></a>
+<span class="sourceLineNo">336</span>   * @param scanners File scanners for compaction files.<a name="line.336"></a>
+<span class="sourceLineNo">337</span>   * @param user the User<a name="line.337"></a>
+<span class="sourceLineNo">338</span>   * @param readPoint the read point to help create scanner by Coprocessor if required.<a name="line.338"></a>
+<span class="sourceLineNo">339</span>   * @return Scanner override by coprocessor; null if not overriding.<a name="line.339"></a>
+<span class="sourceLineNo">340</span>   */<a name="line.340"></a>
+<span class="sourceLineNo">341</span>  protected InternalScanner preCreateCoprocScanner(final CompactionRequest request,<a name="line.341"></a>
+<span class="sourceLineNo">342</span>      final ScanType scanType, final long earliestPutTs, final List&lt;StoreFileScanner&gt; scanners,<a name="line.342"></a>
+<span class="sourceLineNo">343</span>      User user, final long readPoint) throws IOException {<a name="line.343"></a>
+<span class="sourceLineNo">344</span>    if (store.getCoprocessorHost() == null) {<a name="line.344"></a>
+<span class="sourceLineNo">345</span>      return null;<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    }<a name="line.346"></a>
+<span class="sourceLineNo">347</span>    return store.getCoprocessorHost().preCompactScannerOpen(store, scanners, scanType,<a name="line.347"></a>
+<span class="sourceLineNo">348</span>        earliestPutTs, request, user, readPoint);<a name="line.348"></a>
+<span class="sourceLineNo">349</span>  }<a name="line.349"></a>
+<span class="sourceLineNo">350</span><a name="line.350"></a>
+<span class="sourceLineNo">351</span>  /**<a name="line.351"></a>
+<span class="sourceLineNo">352</span>   * Calls coprocessor, if any, to create scanners - after normal scanner creation.<a name="line.352"></a>
+<span class="sourceLineNo">353</span>   * @param request Compaction request.<a name="line.353"></a>
+<span class="sourceLineNo">354</span>   * @param scanType Scan type.<a name="line.354"></a>
+<span class="sourceLineNo">355</span>   * @param scanner The default scanner created for compaction.<a name="line.355"></a>
+<span class="sourceLineNo">356</span>   * @return Scanner scanner to use (usually the default); null if compaction should not proceed.<a name="line.356"></a>
+<span class="sourceLineNo">357</span>   */<a name="line.357"></a>
+<span class="sourceLineNo">358</span>  protected InternalScanner postCreateCoprocScanner(final CompactionRequest request,<a name="line.358"></a>
+<span class="sourceLineNo">359</span>      final ScanType scanType, final InternalScanner scanner, User user) throws IOException {<a name="line.359"></a>
+<span class="sourceLineNo">360</span>    if (store.getCoprocessorHost() == null) {<a name="line.360"></a>
+<span class="sourceLineNo">361</span>      return scanner;<a name="line.361"></a>
+<span class="sourceLineNo">362</span>    }<a name="line.362"></a>
+<span class="sourceLineNo">363</span>    return store.getCoprocessorHost().preCompact(store, scanner, scanType, request, user);<a name="line.363"></a>
+<span class="sourceLineNo">364</span>  }<a name="line.364"></a>
+<span class="sourceLineNo">365</span><a name="line.365"></a>
+<span class="sourceLineNo">366</span>  /**<a name="line.366"></a>
+<span class="sourceLineNo">367</span>   * Performs the compaction.<a name="line.367"></a>
+<span class="sourceLineNo">368</span>   * @param fd FileDetails of cell sink writer<a name="line.368"></a>
+<span class="sourceLineNo">369</span>   * @param scanner Where to read from.<a name="line.369"></a>
+<span class="sourceLineNo">370</span>   * @param writer Where to write to.<a name="line.370"></a>
+<span class="sourceLineNo">371</span>   * @param smallestReadPoint Smallest read point.<a name="line.371"></a>
+<span class="sourceLineNo">372</span>   * @param cleanSeqId When true, remove seqId(used to be mvcc) value which is &amp;lt;=<a name="line.372"></a>
+<span class="sourceLineNo">373</span>   *          smallestReadPoint<a name="line.373"></a>
+<span class="sourceLineNo">374</span>   * @param major Is a major compaction.<a name="line.374"></a>
+<span class="sourceLineNo">375</span>   * @param numofFilesToCompact the number of files to compact<a name="line.375"></a>
+<span class="sourceLineNo">376</span>   * @return Whether compaction ended; false if it was interrupted for some reason.<a name="line.376"></a>
+<span class="sourceLineNo">377</span>   */<a name="line.377"></a>
+<span class="sourceLineNo">378</span>  protected boolean performCompaction(FileDetails fd, InternalScanner scanner, CellSink writer,<a name="line.378"></a>
+<span class="sourceLineNo">379</span>      long smallestReadPoint, boolean cleanSeqId, ThroughputController throughputController,<a name="line.379"></a>
+<span class="sourceLineNo">380</span>      boolean major, int numofFilesToCompact) throws IOException {<a name="line.380"></a>
+<span class="sourceLineNo">381</span>    assert writer instanceof ShipperListener;<a name="line.381"></a>
+<span class="sourceLineNo">382</span>    long bytesWrittenProgressForCloseCheck = 0;<a name="line.382"></a>
+<span class="sourceLineNo">383</span>    long bytesWrittenProgressForLog = 0;<a name="line.383"></a>
+<span class="sourceLineNo">384</span>    long bytesWrittenProgressForShippedCall = 0;<a name="line.384"></a>
+<span class="sourceLineNo">385</span>    // Since scanner.next() can return 'false' but still be delivering data,<a name="line.385"></a>
+<span class="sourceLineNo">386</span>    // we have to use a do/while loop.<a name="line.386"></a>
+<span class="sourceLineNo">387</span>    List&lt;Cell&gt; cells = new ArrayList&lt;&gt;();<a name="line.387"></a>
+<span class="sourceLineNo">388</span>    long closeCheckSizeLimit = HStore.getCloseCheckInterval();<a name="line.388"></a>
+<span class="sourceLineNo">389</span>    long lastMillis = 0;<a name="line.389"></a>
+<span class="sourceLineNo">390</span>    if (LOG.isDebugEnabled()) {<a name="line.390"></a>
+<span class="sourceLineNo">391</span>      lastMillis = EnvironmentEdgeManager.currentTime();<a name="line.391"></a>
+<span class="sourceLineNo">392</span>    }<a name="line.392"></a>
+<span class="sourceLineNo">393</span>    String compactionName = ThroughputControlUtil.getNameForThrottling(store, "compaction");<a name="line.393"></a>
+<span class="sourceLineNo">394</span>    long now = 0;<a name="line.394"></a>
+<span class="sourceLineNo">395</span>    boolean hasMore;<a name="line.395"></a>
+<span class="sourceLineNo">396</span>    ScannerContext scannerContext =<a name="line.396"></a>
+<span class="sourceLineNo">397</span>        ScannerContext.newBuilder().setBatchLimit(compactionKVMax).build();<a name="line.397"></a>
+<span class="sourceLineNo">398</span><a name="line.398"></a>
+<span class="sourceLineNo">399</span>    throughputController.start(compactionName);<a name="line.399"></a>
+<span class="sourceLineNo">400</span>    KeyValueScanner kvs = (scanner instanceof KeyValueScanner)? (KeyValueScanner)scanner : null;<a name="line.400"></a>
+<span class="sourceLineNo">401</span>    long shippedCallSizeLimit = (long) numofFilesToCompact * this.store.getColumnFamilyDescriptor().getBlocksize();<a name="line.401"></a>
+<span class="sourceLineNo">402</span>    try {<a name="line.402"></a>
+<span class="sourceLineNo">403</span>      do {<a name="line.403"></a>
+<span class="sourceLineNo">404</span>        hasMore = scanner.next(cells, scannerContext);<a name="line.404"></a>
+<span class="sourceLineNo">405</span>        if (LOG.isDebugEnabled()) {<a name="line.405"></a>
+<span class="sourceLineNo">406</span>          now = EnvironmentEdgeManager.currentTime();<a name="line.406"></a>
+<span class="sourceLineNo">407</span>        }<a name="line.407"></a>
+<span class="sourceLineNo">408</span>        // output to writer:<a name="line.408"></a>
+<span class="sourceLineNo">409</span>        Cell lastCleanCell = null;<a name="line.409"></a>
+<span class="sourceLineNo">410</span>        long lastCleanCellSeqId = 0;<a name="line.410"></a>
+<span class="sourceLineNo">411</span>        for (Cell c : cells) {<a name="line.411"></a>
+<span class="sourceLineNo">412</span>          if (cleanSeqId &amp;&amp; c.getSequenceId() &lt;= smallestReadPoint) {<a name="line.412"></a>
+<span class="sourceLineNo">413</span>            lastCleanCell = c;<a name="line.413"></a>
+<span class="sourceLineNo">414</span>            lastCleanCellSeqId = c.getSequenceId();<a name="line.414"></a>
+<span class="sourceLineNo">415</span>            CellUtil.setSequenceId(c, 0);<a name="line.415"></a>
+<span class="sourceLineNo">416</span>          } else {<a name="line.416"></a>
+<span class="sourceLineNo">417</span>            lastCleanCell = null;<a name="line.417"></a>
+<span class="sourceLineNo">418</span>            lastCleanCellSeqId = 0;<a name="line.418"></a>
+<span class="sourceLineNo">419</span>          }<a name="line.419"></a>
+<span class="sourceLineNo">420</span>          writer.append(c);<a name="line.420"></a>
+<span class="sourceLineNo">421</span>          int len = KeyValueUtil.length(c);<a name="line.421"></a>
+<span class="sourceLineNo">422</span>          ++progress.currentCompactedKVs;<a name="line.422"></a>
+<span class="sourceLineNo">423</span>          progress.totalCompactedSize += len;<a name="line.423"></a>
+<span class="sourceLineNo">424</span>          bytesWrittenProgressForShippedCall += len;<a name="line.424"></a>
+<span class="sourceLineNo">425</span>          if (LOG.isDebugEnabled()) {<a name="line.425"></a>
+<span class="sourceLineNo">426</span>            bytesWrittenProgressForLog += len;<a name="line.426"></a>
+<span class="sourceLineNo">427</span>          }<a name="line.427"></a>
+<span class="sourceLineNo">428</span>          throughputController.control(compactionName, len);<a name="line.428"></a>
+<span class="sourceLineNo">429</span>          // check periodically to see if a system stop is requested<a name="line.429"></a>
+<span class="sourceLineNo">430</span>          if (closeCheckSizeLimit &gt; 0) {<a name="line.430"></a>
+<span class="sourceLineNo">431</span>            bytesWrittenProgressForCloseCheck += len;<a name="line.431"></a>
+<span class="sourceLineNo">432</span>            if (bytesWrittenProgressForCloseCheck &gt; closeCheckSizeLimit) {<a name="line.432"></a>
+<span class="sourceLineNo">433</span>              bytesWrittenProgressForCloseCheck = 0;<a name="line.433"></a>
+<span class="sourceLineNo">434</span>              if (!store.areWritesEnabled()) {<a name="line.434"></a>
+<span class="sourceLineNo">435</span>                progress.cancel();<a name="line.435"></a>
+<span class="sourceLineNo">436</span>                return false;<a name="line.436"></a>
+<span class="sourceLineNo">437</span>              }<a name="line.437"></a>
+<span class="sourceLineNo">438</span>            }<a name="line.438"></a>
+<span class="sourceLineNo">439</span>          }<a name="line.439"></a>
+<span class="sourceLineNo">440</span>          if (kvs != null &amp;&amp; bytesWrittenProgressForShippedCall &gt; shippedCallSizeLimit) {<a name="line.440"></a>
+<span class="sourceLineNo">441</span>            if (lastCleanCell != null) {<a name="line.441"></a>
+<span class="sourceLineNo">442</span>              // HBASE-16931, set back sequence id to avoid affecting scan order unexpectedly.<a name="line.442"></a>
+<span class="sourceLineNo">443</span>              // ShipperListener will do a clone of the last cells it refer, so need to set back<a name="line.443"></a>
+<span class="sourceLineNo">444</span>              // sequence id before ShipperListener.beforeShipped<a name="line.444"></a>
+<span class="sourceLineNo">445</span>              CellUtil.setSequenceId(lastCleanCell, lastCleanCellSeqId);<a name="line.445"></a>
+<span class="sourceLineNo">446</span>            }<a name="line.446"></a>
+<span class="sourceLineNo">447</span>            // Clone the cells that are in the writer so that they are freed of references,<a name="line.447"></a>
+<span class="sourceLineNo">448</span>            // if they are holding any.<a name="line.448"></a>
+<span class="sourceLineNo">449</span>            ((ShipperListener)writer).beforeShipped();<a name="line.449"></a>
+<span class="sourceLineNo">450</span>            // The SHARED block references, being read for compaction, will be kept in prevBlocks<a name="line.450"></a>
+<span class="sourceLineNo">451</span>            // list(See HFileScannerImpl#prevBlocks). In case of scan flow, after each set of cells<a name="line.451"></a>
+<span class="sourceLineNo">452</span>            // being returned to client, we will call shipped() which can clear this list. Here by<a name="line.452"></a>
+<span class="sourceLineNo">453</span>            // we are doing the similar thing. In between the compaction (after every N cells<a name="line.453"></a>
+<span class="sourceLineNo">454</span>            // written with collective size of 'shippedCallSizeLimit') we will call shipped which<a name="line.454"></a>
+<span class="sourceLineNo">455</span>            // may clear prevBlocks list.<a name="line.455"></a>
+<span class="sourceLineNo">456</span>            kvs.shipped();<a name="line.456"></a>
+<span class="sourceLineNo">457</span>            bytesWrittenProgressForShippedCall = 0;<a name="line.457"></a>
+<span class="sourceLineNo">458</span>          }<a name="line.458"></a>
+<span class="sourceLineNo">459</span>        }<a name="line.459"></a>
+<span class="sourceLineNo">460</span>        if (lastCleanCell != null) {<a name="line.460"></a>
+<span class="sourceLineNo">461</span>          // HBASE-16931, set back sequence id to avoid affecting scan order unexpectedly<a name="line.461"></a>
+<span class="sourceLineNo">462</span>          CellUtil.setSequenceId(lastCleanCell, lastCleanCellSeqId);<a name="line.462"></a>
+<span class="sourceLineNo">463</span>        }<a name="line.463"></a>
+<span class="sourceLineNo">464</span>        // Log the progress of long running compactions every minute if<a name="line.464"></a>
+<span class="sourceLineNo">465</span>        // logging at DEBUG level<a name="line.465"></a>
+<span class="sourceLineNo">466</span>        if (LOG.isDebugEnabled()) {<a name="line.466"></a>
+<span class="sourceLineNo">467</span>          if ((now - lastMillis) &gt;= COMPACTION_PROGRESS_LOG_INTERVAL) {<a name="line.467"></a>
+<span class="sourceLineNo">468</span>            LOG.debug("Compaction progress: "<a name="line.468"></a>
+<span class="sourceLineNo">469</span>                + compactionName<a name="line.469"></a>
+<span class="sourceLineNo">470</span>                + " "<a name="line.470"></a>
+<span class="sourceLineNo">471</span>                + progress<a name="line.471"></a>
+<span class="sourceLineNo">472</span>                + String.format(", rate=%.2f kB/sec", (bytesWrittenProgressForLog / 1024.0)<a name="line.472"></a>
+<span class="sourceLineNo">473</span>                    / ((now - lastMillis) / 1000.0)) + ", throughputController is "<a name="line.473"></a>
+<span class="sourceLineNo">474</span>                + throughputController);<a name="line.474"></a>
+<span class="sourceLineNo">475</span>            lastMillis = now;<a name="line.475"></a>
+<span class="sourceLineNo">476</span>            bytesWrittenProgressForLog = 0;<a name="line.476"></a>
+<span class="sourceLineNo">477</span>          }<a name="line.477"></a>
+<span class="sourceLineNo">478</span>        }<a name="line.478"></a>
+<span class="sourceLineNo">479</span>        cells.clear();<a name="line.479"></a>
+<span class="sourceLineNo">480</span>      } while (hasMore);<a name="line.480"></a>
+<span class="sourceLineNo">481</span>    } catch (InterruptedException e) {<a name="line.481"></a>
+<span class="sourceLineNo">482</span>      progress.cancel();<a name="line.482"></a>
+<span class="sourceLineNo">483</span>      throw new InterruptedIOException("Interrupted while control throughput of compacting "<a name="line.483"></a>
+<span class="sourceLineNo">484</span>          + compactionName);<a name="line.484"></a>
+<span class="sourceLineNo">485</span>    } finally {<a name="line.485"></a>
+<span class="sourceLineNo">486</span>      throughputController.finish(compactionName);<a name="line.486"></a>
+<span class="sourceLineNo">487</span>    }<a name="line.487"></a>
+<span class="sourceLineNo">488</span>    progress.complete();<a name="line.488"></a>
+<span class="sourceLineNo">489</span>    return true;<a name="line.489"></a>
+<span class="sourceLineNo">490</span>  }<a name="line.490"></a>
+<span class="sourceLineNo">491</span><a name="line.491"></a>
+<span class="sourceLineNo">492</span>  /**<a name="line.492"></a>
+<span class="sourceLineNo">493</span>   * @param store store<a name="line.493"></a>
+<span class="sourceLineNo">494</span>   * @param scanners Store file scanners.<a name="line.494"></a>
+<span class="sourceLineNo">495</span>   * @param scanType Scan type.<a name="line.495"></a>
+<span class="sourceLineNo">496</span>   * @param smallestReadPoint Smallest MVCC read point.<a name="line.496"></a>
+<span class="sourceLineNo">497</span>   * @param earliestPutTs Earliest put across all files.<a name="line.497"></a>
+<span class="sourceLineNo">498</span>   * @return A compaction scanner.<a name="line.498"></a>
+<span class="sourceLineNo">499</span>   */<a name="line.499"></a>
+<span class="sourceLineNo">500</span>  protected InternalScanner createScanner(Store store, List&lt;StoreFileScanner&gt; scanners,<a name="line.500"></a>
+<span class="sourceLineNo">501</span>      ScanType scanType, long smallestReadPoint, long earliestPutTs) throws IOException {<a name="line.501"></a>
+<span class="sourceLineNo">502</span>    Scan scan = new Scan();<a name="line.502"></a>
+<span class="sourceLineNo">503</span>    scan.setMaxVersions(store.getColumnFamilyDescriptor().getMaxVersions());<a name="line.503"></a>
+<span class="sourceLineNo">504</span>    return new StoreScanner(store, store.getScanInfo(), scan, scanners,<a name="line.504"></a>
+<span class="sourceLineNo">505</span>        scanType, smallestReadPoint, earliestPutTs);<a name="line.505"></a>
+<span class="sourceLineNo">506</span>  }<a name="line.506"></a>
+<span class="sourceLineNo">507</span><a name="line.507"></a>
+<span class="sourceLineNo">508</span>  /**<a name="line.508"></a>
+<span class="sourceLineNo">509</span>   * @param store The store.<a name="line.509"></a>
+<span class="sourceLineNo">510</span>   * @param scanners Store file scanners.<a name="line.510"></a>
+<span class="sourceLineNo">511</span>   * @param smallestReadPoint Smallest MVCC read point.<a name="line.511"></a>
+<span class="sourceLineNo">512</span>   * @param earliestPutTs Earliest put across all files.<a name="line.512"></a>
+<span class="sourceLineNo">513</span>   * @param dropDeletesFromRow Drop deletes starting with this row, inclusive. Can be null.<a name="line.513"></a>
+<span class="sourceLineNo">514</span>   * @param dropDeletesToRow Drop deletes ending with this row, exclusive. Can be null.<a name="line.514"></a>
+<span class="sourceLineNo">515</span>   * @return A compaction scanner.<a name="line.515"></a>
+<span class="sourceLineNo">516</span>   */<a name="line.516"></a>
+<span class="sourceLineNo">517</span>  protected InternalScanner createScanner(Store store, List&lt;StoreFileScanner&gt; scanners,<a name="line.517"></a>
+<span class="sourceLineNo">518</span>     long smallestReadPoint, long earliestPutTs, byte[] dropDeletesFromRow,<a name="line.518"></a>
+<span class="sourceLineNo">519</span>     byte[] dropDeletesToRow) throws IOException {<a name="line.519"></a>
+<span class="sourceLineNo">520</span>    Scan scan = new Scan();<a name="line.520"></a>
+<span class="sourceLineNo">521</span>    scan.setMaxVersions(store.getColumnFamilyDescriptor().getMaxVersions());<a name="line.521"></a>
+<span class="sourceLineNo">522</span>    return new StoreScanner(store, store.getScanInfo(), scan, scanners, smallestReadPoint,<a name="line.522"></a>
+<span class="sourceLineNo">523</span>        earliestPutTs, dropDeletesFromRow, dropDeletesToRow);<a name="line.523"></a>
+<span class="sourceLineNo">524</span>  }<a name="line.524"></a>
+<span class="sourceLineNo">525</span>}<a name="line.525"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/21766f4a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/FIFOCompactionPolicy.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/FIFOCompactionPolicy.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/FIFOCompactionPolicy.html
index 6dcd012..2fc1078 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/FIFOCompactionPolicy.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/compactions/FIFOCompactionPolicy.html
@@ -109,38 +109,36 @@
 <span class="sourceLineNo">101</span>    long currentTime = EnvironmentEdgeManager.currentTime();<a name="line.101"></a>
 <span class="sourceLineNo">102</span>    for(StoreFile sf: files){<a name="line.102"></a>
 <span class="sourceLineNo">103</span>      // Check MIN_VERSIONS is in HStore removeUnneededFiles<a name="line.103"></a>
-<span class="sourceLineNo">104</span>      Long maxTs = sf.getReader().getMaxTimestamp();<a name="line.104"></a>
+<span class="sourceLineNo">104</span>      long maxTs = sf.getReader().getMaxTimestamp();<a name="line.104"></a>
 <span class="sourceLineNo">105</span>      long maxTtl = storeConfigInfo.getStoreFileTtl();<a name="line.105"></a>
-<span class="sourceLineNo">106</span>      if(maxTs == null <a name="line.106"></a>
-<span class="sourceLineNo">107</span>          || maxTtl == Long.MAX_VALUE<a name="line.107"></a>
-<span class="sourceLineNo">108</span>          || (currentTime - maxTtl &lt; maxTs)){<a name="line.108"></a>
-<span class="sourceLineNo">109</span>        continue; <a name="line.109"></a>
-<span class="sourceLineNo">110</span>      } else{<a name="line.110"></a>
-<span class="sourceLineNo">111</span>        return true;<a name="line.111"></a>
-<span class="sourceLineNo">112</span>      }<a name="line.112"></a>
-<span class="sourceLineNo">113</span>    }<a name="line.113"></a>
-<span class="sourceLineNo">114</span>    return false;<a name="line.114"></a>
-<span class="sourceLineNo">115</span>  }<a name="line.115"></a>
-<span class="sourceLineNo">116</span><a name="line.116"></a>
-<span class="sourceLineNo">117</span>  private  Collection&lt;StoreFile&gt; getExpiredStores(Collection&lt;StoreFile&gt; files,<a name="line.117"></a>
-<span class="sourceLineNo">118</span>    Collection&lt;StoreFile&gt; filesCompacting) {<a name="line.118"></a>
-<span class="sourceLineNo">119</span>    long currentTime = EnvironmentEdgeManager.currentTime();<a name="line.119"></a>
-<span class="sourceLineNo">120</span>    Collection&lt;StoreFile&gt; expiredStores = new ArrayList&lt;&gt;();<a name="line.120"></a>
-<span class="sourceLineNo">121</span>    for(StoreFile sf: files){<a name="line.121"></a>
-<span class="sourceLineNo">122</span>      // Check MIN_VERSIONS is in HStore removeUnneededFiles<a name="line.122"></a>
-<span class="sourceLineNo">123</span>      Long maxTs = sf.getReader().getMaxTimestamp();<a name="line.123"></a>
-<span class="sourceLineNo">124</span>      long maxTtl = storeConfigInfo.getStoreFileTtl();<a name="line.124"></a>
-<span class="sourceLineNo">125</span>      if(maxTs == null <a name="line.125"></a>
-<span class="sourceLineNo">126</span>          || maxTtl == Long.MAX_VALUE<a name="line.126"></a>
-<span class="sourceLineNo">127</span>          || (currentTime - maxTtl &lt; maxTs)){<a name="line.127"></a>
-<span class="sourceLineNo">128</span>        continue; <a name="line.128"></a>
-<span class="sourceLineNo">129</span>      } else if(filesCompacting == null || filesCompacting.contains(sf) == false){<a name="line.129"></a>
-<span class="sourceLineNo">130</span>        expiredStores.add(sf);<a name="line.130"></a>
-<span class="sourceLineNo">131</span>      }<a name="line.131"></a>
-<span class="sourceLineNo">132</span>    }<a name="line.132"></a>
-<span class="sourceLineNo">133</span>    return expiredStores;<a name="line.133"></a>
-<span class="sourceLineNo">134</span>  }<a name="line.134"></a>
-<span class="sourceLineNo">135</span>}<a name="line.135"></a>
+<span class="sourceLineNo">106</span>      if (maxTtl == Long.MAX_VALUE<a name="line.106"></a>
+<span class="sourceLineNo">107</span>          || (currentTime - maxTtl &lt; maxTs)){<a name="line.107"></a>
+<span class="sourceLineNo">108</span>        continue; <a name="line.108"></a>
+<span class="sourceLineNo">109</span>      } else{<a name="line.109"></a>
+<span class="sourceLineNo">110</span>        return true;<a name="line.110"></a>
+<span class="sourceLineNo">111</span>      }<a name="line.111"></a>
+<span class="sourceLineNo">112</span>    }<a name="line.112"></a>
+<span class="sourceLineNo">113</span>    return false;<a name="line.113"></a>
+<span class="sourceLineNo">114</span>  }<a name="line.114"></a>
+<span class="sourceLineNo">115</span><a name="line.115"></a>
+<span class="sourceLineNo">116</span>  private  Collection&lt;StoreFile&gt; getExpiredStores(Collection&lt;StoreFile&gt; files,<a name="line.116"></a>
+<span class="sourceLineNo">117</span>    Collection&lt;StoreFile&gt; filesCompacting) {<a name="line.117"></a>
+<span class="sourceLineNo">118</span>    long currentTime = EnvironmentEdgeManager.currentTime();<a name="line.118"></a>
+<span class="sourceLineNo">119</span>    Collection&lt;StoreFile&gt; expiredStores = new ArrayList&lt;&gt;();<a name="line.119"></a>
+<span class="sourceLineNo">120</span>    for(StoreFile sf: files){<a name="line.120"></a>
+<span class="sourceLineNo">121</span>      // Check MIN_VERSIONS is in HStore removeUnneededFiles<a name="line.121"></a>
+<span class="sourceLineNo">122</span>      long maxTs = sf.getReader().getMaxTimestamp();<a name="line.122"></a>
+<span class="sourceLineNo">123</span>      long maxTtl = storeConfigInfo.getStoreFileTtl();<a name="line.123"></a>
+<span class="sourceLineNo">124</span>      if (maxTtl == Long.MAX_VALUE<a name="line.124"></a>
+<span class="sourceLineNo">125</span>          || (currentTime - maxTtl &lt; maxTs)){<a name="line.125"></a>
+<span class="sourceLineNo">126</span>        continue; <a name="line.126"></a>
+<span class="sourceLineNo">127</span>      } else if(filesCompacting == null || filesCompacting.contains(sf) == false){<a name="line.127"></a>
+<span class="sourceLineNo">128</span>        expiredStores.add(sf);<a name="line.128"></a>
+<span class="sourceLineNo">129</span>      }<a name="line.129"></a>
+<span class="sourceLineNo">130</span>    }<a name="line.130"></a>
+<span class="sourceLineNo">131</span>    return expiredStores;<a name="line.131"></a>
+<span class="sourceLineNo">132</span>  }<a name="line.132"></a>
+<span class="sourceLineNo">133</span>}<a name="line.133"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/21766f4a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/ColumnTracker.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/ColumnTracker.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/ColumnTracker.html
index 011cccf..bfca591 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/ColumnTracker.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/ColumnTracker.html
@@ -86,7 +86,7 @@
 <span class="sourceLineNo">078</span>   * the {@link #checkColumn(Cell, byte)} method and perform all the operations in this<a name="line.78"></a>
 <span class="sourceLineNo">079</span>   * checkVersions method.<a name="line.79"></a>
 <span class="sourceLineNo">080</span>   * @param cell<a name="line.80"></a>
-<span class="sourceLineNo">081</span>   * @param ttl The timeToLive to enforce.<a name="line.81"></a>
+<span class="sourceLineNo">081</span>   * @param timestamp The timestamp of the cell.<a name="line.81"></a>
 <span class="sourceLineNo">082</span>   * @param type the type of the key value (Put/Delete)<a name="line.82"></a>
 <span class="sourceLineNo">083</span>   * @param ignoreCount indicates if the KV needs to be excluded while counting (used during<a name="line.83"></a>
 <span class="sourceLineNo">084</span>   *          compactions. We only count KV's that are older than all the scanners' read points.)<a name="line.84"></a>
@@ -94,8 +94,8 @@
 <span class="sourceLineNo">086</span>   * @throws IOException in case there is an internal consistency problem caused by a data<a name="line.86"></a>
 <span class="sourceLineNo">087</span>   *           corruption.<a name="line.87"></a>
 <span class="sourceLineNo">088</span>   */<a name="line.88"></a>
-<span class="sourceLineNo">089</span>  ScanQueryMatcher.MatchCode checkVersions(Cell cell, long ttl, byte type, boolean ignoreCount)<a name="line.89"></a>
-<span class="sourceLineNo">090</span>      throws IOException;<a name="line.90"></a>
+<span class="sourceLineNo">089</span>  ScanQueryMatcher.MatchCode checkVersions(Cell cell, long timestamp, byte type,<a name="line.89"></a>
+<span class="sourceLineNo">090</span>      boolean ignoreCount) throws IOException;<a name="line.90"></a>
 <span class="sourceLineNo">091</span>  /**<a name="line.91"></a>
 <span class="sourceLineNo">092</span>   * Resets the Matcher<a name="line.92"></a>
 <span class="sourceLineNo">093</span>   */<a name="line.93"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/21766f4a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/CompactionScanQueryMatcher.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/CompactionScanQueryMatcher.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/CompactionScanQueryMatcher.html
index 40a6d28..6a3c11d 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/CompactionScanQueryMatcher.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/CompactionScanQueryMatcher.html
@@ -36,102 +36,110 @@
 <span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost;<a name="line.28"></a>
 <span class="sourceLineNo">029</span>import org.apache.hadoop.hbase.regionserver.ScanInfo;<a name="line.29"></a>
 <span class="sourceLineNo">030</span>import org.apache.hadoop.hbase.regionserver.ScanType;<a name="line.30"></a>
-<span class="sourceLineNo">031</span><a name="line.31"></a>
-<span class="sourceLineNo">032</span>/**<a name="line.32"></a>
-<span class="sourceLineNo">033</span> * Query matcher for compaction.<a name="line.33"></a>
-<span class="sourceLineNo">034</span> */<a name="line.34"></a>
-<span class="sourceLineNo">035</span>@InterfaceAudience.Private<a name="line.35"></a>
-<span class="sourceLineNo">036</span>public abstract class CompactionScanQueryMatcher extends ScanQueryMatcher {<a name="line.36"></a>
-<span class="sourceLineNo">037</span><a name="line.37"></a>
-<span class="sourceLineNo">038</span>  /** readPoint over which the KVs are unconditionally included */<a name="line.38"></a>
-<span class="sourceLineNo">039</span>  protected final long maxReadPointToTrackVersions;<a name="line.39"></a>
-<span class="sourceLineNo">040</span><a name="line.40"></a>
-<span class="sourceLineNo">041</span>  /** Keeps track of deletes */<a name="line.41"></a>
-<span class="sourceLineNo">042</span>  protected final DeleteTracker deletes;<a name="line.42"></a>
-<span class="sourceLineNo">043</span><a name="line.43"></a>
-<span class="sourceLineNo">044</span>  /** whether to return deleted rows */<a name="line.44"></a>
-<span class="sourceLineNo">045</span>  protected final KeepDeletedCells keepDeletedCells;<a name="line.45"></a>
-<span class="sourceLineNo">046</span><a name="line.46"></a>
-<span class="sourceLineNo">047</span>  protected CompactionScanQueryMatcher(ScanInfo scanInfo, DeleteTracker deletes,<a name="line.47"></a>
-<span class="sourceLineNo">048</span>      long readPointToUse, long oldestUnexpiredTS, long now) {<a name="line.48"></a>
-<span class="sourceLineNo">049</span>    super(createStartKeyFromRow(EMPTY_START_ROW, scanInfo), scanInfo,<a name="line.49"></a>
-<span class="sourceLineNo">050</span>        new ScanWildcardColumnTracker(scanInfo.getMinVersions(), scanInfo.getMaxVersions(),<a name="line.50"></a>
-<span class="sourceLineNo">051</span>            oldestUnexpiredTS),<a name="line.51"></a>
-<span class="sourceLineNo">052</span>        oldestUnexpiredTS, now);<a name="line.52"></a>
-<span class="sourceLineNo">053</span>    this.maxReadPointToTrackVersions = readPointToUse;<a name="line.53"></a>
-<span class="sourceLineNo">054</span>    this.deletes = deletes;<a name="line.54"></a>
-<span class="sourceLineNo">055</span>    this.keepDeletedCells = scanInfo.getKeepDeletedCells();<a name="line.55"></a>
-<span class="sourceLineNo">056</span>  }<a name="line.56"></a>
-<span class="sourceLineNo">057</span><a name="line.57"></a>
-<span class="sourceLineNo">058</span>  @Override<a name="line.58"></a>
-<span class="sourceLineNo">059</span>  public void beforeShipped() throws IOException {<a name="line.59"></a>
-<span class="sourceLineNo">060</span>    super.beforeShipped();<a name="line.60"></a>
-<span class="sourceLineNo">061</span>    deletes.beforeShipped();<a name="line.61"></a>
-<span class="sourceLineNo">062</span>  }<a name="line.62"></a>
-<span class="sourceLineNo">063</span><a name="line.63"></a>
-<span class="sourceLineNo">064</span>  @Override<a name="line.64"></a>
-<span class="sourceLineNo">065</span>  public boolean hasNullColumnInQuery() {<a name="line.65"></a>
-<span class="sourceLineNo">066</span>    return true;<a name="line.66"></a>
-<span class="sourceLineNo">067</span>  }<a name="line.67"></a>
-<span class="sourceLineNo">068</span><a name="line.68"></a>
-<span class="sourceLineNo">069</span>  @Override<a name="line.69"></a>
-<span class="sourceLineNo">070</span>  public boolean isUserScan() {<a name="line.70"></a>
-<span class="sourceLineNo">071</span>    return false;<a name="line.71"></a>
-<span class="sourceLineNo">072</span>  }<a name="line.72"></a>
-<span class="sourceLineNo">073</span><a name="line.73"></a>
-<span class="sourceLineNo">074</span>  @Override<a name="line.74"></a>
-<span class="sourceLineNo">075</span>  public boolean moreRowsMayExistAfter(Cell cell) {<a name="line.75"></a>
-<span class="sourceLineNo">076</span>    return true;<a name="line.76"></a>
-<span class="sourceLineNo">077</span>  }<a name="line.77"></a>
-<span class="sourceLineNo">078</span><a name="line.78"></a>
-<span class="sourceLineNo">079</span>  @Override<a name="line.79"></a>
-<span class="sourceLineNo">080</span>  public Filter getFilter() {<a name="line.80"></a>
-<span class="sourceLineNo">081</span>    // no filter when compaction<a name="line.81"></a>
-<span class="sourceLineNo">082</span>    return null;<a name="line.82"></a>
-<span class="sourceLineNo">083</span>  }<a name="line.83"></a>
-<span class="sourceLineNo">084</span><a name="line.84"></a>
-<span class="sourceLineNo">085</span>  @Override<a name="line.85"></a>
-<span class="sourceLineNo">086</span>  public Cell getNextKeyHint(Cell cell) throws IOException {<a name="line.86"></a>
-<span class="sourceLineNo">087</span>    // no filter, so no key hint.<a name="line.87"></a>
-<span class="sourceLineNo">088</span>    return null;<a name="line.88"></a>
-<span class="sourceLineNo">089</span>  }<a name="line.89"></a>
-<span class="sourceLineNo">090</span><a name="line.90"></a>
-<span class="sourceLineNo">091</span>  @Override<a name="line.91"></a>
-<span class="sourceLineNo">092</span>  protected void reset() {<a name="line.92"></a>
-<span class="sourceLineNo">093</span>    deletes.reset();<a name="line.93"></a>
-<span class="sourceLineNo">094</span>  }<a name="line.94"></a>
-<span class="sourceLineNo">095</span><a name="line.95"></a>
-<span class="sourceLineNo">096</span>  protected final void trackDelete(Cell cell) {<a name="line.96"></a>
-<span class="sourceLineNo">097</span>    // If keepDeletedCells is true, then we only remove cells by versions or TTL during<a name="line.97"></a>
-<span class="sourceLineNo">098</span>    // compaction, so we do not need to track delete here.<a name="line.98"></a>
-<span class="sourceLineNo">099</span>    // If keepDeletedCells is TTL and the delete marker is expired, then we can make sure that the<a name="line.99"></a>
-<span class="sourceLineNo">100</span>    // minVerions is larger than 0(otherwise we will just return at preCheck). So here we still<a name="line.100"></a>
-<span class="sourceLineNo">101</span>    // need to track the delete marker to see if it masks some cells.<a name="line.101"></a>
-<span class="sourceLineNo">102</span>    if (keepDeletedCells == KeepDeletedCells.FALSE<a name="line.102"></a>
-<span class="sourceLineNo">103</span>        || (keepDeletedCells == KeepDeletedCells.TTL &amp;&amp; cell.getTimestamp() &lt; oldestUnexpiredTS)) {<a name="line.103"></a>
-<span class="sourceLineNo">104</span>      deletes.add(cell);<a name="line.104"></a>
-<span class="sourceLineNo">105</span>    }<a name="line.105"></a>
-<span class="sourceLineNo">106</span>  }<a name="line.106"></a>
-<span class="sourceLineNo">107</span><a name="line.107"></a>
-<span class="sourceLineNo">108</span>  public static CompactionScanQueryMatcher create(ScanInfo scanInfo, ScanType scanType,<a name="line.108"></a>
-<span class="sourceLineNo">109</span>      long readPointToUse, long earliestPutTs, long oldestUnexpiredTS, long now,<a name="line.109"></a>
-<span class="sourceLineNo">110</span>      byte[] dropDeletesFromRow, byte[] dropDeletesToRow,<a name="line.110"></a>
-<span class="sourceLineNo">111</span>      RegionCoprocessorHost regionCoprocessorHost) throws IOException {<a name="line.111"></a>
-<span class="sourceLineNo">112</span>    DeleteTracker deleteTracker = instantiateDeleteTracker(regionCoprocessorHost);<a name="line.112"></a>
-<span class="sourceLineNo">113</span>    if (dropDeletesFromRow == null) {<a name="line.113"></a>
-<span class="sourceLineNo">114</span>      if (scanType == ScanType.COMPACT_RETAIN_DELETES) {<a name="line.114"></a>
-<span class="sourceLineNo">115</span>        return new MinorCompactionScanQueryMatcher(scanInfo, deleteTracker, readPointToUse,<a name="line.115"></a>
-<span class="sourceLineNo">116</span>            oldestUnexpiredTS, now);<a name="line.116"></a>
-<span class="sourceLineNo">117</span>      } else {<a name="line.117"></a>
-<span class="sourceLineNo">118</span>        return new MajorCompactionScanQueryMatcher(scanInfo, deleteTracker, readPointToUse,<a name="line.118"></a>
-<span class="sourceLineNo">119</span>            earliestPutTs, oldestUnexpiredTS, now);<a name="line.119"></a>
-<span class="sourceLineNo">120</span>      }<a name="line.120"></a>
-<span class="sourceLineNo">121</span>    } else {<a name="line.121"></a>
-<span class="sourceLineNo">122</span>      return new StripeCompactionScanQueryMatcher(scanInfo, deleteTracker, readPointToUse,<a name="line.122"></a>
-<span class="sourceLineNo">123</span>          earliestPutTs, oldestUnexpiredTS, now, dropDeletesFromRow, dropDeletesToRow);<a name="line.123"></a>
-<span class="sourceLineNo">124</span>    }<a name="line.124"></a>
-<span class="sourceLineNo">125</span>  }<a name="line.125"></a>
-<span class="sourceLineNo">126</span>}<a name="line.126"></a>
+<span class="sourceLineNo">031</span>import org.apache.hadoop.hbase.util.Pair;<a name="line.31"></a>
+<span class="sourceLineNo">032</span><a name="line.32"></a>
+<span class="sourceLineNo">033</span>/**<a name="line.33"></a>
+<span class="sourceLineNo">034</span> * Query matcher for compaction.<a name="line.34"></a>
+<span class="sourceLineNo">035</span> */<a name="line.35"></a>
+<span class="sourceLineNo">036</span>@InterfaceAudience.Private<a name="line.36"></a>
+<span class="sourceLineNo">037</span>public abstract class CompactionScanQueryMatcher extends ScanQueryMatcher {<a name="line.37"></a>
+<span class="sourceLineNo">038</span><a name="line.38"></a>
+<span class="sourceLineNo">039</span>  /** readPoint over which the KVs are unconditionally included */<a name="line.39"></a>
+<span class="sourceLineNo">040</span>  protected final long maxReadPointToTrackVersions;<a name="line.40"></a>
+<span class="sourceLineNo">041</span><a name="line.41"></a>
+<span class="sourceLineNo">042</span>  /** Keeps track of deletes */<a name="line.42"></a>
+<span class="sourceLineNo">043</span>  protected final DeleteTracker deletes;<a name="line.43"></a>
+<span class="sourceLineNo">044</span><a name="line.44"></a>
+<span class="sourceLineNo">045</span>  /** whether to return deleted rows */<a name="line.45"></a>
+<span class="sourceLineNo">046</span>  protected final KeepDeletedCells keepDeletedCells;<a name="line.46"></a>
+<span class="sourceLineNo">047</span><a name="line.47"></a>
+<span class="sourceLineNo">048</span>  protected CompactionScanQueryMatcher(ScanInfo scanInfo, DeleteTracker deletes,<a name="line.48"></a>
+<span class="sourceLineNo">049</span>      ColumnTracker columnTracker, long readPointToUse, long oldestUnexpiredTS, long now) {<a name="line.49"></a>
+<span class="sourceLineNo">050</span>    super(createStartKeyFromRow(EMPTY_START_ROW, scanInfo), scanInfo, columnTracker,<a name="line.50"></a>
+<span class="sourceLineNo">051</span>        oldestUnexpiredTS, now);<a name="line.51"></a>
+<span class="sourceLineNo">052</span>    this.maxReadPointToTrackVersions = readPointToUse;<a name="line.52"></a>
+<span class="sourceLineNo">053</span>    this.deletes = deletes;<a name="line.53"></a>
+<span class="sourceLineNo">054</span>    this.keepDeletedCells = scanInfo.getKeepDeletedCells();<a name="line.54"></a>
+<span class="sourceLineNo">055</span>  }<a name="line.55"></a>
+<span class="sourceLineNo">056</span><a name="line.56"></a>
+<span class="sourceLineNo">057</span>  @Override<a name="line.57"></a>
+<span class="sourceLineNo">058</span>  public void beforeShipped() throws IOException {<a name="line.58"></a>
+<span class="sourceLineNo">059</span>    super.beforeShipped();<a name="line.59"></a>
+<span class="sourceLineNo">060</span>    deletes.beforeShipped();<a name="line.60"></a>
+<span class="sourceLineNo">061</span>  }<a name="line.61"></a>
+<span class="sourceLineNo">062</span><a name="line.62"></a>
+<span class="sourceLineNo">063</span>  @Override<a name="line.63"></a>
+<span class="sourceLineNo">064</span>  public boolean hasNullColumnInQuery() {<a name="line.64"></a>
+<span class="sourceLineNo">065</span>    return true;<a name="line.65"></a>
+<span class="sourceLineNo">066</span>  }<a name="line.66"></a>
+<span class="sourceLineNo">067</span><a name="line.67"></a>
+<span class="sourceLineNo">068</span>  @Override<a name="line.68"></a>
+<span class="sourceLineNo">069</span>  public boolean isUserScan() {<a name="line.69"></a>
+<span class="sourceLineNo">070</span>    return false;<a name="line.70"></a>
+<span class="sourceLineNo">071</span>  }<a name="line.71"></a>
+<span class="sourceLineNo">072</span><a name="line.72"></a>
+<span class="sourceLineNo">073</span>  @Override<a name="line.73"></a>
+<span class="sourceLineNo">074</span>  public boolean moreRowsMayExistAfter(Cell cell) {<a name="line.74"></a>
+<span class="sourceLineNo">075</span>    return true;<a name="line.75"></a>
+<span class="sourceLineNo">076</span>  }<a name="line.76"></a>
+<span class="sourceLineNo">077</span><a name="line.77"></a>
+<span class="sourceLineNo">078</span>  @Override<a name="line.78"></a>
+<span class="sourceLineNo">079</span>  public Filter getFilter() {<a name="line.79"></a>
+<span class="sourceLineNo">080</span>    // no filter when compaction<a name="line.80"></a>
+<span class="sourceLineNo">081</span>    return null;<a name="line.81"></a>
+<span class="sourceLineNo">082</span>  }<a name="line.82"></a>
+<span class="sourceLineNo">083</span><a name="line.83"></a>
+<span class="sourceLineNo">084</span>  @Override<a name="line.84"></a>
+<span class="sourceLineNo">085</span>  public Cell getNextKeyHint(Cell cell) throws IOException {<a name="line.85"></a>
+<span class="sourceLineNo">086</span>    // no filter, so no key hint.<a name="line.86"></a>
+<span class="sourceLineNo">087</span>    return null;<a name="line.87"></a>
+<span class="sourceLineNo">088</span>  }<a name="line.88"></a>
+<span class="sourceLineNo">089</span><a name="line.89"></a>
+<span class="sourceLineNo">090</span>  @Override<a name="line.90"></a>
+<span class="sourceLineNo">091</span>  protected void reset() {<a name="line.91"></a>
+<span class="sourceLineNo">092</span>    deletes.reset();<a name="line.92"></a>
+<span class="sourceLineNo">093</span>  }<a name="line.93"></a>
+<span class="sourceLineNo">094</span><a name="line.94"></a>
+<span class="sourceLineNo">095</span>  protected final void trackDelete(Cell cell) {<a name="line.95"></a>
+<span class="sourceLineNo">096</span>    // If keepDeletedCells is true, then we only remove cells by versions or TTL during<a name="line.96"></a>
+<span class="sourceLineNo">097</span>    // compaction, so we do not need to track delete here.<a name="line.97"></a>
+<span class="sourceLineNo">098</span>    // If keepDeletedCells is TTL and the delete marker is expired, then we can make sure that the<a name="line.98"></a>
+<span class="sourceLineNo">099</span>    // minVerions is larger than 0(otherwise we will just return at preCheck). So here we still<a name="line.99"></a>
+<span class="sourceLineNo">100</span>    // need to track the delete marker to see if it masks some cells.<a name="line.100"></a>
+<span class="sourceLineNo">101</span>    if (keepDeletedCells == KeepDeletedCells.FALSE<a name="line.101"></a>
+<span class="sourceLineNo">102</span>        || (keepDeletedCells == KeepDeletedCells.TTL &amp;&amp; cell.getTimestamp() &lt; oldestUnexpiredTS)) {<a name="line.102"></a>
+<span class="sourceLineNo">103</span>      deletes.add(cell);<a name="line.103"></a>
+<span class="sourceLineNo">104</span>    }<a name="line.104"></a>
+<span class="sourceLineNo">105</span>  }<a name="line.105"></a>
+<span class="sourceLineNo">106</span><a name="line.106"></a>
+<span class="sourceLineNo">107</span>  public static CompactionScanQueryMatcher create(ScanInfo scanInfo, ScanType scanType,<a name="line.107"></a>
+<span class="sourceLineNo">108</span>      long readPointToUse, long earliestPutTs, long oldestUnexpiredTS, long now,<a name="line.108"></a>
+<span class="sourceLineNo">109</span>      byte[] dropDeletesFromRow, byte[] dropDeletesToRow,<a name="line.109"></a>
+<span class="sourceLineNo">110</span>      RegionCoprocessorHost regionCoprocessorHost) throws IOException {<a name="line.110"></a>
+<span class="sourceLineNo">111</span>    Pair&lt;DeleteTracker, ColumnTracker&gt; trackers = getTrackers(regionCoprocessorHost, null,<a name="line.111"></a>
+<span class="sourceLineNo">112</span>        scanInfo,oldestUnexpiredTS, null);<a name="line.112"></a>
+<span class="sourceLineNo">113</span>    DeleteTracker deleteTracker = trackers.getFirst();<a name="line.113"></a>
+<span class="sourceLineNo">114</span>    ColumnTracker columnTracker = trackers.getSecond();<a name="line.114"></a>
+<span class="sourceLineNo">115</span>    if (dropDeletesFromRow == null) {<a name="line.115"></a>
+<span class="sourceLineNo">116</span>      if (scanType == ScanType.COMPACT_RETAIN_DELETES) {<a name="line.116"></a>
+<span class="sourceLineNo">117</span>        if (scanInfo.isNewVersionBehavior()) {<a name="line.117"></a>
+<span class="sourceLineNo">118</span>          return new IncludeAllCompactionQueryMatcher(scanInfo, deleteTracker, columnTracker,<a name="line.118"></a>
+<span class="sourceLineNo">119</span>              readPointToUse, oldestUnexpiredTS, now);<a name="line.119"></a>
+<span class="sourceLineNo">120</span>        } else {<a name="line.120"></a>
+<span class="sourceLineNo">121</span>          return new MinorCompactionScanQueryMatcher(scanInfo, deleteTracker, columnTracker,<a name="line.121"></a>
+<span class="sourceLineNo">122</span>              readPointToUse, oldestUnexpiredTS, now);<a name="line.122"></a>
+<span class="sourceLineNo">123</span>        }<a name="line.123"></a>
+<span class="sourceLineNo">124</span>      } else {<a name="line.124"></a>
+<span class="sourceLineNo">125</span>        return new MajorCompactionScanQueryMatcher(scanInfo, deleteTracker, columnTracker,<a name="line.125"></a>
+<span class="sourceLineNo">126</span>            readPointToUse, earliestPutTs, oldestUnexpiredTS, now);<a name="line.126"></a>
+<span class="sourceLineNo">127</span>      }<a name="line.127"></a>
+<span class="sourceLineNo">128</span>    } else {<a name="line.128"></a>
+<span class="sourceLineNo">129</span>      return new StripeCompactionScanQueryMatcher(scanInfo, deleteTracker, columnTracker,<a name="line.129"></a>
+<span class="sourceLineNo">130</span>          readPointToUse, earliestPutTs, oldestUnexpiredTS, now, dropDeletesFromRow,<a name="line.130"></a>
+<span class="sourceLineNo">131</span>          dropDeletesToRow);<a name="line.131"></a>
+<span class="sourceLineNo">132</span>    }<a name="line.132"></a>
+<span class="sourceLineNo">133</span>  }<a name="line.133"></a>
+<span class="sourceLineNo">134</span>}<a name="line.134"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/21766f4a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.DeleteCompare.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.DeleteCompare.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.DeleteCompare.html
index 842fc3c..114dcb8 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.DeleteCompare.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.DeleteCompare.html
@@ -104,10 +104,12 @@
 <span class="sourceLineNo">096</span>    FAMILY_VERSION_DELETED, // The KeyValue is deleted by a delete family version.<a name="line.96"></a>
 <span class="sourceLineNo">097</span>    COLUMN_DELETED, // The KeyValue is deleted by a delete column.<a name="line.97"></a>
 <span class="sourceLineNo">098</span>    VERSION_DELETED, // The KeyValue is deleted by a version delete.<a name="line.98"></a>
-<span class="sourceLineNo">099</span>    NOT_DELETED<a name="line.99"></a>
-<span class="sourceLineNo">100</span>  }<a name="line.100"></a>
-<span class="sourceLineNo">101</span><a name="line.101"></a>
-<span class="sourceLineNo">102</span>}<a name="line.102"></a>
+<span class="sourceLineNo">099</span>    NOT_DELETED,<a name="line.99"></a>
+<span class="sourceLineNo">100</span>    VERSION_MASKED  // The KeyValue is masked by max number of versions which is considered as<a name="line.100"></a>
+<span class="sourceLineNo">101</span>                    // deleted in strong semantics of versions(See MvccTracker)<a name="line.101"></a>
+<span class="sourceLineNo">102</span>  }<a name="line.102"></a>
+<span class="sourceLineNo">103</span><a name="line.103"></a>
+<span class="sourceLineNo">104</span>}<a name="line.104"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/21766f4a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.DeleteResult.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.DeleteResult.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.DeleteResult.html
index 842fc3c..114dcb8 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.DeleteResult.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.DeleteResult.html
@@ -104,10 +104,12 @@
 <span class="sourceLineNo">096</span>    FAMILY_VERSION_DELETED, // The KeyValue is deleted by a delete family version.<a name="line.96"></a>
 <span class="sourceLineNo">097</span>    COLUMN_DELETED, // The KeyValue is deleted by a delete column.<a name="line.97"></a>
 <span class="sourceLineNo">098</span>    VERSION_DELETED, // The KeyValue is deleted by a version delete.<a name="line.98"></a>
-<span class="sourceLineNo">099</span>    NOT_DELETED<a name="line.99"></a>
-<span class="sourceLineNo">100</span>  }<a name="line.100"></a>
-<span class="sourceLineNo">101</span><a name="line.101"></a>
-<span class="sourceLineNo">102</span>}<a name="line.102"></a>
+<span class="sourceLineNo">099</span>    NOT_DELETED,<a name="line.99"></a>
+<span class="sourceLineNo">100</span>    VERSION_MASKED  // The KeyValue is masked by max number of versions which is considered as<a name="line.100"></a>
+<span class="sourceLineNo">101</span>                    // deleted in strong semantics of versions(See MvccTracker)<a name="line.101"></a>
+<span class="sourceLineNo">102</span>  }<a name="line.102"></a>
+<span class="sourceLineNo">103</span><a name="line.103"></a>
+<span class="sourceLineNo">104</span>}<a name="line.104"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/21766f4a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.html
index 842fc3c..114dcb8 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/querymatcher/DeleteTracker.html
@@ -104,10 +104,12 @@
 <span class="sourceLineNo">096</span>    FAMILY_VERSION_DELETED, // The KeyValue is deleted by a delete family version.<a name="line.96"></a>
 <span class="sourceLineNo">097</span>    COLUMN_DELETED, // The KeyValue is deleted by a delete column.<a name="line.97"></a>
 <span class="sourceLineNo">098</span>    VERSION_DELETED, // The KeyValue is deleted by a version delete.<a name="line.98"></a>
-<span class="sourceLineNo">099</span>    NOT_DELETED<a name="line.99"></a>
-<span class="sourceLineNo">100</span>  }<a name="line.100"></a>
-<span class="sourceLineNo">101</span><a name="line.101"></a>
-<span class="sourceLineNo">102</span>}<a name="line.102"></a>
+<span class="sourceLineNo">099</span>    NOT_DELETED,<a name="line.99"></a>
+<span class="sourceLineNo">100</span>    VERSION_MASKED  // The KeyValue is masked by max number of versions which is considered as<a name="line.100"></a>
+<span class="sourceLineNo">101</span>                    // deleted in strong semantics of versions(See MvccTracker)<a name="line.101"></a>
+<span class="sourceLineNo">102</span>  }<a name="line.102"></a>
+<span class="sourceLineNo">103</span><a name="line.103"></a>
+<span class="sourceLineNo">104</span>}<a name="line.104"></a>
 
 
 


Mime
View raw message