Published site at 4281cb3b9574333fab0e7c028c9c0d7e5b320c73.
authorjenkins <builds@apache.org>
Wed, 26 Dec 2018 14:51:21 +0000 (14:51 +0000)
committerjenkins <builds@apache.org>
Wed, 26 Dec 2018 14:51:21 +0000 (14:51 +0000)
60 files changed:
acid-semantics.html
apache_hbase_reference_guide.pdf
book.html
bulk-loads.html
checkstyle-aggregate.html
checkstyle.rss
coc.html
dependencies.html
dependency-convergence.html
dependency-info.html
dependency-management.html
devapidocs/constant-values.html
devapidocs/index-all.html
devapidocs/org/apache/hadoop/hbase/class-use/Cell.html
devapidocs/org/apache/hadoop/hbase/client/class-use/Durability.html
devapidocs/org/apache/hadoop/hbase/client/class-use/Mutation.html
devapidocs/org/apache/hadoop/hbase/regionserver/HRegion.html
devapidocs/org/apache/hadoop/hbase/regionserver/class-use/HStore.html
devapidocs/org/apache/hadoop/hbase/regionserver/class-use/Region.Operation.html
devapidocs/org/apache/hadoop/hbase/wal/class-use/WALEdit.html
devapidocs/src-html/org/apache/hadoop/hbase/Version.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.BatchOperation.Visitor.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.BatchOperation.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.BulkLoadListener.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.FlushResult.Result.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.FlushResult.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.FlushResultImpl.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.MutationBatchOperation.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.ObservedExceptionsInBatch.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.PrepareFlushResult.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.RegionScannerImpl.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.ReplayBatchOperation.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.RowLockContext.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.RowLockImpl.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.WriteState.html
devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.html
downloads.html
export_control.html
index.html
integration.html
issue-tracking.html
license.html
mail-lists.html
metrics.html
old_news.html
plugin-management.html
plugins.html
poweredbyhbase.html
project-info.html
project-reports.html
project-summary.html
pseudo-distributed.html
replication.html
resources.html
source-repository.html
sponsors.html
supportingprojects.html
team-list.html
testdevapidocs/org/apache/hadoop/hbase/regionserver/wal/TestDurability.html
testdevapidocs/src-html/org/apache/hadoop/hbase/regionserver/wal/TestDurability.html

index cc12b83..f37e48c 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181225" />
+    <meta name="Date-Revision-yyyymmdd" content="20181226" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013;  
       Apache HBase (TM) ACID Properties
@@ -611,7 +611,7 @@ under the License. -->
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-12-25</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-12-26</li>
             </p>
                 </div>
 
index ec4358f..1599e36 100644 (file)
@@ -5,8 +5,8 @@
 /Author (Apache HBase Team)
 /Creator (Asciidoctor PDF 1.5.0.alpha.15, based on Prawn 2.2.2)
 /Producer (Apache HBase Team)
-/ModDate (D:20181225143152+00'00')
-/CreationDate (D:20181225144656+00'00')
+/ModDate (D:20181226143240+00'00')
+/CreationDate (D:20181226144805+00'00')
 >>
 endobj
 2 0 obj
index 57d4dcc..af029d9 100644 (file)
--- a/book.html
+++ b/book.html
@@ -41371,7 +41371,7 @@ org/apache/hadoop/hbase/security/access/AccessControlClient.revoke:(Lorg/apache/
 <div id="footer">
 <div id="footer-text">
 Version 3.0.0-SNAPSHOT<br>
-Last updated 2018-12-25 14:31:52 UTC
+Last updated 2018-12-26 14:32:40 UTC
 </div>
 </div>
 </body>
index c5ef841..2a9316d 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181225" />
+    <meta name="Date-Revision-yyyymmdd" content="20181226" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013;  
       Bulk Loads in Apache HBase (TM)
@@ -316,7 +316,7 @@ under the License. -->
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-12-25</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-12-26</li>
             </p>
                 </div>
 
index a932005..3730fa8 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181225" />
+    <meta name="Date-Revision-yyyymmdd" content="20181226" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Checkstyle Results</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" />
 <td>3824</td>
 <td>0</td>
 <td>0</td>
-<td>14671</td></tr></table></div>
+<td>14669</td></tr></table></div>
 <div class="section">
 <h2><a name="Files"></a>Files</h2>
 <table border="0" class="table table-striped">
 <td><a href="#org.apache.hadoop.hbase.regionserver.HRegion.java">org/apache/hadoop/hbase/regionserver/HRegion.java</a></td>
 <td>0</td>
 <td>0</td>
-<td>208</td></tr>
+<td>206</td></tr>
 <tr class="b">
 <td><a href="#org.apache.hadoop.hbase.regionserver.HRegionFileSystem.java">org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java</a></td>
 <td>0</td>
 <td><a class="externalLink" href="http://checkstyle.sourceforge.net/config_javadoc.html#JavadocTagContinuationIndentation">JavadocTagContinuationIndentation</a>
 <ul>
 <li>offset: <tt>&quot;2&quot;</tt></li></ul></td>
-<td>728</td>
+<td>727</td>
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td></tr>
 <tr class="a">
 <td></td>
 <td><a class="externalLink" href="http://checkstyle.sourceforge.net/config_javadoc.html#NonEmptyAtclauseDescription">NonEmptyAtclauseDescription</a></td>
-<td>3407</td>
+<td>3406</td>
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td></tr>
 <tr class="b">
 <td>misc</td>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
-<td>NonEmptyAtclauseDescription</td>
+<td>JavadocTagContinuationIndentation</td>
 <td>Javadoc comment at column 0 has parse error. Details: no viable alternative at input '   *' while parsing JAVADOC_TAG</td>
 <td>117</td></tr>
 <tr class="a">
 <td>javadoc</td>
 <td>JavadocTagContinuationIndentation</td>
 <td>Line continuation have incorrect indentation level, expected level should be 2.</td>
-<td>7970</td></tr>
+<td>7969</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>JavadocTagContinuationIndentation</td>
 <td>Line continuation have incorrect indentation level, expected level should be 2.</td>
-<td>8010</td></tr>
-<tr class="b">
-<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
-<td>javadoc</td>
-<td>JavadocTagContinuationIndentation</td>
-<td>Line continuation have incorrect indentation level, expected level should be 2.</td>
 <td>8011</td></tr>
-<tr class="a">
-<td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
-<td>javadoc</td>
-<td>JavadocTagContinuationIndentation</td>
-<td>Line continuation have incorrect indentation level, expected level should be 2.</td>
-<td>8013</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>sizes</td>
 <td>LineLength</td>
 <td>Line is longer than 100 characters (found 110).</td>
-<td>8060</td></tr>
+<td>8051</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>sizes</td>
 <td>LineLength</td>
 <td>Line is longer than 100 characters (found 120).</td>
-<td>8061</td></tr>
+<td>8052</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>sizes</td>
 <td>LineLength</td>
 <td>Line is longer than 100 characters (found 101).</td>
-<td>8068</td></tr>
+<td>8058</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>sizes</td>
 <td>LineLength</td>
 <td>Line is longer than 100 characters (found 106).</td>
-<td>8095</td></tr>
+<td>8082</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>JavadocTagContinuationIndentation</td>
 <td>Line continuation have incorrect indentation level, expected level should be 2.</td>
-<td>8218</td></tr>
+<td>8205</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def modifier' has incorrect indentation level 6, expected level should be one of the following: 8, 10.</td>
-<td>8286</td></tr>
+<td>8273</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'if' has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>8288</td></tr>
+<td>8275</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'if' child has incorrect indentation level 10, expected level should be one of the following: 12, 14.</td>
-<td>8289</td></tr>
+<td>8276</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'if rcurly' has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>8290</td></tr>
+<td>8277</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def rcurly' has incorrect indentation level 6, expected level should be one of the following: 8, 10.</td>
-<td>8291</td></tr>
+<td>8278</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'object def rcurly' has incorrect indentation level 4, expected level should be one of the following: 6, 8.</td>
-<td>8292</td></tr>
+<td>8279</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>8458</td></tr>
+<td>8445</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'else' construct must use '{}'s.</td>
-<td>8459</td></tr>
+<td>8446</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>8461</td></tr>
+<td>8448</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'else' construct must use '{}'s.</td>
-<td>8462</td></tr>
+<td>8449</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>8472</td></tr>
+<td>8459</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'else' construct must use '{}'s.</td>
-<td>8473</td></tr>
+<td>8460</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'case' child has incorrect indentation level 6, expected level should be 8.</td>
-<td>8543</td></tr>
+<td>8530</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'if' has incorrect indentation level 8, expected level should be 10.</td>
-<td>8545</td></tr>
+<td>8532</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'if' child has incorrect indentation level 10, expected level should be 12.</td>
-<td>8546</td></tr>
+<td>8533</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'if rcurly' has incorrect indentation level 8, expected level should be 10.</td>
-<td>8547</td></tr>
+<td>8534</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'block' child has incorrect indentation level 8, expected level should be 10.</td>
-<td>8548</td></tr>
+<td>8535</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'case' child has incorrect indentation level 6, expected level should be 8.</td>
-<td>8549</td></tr>
+<td>8536</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'block' child has incorrect indentation level 8, expected level should be 10.</td>
-<td>8551</td></tr>
+<td>8538</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'case' child has incorrect indentation level 6, expected level should be 8.</td>
-<td>8552</td></tr>
+<td>8539</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'block' child has incorrect indentation level 8, expected level should be 10.</td>
-<td>8554</td></tr>
+<td>8541</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'case' child has incorrect indentation level 6, expected level should be 8.</td>
-<td>8555</td></tr>
+<td>8542</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'case' child has incorrect indentation level 6, expected level should be 8.</td>
-<td>8558</td></tr>
+<td>8545</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'case' child has incorrect indentation level 6, expected level should be 8.</td>
-<td>8561</td></tr>
+<td>8548</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'block' child has incorrect indentation level 8, expected level should be 10.</td>
-<td>8562</td></tr></table></div>
+<td>8549</td></tr></table></div>
 <div class="section">
 <h3 id="org.apache.hadoop.hbase.regionserver.HRegionFileSystem.java">org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java</h3>
 <table border="0" class="table table-striped">
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-12-25</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-12-26</li>
             </p>
                 </div>
 
index ecd03fd..ab965a5 100644 (file)
@@ -26,7 +26,7 @@ under the License.
     <copyright>&#169;2007 - 2018 The Apache Software Foundation</copyright>
     <item>
       <title>File: 3824,
-             Errors: 14671,
+             Errors: 14669,
              Warnings: 0,
              Infos: 0
       </title>
@@ -50525,7 +50525,7 @@ under the License.
                   0
                 </td>
                 <td>
-                  208
+                  206
                 </td>
               </tr>
                           <tr>
index 9ea987e..27adafd 100644 (file)
--- a/coc.html
+++ b/coc.html
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181225" />
+    <meta name="Date-Revision-yyyymmdd" content="20181226" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; 
       Code of Conduct Policy
@@ -385,7 +385,7 @@ email to <a class="externalLink" href="mailto:private@hbase.apache.org">the priv
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-12-25</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-12-26</li>
             </p>
                 </div>
 
index 97a4c42..c504435 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181225" />
+    <meta name="Date-Revision-yyyymmdd" content="20181226" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Project Dependencies</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" />
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-12-25</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-12-26</li>
             </p>
                 </div>
 
index f471a82..0bd1ffc 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181225" />
+    <meta name="Date-Revision-yyyymmdd" content="20181226" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Reactor Dependency Convergence</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" />
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-12-25</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-12-26</li>
             </p>
                 </div>
 
index aae0f93..dbe2151 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181225" />
+    <meta name="Date-Revision-yyyymmdd" content="20181226" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Dependency Information</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" />
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-12-25</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-12-26</li>
             </p>
                 </div>
 
index b265fb1..57c1540 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181225" />
+    <meta name="Date-Revision-yyyymmdd" content="20181226" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Project Dependency Management</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" />
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-12-25</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-12-26</li>
             </p>
                 </div>
 
index 96d777c..82e4264 100644 (file)
 <!--   -->
 </a><code>public&nbsp;static&nbsp;final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
 <td><code><a href="org/apache/hadoop/hbase/Version.html#date">date</a></code></td>
-<td class="colLast"><code>"Tue Dec 25 14:42:07 UTC 2018"</code></td>
+<td class="colLast"><code>"Wed Dec 26 14:43:13 UTC 2018"</code></td>
 </tr>
 <tr class="rowColor">
 <td class="colFirst"><a name="org.apache.hadoop.hbase.Version.revision">
 <!--   -->
 </a><code>public&nbsp;static&nbsp;final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
 <td><code><a href="org/apache/hadoop/hbase/Version.html#srcChecksum">srcChecksum</a></code></td>
-<td class="colLast"><code>"d03152c0541006f4439c608cf8ff910c"</code></td>
+<td class="colLast"><code>"412e9c180315ddde676f96c0844bbcff"</code></td>
 </tr>
 <tr class="rowColor">
 <td class="colFirst"><a name="org.apache.hadoop.hbase.Version.url">
index 8235339..bd54112 100644 (file)
@@ -90053,8 +90053,7 @@ service.</div>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/regionserver/HRegion.html#reckonDeltas-org.apache.hadoop.hbase.regionserver.Region.Operation-org.apache.hadoop.hbase.client.Mutation-org.apache.hadoop.hbase.client.Durability-java.util.Map-java.util.List-">reckonDeltas(Region.Operation, Mutation, Durability, Map&lt;HStore, List&lt;Cell&gt;&gt;, List&lt;Cell&gt;)</a></span> - Method in class org.apache.hadoop.hbase.regionserver.<a href="org/apache/hadoop/hbase/regionserver/HRegion.html" title="class in org.apache.hadoop.hbase.regionserver">HRegion</a></dt>
 <dd>
 <div class="block">Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not
- always the same dependent on whether to write WAL or if the amount to increment is zero (in
- this case we write back nothing, just return latest Cell value to the client).</div>
+ always the same dependent on whether to write WAL.</div>
 </dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/regionserver/HRegion.html#reckonDeltasByStore-org.apache.hadoop.hbase.regionserver.HStore-org.apache.hadoop.hbase.regionserver.Region.Operation-org.apache.hadoop.hbase.client.Mutation-org.apache.hadoop.hbase.client.Durability-long-java.util.List-java.util.List-">reckonDeltasByStore(HStore, Region.Operation, Mutation, Durability, long, List&lt;Cell&gt;, List&lt;Cell&gt;)</a></span> - Method in class org.apache.hadoop.hbase.regionserver.<a href="org/apache/hadoop/hbase/regionserver/HRegion.html" title="class in org.apache.hadoop.hbase.regionserver">HRegion</a></dt>
 <dd>
index fb5e57d..8496269 100644 (file)
@@ -7334,8 +7334,7 @@ service.</div>
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&gt;&nbsp;forMemStore,
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;results)</code>
 <div class="block">Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not
- always the same dependent on whether to write WAL or if the amount to increment is zero (in
- this case we write back nothing, just return latest Cell value to the client).</div>
+ always the same dependent on whether to write WAL.</div>
 </td>
 </tr>
 <tr class="altColor">
@@ -7346,8 +7345,7 @@ service.</div>
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&gt;&nbsp;forMemStore,
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;results)</code>
 <div class="block">Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not
- always the same dependent on whether to write WAL or if the amount to increment is zero (in
- this case we write back nothing, just return latest Cell value to the client).</div>
+ always the same dependent on whether to write WAL.</div>
 </td>
 </tr>
 <tr class="rowColor">
index a669fe5..42fa820 100644 (file)
@@ -559,8 +559,7 @@ the order they are declared.</div>
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&gt;&nbsp;forMemStore,
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;results)</code>
 <div class="block">Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not
- always the same dependent on whether to write WAL or if the amount to increment is zero (in
- this case we write back nothing, just return latest Cell value to the client).</div>
+ always the same dependent on whether to write WAL.</div>
 </td>
 </tr>
 <tr class="altColor">
index 0e7ec40..05f369a 100644 (file)
@@ -982,8 +982,7 @@ Input/OutputFormats, a table indexing MapReduce job, and utility methods.</div>
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&gt;&nbsp;forMemStore,
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;results)</code>
 <div class="block">Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not
- always the same dependent on whether to write WAL or if the amount to increment is zero (in
- this case we write back nothing, just return latest Cell value to the client).</div>
+ always the same dependent on whether to write WAL.</div>
 </td>
 </tr>
 <tr class="rowColor">
index e258dca..17a35ff 100644 (file)
@@ -1986,8 +1986,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/io/HeapSize.html" tit
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&gt;&nbsp;forMemStore,
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;results)</code>
 <div class="block">Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not
- always the same dependent on whether to write WAL or if the amount to increment is zero (in
- this case we write back nothing, just return latest Cell value to the client).</div>
+ always the same dependent on whether to write WAL.</div>
 </td>
 </tr>
 <tr id="i212" class="altColor">
@@ -3354,7 +3353,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/io/HeapSize.html" tit
 <ul class="blockList">
 <li class="blockList">
 <h4>FIXED_OVERHEAD</h4>
-<pre>public static final&nbsp;long <a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8166">FIXED_OVERHEAD</a></pre>
+<pre>public static final&nbsp;long <a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8153">FIXED_OVERHEAD</a></pre>
 </li>
 </ul>
 <a name="DEEP_OVERHEAD">
@@ -3363,7 +3362,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/io/HeapSize.html" tit
 <ul class="blockList">
 <li class="blockList">
 <h4>DEEP_OVERHEAD</h4>
-<pre>public static final&nbsp;long <a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8183">DEEP_OVERHEAD</a></pre>
+<pre>public static final&nbsp;long <a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8170">DEEP_OVERHEAD</a></pre>
 </li>
 </ul>
 <a name="MOCKED_LIST">
@@ -3372,7 +3371,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/io/HeapSize.html" tit
 <ul class="blockListLast">
 <li class="blockList">
 <h4>MOCKED_LIST</h4>
-<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt; <a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8577">MOCKED_LIST</a></pre>
+<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt; <a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8564">MOCKED_LIST</a></pre>
 <div class="block">A mocked list implementation - discards all updates.</div>
 </li>
 </ul>
@@ -7415,15 +7414,14 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>reckonDeltas</h4>
-<pre>private&nbsp;<a href="../../../../../org/apache/hadoop/hbase/wal/WALEdit.html" title="class in org.apache.hadoop.hbase.wal">WALEdit</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.7974">reckonDeltas</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.Operation.html" title="enum in org.apache.hadoop.hbase.regionserver">Region.Operation</a>&nbsp;op,
+<pre>private&nbsp;<a href="../../../../../org/apache/hadoop/hbase/wal/WALEdit.html" title="class in org.apache.hadoop.hbase.wal">WALEdit</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.7973">reckonDeltas</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.Operation.html" title="enum in org.apache.hadoop.hbase.regionserver">Region.Operation</a>&nbsp;op,
                              <a href="../../../../../org/apache/hadoop/hbase/client/Mutation.html" title="class in org.apache.hadoop.hbase.client">Mutation</a>&nbsp;mutation,
                              <a href="../../../../../org/apache/hadoop/hbase/client/Durability.html" title="enum in org.apache.hadoop.hbase.client">Durability</a>&nbsp;effectiveDurability,
                              <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&gt;&nbsp;forMemStore,
                              <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;results)
                       throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not
- always the same dependent on whether to write WAL or if the amount to increment is zero (in
- this case we write back nothing, just return latest Cell value to the client).</div>
+ always the same dependent on whether to write WAL.</div>
 <dl>
 <dt><span class="paramLabel">Parameters:</span></dt>
 <dd><code>results</code> - Fill in here what goes back to the Client if it is non-null (if null, client
@@ -7442,7 +7440,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>reckonDeltasByStore</h4>
-<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8015">reckonDeltasByStore</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>&nbsp;store,
+<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8013">reckonDeltasByStore</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>&nbsp;store,
                                        <a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.Operation.html" title="enum in org.apache.hadoop.hbase.regionserver">Region.Operation</a>&nbsp;op,
                                        <a href="../../../../../org/apache/hadoop/hbase/client/Mutation.html" title="class in org.apache.hadoop.hbase.client">Mutation</a>&nbsp;mutation,
                                        <a href="../../../../../org/apache/hadoop/hbase/client/Durability.html" title="enum in org.apache.hadoop.hbase.client">Durability</a>&nbsp;effectiveDurability,
@@ -7459,9 +7457,8 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <dd><code>op</code> - Whether Increment or Append</dd>
 <dd><code>mutation</code> - The encompassing Mutation object</dd>
 <dd><code>deltas</code> - Changes to apply to this Store; either increment amount or data to append</dd>
-<dd><code>results</code> - In here we accumulate all the Cells we are to return to the client; this List
-  can be larger than what we return in case where delta is zero; i.e. don't write
-  out new values, just return current value. If null, client doesn't want results returned.</dd>
+<dd><code>results</code> - In here we accumulate all the Cells we are to return to the client. If null,
+                client doesn't want results returned.</dd>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>Resulting Cells after <code>deltas</code> have been applied to current
   values. Side effect is our filling out of the <code>results</code> List.</dd>
@@ -7476,7 +7473,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>reckonDelta</h4>
-<pre>private static&nbsp;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8093">reckonDelta</a>(<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;delta,
+<pre>private static&nbsp;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8080">reckonDelta</a>(<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;delta,
                                 <a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;currentCell,
                                 byte[]&nbsp;columnFamily,
                                 long&nbsp;now,
@@ -7495,7 +7492,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>getLongValue</h4>
-<pre>private static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8121">getLongValue</a>(<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;cell)
+<pre>private static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8108">getLongValue</a>(<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&nbsp;cell)
                           throws <a href="../../../../../org/apache/hadoop/hbase/DoNotRetryIOException.html" title="class in org.apache.hadoop.hbase">DoNotRetryIOException</a></pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
@@ -7511,7 +7508,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>get</h4>
-<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8137">get</a>(<a href="../../../../../org/apache/hadoop/hbase/client/Mutation.html" title="class in org.apache.hadoop.hbase.client">Mutation</a>&nbsp;mutation,
+<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8124">get</a>(<a href="../../../../../org/apache/hadoop/hbase/client/Mutation.html" title="class in org.apache.hadoop.hbase.client">Mutation</a>&nbsp;mutation,
                        <a href="../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>&nbsp;store,
                        <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;coordinates,
                        <a href="../../../../../org/apache/hadoop/hbase/client/IsolationLevel.html" title="enum in org.apache.hadoop.hbase.client">IsolationLevel</a>&nbsp;isolation,
@@ -7536,7 +7533,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>sort</h4>
-<pre>private static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8161">sort</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;cells,
+<pre>private static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8148">sort</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;cells,
                                <a href="../../../../../org/apache/hadoop/hbase/CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a>&nbsp;comparator)</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
@@ -7550,7 +7547,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>heapSize</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8200">heapSize</a>()</pre>
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8187">heapSize</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/io/HeapSize.html#heapSize--">heapSize</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/io/HeapSize.html" title="interface in org.apache.hadoop.hbase.io">HeapSize</a></code></dd>
@@ -7566,7 +7563,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>registerService</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8220">registerService</a>(com.google.protobuf.Service&nbsp;instance)</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8207">registerService</a>(com.google.protobuf.Service&nbsp;instance)</pre>
 <div class="block">Registers a new protocol buffer <code>Service</code> subclass as a coprocessor endpoint to
  be available for handling Region#execService(com.google.protobuf.RpcController,
     org.apache.hadoop.hbase.protobuf.generated.ClientProtos.CoprocessorServiceCall) calls.
@@ -7592,7 +7589,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>execService</h4>
-<pre>public&nbsp;com.google.protobuf.Message&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8255">execService</a>(com.google.protobuf.RpcController&nbsp;controller,
+<pre>public&nbsp;com.google.protobuf.Message&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8242">execService</a>(com.google.protobuf.RpcController&nbsp;controller,
                                                org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceCall&nbsp;call)
                                         throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Executes a single protocol buffer coprocessor endpoint <code>Service</code> method using
@@ -7620,7 +7617,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>shouldForceSplit</h4>
-<pre>boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8306">shouldForceSplit</a>()</pre>
+<pre>boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8293">shouldForceSplit</a>()</pre>
 </li>
 </ul>
 <a name="getExplicitSplitPoint--">
@@ -7629,7 +7626,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>getExplicitSplitPoint</h4>
-<pre>byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8310">getExplicitSplitPoint</a>()</pre>
+<pre>byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8297">getExplicitSplitPoint</a>()</pre>
 </li>
 </ul>
 <a name="forceSplit-byte:A-">
@@ -7638,7 +7635,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>forceSplit</h4>
-<pre>void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8314">forceSplit</a>(byte[]&nbsp;sp)</pre>
+<pre>void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8301">forceSplit</a>(byte[]&nbsp;sp)</pre>
 </li>
 </ul>
 <a name="clearSplit--">
@@ -7647,7 +7644,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>clearSplit</h4>
-<pre>void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8323">clearSplit</a>()</pre>
+<pre>void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8310">clearSplit</a>()</pre>
 </li>
 </ul>
 <a name="checkSplit--">
@@ -7656,7 +7653,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>checkSplit</h4>
-<pre>public&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8334">checkSplit</a>()</pre>
+<pre>public&nbsp;byte[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8321">checkSplit</a>()</pre>
 <div class="block">Return the splitpoint. null indicates the region isn't splittable
  If the splitpoint isn't explicitly specified, it will go over the stores
  to find the best splitpoint. Currently the criteria of best splitpoint
@@ -7669,7 +7666,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>getCompactPriority</h4>
-<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8368">getCompactPriority</a>()</pre>
+<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8355">getCompactPriority</a>()</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>The priority that this region should have in the compaction queue</dd>
@@ -7682,7 +7679,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>getCoprocessorHost</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.html" title="class in org.apache.hadoop.hbase.regionserver">RegionCoprocessorHost</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8374">getCoprocessorHost</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.html" title="class in org.apache.hadoop.hbase.regionserver">RegionCoprocessorHost</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8361">getCoprocessorHost</a>()</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>the coprocessor host</dd>
@@ -7695,7 +7692,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>setCoprocessorHost</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8380">setCoprocessorHost</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.html" title="class in org.apache.hadoop.hbase.regionserver">RegionCoprocessorHost</a>&nbsp;coprocessorHost)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8367">setCoprocessorHost</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.html" title="class in org.apache.hadoop.hbase.regionserver">RegionCoprocessorHost</a>&nbsp;coprocessorHost)</pre>
 <dl>
 <dt><span class="paramLabel">Parameters:</span></dt>
 <dd><code>coprocessorHost</code> - the new coprocessor host</dd>
@@ -7708,7 +7705,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>startRegionOperation</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8385">startRegionOperation</a>()
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8372">startRegionOperation</a>()
                           throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.html#startRegionOperation--">Region</a></code></span></div>
 <div class="block">This method needs to be called before any public call that reads or
@@ -7730,7 +7727,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>startRegionOperation</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8390">startRegionOperation</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.Operation.html" title="enum in org.apache.hadoop.hbase.regionserver">Region.Operation</a>&nbsp;op)
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8377">startRegionOperation</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.Operation.html" title="enum in org.apache.hadoop.hbase.regionserver">Region.Operation</a>&nbsp;op)
                           throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.html#startRegionOperation-org.apache.hadoop.hbase.regionserver.Region.Operation-">Region</a></code></span></div>
 <div class="block">This method needs to be called before any public call that reads or
@@ -7754,7 +7751,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>closeRegionOperation</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8429">closeRegionOperation</a>()
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8416">closeRegionOperation</a>()
                           throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.html#closeRegionOperation--">Region</a></code></span></div>
 <div class="block">Closes the region operation lock.</div>
@@ -7772,7 +7769,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>closeRegionOperation</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8434">closeRegionOperation</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.Operation.html" title="enum in org.apache.hadoop.hbase.regionserver">Region.Operation</a>&nbsp;operation)
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8421">closeRegionOperation</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.Operation.html" title="enum in org.apache.hadoop.hbase.regionserver">Region.Operation</a>&nbsp;operation)
                           throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.html#closeRegionOperation-org.apache.hadoop.hbase.regionserver.Region.Operation-">Region</a></code></span></div>
 <div class="block">Closes the region operation lock. This needs to be called in the finally block corresponding
@@ -7791,7 +7788,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>startBulkRegionOperation</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8453">startBulkRegionOperation</a>(boolean&nbsp;writeLockNeeded)
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8440">startBulkRegionOperation</a>(boolean&nbsp;writeLockNeeded)
                                throws <a href="../../../../../org/apache/hadoop/hbase/NotServingRegionException.html" title="class in org.apache.hadoop.hbase">NotServingRegionException</a>,
                                       <a href="../../../../../org/apache/hadoop/hbase/RegionTooBusyException.html" title="class in org.apache.hadoop.hbase">RegionTooBusyException</a>,
                                       <a href="https://docs.oracle.com/javase/8/docs/api/java/io/InterruptedIOException.html?is-external=true" title="class or interface in java.io">InterruptedIOException</a></pre>
@@ -7813,7 +7810,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>closeBulkRegionOperation</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8471">closeBulkRegionOperation</a>()</pre>
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8458">closeBulkRegionOperation</a>()</pre>
 <div class="block">Closes the lock. This needs to be called in the finally block corresponding
  to the try block of #startRegionOperation</div>
 </li>
@@ -7824,7 +7821,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>recordMutationWithoutWal</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8480">recordMutationWithoutWal</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;byte[],<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&gt;&nbsp;familyMap)</pre>
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8467">recordMutationWithoutWal</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;byte[],<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&gt;&nbsp;familyMap)</pre>
 <div class="block">Update LongAdders for number of puts without wal and the size of possible data loss.
  These information are exposed by the region server metrics.</div>
 </li>
@@ -7835,7 +7832,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>lock</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8502">lock</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks">Lock</a>&nbsp;lock)
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8489">lock</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks">Lock</a>&nbsp;lock)
            throws <a href="../../../../../org/apache/hadoop/hbase/RegionTooBusyException.html" title="class in org.apache.hadoop.hbase">RegionTooBusyException</a>,
                   <a href="https://docs.oracle.com/javase/8/docs/api/java/io/InterruptedIOException.html?is-external=true" title="class or interface in java.io">InterruptedIOException</a></pre>
 <dl>
@@ -7851,7 +7848,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>lock</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8511">lock</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks">Lock</a>&nbsp;lock,
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8498">lock</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/Lock.html?is-external=true" title="class or interface in java.util.concurrent.locks">Lock</a>&nbsp;lock,
                   int&nbsp;multiplier)
            throws <a href="../../../../../org/apache/hadoop/hbase/RegionTooBusyException.html" title="class in org.apache.hadoop.hbase">RegionTooBusyException</a>,
                   <a href="https://docs.oracle.com/javase/8/docs/api/java/io/InterruptedIOException.html?is-external=true" title="class or interface in java.io">InterruptedIOException</a></pre>
@@ -7871,7 +7868,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>sync</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8538">sync</a>(long&nbsp;txid,
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8525">sync</a>(long&nbsp;txid,
                   <a href="../../../../../org/apache/hadoop/hbase/client/Durability.html" title="enum in org.apache.hadoop.hbase.client">Durability</a>&nbsp;durability)
            throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Calls sync with the given transaction ID</div>
@@ -7889,7 +7886,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>shouldSyncWAL</h4>
-<pre>private&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8570">shouldSyncWAL</a>()</pre>
+<pre>private&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8557">shouldSyncWAL</a>()</pre>
 <div class="block">Check whether we should sync the wal from the table's durability settings</div>
 </li>
 </ul>
@@ -7899,7 +7896,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>getOpenSeqNum</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8601">getOpenSeqNum</a>()</pre>
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8588">getOpenSeqNum</a>()</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>the latest sequence number that was read from storage when this region was opened</dd>
@@ -7912,7 +7909,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>getMaxStoreSeqId</h4>
-<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;byte[],<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8606">getMaxStoreSeqId</a>()</pre>
+<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;byte[],<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8593">getMaxStoreSeqId</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.html#getMaxStoreSeqId--">getMaxStoreSeqId</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.html" title="interface in org.apache.hadoop.hbase.regionserver">Region</a></code></dd>
@@ -7928,7 +7925,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>getOldestSeqIdOfStore</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8610">getOldestSeqIdOfStore</a>(byte[]&nbsp;familyName)</pre>
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8597">getOldestSeqIdOfStore</a>(byte[]&nbsp;familyName)</pre>
 </li>
 </ul>
 <a name="getCompactionState--">
@@ -7937,7 +7934,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>getCompactionState</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/client/CompactionState.html" title="enum in org.apache.hadoop.hbase.client">CompactionState</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8615">getCompactionState</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/client/CompactionState.html" title="enum in org.apache.hadoop.hbase.client">CompactionState</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8602">getCompactionState</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.html#getCompactionState--">getCompactionState</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.html" title="interface in org.apache.hadoop.hbase.regionserver">Region</a></code></dd>
@@ -7952,7 +7949,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>reportCompactionRequestStart</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8621">reportCompactionRequestStart</a>(boolean&nbsp;isMajor)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8608">reportCompactionRequestStart</a>(boolean&nbsp;isMajor)</pre>
 </li>
 </ul>
 <a name="reportCompactionRequestEnd-boolean-int-long-">
@@ -7961,7 +7958,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>reportCompactionRequestEnd</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8625">reportCompactionRequestEnd</a>(boolean&nbsp;isMajor,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8612">reportCompactionRequestEnd</a>(boolean&nbsp;isMajor,
                                        int&nbsp;numFiles,
                                        long&nbsp;filesSizeCompacted)</pre>
 </li>
@@ -7972,7 +7969,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>reportCompactionRequestFailure</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8636">reportCompactionRequestFailure</a>()</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8623">reportCompactionRequestFailure</a>()</pre>
 </li>
 </ul>
 <a name="incrementCompactionsQueuedCount--">
@@ -7981,7 +7978,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>incrementCompactionsQueuedCount</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8640">incrementCompactionsQueuedCount</a>()</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8627">incrementCompactionsQueuedCount</a>()</pre>
 </li>
 </ul>
 <a name="decrementCompactionsQueuedCount--">
@@ -7990,7 +7987,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>decrementCompactionsQueuedCount</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8644">decrementCompactionsQueuedCount</a>()</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8631">decrementCompactionsQueuedCount</a>()</pre>
 </li>
 </ul>
 <a name="incrementFlushesQueuedCount--">
@@ -7999,7 +7996,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>incrementFlushesQueuedCount</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8648">incrementFlushesQueuedCount</a>()</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8635">incrementFlushesQueuedCount</a>()</pre>
 </li>
 </ul>
 <a name="getReadPoint--">
@@ -8008,7 +8005,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>getReadPoint</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8653">getReadPoint</a>()</pre>
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8640">getReadPoint</a>()</pre>
 </li>
 </ul>
 <a name="onConfigurationChange-org.apache.hadoop.conf.Configuration-">
@@ -8017,7 +8014,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>onConfigurationChange</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8661">onConfigurationChange</a>(org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8648">onConfigurationChange</a>(org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
 <div class="block">This method would be called by the <a href="../../../../../org/apache/hadoop/hbase/conf/ConfigurationManager.html" title="class in org.apache.hadoop.hbase.conf"><code>ConfigurationManager</code></a>
  object when the <code>Configuration</code> object is reloaded from disk.</div>
 <dl>
@@ -8032,7 +8029,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>registerChildren</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8669">registerChildren</a>(<a href="../../../../../org/apache/hadoop/hbase/conf/ConfigurationManager.html" title="class in org.apache.hadoop.hbase.conf">ConfigurationManager</a>&nbsp;manager)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8656">registerChildren</a>(<a href="../../../../../org/apache/hadoop/hbase/conf/ConfigurationManager.html" title="class in org.apache.hadoop.hbase.conf">ConfigurationManager</a>&nbsp;manager)</pre>
 <div class="block">Needs to be called to register the children to the manager.</div>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
@@ -8048,7 +8045,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>deregisterChildren</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8678">deregisterChildren</a>(<a href="../../../../../org/apache/hadoop/hbase/conf/ConfigurationManager.html" title="class in org.apache.hadoop.hbase.conf">ConfigurationManager</a>&nbsp;manager)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8665">deregisterChildren</a>(<a href="../../../../../org/apache/hadoop/hbase/conf/ConfigurationManager.html" title="class in org.apache.hadoop.hbase.conf">ConfigurationManager</a>&nbsp;manager)</pre>
 <div class="block">Needs to be called to deregister the children from the manager.</div>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
@@ -8064,7 +8061,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>getCellComparator</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8683">getCellComparator</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/CellComparator.html" title="interface in org.apache.hadoop.hbase">CellComparator</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8670">getCellComparator</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.html#getCellComparator--">Region</a></code></span></div>
 <div class="block">The comparator to be used with the region</div>
 <dl>
@@ -8079,7 +8076,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>getMemStoreFlushSize</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8688">getMemStoreFlushSize</a>()</pre>
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8675">getMemStoreFlushSize</a>()</pre>
 </li>
 </ul>
 <a name="throwException-java.lang.String-java.lang.String-">
@@ -8088,7 +8085,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>throwException</h4>
-<pre>void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8694">throwException</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;title,
+<pre>void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8681">throwException</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;title,
                     <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;regionName)</pre>
 </li>
 </ul>
@@ -8098,7 +8095,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>requestCompaction</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8715">requestCompaction</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;why,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8702">requestCompaction</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;why,
                               int&nbsp;priority,
                               boolean&nbsp;major,
                               <a href="../../../../../org/apache/hadoop/hbase/regionserver/compactions/CompactionLifeCycleTracker.html" title="interface in org.apache.hadoop.hbase.regionserver.compactions">CompactionLifeCycleTracker</a>&nbsp;tracker)
@@ -8119,7 +8116,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>requestCompaction</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8725">requestCompaction</a>(byte[]&nbsp;family,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8712">requestCompaction</a>(byte[]&nbsp;family,
                               <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;why,
                               int&nbsp;priority,
                               boolean&nbsp;major,
@@ -8141,7 +8138,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>requestFlushIfNeeded</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8739">requestFlushIfNeeded</a>()
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8726">requestFlushIfNeeded</a>()
                            throws <a href="../../../../../org/apache/hadoop/hbase/RegionTooBusyException.html" title="class in org.apache.hadoop.hbase">RegionTooBusyException</a></pre>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -8155,7 +8152,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>requestFlush</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8745">requestFlush</a>()</pre>
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8732">requestFlush</a>()</pre>
 </li>
 </ul>
 <a name="requestFlush0-org.apache.hadoop.hbase.regionserver.FlushLifeCycleTracker-">
@@ -8164,7 +8161,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>requestFlush0</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8752">requestFlush0</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/FlushLifeCycleTracker.html" title="interface in org.apache.hadoop.hbase.regionserver">FlushLifeCycleTracker</a>&nbsp;tracker)</pre>
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8739">requestFlush0</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/FlushLifeCycleTracker.html" title="interface in org.apache.hadoop.hbase.regionserver">FlushLifeCycleTracker</a>&nbsp;tracker)</pre>
 </li>
 </ul>
 <a name="requestFlush-org.apache.hadoop.hbase.regionserver.FlushLifeCycleTracker-">
@@ -8173,7 +8170,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockList">
 <li class="blockList">
 <h4>requestFlush</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8772">requestFlush</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/FlushLifeCycleTracker.html" title="interface in org.apache.hadoop.hbase.regionserver">FlushLifeCycleTracker</a>&nbsp;tracker)
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8759">requestFlush</a>(<a href="../../../../../org/apache/hadoop/hbase/regionserver/FlushLifeCycleTracker.html" title="interface in org.apache.hadoop.hbase.regionserver">FlushLifeCycleTracker</a>&nbsp;tracker)
                   throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/Region.html#requestFlush-org.apache.hadoop.hbase.regionserver.FlushLifeCycleTracker-">Region</a></code></span></div>
 <div class="block">Request flush on this region.</div>
@@ -8191,7 +8188,7 @@ public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-ht
 <ul class="blockListLast">
 <li class="blockList">
 <h4>decorateRegionConfiguration</h4>
-<pre>static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8781">decorateRegionConfiguration</a>(org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
+<pre>static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/regionserver/HRegion.html#line.8768">decorateRegionConfiguration</a>(org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
 <div class="block">This method modifies the region's configuration in order to inject replication-related
  features</div>
 <dl>
index a4cef1e..034c472 100644 (file)
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&gt;&nbsp;forMemStore,
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;results)</code>
 <div class="block">Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not
- always the same dependent on whether to write WAL or if the amount to increment is zero (in
- this case we write back nothing, just return latest Cell value to the client).</div>
+ always the same dependent on whether to write WAL.</div>
 </td>
 </tr>
 </tbody>
index 2b9caea..12e15aa 100644 (file)
@@ -202,8 +202,7 @@ the order they are declared.</div>
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&gt;&nbsp;forMemStore,
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;results)</code>
 <div class="block">Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not
- always the same dependent on whether to write WAL or if the amount to increment is zero (in
- this case we write back nothing, just return latest Cell value to the client).</div>
+ always the same dependent on whether to write WAL.</div>
 </td>
 </tr>
 <tr class="rowColor">
index 76d0ebd..3bd864a 100644 (file)
@@ -348,8 +348,7 @@ Input/OutputFormats, a table indexing MapReduce job, and utility methods.</div>
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/regionserver/HStore.html" title="class in org.apache.hadoop.hbase.regionserver">HStore</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&gt;&nbsp;forMemStore,
             <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/Cell.html" title="interface in org.apache.hadoop.hbase">Cell</a>&gt;&nbsp;results)</code>
 <div class="block">Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not
- always the same dependent on whether to write WAL or if the amount to increment is zero (in
- this case we write back nothing, just return latest Cell value to the client).</div>
+ always the same dependent on whether to write WAL.</div>
 </td>
 </tr>
 </tbody>
index f25c114..2dbe425 100644 (file)
@@ -18,9 +18,9 @@
 <span class="sourceLineNo">010</span>  public static final String version = "3.0.0-SNAPSHOT";<a name="line.10"></a>
 <span class="sourceLineNo">011</span>  public static final String revision = "";<a name="line.11"></a>
 <span class="sourceLineNo">012</span>  public static final String user = "jenkins";<a name="line.12"></a>
-<span class="sourceLineNo">013</span>  public static final String date = "Tue Dec 25 14:42:07 UTC 2018";<a name="line.13"></a>
+<span class="sourceLineNo">013</span>  public static final String date = "Wed Dec 26 14:43:13 UTC 2018";<a name="line.13"></a>
 <span class="sourceLineNo">014</span>  public static final String url = "git://jenkins-websites1.apache.org/home/jenkins/jenkins-slave/workspace/hbase_generate_website/hbase";<a name="line.14"></a>
-<span class="sourceLineNo">015</span>  public static final String srcChecksum = "d03152c0541006f4439c608cf8ff910c";<a name="line.15"></a>
+<span class="sourceLineNo">015</span>  public static final String srcChecksum = "412e9c180315ddde676f96c0844bbcff";<a name="line.15"></a>
 <span class="sourceLineNo">016</span>}<a name="line.16"></a>
 
 
index 68e9bfe..0f5a095 100644 (file)
 <span class="sourceLineNo">7963</span><a name="line.7963"></a>
 <span class="sourceLineNo">7964</span>  /**<a name="line.7964"></a>
 <span class="sourceLineNo">7965</span>   * Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not<a name="line.7965"></a>
-<span class="sourceLineNo">7966</span>   * always the same dependent on whether to write WAL or if the amount to increment is zero (in<a name="line.7966"></a>
-<span class="sourceLineNo">7967</span>   * this case we write back nothing, just return latest Cell value to the client).<a name="line.7967"></a>
-<span class="sourceLineNo">7968</span>   *<a name="line.7968"></a>
-<span class="sourceLineNo">7969</span>   * @param results Fill in here what goes back to the Client if it is non-null (if null, client<a name="line.7969"></a>
-<span class="sourceLineNo">7970</span>   *  doesn't want results).<a name="line.7970"></a>
-<span class="sourceLineNo">7971</span>   * @param forMemStore Fill in here what to apply to the MemStore (by Store).<a name="line.7971"></a>
-<span class="sourceLineNo">7972</span>   * @return A WALEdit to apply to WAL or null if we are to skip the WAL.<a name="line.7972"></a>
-<span class="sourceLineNo">7973</span>   */<a name="line.7973"></a>
-<span class="sourceLineNo">7974</span>  private WALEdit reckonDeltas(Operation op, Mutation mutation, Durability effectiveDurability,<a name="line.7974"></a>
-<span class="sourceLineNo">7975</span>      Map&lt;HStore, List&lt;Cell&gt;&gt; forMemStore, List&lt;Cell&gt; results) throws IOException {<a name="line.7975"></a>
-<span class="sourceLineNo">7976</span>    WALEdit walEdit = null;<a name="line.7976"></a>
-<span class="sourceLineNo">7977</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.7977"></a>
-<span class="sourceLineNo">7978</span>    final boolean writeToWAL = effectiveDurability != Durability.SKIP_WAL;<a name="line.7978"></a>
-<span class="sourceLineNo">7979</span>    // Process a Store/family at a time.<a name="line.7979"></a>
-<span class="sourceLineNo">7980</span>    for (Map.Entry&lt;byte [], List&lt;Cell&gt;&gt; entry: mutation.getFamilyCellMap().entrySet()) {<a name="line.7980"></a>
-<span class="sourceLineNo">7981</span>      final byte[] columnFamilyName = entry.getKey();<a name="line.7981"></a>
-<span class="sourceLineNo">7982</span>      List&lt;Cell&gt; deltas = entry.getValue();<a name="line.7982"></a>
-<span class="sourceLineNo">7983</span>      HStore store = this.stores.get(columnFamilyName);<a name="line.7983"></a>
-<span class="sourceLineNo">7984</span>      // Reckon for the Store what to apply to WAL and MemStore.<a name="line.7984"></a>
-<span class="sourceLineNo">7985</span>      List&lt;Cell&gt; toApply =<a name="line.7985"></a>
-<span class="sourceLineNo">7986</span>        reckonDeltasByStore(store, op, mutation, effectiveDurability, now, deltas, results);<a name="line.7986"></a>
-<span class="sourceLineNo">7987</span>      if (!toApply.isEmpty()) {<a name="line.7987"></a>
-<span class="sourceLineNo">7988</span>        forMemStore.put(store, toApply);<a name="line.7988"></a>
-<span class="sourceLineNo">7989</span>        if (writeToWAL) {<a name="line.7989"></a>
-<span class="sourceLineNo">7990</span>          if (walEdit == null) {<a name="line.7990"></a>
-<span class="sourceLineNo">7991</span>            walEdit = new WALEdit();<a name="line.7991"></a>
-<span class="sourceLineNo">7992</span>          }<a name="line.7992"></a>
-<span class="sourceLineNo">7993</span>          walEdit.getCells().addAll(toApply);<a name="line.7993"></a>
-<span class="sourceLineNo">7994</span>        }<a name="line.7994"></a>
-<span class="sourceLineNo">7995</span>      }<a name="line.7995"></a>
-<span class="sourceLineNo">7996</span>    }<a name="line.7996"></a>
-<span class="sourceLineNo">7997</span>    return walEdit;<a name="line.7997"></a>
-<span class="sourceLineNo">7998</span>  }<a name="line.7998"></a>
-<span class="sourceLineNo">7999</span><a name="line.7999"></a>
-<span class="sourceLineNo">8000</span>  /**<a name="line.8000"></a>
-<span class="sourceLineNo">8001</span>   * Reckon the Cells to apply to WAL, memstore, and to return to the Client in passed<a name="line.8001"></a>
-<span class="sourceLineNo">8002</span>   * column family/Store.<a name="line.8002"></a>
-<span class="sourceLineNo">8003</span>   *<a name="line.8003"></a>
-<span class="sourceLineNo">8004</span>   * Does Get of current value and then adds passed in deltas for this Store returning the result.<a name="line.8004"></a>
-<span class="sourceLineNo">8005</span>   *<a name="line.8005"></a>
-<span class="sourceLineNo">8006</span>   * @param op Whether Increment or Append<a name="line.8006"></a>
-<span class="sourceLineNo">8007</span>   * @param mutation The encompassing Mutation object<a name="line.8007"></a>
-<span class="sourceLineNo">8008</span>   * @param deltas Changes to apply to this Store; either increment amount or data to append<a name="line.8008"></a>
-<span class="sourceLineNo">8009</span>   * @param results In here we accumulate all the Cells we are to return to the client; this List<a name="line.8009"></a>
-<span class="sourceLineNo">8010</span>   *  can be larger than what we return in case where delta is zero; i.e. don't write<a name="line.8010"></a>
-<span class="sourceLineNo">8011</span>   *  out new values, just return current value. If null, client doesn't want results returned.<a name="line.8011"></a>
-<span class="sourceLineNo">8012</span>   * @return Resulting Cells after &lt;code&gt;deltas&lt;/code&gt; have been applied to current<a name="line.8012"></a>
-<span class="sourceLineNo">8013</span>   *  values. Side effect is our filling out of the &lt;code&gt;results&lt;/code&gt; List.<a name="line.8013"></a>
-<span class="sourceLineNo">8014</span>   */<a name="line.8014"></a>
-<span class="sourceLineNo">8015</span>  private List&lt;Cell&gt; reckonDeltasByStore(HStore store, Operation op, Mutation mutation,<a name="line.8015"></a>
-<span class="sourceLineNo">8016</span>      Durability effectiveDurability, long now, List&lt;Cell&gt; deltas, List&lt;Cell&gt; results)<a name="line.8016"></a>
-<span class="sourceLineNo">8017</span>      throws IOException {<a name="line.8017"></a>
-<span class="sourceLineNo">8018</span>    byte[] columnFamily = store.getColumnFamilyDescriptor().getName();<a name="line.8018"></a>
-<span class="sourceLineNo">8019</span>    List&lt;Cell&gt; toApply = new ArrayList&lt;&gt;(deltas.size());<a name="line.8019"></a>
-<span class="sourceLineNo">8020</span>    // Get previous values for all columns in this family.<a name="line.8020"></a>
-<span class="sourceLineNo">8021</span>    TimeRange tr = null;<a name="line.8021"></a>
-<span class="sourceLineNo">8022</span>    switch (op) {<a name="line.8022"></a>
-<span class="sourceLineNo">8023</span>      case INCREMENT:<a name="line.8023"></a>
-<span class="sourceLineNo">8024</span>        tr = ((Increment)mutation).getTimeRange();<a name="line.8024"></a>
-<span class="sourceLineNo">8025</span>        break;<a name="line.8025"></a>
-<span class="sourceLineNo">8026</span>      case APPEND:<a name="line.8026"></a>
-<span class="sourceLineNo">8027</span>        tr = ((Append)mutation).getTimeRange();<a name="line.8027"></a>
+<span class="sourceLineNo">7966</span>   * always the same dependent on whether to write WAL.<a name="line.7966"></a>
+<span class="sourceLineNo">7967</span>   *<a name="line.7967"></a>
+<span class="sourceLineNo">7968</span>   * @param results Fill in here what goes back to the Client if it is non-null (if null, client<a name="line.7968"></a>
+<span class="sourceLineNo">7969</span>   *  doesn't want results).<a name="line.7969"></a>
+<span class="sourceLineNo">7970</span>   * @param forMemStore Fill in here what to apply to the MemStore (by Store).<a name="line.7970"></a>
+<span class="sourceLineNo">7971</span>   * @return A WALEdit to apply to WAL or null if we are to skip the WAL.<a name="line.7971"></a>
+<span class="sourceLineNo">7972</span>   */<a name="line.7972"></a>
+<span class="sourceLineNo">7973</span>  private WALEdit reckonDeltas(Operation op, Mutation mutation, Durability effectiveDurability,<a name="line.7973"></a>
+<span class="sourceLineNo">7974</span>      Map&lt;HStore, List&lt;Cell&gt;&gt; forMemStore, List&lt;Cell&gt; results) throws IOException {<a name="line.7974"></a>
+<span class="sourceLineNo">7975</span>    WALEdit walEdit = null;<a name="line.7975"></a>
+<span class="sourceLineNo">7976</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.7976"></a>
+<span class="sourceLineNo">7977</span>    final boolean writeToWAL = effectiveDurability != Durability.SKIP_WAL;<a name="line.7977"></a>
+<span class="sourceLineNo">7978</span>    // Process a Store/family at a time.<a name="line.7978"></a>
+<span class="sourceLineNo">7979</span>    for (Map.Entry&lt;byte [], List&lt;Cell&gt;&gt; entry: mutation.getFamilyCellMap().entrySet()) {<a name="line.7979"></a>
+<span class="sourceLineNo">7980</span>      final byte[] columnFamilyName = entry.getKey();<a name="line.7980"></a>
+<span class="sourceLineNo">7981</span>      List&lt;Cell&gt; deltas = entry.getValue();<a name="line.7981"></a>
+<span class="sourceLineNo">7982</span>      HStore store = this.stores.get(columnFamilyName);<a name="line.7982"></a>
+<span class="sourceLineNo">7983</span>      // Reckon for the Store what to apply to WAL and MemStore.<a name="line.7983"></a>
+<span class="sourceLineNo">7984</span>      List&lt;Cell&gt; toApply =<a name="line.7984"></a>
+<span class="sourceLineNo">7985</span>        reckonDeltasByStore(store, op, mutation, effectiveDurability, now, deltas, results);<a name="line.7985"></a>
+<span class="sourceLineNo">7986</span>      if (!toApply.isEmpty()) {<a name="line.7986"></a>
+<span class="sourceLineNo">7987</span>        forMemStore.put(store, toApply);<a name="line.7987"></a>
+<span class="sourceLineNo">7988</span>        if (writeToWAL) {<a name="line.7988"></a>
+<span class="sourceLineNo">7989</span>          if (walEdit == null) {<a name="line.7989"></a>
+<span class="sourceLineNo">7990</span>            walEdit = new WALEdit();<a name="line.7990"></a>
+<span class="sourceLineNo">7991</span>          }<a name="line.7991"></a>
+<span class="sourceLineNo">7992</span>          walEdit.getCells().addAll(toApply);<a name="line.7992"></a>
+<span class="sourceLineNo">7993</span>        }<a name="line.7993"></a>
+<span class="sourceLineNo">7994</span>      }<a name="line.7994"></a>
+<span class="sourceLineNo">7995</span>    }<a name="line.7995"></a>
+<span class="sourceLineNo">7996</span>    return walEdit;<a name="line.7996"></a>
+<span class="sourceLineNo">7997</span>  }<a name="line.7997"></a>
+<span class="sourceLineNo">7998</span><a name="line.7998"></a>
+<span class="sourceLineNo">7999</span>  /**<a name="line.7999"></a>
+<span class="sourceLineNo">8000</span>   * Reckon the Cells to apply to WAL, memstore, and to return to the Client in passed<a name="line.8000"></a>
+<span class="sourceLineNo">8001</span>   * column family/Store.<a name="line.8001"></a>
+<span class="sourceLineNo">8002</span>   *<a name="line.8002"></a>
+<span class="sourceLineNo">8003</span>   * Does Get of current value and then adds passed in deltas for this Store returning the result.<a name="line.8003"></a>
+<span class="sourceLineNo">8004</span>   *<a name="line.8004"></a>
+<span class="sourceLineNo">8005</span>   * @param op Whether Increment or Append<a name="line.8005"></a>
+<span class="sourceLineNo">8006</span>   * @param mutation The encompassing Mutation object<a name="line.8006"></a>
+<span class="sourceLineNo">8007</span>   * @param deltas Changes to apply to this Store; either increment amount or data to append<a name="line.8007"></a>
+<span class="sourceLineNo">8008</span>   * @param results In here we accumulate all the Cells we are to return to the client. If null,<a name="line.8008"></a>
+<span class="sourceLineNo">8009</span>   *                client doesn't want results returned.<a name="line.8009"></a>
+<span class="sourceLineNo">8010</span>   * @return Resulting Cells after &lt;code&gt;deltas&lt;/code&gt; have been applied to current<a name="line.8010"></a>
+<span class="sourceLineNo">8011</span>   *  values. Side effect is our filling out of the &lt;code&gt;results&lt;/code&gt; List.<a name="line.8011"></a>
+<span class="sourceLineNo">8012</span>   */<a name="line.8012"></a>
+<span class="sourceLineNo">8013</span>  private List&lt;Cell&gt; reckonDeltasByStore(HStore store, Operation op, Mutation mutation,<a name="line.8013"></a>
+<span class="sourceLineNo">8014</span>      Durability effectiveDurability, long now, List&lt;Cell&gt; deltas, List&lt;Cell&gt; results)<a name="line.8014"></a>
+<span class="sourceLineNo">8015</span>      throws IOException {<a name="line.8015"></a>
+<span class="sourceLineNo">8016</span>    byte[] columnFamily = store.getColumnFamilyDescriptor().getName();<a name="line.8016"></a>
+<span class="sourceLineNo">8017</span>    List&lt;Cell&gt; toApply = new ArrayList&lt;&gt;(deltas.size());<a name="line.8017"></a>
+<span class="sourceLineNo">8018</span>    // Get previous values for all columns in this family.<a name="line.8018"></a>
+<span class="sourceLineNo">8019</span>    TimeRange tr = null;<a name="line.8019"></a>
+<span class="sourceLineNo">8020</span>    switch (op) {<a name="line.8020"></a>
+<span class="sourceLineNo">8021</span>      case INCREMENT:<a name="line.8021"></a>
+<span class="sourceLineNo">8022</span>        tr = ((Increment)mutation).getTimeRange();<a name="line.8022"></a>
+<span class="sourceLineNo">8023</span>        break;<a name="line.8023"></a>
+<span class="sourceLineNo">8024</span>      case APPEND:<a name="line.8024"></a>
+<span class="sourceLineNo">8025</span>        tr = ((Append)mutation).getTimeRange();<a name="line.8025"></a>
+<span class="sourceLineNo">8026</span>        break;<a name="line.8026"></a>
+<span class="sourceLineNo">8027</span>      default:<a name="line.8027"></a>
 <span class="sourceLineNo">8028</span>        break;<a name="line.8028"></a>
-<span class="sourceLineNo">8029</span>      default:<a name="line.8029"></a>
-<span class="sourceLineNo">8030</span>        break;<a name="line.8030"></a>
-<span class="sourceLineNo">8031</span>    }<a name="line.8031"></a>
-<span class="sourceLineNo">8032</span>    List&lt;Cell&gt; currentValues = get(mutation, store, deltas,null, tr);<a name="line.8032"></a>
-<span class="sourceLineNo">8033</span>    // Iterate the input columns and update existing values if they were found, otherwise<a name="line.8033"></a>
-<span class="sourceLineNo">8034</span>    // add new column initialized to the delta amount<a name="line.8034"></a>
-<span class="sourceLineNo">8035</span>    int currentValuesIndex = 0;<a name="line.8035"></a>
-<span class="sourceLineNo">8036</span>    for (int i = 0; i &lt; deltas.size(); i++) {<a name="line.8036"></a>
-<span class="sourceLineNo">8037</span>      Cell delta = deltas.get(i);<a name="line.8037"></a>
-<span class="sourceLineNo">8038</span>      Cell currentValue = null;<a name="line.8038"></a>
-<span class="sourceLineNo">8039</span>      boolean firstWrite = false;<a name="line.8039"></a>
-<span class="sourceLineNo">8040</span>      if (currentValuesIndex &lt; currentValues.size() &amp;&amp;<a name="line.8040"></a>
-<span class="sourceLineNo">8041</span>          CellUtil.matchingQualifier(currentValues.get(currentValuesIndex), delta)) {<a name="line.8041"></a>
-<span class="sourceLineNo">8042</span>        currentValue = currentValues.get(currentValuesIndex);<a name="line.8042"></a>
-<span class="sourceLineNo">8043</span>        if (i &lt; (deltas.size() - 1) &amp;&amp; !CellUtil.matchingQualifier(delta, deltas.get(i + 1))) {<a name="line.8043"></a>
-<span class="sourceLineNo">8044</span>          currentValuesIndex++;<a name="line.8044"></a>
-<span class="sourceLineNo">8045</span>        }<a name="line.8045"></a>
-<span class="sourceLineNo">8046</span>      } else {<a name="line.8046"></a>
-<span class="sourceLineNo">8047</span>        firstWrite = true;<a name="line.8047"></a>
-<span class="sourceLineNo">8048</span>      }<a name="line.8048"></a>
-<span class="sourceLineNo">8049</span>      // Switch on whether this an increment or an append building the new Cell to apply.<a name="line.8049"></a>
-<span class="sourceLineNo">8050</span>      Cell newCell = null;<a name="line.8050"></a>
-<span class="sourceLineNo">8051</span>      MutationType mutationType = null;<a name="line.8051"></a>
-<span class="sourceLineNo">8052</span>      boolean apply = true;<a name="line.8052"></a>
-<span class="sourceLineNo">8053</span>      switch (op) {<a name="line.8053"></a>
-<span class="sourceLineNo">8054</span>        case INCREMENT:<a name="line.8054"></a>
-<span class="sourceLineNo">8055</span>          mutationType = MutationType.INCREMENT;<a name="line.8055"></a>
-<span class="sourceLineNo">8056</span>          // If delta amount to apply is 0, don't write WAL or MemStore.<a name="line.8056"></a>
-<span class="sourceLineNo">8057</span>          long deltaAmount = getLongValue(delta);<a name="line.8057"></a>
-<span class="sourceLineNo">8058</span>          // TODO: Does zero value mean reset Cell? For example, the ttl.<a name="line.8058"></a>
-<span class="sourceLineNo">8059</span>          apply = deltaAmount != 0;<a name="line.8059"></a>
-<span class="sourceLineNo">8060</span>          final long newValue = currentValue == null ? deltaAmount : getLongValue(currentValue) + deltaAmount;<a name="line.8060"></a>
-<span class="sourceLineNo">8061</span>          newCell = reckonDelta(delta, currentValue, columnFamily, now, mutation, (oldCell) -&gt; Bytes.toBytes(newValue));<a name="line.8061"></a>
+<span class="sourceLineNo">8029</span>    }<a name="line.8029"></a>
+<span class="sourceLineNo">8030</span>    List&lt;Cell&gt; currentValues = get(mutation, store, deltas,null, tr);<a name="line.8030"></a>
+<span class="sourceLineNo">8031</span>    // Iterate the input columns and update existing values if they were found, otherwise<a name="line.8031"></a>
+<span class="sourceLineNo">8032</span>    // add new column initialized to the delta amount<a name="line.8032"></a>
+<span class="sourceLineNo">8033</span>    int currentValuesIndex = 0;<a name="line.8033"></a>
+<span class="sourceLineNo">8034</span>    for (int i = 0; i &lt; deltas.size(); i++) {<a name="line.8034"></a>
+<span class="sourceLineNo">8035</span>      Cell delta = deltas.get(i);<a name="line.8035"></a>
+<span class="sourceLineNo">8036</span>      Cell currentValue = null;<a name="line.8036"></a>
+<span class="sourceLineNo">8037</span>      if (currentValuesIndex &lt; currentValues.size() &amp;&amp;<a name="line.8037"></a>
+<span class="sourceLineNo">8038</span>          CellUtil.matchingQualifier(currentValues.get(currentValuesIndex), delta)) {<a name="line.8038"></a>
+<span class="sourceLineNo">8039</span>        currentValue = currentValues.get(currentValuesIndex);<a name="line.8039"></a>
+<span class="sourceLineNo">8040</span>        if (i &lt; (deltas.size() - 1) &amp;&amp; !CellUtil.matchingQualifier(delta, deltas.get(i + 1))) {<a name="line.8040"></a>
+<span class="sourceLineNo">8041</span>          currentValuesIndex++;<a name="line.8041"></a>
+<span class="sourceLineNo">8042</span>        }<a name="line.8042"></a>
+<span class="sourceLineNo">8043</span>      }<a name="line.8043"></a>
+<span class="sourceLineNo">8044</span>      // Switch on whether this an increment or an append building the new Cell to apply.<a name="line.8044"></a>
+<span class="sourceLineNo">8045</span>      Cell newCell = null;<a name="line.8045"></a>
+<span class="sourceLineNo">8046</span>      MutationType mutationType = null;<a name="line.8046"></a>
+<span class="sourceLineNo">8047</span>      switch (op) {<a name="line.8047"></a>
+<span class="sourceLineNo">8048</span>        case INCREMENT:<a name="line.8048"></a>
+<span class="sourceLineNo">8049</span>          mutationType = MutationType.INCREMENT;<a name="line.8049"></a>
+<span class="sourceLineNo">8050</span>          long deltaAmount = getLongValue(delta);<a name="line.8050"></a>
+<span class="sourceLineNo">8051</span>          final long newValue = currentValue == null ? deltaAmount : getLongValue(currentValue) + deltaAmount;<a name="line.8051"></a>
+<span class="sourceLineNo">8052</span>          newCell = reckonDelta(delta, currentValue, columnFamily, now, mutation, (oldCell) -&gt; Bytes.toBytes(newValue));<a name="line.8052"></a>
+<span class="sourceLineNo">8053</span>          break;<a name="line.8053"></a>
+<span class="sourceLineNo">8054</span>        case APPEND:<a name="line.8054"></a>
+<span class="sourceLineNo">8055</span>          mutationType = MutationType.APPEND;<a name="line.8055"></a>
+<span class="sourceLineNo">8056</span>          newCell = reckonDelta(delta, currentValue, columnFamily, now, mutation, (oldCell) -&gt;<a name="line.8056"></a>
+<span class="sourceLineNo">8057</span>            ByteBuffer.wrap(new byte[delta.getValueLength() + oldCell.getValueLength()])<a name="line.8057"></a>
+<span class="sourceLineNo">8058</span>                    .put(oldCell.getValueArray(), oldCell.getValueOffset(), oldCell.getValueLength())<a name="line.8058"></a>
+<span class="sourceLineNo">8059</span>                    .put(delta.getValueArray(), delta.getValueOffset(), delta.getValueLength())<a name="line.8059"></a>
+<span class="sourceLineNo">8060</span>                    .array()<a name="line.8060"></a>
+<span class="sourceLineNo">8061</span>          );<a name="line.8061"></a>
 <span class="sourceLineNo">8062</span>          break;<a name="line.8062"></a>
-<span class="sourceLineNo">8063</span>        case APPEND:<a name="line.8063"></a>
-<span class="sourceLineNo">8064</span>          mutationType = MutationType.APPEND;<a name="line.8064"></a>
-<span class="sourceLineNo">8065</span>          // Always apply Append. TODO: Does empty delta value mean reset Cell? It seems to.<a name="line.8065"></a>
-<span class="sourceLineNo">8066</span>          newCell = reckonDelta(delta, currentValue, columnFamily, now, mutation, (oldCell) -&gt;<a name="line.8066"></a>
-<span class="sourceLineNo">8067</span>            ByteBuffer.wrap(new byte[delta.getValueLength() + oldCell.getValueLength()])<a name="line.8067"></a>
-<span class="sourceLineNo">8068</span>                    .put(oldCell.getValueArray(), oldCell.getValueOffset(), oldCell.getValueLength())<a name="line.8068"></a>
-<span class="sourceLineNo">8069</span>                    .put(delta.getValueArray(), delta.getValueOffset(), delta.getValueLength())<a name="line.8069"></a>
-<span class="sourceLineNo">8070</span>                    .array()<a name="line.8070"></a>
-<span class="sourceLineNo">8071</span>          );<a name="line.8071"></a>
-<span class="sourceLineNo">8072</span>          break;<a name="line.8072"></a>
-<span class="sourceLineNo">8073</span>        default: throw new UnsupportedOperationException(op.toString());<a name="line.8073"></a>
-<span class="sourceLineNo">8074</span>      }<a name="line.8074"></a>
-<span class="sourceLineNo">8075</span><a name="line.8075"></a>
-<span class="sourceLineNo">8076</span>      // Give coprocessors a chance to update the new cell<a name="line.8076"></a>
-<span class="sourceLineNo">8077</span>      if (coprocessorHost != null) {<a name="line.8077"></a>
-<span class="sourceLineNo">8078</span>        newCell =<a name="line.8078"></a>
-<span class="sourceLineNo">8079</span>            coprocessorHost.postMutationBeforeWAL(mutationType, mutation, currentValue, newCell);<a name="line.8079"></a>
-<span class="sourceLineNo">8080</span>      }<a name="line.8080"></a>
-<span class="sourceLineNo">8081</span>      // If apply, we need to update memstore/WAL with new value; add it toApply.<a name="line.8081"></a>
-<span class="sourceLineNo">8082</span>      if (apply || firstWrite) {<a name="line.8082"></a>
-<span class="sourceLineNo">8083</span>        toApply.add(newCell);<a name="line.8083"></a>
-<span class="sourceLineNo">8084</span>      }<a name="line.8084"></a>
-<span class="sourceLineNo">8085</span>      // Add to results to get returned to the Client. If null, cilent does not want results.<a name="line.8085"></a>
-<span class="sourceLineNo">8086</span>      if (results != null) {<a name="line.8086"></a>
-<span class="sourceLineNo">8087</span>        results.add(newCell);<a name="line.8087"></a>
-<span class="sourceLineNo">8088</span>      }<a name="line.8088"></a>
-<span class="sourceLineNo">8089</span>    }<a name="line.8089"></a>
-<span class="sourceLineNo">8090</span>    return toApply;<a name="line.8090"></a>
-<span class="sourceLineNo">8091</span>  }<a name="line.8091"></a>
-<span class="sourceLineNo">8092</span><a name="line.8092"></a>
-<span class="sourceLineNo">8093</span>  private static Cell reckonDelta(final Cell delta, final Cell currentCell,<a name="line.8093"></a>
-<span class="sourceLineNo">8094</span>                                  final byte[] columnFamily, final long now,<a name="line.8094"></a>
-<span class="sourceLineNo">8095</span>                                  Mutation mutation, Function&lt;Cell, byte[]&gt; supplier) throws IOException {<a name="line.8095"></a>
-<span class="sourceLineNo">8096</span>    // Forward any tags found on the delta.<a name="line.8096"></a>
-<span class="sourceLineNo">8097</span>    List&lt;Tag&gt; tags = TagUtil.carryForwardTags(delta);<a name="line.8097"></a>
-<span class="sourceLineNo">8098</span>    tags = TagUtil.carryForwardTTLTag(tags, mutation.getTTL());<a name="line.8098"></a>
-<span class="sourceLineNo">8099</span>    if (currentCell != null) {<a name="line.8099"></a>
-<span class="sourceLineNo">8100</span>      tags = TagUtil.carryForwardTags(tags, currentCell);<a name="line.8100"></a>
-<span class="sourceLineNo">8101</span>      byte[] newValue = supplier.apply(currentCell);<a name="line.8101"></a>
-<span class="sourceLineNo">8102</span>      return ExtendedCellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a name="line.8102"></a>
-<span class="sourceLineNo">8103</span>              .setRow(mutation.getRow(), 0, mutation.getRow().length)<a name="line.8103"></a>
-<span class="sourceLineNo">8104</span>              .setFamily(columnFamily, 0, columnFamily.length)<a name="line.8104"></a>
-<span class="sourceLineNo">8105</span>              // copy the qualifier if the cell is located in shared memory.<a name="line.8105"></a>
-<span class="sourceLineNo">8106</span>              .setQualifier(CellUtil.cloneQualifier(delta))<a name="line.8106"></a>
-<span class="sourceLineNo">8107</span>              .setTimestamp(Math.max(currentCell.getTimestamp() + 1, now))<a name="line.8107"></a>
-<span class="sourceLineNo">8108</span>              .setType(KeyValue.Type.Put.getCode())<a name="line.8108"></a>
-<span class="sourceLineNo">8109</span>              .setValue(newValue, 0, newValue.length)<a name="line.8109"></a>
-<span class="sourceLineNo">8110</span>              .setTags(TagUtil.fromList(tags))<a name="line.8110"></a>
-<span class="sourceLineNo">8111</span>              .build();<a name="line.8111"></a>
-<span class="sourceLineNo">8112</span>    } else {<a name="line.8112"></a>
-<span class="sourceLineNo">8113</span>      PrivateCellUtil.updateLatestStamp(delta, now);<a name="line.8113"></a>
-<span class="sourceLineNo">8114</span>      return CollectionUtils.isEmpty(tags) ? delta : PrivateCellUtil.createCell(delta, tags);<a name="line.8114"></a>
-<span class="sourceLineNo">8115</span>    }<a name="line.8115"></a>
-<span class="sourceLineNo">8116</span>  }<a name="line.8116"></a>
-<span class="sourceLineNo">8117</span><a name="line.8117"></a>
-<span class="sourceLineNo">8118</span>  /**<a name="line.8118"></a>
-<span class="sourceLineNo">8119</span>   * @return Get the long out of the passed in Cell<a name="line.8119"></a>
-<span class="sourceLineNo">8120</span>   */<a name="line.8120"></a>
-<span class="sourceLineNo">8121</span>  private static long getLongValue(final Cell cell) throws DoNotRetryIOException {<a name="line.8121"></a>
-<span class="sourceLineNo">8122</span>    int len = cell.getValueLength();<a name="line.8122"></a>
-<span class="sourceLineNo">8123</span>    if (len != Bytes.SIZEOF_LONG) {<a name="line.8123"></a>
-<span class="sourceLineNo">8124</span>      // throw DoNotRetryIOException instead of IllegalArgumentException<a name="line.8124"></a>
-<span class="sourceLineNo">8125</span>      throw new DoNotRetryIOException("Field is not a long, it's " + len + " bytes wide");<a name="line.8125"></a>
-<span class="sourceLineNo">8126</span>    }<a name="line.8126"></a>
-<span class="sourceLineNo">8127</span>    return PrivateCellUtil.getValueAsLong(cell);<a name="line.8127"></a>
-<span class="sourceLineNo">8128</span>  }<a name="line.8128"></a>
-<span class="sourceLineNo">8129</span><a name="line.8129"></a>
-<span class="sourceLineNo">8130</span>  /**<a name="line.8130"></a>
-<span class="sourceLineNo">8131</span>   * Do a specific Get on passed &lt;code&gt;columnFamily&lt;/code&gt; and column qualifiers.<a name="line.8131"></a>
-<span class="sourceLineNo">8132</span>   * @param mutation Mutation we are doing this Get for.<a name="line.8132"></a>
-<span class="sourceLineNo">8133</span>   * @param store Which column family on row (TODO: Go all Gets in one go)<a name="line.8133"></a>
-<span class="sourceLineNo">8134</span>   * @param coordinates Cells from &lt;code&gt;mutation&lt;/code&gt; used as coordinates applied to Get.<a name="line.8134"></a>
-<span class="sourceLineNo">8135</span>   * @return Return list of Cells found.<a name="line.8135"></a>
-<span class="sourceLineNo">8136</span>   */<a name="line.8136"></a>
-<span class="sourceLineNo">8137</span>  private List&lt;Cell&gt; get(Mutation mutation, HStore store, List&lt;Cell&gt; coordinates,<a name="line.8137"></a>
-<span class="sourceLineNo">8138</span>      IsolationLevel isolation, TimeRange tr) throws IOException {<a name="line.8138"></a>
-<span class="sourceLineNo">8139</span>    // Sort the cells so that they match the order that they appear in the Get results. Otherwise,<a name="line.8139"></a>
-<span class="sourceLineNo">8140</span>    // we won't be able to find the existing values if the cells are not specified in order by the<a name="line.8140"></a>
-<span class="sourceLineNo">8141</span>    // client since cells are in an array list.<a name="line.8141"></a>
-<span class="sourceLineNo">8142</span>    // TODO: I don't get why we are sorting. St.Ack 20150107<a name="line.8142"></a>
-<span class="sourceLineNo">8143</span>    sort(coordinates, store.getComparator());<a name="line.8143"></a>
-<span class="sourceLineNo">8144</span>    Get get = new Get(mutation.getRow());<a name="line.8144"></a>
-<span class="sourceLineNo">8145</span>    if (isolation != null) {<a name="line.8145"></a>
-<span class="sourceLineNo">8146</span>      get.setIsolationLevel(isolation);<a name="line.8146"></a>
-<span class="sourceLineNo">8147</span>    }<a name="line.8147"></a>
-<span class="sourceLineNo">8148</span>    for (Cell cell: coordinates) {<a name="line.8148"></a>
-<span class="sourceLineNo">8149</span>      get.addColumn(store.getColumnFamilyDescriptor().getName(), CellUtil.cloneQualifier(cell));<a name="line.8149"></a>
-<span class="sourceLineNo">8150</span>    }<a name="line.8150"></a>
-<span class="sourceLineNo">8151</span>    // Increments carry time range. If an Increment instance, put it on the Get.<a name="line.8151"></a>
-<span class="sourceLineNo">8152</span>    if (tr != null) {<a name="line.8152"></a>
-<span class="sourceLineNo">8153</span>      get.setTimeRange(tr.getMin(), tr.getMax());<a name="line.8153"></a>
-<span class="sourceLineNo">8154</span>    }<a name="line.8154"></a>
-<span class="sourceLineNo">8155</span>    return get(get, false);<a name="line.8155"></a>
-<span class="sourceLineNo">8156</span>  }<a name="line.8156"></a>
-<span class="sourceLineNo">8157</span><a name="line.8157"></a>
-<span class="sourceLineNo">8158</span>  /**<a name="line.8158"></a>
-<span class="sourceLineNo">8159</span>   * @return Sorted list of &lt;code&gt;cells&lt;/code&gt; using &lt;code&gt;comparator&lt;/code&gt;<a name="line.8159"></a>
-<span class="sourceLineNo">8160</span>   */<a name="line.8160"></a>
-<span class="sourceLineNo">8161</span>  private static List&lt;Cell&gt; sort(List&lt;Cell&gt; cells, final CellComparator comparator) {<a name="line.8161"></a>
-<span class="sourceLineNo">8162</span>    cells.sort(comparator);<a name="line.8162"></a>
-<span class="sourceLineNo">8163</span>    return cells;<a name="line.8163"></a>
-<span class="sourceLineNo">8164</span>  }<a name="line.8164"></a>
-<span class="sourceLineNo">8165</span><a name="line.8165"></a>
-<span class="sourceLineNo">8166</span>  public static final long FIXED_OVERHEAD = ClassSize.align(<a name="line.8166"></a>
-<span class="sourceLineNo">8167</span>      ClassSize.OBJECT +<a name="line.8167"></a>
-<span class="sourceLineNo">8168</span>      ClassSize.ARRAY +<a name="line.8168"></a>
-<span class="sourceLineNo">8169</span>      55 * ClassSize.REFERENCE + 3 * Bytes.SIZEOF_INT +<a name="line.8169"></a>
-<span class="sourceLineNo">8170</span>      (15 * Bytes.SIZEOF_LONG) +<a name="line.8170"></a>
-<span class="sourceLineNo">8171</span>      3 * Bytes.SIZEOF_BOOLEAN);<a name="line.8171"></a>
-<span class="sourceLineNo">8172</span><a name="line.8172"></a>
-<span class="sourceLineNo">8173</span>  // woefully out of date - currently missing:<a name="line.8173"></a>
-<span class="sourceLineNo">8174</span>  // 1 x HashMap - coprocessorServiceHandlers<a name="line.8174"></a>
-<span class="sourceLineNo">8175</span>  // 6 x LongAdder - numMutationsWithoutWAL, dataInMemoryWithoutWAL,<a name="line.8175"></a>
-<span class="sourceLineNo">8176</span>  //   checkAndMutateChecksPassed, checkAndMutateChecksFailed, readRequestsCount,<a name="line.8176"></a>
-<span class="sourceLineNo">8177</span>  //   writeRequestsCount, cpRequestsCount<a name="line.8177"></a>
-<span class="sourceLineNo">8178</span>  // 1 x HRegion$WriteState - writestate<a name="line.8178"></a>
-<span class="sourceLineNo">8179</span>  // 1 x RegionCoprocessorHost - coprocessorHost<a name="line.8179"></a>
-<span class="sourceLineNo">8180</span>  // 1 x RegionSplitPolicy - splitPolicy<a name="line.8180"></a>
-<span class="sourceLineNo">8181</span>  // 1 x MetricsRegion - metricsRegion<a name="line.8181"></a>
-<span class="sourceLineNo">8182</span>  // 1 x MetricsRegionWrapperImpl - metricsRegionWrapper<a name="line.8182"></a>
-<span class="sourceLineNo">8183</span>  public static final long DEEP_OVERHEAD = FIXED_OVERHEAD +<a name="line.8183"></a>
-<span class="sourceLineNo">8184</span>      ClassSize.OBJECT + // closeLock<a name="line.8184"></a>
-<span class="sourceLineNo">8185</span>      (2 * ClassSize.ATOMIC_BOOLEAN) + // closed, closing<a name="line.8185"></a>
-<span class="sourceLineNo">8186</span>      (3 * ClassSize.ATOMIC_LONG) + // numPutsWithoutWAL, dataInMemoryWithoutWAL,<a name="line.8186"></a>
-<span class="sourceLineNo">8187</span>                                    // compactionsFailed<a name="line.8187"></a>
-<span class="sourceLineNo">8188</span>      (2 * ClassSize.CONCURRENT_HASHMAP) +  // lockedRows, scannerReadPoints<a name="line.8188"></a>
-<span class="sourceLineNo">8189</span>      WriteState.HEAP_SIZE + // writestate<a name="line.8189"></a>
-<span class="sourceLineNo">8190</span>      ClassSize.CONCURRENT_SKIPLISTMAP + ClassSize.CONCURRENT_SKIPLISTMAP_ENTRY + // stores<a name="line.8190"></a>
-<span class="sourceLineNo">8191</span>      (2 * ClassSize.REENTRANT_LOCK) + // lock, updatesLock<a name="line.8191"></a>
-<span class="sourceLineNo">8192</span>      MultiVersionConcurrencyControl.FIXED_SIZE // mvcc<a name="line.8192"></a>
-<span class="sourceLineNo">8193</span>      + 2 * ClassSize.TREEMAP // maxSeqIdInStores, replicationScopes<a name="line.8193"></a>
-<span class="sourceLineNo">8194</span>      + 2 * ClassSize.ATOMIC_INTEGER // majorInProgress, minorInProgress<a name="line.8194"></a>
-<span class="sourceLineNo">8195</span>      + ClassSize.STORE_SERVICES // store services<a name="line.8195"></a>
-<span class="sourceLineNo">8196</span>      + StoreHotnessProtector.FIXED_SIZE<a name="line.8196"></a>
-<span class="sourceLineNo">8197</span>      ;<a name="line.8197"></a>
-<span class="sourceLineNo">8198</span><a name="line.8198"></a>
-<span class="sourceLineNo">8199</span>  @Override<a name="line.8199"></a>
-<span class="sourceLineNo">8200</span>  public long heapSize() {<a name="line.8200"></a>
-<span class="sourceLineNo">8201</span>    // this does not take into account row locks, recent flushes, mvcc entries, and more<a name="line.8201"></a>
-<span class="sourceLineNo">8202</span>    return DEEP_OVERHEAD + stores.values().stream().mapToLong(HStore::heapSize).sum();<a name="line.8202"></a>
-<span class="sourceLineNo">8203</span>  }<a name="line.8203"></a>
-<span class="sourceLineNo">8204</span><a name="line.8204"></a>
-<span class="sourceLineNo">8205</span>  /**<a name="line.8205"></a>
-<span class="sourceLineNo">8206</span>   * Registers a new protocol buffer {@link Service} subclass as a coprocessor endpoint to<a name="line.8206"></a>
-<span class="sourceLineNo">8207</span>   * be available for handling Region#execService(com.google.protobuf.RpcController,<a name="line.8207"></a>
-<span class="sourceLineNo">8208</span>   *    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.CoprocessorServiceCall) calls.<a name="line.8208"></a>
-<span class="sourceLineNo">8209</span>   *<a name="line.8209"></a>
-<span class="sourceLineNo">8210</span>   * &lt;p&gt;<a name="line.8210"></a>
-<span class="sourceLineNo">8211</span>   * Only a single instance may be registered per region for a given {@link Service} subclass (the<a name="line.8211"></a>
-<span class="sourceLineNo">8212</span>   * instances are keyed on {@link com.google.protobuf.Descriptors.ServiceDescriptor#getFullName()}.<a name="line.8212"></a>
-<span class="sourceLineNo">8213</span>   * After the first registration, subsequent calls with the same service name will fail with<a name="line.8213"></a>
-<span class="sourceLineNo">8214</span>   * a return value of {@code false}.<a name="line.8214"></a>
-<span class="sourceLineNo">8215</span>   * &lt;/p&gt;<a name="line.8215"></a>
-<span class="sourceLineNo">8216</span>   * @param instance the {@code Service} subclass instance to expose as a coprocessor endpoint<a name="line.8216"></a>
-<span class="sourceLineNo">8217</span>   * @return {@code true} if the registration was successful, {@code false}<a name="line.8217"></a>
-<span class="sourceLineNo">8218</span>   * otherwise<a name="line.8218"></a>
-<span class="sourceLineNo">8219</span>   */<a name="line.8219"></a>
-<span class="sourceLineNo">8220</span>  public boolean registerService(com.google.protobuf.Service instance) {<a name="line.8220"></a>
-<span class="sourceLineNo">8221</span>    /*<a name="line.8221"></a>
-<span class="sourceLineNo">8222</span>     * No stacking of instances is allowed for a single service name<a name="line.8222"></a>
-<span class="sourceLineNo">8223</span>     */<a name="line.8223"></a>
-<span class="sourceLineNo">8224</span>    com.google.protobuf.Descriptors.ServiceDescriptor serviceDesc = instance.getDescriptorForType();<a name="line.8224"></a>
-<span class="sourceLineNo">8225</span>    String serviceName = CoprocessorRpcUtils.getServiceName(serviceDesc);<a name="line.8225"></a>
-<span class="sourceLineNo">8226</span>    if (coprocessorServiceHandlers.containsKey(serviceName)) {<a name="line.8226"></a>
-<span class="sourceLineNo">8227</span>      LOG.error("Coprocessor service " + serviceName +<a name="line.8227"></a>
-<span class="sourceLineNo">8228</span>          " already registered, rejecting request from " + instance);<a name="line.8228"></a>
-<span class="sourceLineNo">8229</span>      return false;<a name="line.8229"></a>
-<span class="sourceLineNo">8230</span>    }<a name="line.8230"></a>
-<span class="sourceLineNo">8231</span><a name="line.8231"></a>
-<span class="sourceLineNo">8232</span>    coprocessorServiceHandlers.put(serviceName, instance);<a name="line.8232"></a>
-<span class="sourceLineNo">8233</span>    if (LOG.isDebugEnabled()) {<a name="line.8233"></a>
-<span class="sourceLineNo">8234</span>      LOG.debug("Registered coprocessor service: region=" +<a name="line.8234"></a>
-<span class="sourceLineNo">8235</span>          Bytes.toStringBinary(getRegionInfo().getRegionName()) +<a name="line.8235"></a>
-<span class="sourceLineNo">8236</span>          " service=" + serviceName);<a name="line.8236"></a>
-<span class="sourceLineNo">8237</span>    }<a name="line.8237"></a>
-<span class="sourceLineNo">8238</span>    return true;<a name="line.8238"></a>
-<span class="sourceLineNo">8239</span>  }<a name="line.8239"></a>
-<span class="sourceLineNo">8240</span><a name="line.8240"></a>
-<span class="sourceLineNo">8241</span>  /**<a name="line.8241"></a>
-<span class="sourceLineNo">8242</span>   * Executes a single protocol buffer coprocessor endpoint {@link Service} method using<a name="line.8242"></a>
-<span class="sourceLineNo">8243</span>   * the registered protocol handlers.  {@link Service} implementations must be registered via the<a name="line.8243"></a>
-<span class="sourceLineNo">8244</span>   * {@link #registerService(com.google.protobuf.Service)}<a name="line.8244"></a>
-<span class="sourceLineNo">8245</span>   * method before they are available.<a name="line.8245"></a>
-<span class="sourceLineNo">8246</span>   *<a name="line.8246"></a>
-<span class="sourceLineNo">8247</span>   * @param controller an {@code RpcContoller} implementation to pass to the invoked service<a name="line.8247"></a>
-<span class="sourceLineNo">8248</span>   * @param call a {@code CoprocessorServiceCall} instance identifying the service, method,<a name="line.8248"></a>
-<span class="sourceLineNo">8249</span>   *     and parameters for the method invocation<a name="line.8249"></a>
-<span class="sourceLineNo">8250</span>   * @return a protocol buffer {@code Message} instance containing the method's result<a name="line.8250"></a>
-<span class="sourceLineNo">8251</span>   * @throws IOException if no registered service handler is found or an error<a name="line.8251"></a>
-<span class="sourceLineNo">8252</span>   *     occurs during the invocation<a name="line.8252"></a>
-<span class="sourceLineNo">8253</span>   * @see #registerService(com.google.protobuf.Service)<a name="line.8253"></a>
-<span class="sourceLineNo">8254</span>   */<a name="line.8254"></a>
-<span class="sourceLineNo">8255</span>  public com.google.protobuf.Message execService(com.google.protobuf.RpcController controller,<a name="line.8255"></a>
-<span class="sourceLineNo">8256</span>      CoprocessorServiceCall call) throws IOException {<a name="line.8256"></a>
-<span class="sourceLineNo">8257</span>    String serviceName = call.getServiceName();<a name="line.8257"></a>
-<span class="sourceLineNo">8258</span>    com.google.protobuf.Service service = coprocessorServiceHandlers.get(serviceName);<a name="line.8258"></a>
-<span class="sourceLineNo">8259</span>    if (service == null) {<a name="line.8259"></a>
-<span class="sourceLineNo">8260</span>      throw new UnknownProtocolException(null, "No registered coprocessor service found for " +<a name="line.8260"></a>
-<span class="sourceLineNo">8261</span>          serviceName + " in region " + Bytes.toStringBinary(getRegionInfo().getRegionName()));<a name="line.8261"></a>
-<span class="sourceLineNo">8262</span>    }<a name="line.8262"></a>
-<span class="sourceLineNo">8263</span>    com.google.protobuf.Descriptors.ServiceDescriptor serviceDesc = service.getDescriptorForType();<a name="line.8263"></a>
+<span class="sourceLineNo">8063</span>        default: throw new UnsupportedOperationException(op.toString());<a name="line.8063"></a>
+<span class="sourceLineNo">8064</span>      }<a name="line.8064"></a>
+<span class="sourceLineNo">8065</span><a name="line.8065"></a>
+<span class="sourceLineNo">8066</span>      // Give coprocessors a chance to update the new cell<a name="line.8066"></a>
+<span class="sourceLineNo">8067</span>      if (coprocessorHost != null) {<a name="line.8067"></a>
+<span class="sourceLineNo">8068</span>        newCell =<a name="line.8068"></a>
+<span class="sourceLineNo">8069</span>            coprocessorHost.postMutationBeforeWAL(mutationType, mutation, currentValue, newCell);<a name="line.8069"></a>
+<span class="sourceLineNo">8070</span>      }<a name="line.8070"></a>
+<span class="sourceLineNo">8071</span>      toApply.add(newCell);<a name="line.8071"></a>
+<span class="sourceLineNo">8072</span>      // Add to results to get returned to the Client. If null, cilent does not want results.<a name="line.8072"></a>
+<span class="sourceLineNo">8073</span>      if (results != null) {<a name="line.8073"></a>
+<span class="sourceLineNo">8074</span>        results.add(newCell);<a name="line.8074"></a>
+<span class="sourceLineNo">8075</span>      }<a name="line.8075"></a>
+<span class="sourceLineNo">8076</span>    }<a name="line.8076"></a>
+<span class="sourceLineNo">8077</span>    return toApply;<a name="line.8077"></a>
+<span class="sourceLineNo">8078</span>  }<a name="line.8078"></a>
+<span class="sourceLineNo">8079</span><a name="line.8079"></a>
+<span class="sourceLineNo">8080</span>  private static Cell reckonDelta(final Cell delta, final Cell currentCell,<a name="line.8080"></a>
+<span class="sourceLineNo">8081</span>                                  final byte[] columnFamily, final long now,<a name="line.8081"></a>
+<span class="sourceLineNo">8082</span>                                  Mutation mutation, Function&lt;Cell, byte[]&gt; supplier) throws IOException {<a name="line.8082"></a>
+<span class="sourceLineNo">8083</span>    // Forward any tags found on the delta.<a name="line.8083"></a>
+<span class="sourceLineNo">8084</span>    List&lt;Tag&gt; tags = TagUtil.carryForwardTags(delta);<a name="line.8084"></a>
+<span class="sourceLineNo">8085</span>    tags = TagUtil.carryForwardTTLTag(tags, mutation.getTTL());<a name="line.8085"></a>
+<span class="sourceLineNo">8086</span>    if (currentCell != null) {<a name="line.8086"></a>
+<span class="sourceLineNo">8087</span>      tags = TagUtil.carryForwardTags(tags, currentCell);<a name="line.8087"></a>
+<span class="sourceLineNo">8088</span>      byte[] newValue = supplier.apply(currentCell);<a name="line.8088"></a>
+<span class="sourceLineNo">8089</span>      return ExtendedCellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a name="line.8089"></a>
+<span class="sourceLineNo">8090</span>              .setRow(mutation.getRow(), 0, mutation.getRow().length)<a name="line.8090"></a>
+<span class="sourceLineNo">8091</span>              .setFamily(columnFamily, 0, columnFamily.length)<a name="line.8091"></a>
+<span class="sourceLineNo">8092</span>              // copy the qualifier if the cell is located in shared memory.<a name="line.8092"></a>
+<span class="sourceLineNo">8093</span>              .setQualifier(CellUtil.cloneQualifier(delta))<a name="line.8093"></a>
+<span class="sourceLineNo">8094</span>              .setTimestamp(Math.max(currentCell.getTimestamp() + 1, now))<a name="line.8094"></a>
+<span class="sourceLineNo">8095</span>              .setType(KeyValue.Type.Put.getCode())<a name="line.8095"></a>
+<span class="sourceLineNo">8096</span>              .setValue(newValue, 0, newValue.length)<a name="line.8096"></a>
+<span class="sourceLineNo">8097</span>              .setTags(TagUtil.fromList(tags))<a name="line.8097"></a>
+<span class="sourceLineNo">8098</span>              .build();<a name="line.8098"></a>
+<span class="sourceLineNo">8099</span>    } else {<a name="line.8099"></a>
+<span class="sourceLineNo">8100</span>      PrivateCellUtil.updateLatestStamp(delta, now);<a name="line.8100"></a>
+<span class="sourceLineNo">8101</span>      return CollectionUtils.isEmpty(tags) ? delta : PrivateCellUtil.createCell(delta, tags);<a name="line.8101"></a>
+<span class="sourceLineNo">8102</span>    }<a name="line.8102"></a>
+<span class="sourceLineNo">8103</span>  }<a name="line.8103"></a>
+<span class="sourceLineNo">8104</span><a name="line.8104"></a>
+<span class="sourceLineNo">8105</span>  /**<a name="line.8105"></a>
+<span class="sourceLineNo">8106</span>   * @return Get the long out of the passed in Cell<a name="line.8106"></a>
+<span class="sourceLineNo">8107</span>   */<a name="line.8107"></a>
+<span class="sourceLineNo">8108</span>  private static long getLongValue(final Cell cell) throws DoNotRetryIOException {<a name="line.8108"></a>
+<span class="sourceLineNo">8109</span>    int len = cell.getValueLength();<a name="line.8109"></a>
+<span class="sourceLineNo">8110</span>    if (len != Bytes.SIZEOF_LONG) {<a name="line.8110"></a>
+<span class="sourceLineNo">8111</span>      // throw DoNotRetryIOException instead of IllegalArgumentException<a name="line.8111"></a>
+<span class="sourceLineNo">8112</span>      throw new DoNotRetryIOException("Field is not a long, it's " + len + " bytes wide");<a name="line.8112"></a>
+<span class="sourceLineNo">8113</span>    }<a name="line.8113"></a>
+<span class="sourceLineNo">8114</span>    return PrivateCellUtil.getValueAsLong(cell);<a name="line.8114"></a>
+<span class="sourceLineNo">8115</span>  }<a name="line.8115"></a>
+<span class="sourceLineNo">8116</span><a name="line.8116"></a>
+<span class="sourceLineNo">8117</span>  /**<a name="line.8117"></a>
+<span class="sourceLineNo">8118</span>   * Do a specific Get on passed &lt;code&gt;columnFamily&lt;/code&gt; and column qualifiers.<a name="line.8118"></a>
+<span class="sourceLineNo">8119</span>   * @param mutation Mutation we are doing this Get for.<a name="line.8119"></a>
+<span class="sourceLineNo">8120</span>   * @param store Which column family on row (TODO: Go all Gets in one go)<a name="line.8120"></a>
+<span class="sourceLineNo">8121</span>   * @param coordinates Cells from &lt;code&gt;mutation&lt;/code&gt; used as coordinates applied to Get.<a name="line.8121"></a>
+<span class="sourceLineNo">8122</span>   * @return Return list of Cells found.<a name="line.8122"></a>
+<span class="sourceLineNo">8123</span>   */<a name="line.8123"></a>
+<span class="sourceLineNo">8124</span>  private List&lt;Cell&gt; get(Mutation mutation, HStore store, List&lt;Cell&gt; coordinates,<a name="line.8124"></a>
+<span class="sourceLineNo">8125</span>      IsolationLevel isolation, TimeRange tr) throws IOException {<a name="line.8125"></a>
+<span class="sourceLineNo">8126</span>    // Sort the cells so that they match the order that they appear in the Get results. Otherwise,<a name="line.8126"></a>
+<span class="sourceLineNo">8127</span>    // we won't be able to find the existing values if the cells are not specified in order by the<a name="line.8127"></a>
+<span class="sourceLineNo">8128</span>    // client since cells are in an array list.<a name="line.8128"></a>
+<span class="sourceLineNo">8129</span>    // TODO: I don't get why we are sorting. St.Ack 20150107<a name="line.8129"></a>
+<span class="sourceLineNo">8130</span>    sort(coordinates, store.getComparator());<a name="line.8130"></a>
+<span class="sourceLineNo">8131</span>    Get get = new Get(mutation.getRow());<a name="line.8131"></a>
+<span class="sourceLineNo">8132</span>    if (isolation != null) {<a name="line.8132"></a>
+<span class="sourceLineNo">8133</span>      get.setIsolationLevel(isolation);<a name="line.8133"></a>
+<span class="sourceLineNo">8134</span>    }<a name="line.8134"></a>
+<span class="sourceLineNo">8135</span>    for (Cell cell: coordinates) {<a name="line.8135"></a>
+<span class="sourceLineNo">8136</span>      get.addColumn(store.getColumnFamilyDescriptor().getName(), CellUtil.cloneQualifier(cell));<a name="line.8136"></a>
+<span class="sourceLineNo">8137</span>    }<a name="line.8137"></a>
+<span class="sourceLineNo">8138</span>    // Increments carry time range. If an Increment instance, put it on the Get.<a name="line.8138"></a>
+<span class="sourceLineNo">8139</span>    if (tr != null) {<a name="line.8139"></a>
+<span class="sourceLineNo">8140</span>      get.setTimeRange(tr.getMin(), tr.getMax());<a name="line.8140"></a>
+<span class="sourceLineNo">8141</span>    }<a name="line.8141"></a>
+<span class="sourceLineNo">8142</span>    return get(get, false);<a name="line.8142"></a>
+<span class="sourceLineNo">8143</span>  }<a name="line.8143"></a>
+<span class="sourceLineNo">8144</span><a name="line.8144"></a>
+<span class="sourceLineNo">8145</span>  /**<a name="line.8145"></a>
+<span class="sourceLineNo">8146</span>   * @return Sorted list of &lt;code&gt;cells&lt;/code&gt; using &lt;code&gt;comparator&lt;/code&gt;<a name="line.8146"></a>
+<span class="sourceLineNo">8147</span>   */<a name="line.8147"></a>
+<span class="sourceLineNo">8148</span>  private static List&lt;Cell&gt; sort(List&lt;Cell&gt; cells, final CellComparator comparator) {<a name="line.8148"></a>
+<span class="sourceLineNo">8149</span>    cells.sort(comparator);<a name="line.8149"></a>
+<span class="sourceLineNo">8150</span>    return cells;<a name="line.8150"></a>
+<span class="sourceLineNo">8151</span>  }<a name="line.8151"></a>
+<span class="sourceLineNo">8152</span><a name="line.8152"></a>
+<span class="sourceLineNo">8153</span>  public static final long FIXED_OVERHEAD = ClassSize.align(<a name="line.8153"></a>
+<span class="sourceLineNo">8154</span>      ClassSize.OBJECT +<a name="line.8154"></a>
+<span class="sourceLineNo">8155</span>      ClassSize.ARRAY +<a name="line.8155"></a>
+<span class="sourceLineNo">8156</span>      55 * ClassSize.REFERENCE + 3 * Bytes.SIZEOF_INT +<a name="line.8156"></a>
+<span class="sourceLineNo">8157</span>      (15 * Bytes.SIZEOF_LONG) +<a name="line.8157"></a>
+<span class="sourceLineNo">8158</span>      3 * Bytes.SIZEOF_BOOLEAN);<a name="line.8158"></a>
+<span class="sourceLineNo">8159</span><a name="line.8159"></a>
+<span class="sourceLineNo">8160</span>  // woefully out of date - currently missing:<a name="line.8160"></a>
+<span class="sourceLineNo">8161</span>  // 1 x HashMap - coprocessorServiceHandlers<a name="line.8161"></a>
+<span class="sourceLineNo">8162</span>  // 6 x LongAdder - numMutationsWithoutWAL, dataInMemoryWithoutWAL,<a name="line.8162"></a>
+<span class="sourceLineNo">8163</span>  //   checkAndMutateChecksPassed, checkAndMutateChecksFailed, readRequestsCount,<a name="line.8163"></a>
+<span class="sourceLineNo">8164</span>  //   writeRequestsCount, cpRequestsCount<a name="line.8164"></a>
+<span class="sourceLineNo">8165</span>  // 1 x HRegion$WriteState - writestate<a name="line.8165"></a>
+<span class="sourceLineNo">8166</span>  // 1 x RegionCoprocessorHost - coprocessorHost<a name="line.8166"></a>
+<span class="sourceLineNo">8167</span>  // 1 x RegionSplitPolicy - splitPolicy<a name="line.8167"></a>
+<span class="sourceLineNo">8168</span>  // 1 x MetricsRegion - metricsRegion<a name="line.8168"></a>
+<span class="sourceLineNo">8169</span>  // 1 x MetricsRegionWrapperImpl - metricsRegionWrapper<a name="line.8169"></a>
+<span class="sourceLineNo">8170</span>  public static final long DEEP_OVERHEAD = FIXED_OVERHEAD +<a name="line.8170"></a>
+<span class="sourceLineNo">8171</span>      ClassSize.OBJECT + // closeLock<a name="line.8171"></a>
+<span class="sourceLineNo">8172</span>      (2 * ClassSize.ATOMIC_BOOLEAN) + // closed, closing<a name="line.8172"></a>
+<span class="sourceLineNo">8173</span>      (3 * ClassSize.ATOMIC_LONG) + // numPutsWithoutWAL, dataInMemoryWithoutWAL,<a name="line.8173"></a>
+<span class="sourceLineNo">8174</span>                                    // compactionsFailed<a name="line.8174"></a>
+<span class="sourceLineNo">8175</span>      (2 * ClassSize.CONCURRENT_HASHMAP) +  // lockedRows, scannerReadPoints<a name="line.8175"></a>
+<span class="sourceLineNo">8176</span>      WriteState.HEAP_SIZE + // writestate<a name="line.8176"></a>
+<span class="sourceLineNo">8177</span>      ClassSize.CONCURRENT_SKIPLISTMAP + ClassSize.CONCURRENT_SKIPLISTMAP_ENTRY + // stores<a name="line.8177"></a>
+<span class="sourceLineNo">8178</span>      (2 * ClassSize.REENTRANT_LOCK) + // lock, updatesLock<a name="line.8178"></a>
+<span class="sourceLineNo">8179</span>      MultiVersionConcurrencyControl.FIXED_SIZE // mvcc<a name="line.8179"></a>
+<span class="sourceLineNo">8180</span>      + 2 * ClassSize.TREEMAP // maxSeqIdInStores, replicationScopes<a name="line.8180"></a>
+<span class="sourceLineNo">8181</span>      + 2 * ClassSize.ATOMIC_INTEGER // majorInProgress, minorInProgress<a name="line.8181"></a>
+<span class="sourceLineNo">8182</span>      + ClassSize.STORE_SERVICES // store services<a name="line.8182"></a>
+<span class="sourceLineNo">8183</span>      + StoreHotnessProtector.FIXED_SIZE<a name="line.8183"></a>
+<span class="sourceLineNo">8184</span>      ;<a name="line.8184"></a>
+<span class="sourceLineNo">8185</span><a name="line.8185"></a>
+<span class="sourceLineNo">8186</span>  @Override<a name="line.8186"></a>
+<span class="sourceLineNo">8187</span>  public long heapSize() {<a name="line.8187"></a>
+<span class="sourceLineNo">8188</span>    // this does not take into account row locks, recent flushes, mvcc entries, and more<a name="line.8188"></a>
+<span class="sourceLineNo">8189</span>    return DEEP_OVERHEAD + stores.values().stream().mapToLong(HStore::heapSize).sum();<a name="line.8189"></a>
+<span class="sourceLineNo">8190</span>  }<a name="line.8190"></a>
+<span class="sourceLineNo">8191</span><a name="line.8191"></a>
+<span class="sourceLineNo">8192</span>  /**<a name="line.8192"></a>
+<span class="sourceLineNo">8193</span>   * Registers a new protocol buffer {@link Service} subclass as a coprocessor endpoint to<a name="line.8193"></a>
+<span class="sourceLineNo">8194</span>   * be available for handling Region#execService(com.google.protobuf.RpcController,<a name="line.8194"></a>
+<span class="sourceLineNo">8195</span>   *    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.CoprocessorServiceCall) calls.<a name="line.8195"></a>
+<span class="sourceLineNo">8196</span>   *<a name="line.8196"></a>
+<span class="sourceLineNo">8197</span>   * &lt;p&gt;<a name="line.8197"></a>
+<span class="sourceLineNo">8198</span>   * Only a single instance may be registered per region for a given {@link Service} subclass (the<a name="line.8198"></a>
+<span class="sourceLineNo">8199</span>   * instances are keyed on {@link com.google.protobuf.Descriptors.ServiceDescriptor#getFullName()}.<a name="line.8199"></a>
+<span class="sourceLineNo">8200</span>   * After the first registration, subsequent calls with the same service name will fail with<a name="line.8200"></a>
+<span class="sourceLineNo">8201</span>   * a return value of {@code false}.<a name="line.8201"></a>
+<span class="sourceLineNo">8202</span>   * &lt;/p&gt;<a name="line.8202"></a>
+<span class="sourceLineNo">8203</span>   * @param instance the {@code Service} subclass instance to expose as a coprocessor endpoint<a name="line.8203"></a>
+<span class="sourceLineNo">8204</span>   * @return {@code true} if the registration was successful, {@code false}<a name="line.8204"></a>
+<span class="sourceLineNo">8205</span>   * otherwise<a name="line.8205"></a>
+<span class="sourceLineNo">8206</span>   */<a name="line.8206"></a>
+<span class="sourceLineNo">8207</span>  public boolean registerService(com.google.protobuf.Service instance) {<a name="line.8207"></a>
+<span class="sourceLineNo">8208</span>    /*<a name="line.8208"></a>
+<span class="sourceLineNo">8209</span>     * No stacking of instances is allowed for a single service name<a name="line.8209"></a>
+<span class="sourceLineNo">8210</span>     */<a name="line.8210"></a>
+<span class="sourceLineNo">8211</span>    com.google.protobuf.Descriptors.ServiceDescriptor serviceDesc = instance.getDescriptorForType();<a name="line.8211"></a>
+<span class="sourceLineNo">8212</span>    String serviceName = CoprocessorRpcUtils.getServiceName(serviceDesc);<a name="line.8212"></a>
+<span class="sourceLineNo">8213</span>    if (coprocessorServiceHandlers.containsKey(serviceName)) {<a name="line.8213"></a>
+<span class="sourceLineNo">8214</span>      LOG.error("Coprocessor service " + serviceName +<a name="line.8214"></a>
+<span class="sourceLineNo">8215</span>          " already registered, rejecting request from " + instance);<a name="line.8215"></a>
+<span class="sourceLineNo">8216</span>      return false;<a name="line.8216"></a>
+<span class="sourceLineNo">8217</span>    }<a name="line.8217"></a>
+<span class="sourceLineNo">8218</span><a name="line.8218"></a>
+<span class="sourceLineNo">8219</span>    coprocessorServiceHandlers.put(serviceName, instance);<a name="line.8219"></a>
+<span class="sourceLineNo">8220</span>    if (LOG.isDebugEnabled()) {<a name="line.8220"></a>
+<span class="sourceLineNo">8221</span>      LOG.debug("Registered coprocessor service: region=" +<a name="line.8221"></a>
+<span class="sourceLineNo">8222</span>          Bytes.toStringBinary(getRegionInfo().getRegionName()) +<a name="line.8222"></a>
+<span class="sourceLineNo">8223</span>          " service=" + serviceName);<a name="line.8223"></a>
+<span class="sourceLineNo">8224</span>    }<a name="line.8224"></a>
+<span class="sourceLineNo">8225</span>    return true;<a name="line.8225"></a>
+<span class="sourceLineNo">8226</span>  }<a name="line.8226"></a>
+<span class="sourceLineNo">8227</span><a name="line.8227"></a>
+<span class="sourceLineNo">8228</span>  /**<a name="line.8228"></a>
+<span class="sourceLineNo">8229</span>   * Executes a single protocol buffer coprocessor endpoint {@link Service} method using<a name="line.8229"></a>
+<span class="sourceLineNo">8230</span>   * the registered protocol handlers.  {@link Service} implementations must be registered via the<a name="line.8230"></a>
+<span class="sourceLineNo">8231</span>   * {@link #registerService(com.google.protobuf.Service)}<a name="line.8231"></a>
+<span class="sourceLineNo">8232</span>   * method before they are available.<a name="line.8232"></a>
+<span class="sourceLineNo">8233</span>   *<a name="line.8233"></a>
+<span class="sourceLineNo">8234</span>   * @param controller an {@code RpcContoller} implementation to pass to the invoked service<a name="line.8234"></a>
+<span class="sourceLineNo">8235</span>   * @param call a {@code CoprocessorServiceCall} instance identifying the service, method,<a name="line.8235"></a>
+<span class="sourceLineNo">8236</span>   *     and parameters for the method invocation<a name="line.8236"></a>
+<span class="sourceLineNo">8237</span>   * @return a protocol buffer {@code Message} instance containing the method's result<a name="line.8237"></a>
+<span class="sourceLineNo">8238</span>   * @throws IOException if no registered service handler is found or an error<a name="line.8238"></a>
+<span class="sourceLineNo">8239</span>   *     occurs during the invocation<a name="line.8239"></a>
+<span class="sourceLineNo">8240</span>   * @see #registerService(com.google.protobuf.Service)<a name="line.8240"></a>
+<span class="sourceLineNo">8241</span>   */<a name="line.8241"></a>
+<span class="sourceLineNo">8242</span>  public com.google.protobuf.Message execService(com.google.protobuf.RpcController controller,<a name="line.8242"></a>
+<span class="sourceLineNo">8243</span>      CoprocessorServiceCall call) throws IOException {<a name="line.8243"></a>
+<span class="sourceLineNo">8244</span>    String serviceName = call.getServiceName();<a name="line.8244"></a>
+<span class="sourceLineNo">8245</span>    com.google.protobuf.Service service = coprocessorServiceHandlers.get(serviceName);<a name="line.8245"></a>
+<span class="sourceLineNo">8246</span>    if (service == null) {<a name="line.8246"></a>
+<span class="sourceLineNo">8247</span>      throw new UnknownProtocolException(null, "No registered coprocessor service found for " +<a name="line.8247"></a>
+<span class="sourceLineNo">8248</span>          serviceName + " in region " + Bytes.toStringBinary(getRegionInfo().getRegionName()));<a name="line.8248"></a>
+<span class="sourceLineNo">8249</span>    }<a name="line.8249"></a>
+<span class="sourceLineNo">8250</span>    com.google.protobuf.Descriptors.ServiceDescriptor serviceDesc = service.getDescriptorForType();<a name="line.8250"></a>
+<span class="sourceLineNo">8251</span><a name="line.8251"></a>
+<span class="sourceLineNo">8252</span>    cpRequestsCount.increment();<a name="line.8252"></a>
+<span class="sourceLineNo">8253</span>    String methodName = call.getMethodName();<a name="line.8253"></a>
+<span class="sourceLineNo">8254</span>    com.google.protobuf.Descriptors.MethodDescriptor methodDesc =<a name="line.8254"></a>
+<span class="sourceLineNo">8255</span>        CoprocessorRpcUtils.getMethodDescriptor(methodName, serviceDesc);<a name="line.8255"></a>
+<span class="sourceLineNo">8256</span><a name="line.8256"></a>
+<span class="sourceLineNo">8257</span>    com.google.protobuf.Message.Builder builder =<a name="line.8257"></a>
+<span class="sourceLineNo">8258</span>        service.getRequestPrototype(methodDesc).newBuilderForType();<a name="line.8258"></a>
+<span class="sourceLineNo">8259</span><a name="line.8259"></a>
+<span class="sourceLineNo">8260</span>    org.apache.hadoop.hbase.protobuf.ProtobufUtil.mergeFrom(builder,<a name="line.8260"></a>
+<span class="sourceLineNo">8261</span>        call.getRequest().toByteArray());<a name="line.8261"></a>
+<span class="sourceLineNo">8262</span>    com.google.protobuf.Message request =<a name="line.8262"></a>
+<span class="sourceLineNo">8263</span>        CoprocessorRpcUtils.getRequest(service, methodDesc, call.getRequest());<a name="line.8263"></a>
 <span class="sourceLineNo">8264</span><a name="line.8264"></a>
-<span class="sourceLineNo">8265</span>    cpRequestsCount.increment();<a name="line.8265"></a>
-<span class="sourceLineNo">8266</span>    String methodName = call.getMethodName();<a name="line.8266"></a>
-<span class="sourceLineNo">8267</span>    com.google.protobuf.Descriptors.MethodDescriptor methodDesc =<a name="line.8267"></a>
-<span class="sourceLineNo">8268</span>        CoprocessorRpcUtils.getMethodDescriptor(methodName, serviceDesc);<a name="line.8268"></a>
-<span class="sourceLineNo">8269</span><a name="line.8269"></a>
-<span class="sourceLineNo">8270</span>    com.google.protobuf.Message.Builder builder =<a name="line.8270"></a>
-<span class="sourceLineNo">8271</span>        service.getRequestPrototype(methodDesc).newBuilderForType();<a name="line.8271"></a>
-<span class="sourceLineNo">8272</span><a name="line.8272"></a>
-<span class="sourceLineNo">8273</span>    org.apache.hadoop.hbase.protobuf.ProtobufUtil.mergeFrom(builder,<a name="line.8273"></a>
-<span class="sourceLineNo">8274</span>        call.getRequest().toByteArray());<a name="line.8274"></a>
-<span class="sourceLineNo">8275</span>    com.google.protobuf.Message request =<a name="line.8275"></a>
-<span class="sourceLineNo">8276</span>        CoprocessorRpcUtils.getRequest(service, methodDesc, call.getRequest());<a name="line.8276"></a>
-<span class="sourceLineNo">8277</span><a name="line.8277"></a>
-<span class="sourceLineNo">8278</span>    if (coprocessorHost != null) {<a name="line.8278"></a>
-<span class="sourceLineNo">8279</span>      request = coprocessorHost.preEndpointInvocation(service, methodName, request);<a name="line.8279"></a>
-<span class="sourceLineNo">8280</span>    }<a name="line.8280"></a>
-<span class="sourceLineNo">8281</span><a name="line.8281"></a>
-<span class="sourceLineNo">8282</span>    final com.google.protobuf.Message.Builder responseBuilder =<a name="line.8282"></a>
-<span class="sourceLineNo">8283</span>        service.getResponsePrototype(methodDesc).newBuilderForType();<a name="line.8283"></a>
-<span class="sourceLineNo">8284</span>    service.callMethod(methodDesc, controller, request,<a name="line.8284"></a>
-<span class="sourceLineNo">8285</span>        new com.google.protobuf.RpcCallback&lt;com.google.protobuf.Message&gt;() {<a name="line.8285"></a>
-<span class="sourceLineNo">8286</span>      @Override<a name="line.8286"></a>
-<span class="sourceLineNo">8287</span>      public void run(com.google.protobuf.Message message) {<a name="line.8287"></a>
-<span class="sourceLineNo">8288</span>        if (message != null) {<a name="line.8288"></a>
-<span class="sourceLineNo">8289</span>          responseBuilder.mergeFrom(message);<a name="line.8289"></a>
-<span class="sourceLineNo">8290</span>        }<a name="line.8290"></a>
-<span class="sourceLineNo">8291</span>      }<a name="line.8291"></a>
-<span class="sourceLineNo">8292</span>    });<a name="line.8292"></a>
-<span class="sourceLineNo">8293</span><a name="line.8293"></a>
-<span class="sourceLineNo">8294</span>    if (coprocessorHost != null) {<a name="line.8294"></a>
-<span class="sourceLineNo">8295</span>      coprocessorHost.postEndpointInvocation(service, methodName, request, responseBuilder);<a name="line.8295"></a>
-<span class="sourceLineNo">8296</span>    }<a name="line.8296"></a>
-<span class="sourceLineNo">8297</span>    IOException exception =<a name="line.8297"></a>
-<span class="sourceLineNo">8298</span>        org.apache.hadoop.hbase.ipc.CoprocessorRpcUtils.getControllerException(controller);<a name="line.8298"></a>
-<span class="sourceLineNo">8299</span>    if (exception != null) {<a name="line.8299"></a>
-<span class="sourceLineNo">8300</span>      throw exception;<a name="line.8300"></a>
-<span class="sourceLineNo">8301</span>    }<a name="line.8301"></a>
-<span class="sourceLineNo">8302</span><a name="line.8302"></a>
-<span class="sourceLineNo">8303</span>    return responseBuilder.build();<a name="line.8303"></a>
-<span class="sourceLineNo">8304</span>  }<a name="line.8304"></a>
-<span class="sourceLineNo">8305</span><a name="line.8305"></a>
-<span class="sourceLineNo">8306</span>  boolean shouldForceSplit() {<a name="line.8306"></a>
-<span class="sourceLineNo">8307</span>    return this.splitRequest;<a name="line.8307"></a>
+<span class="sourceLineNo">8265</span>    if (coprocessorHost != null) {<a name="line.8265"></a>
+<span class="sourceLineNo">8266</span>      request = coprocessorHost.preEndpointInvocation(service, methodName, request);<a name="line.8266"></a>
+<span class="sourceLineNo">8267</span>    }<a name="line.8267"></a>
+<span class="sourceLineNo">8268</span><a name="line.8268"></a>
+<span class="sourceLineNo">8269</span>    final com.google.protobuf.Message.Builder responseBuilder =<a name="line.8269"></a>
+<span class="sourceLineNo">8270</span>        service.getResponsePrototype(methodDesc).newBuilderForType();<a name="line.8270"></a>
+<span class="sourceLineNo">8271</span>    service.callMethod(methodDesc, controller, request,<a name="line.8271"></a>
+<span class="sourceLineNo">8272</span>        new com.google.protobuf.RpcCallback&lt;com.google.protobuf.Message&gt;() {<a name="line.8272"></a>
+<span class="sourceLineNo">8273</span>      @Override<a name="line.8273"></a>
+<span class="sourceLineNo">8274</span>      public void run(com.google.protobuf.Message message) {<a name="line.8274"></a>
+<span class="sourceLineNo">8275</span>        if (message != null) {<a name="line.8275"></a>
+<span class="sourceLineNo">8276</span>          responseBuilder.mergeFrom(message);<a name="line.8276"></a>
+<span class="sourceLineNo">8277</span>        }<a name="line.8277"></a>
+<span class="sourceLineNo">8278</span>      }<a name="line.8278"></a>
+<span class="sourceLineNo">8279</span>    });<a name="line.8279"></a>
+<span class="sourceLineNo">8280</span><a name="line.8280"></a>
+<span class="sourceLineNo">8281</span>    if (coprocessorHost != null) {<a name="line.8281"></a>
+<span class="sourceLineNo">8282</span>      coprocessorHost.postEndpointInvocation(service, methodName, request, responseBuilder);<a name="line.8282"></a>
+<span class="sourceLineNo">8283</span>    }<a name="line.8283"></a>
+<span class="sourceLineNo">8284</span>    IOException exception =<a name="line.8284"></a>
+<span class="sourceLineNo">8285</span>        org.apache.hadoop.hbase.ipc.CoprocessorRpcUtils.getControllerException(controller);<a name="line.8285"></a>
+<span class="sourceLineNo">8286</span>    if (exception != null) {<a name="line.8286"></a>
+<span class="sourceLineNo">8287</span>      throw exception;<a name="line.8287"></a>
+<span class="sourceLineNo">8288</span>    }<a name="line.8288"></a>
+<span class="sourceLineNo">8289</span><a name="line.8289"></a>
+<span class="sourceLineNo">8290</span>    return responseBuilder.build();<a name="line.8290"></a>
+<span class="sourceLineNo">8291</span>  }<a name="line.8291"></a>
+<span class="sourceLineNo">8292</span><a name="line.8292"></a>
+<span class="sourceLineNo">8293</span>  boolean shouldForceSplit() {<a name="line.8293"></a>
+<span class="sourceLineNo">8294</span>    return this.splitRequest;<a name="line.8294"></a>
+<span class="sourceLineNo">8295</span>  }<a name="line.8295"></a>
+<span class="sourceLineNo">8296</span><a name="line.8296"></a>
+<span class="sourceLineNo">8297</span>  byte[] getExplicitSplitPoint() {<a name="line.8297"></a>
+<span class="sourceLineNo">8298</span>    return this.explicitSplitPoint;<a name="line.8298"></a>
+<span class="sourceLineNo">8299</span>  }<a name="line.8299"></a>
+<span class="sourceLineNo">8300</span><a name="line.8300"></a>
+<span class="sourceLineNo">8301</span>  void forceSplit(byte[] sp) {<a name="line.8301"></a>
+<span class="sourceLineNo">8302</span>    // This HRegion will go away after the forced split is successful<a name="line.8302"></a>
+<span class="sourceLineNo">8303</span>    // But if a forced split fails, we need to clear forced split.<a name="line.8303"></a>
+<span class="sourceLineNo">8304</span>    this.splitRequest = true;<a name="line.8304"></a>
+<span class="sourceLineNo">8305</span>    if (sp != null) {<a name="line.8305"></a>
+<span class="sourceLineNo">8306</span>      this.explicitSplitPoint = sp;<a name="line.8306"></a>
+<span class="sourceLineNo">8307</span>    }<a name="line.8307"></a>
 <span class="sourceLineNo">8308</span>  }<a name="line.8308"></a>
 <span class="sourceLineNo">8309</span><a name="line.8309"></a>
-<span class="sourceLineNo">8310</span>  byte[] getExplicitSplitPoint() {<a name="line.8310"></a>
-<span class="sourceLineNo">8311</span>    return this.explicitSplitPoint;<a name="line.8311"></a>
-<span class="sourceLineNo">8312</span>  }<a name="line.8312"></a>
-<span class="sourceLineNo">8313</span><a name="line.8313"></a>
-<span class="sourceLineNo">8314</span>  void forceSplit(byte[] sp) {<a name="line.8314"></a>
-<span class="sourceLineNo">8315</span>    // This HRegion will go away after the forced split is successful<a name="line.8315"></a>
-<span class="sourceLineNo">8316</span>    // But if a forced split fails, we need to clear forced split.<a name="line.8316"></a>
-<span class="sourceLineNo">8317</span>    this.splitRequest = true;<a name="line.8317"></a>
-<span class="sourceLineNo">8318</span>    if (sp != null) {<a name="line.8318"></a>
-<span class="sourceLineNo">8319</span>      this.explicitSplitPoint = sp;<a name="line.8319"></a>
-<span class="sourceLineNo">8320</span>    }<a name="line.8320"></a>
-<span class="sourceLineNo">8321</span>  }<a name="line.8321"></a>
-<span class="sourceLineNo">8322</span><a name="line.8322"></a>
-<span class="sourceLineNo">8323</span>  void clearSplit() {<a name="line.8323"></a>
-<span class="sourceLineNo">8324</span>    this.splitRequest = false;<a name="line.8324"></a>
-<span class="sourceLineNo">8325</span>    this.explicitSplitPoint = null;<a name="line.8325"></a>
-<span class="sourceLineNo">8326</span>  }<a name="line.8326"></a>
-<span class="sourceLineNo">8327</span><a name="line.8327"></a>
-<span class="sourceLineNo">8328</span>  /**<a name="line.8328"></a>
-<span class="sourceLineNo">8329</span>   * Return the splitpoint. null indicates the region isn't splittable<a name="line.8329"></a>
-<span class="sourceLineNo">8330</span>   * If the splitpoint isn't explicitly specified, it will go over the stores<a name="line.8330"></a>
-<span class="sourceLineNo">8331</span>   * to find the best splitpoint. Currently the criteria of best splitpoint<a name="line.8331"></a>
-<span class="sourceLineNo">8332</span>   * is based on the size of the store.<a name="line.8332"></a>
-<span class="sourceLineNo">8333</span>   */<a name="line.8333"></a>
-<span class="sourceLineNo">8334</span>  public byte[] checkSplit() {<a name="line.8334"></a>
-<span class="sourceLineNo">8335</span>    // Can't split META<a name="line.8335"></a>
-<span class="sourceLineNo">8336</span>    if (this.getRegionInfo().isMetaRegion()) {<a name="line.8336"></a>
-<span class="sourceLineNo">8337</span>      if (shouldForceSplit()) {<a name="line.8337"></a>
-<span class="sourceLineNo">8338</span>        LOG.warn("Cannot split meta region in HBase 0.20 and above");<a name="line.8338"></a>
-<span class="sourceLineNo">8339</span>      }<a name="line.8339"></a>
-<span class="sourceLineNo">8340</span>      return null;<a name="line.8340"></a>
-<span class="sourceLineNo">8341</span>    }<a name="line.8341"></a>
-<span class="sourceLineNo">8342</span><a name="line.8342"></a>
-<span class="sourceLineNo">8343</span>    // Can't split a region that is closing.<a name="line.8343"></a>
-<span class="sourceLineNo">8344</span>    if (this.isClosing()) {<a name="line.8344"></a>
-<span class="sourceLineNo">8345</span>      return null;<a name="line.8345"></a>
-<span class="sourceLineNo">8346</span>    }<a name="line.8346"></a>
-<span class="sourceLineNo">8347</span><a name="line.8347"></a>
-<span class="sourceLineNo">8348</span>    if (!splitPolicy.shouldSplit()) {<a name="line.8348"></a>
-<span class="sourceLineNo">8349</span>      return null;<a name="line.8349"></a>
-<span class="sourceLineNo">8350</span>    }<a name="line.8350"></a>
+<span class="sourceLineNo">8310</span>  void clearSplit() {<a name="line.8310"></a>
+<span class="sourceLineNo">8311</span>    this.splitRequest = false;<a name="line.8311"></a>
+<span class="sourceLineNo">8312</span>    this.explicitSplitPoint = null;<a name="line.8312"></a>
+<span class="sourceLineNo">8313</span>  }<a name="line.8313"></a>
+<span class="sourceLineNo">8314</span><a name="line.8314"></a>
+<span class="sourceLineNo">8315</span>  /**<a name="line.8315"></a>
+<span class="sourceLineNo">8316</span>   * Return the splitpoint. null indicates the region isn't splittable<a name="line.8316"></a>
+<span class="sourceLineNo">8317</span>   * If the splitpoint isn't explicitly specified, it will go over the stores<a name="line.8317"></a>
+<span class="sourceLineNo">8318</span>   * to find the best splitpoint. Currently the criteria of best splitpoint<a name="line.8318"></a>
+<span class="sourceLineNo">8319</span>   * is based on the size of the store.<a name="line.8319"></a>
+<span class="sourceLineNo">8320</span>   */<a name="line.8320"></a>
+<span class="sourceLineNo">8321</span>  public byte[] checkSplit() {<a name="line.8321"></a>
+<span class="sourceLineNo">8322</span>    // Can't split META<a name="line.8322"></a>
+<span class="sourceLineNo">8323</span>    if (this.getRegionInfo().isMetaRegion()) {<a name="line.8323"></a>
+<span class="sourceLineNo">8324</span>      if (shouldForceSplit()) {<a name="line.8324"></a>
+<span class="sourceLineNo">8325</span>        LOG.warn("Cannot split meta region in HBase 0.20 and above");<a name="line.8325"></a>
+<span class="sourceLineNo">8326</span>      }<a name="line.8326"></a>
+<span class="sourceLineNo">8327</span>      return null;<a name="line.8327"></a>
+<span class="sourceLineNo">8328</span>    }<a name="line.8328"></a>
+<span class="sourceLineNo">8329</span><a name="line.8329"></a>
+<span class="sourceLineNo">8330</span>    // Can't split a region that is closing.<a name="line.8330"></a>
+<span class="sourceLineNo">8331</span>    if (this.isClosing()) {<a name="line.8331"></a>
+<span class="sourceLineNo">8332</span>      return null;<a name="line.8332"></a>
+<span class="sourceLineNo">8333</span>    }<a name="line.8333"></a>
+<span class="sourceLineNo">8334</span><a name="line.8334"></a>
+<span class="sourceLineNo">8335</span>    if (!splitPolicy.shouldSplit()) {<a name="line.8335"></a>
+<span class="sourceLineNo">8336</span>      return null;<a name="line.8336"></a>
+<span class="sourceLineNo">8337</span>    }<a name="line.8337"></a>
+<span class="sourceLineNo">8338</span><a name="line.8338"></a>
+<span class="sourceLineNo">8339</span>    byte[] ret = splitPolicy.getSplitPoint();<a name="line.8339"></a>
+<span class="sourceLineNo">8340</span><a name="line.8340"></a>
+<span class="sourceLineNo">8341</span>    if (ret != null) {<a name="line.8341"></a>
+<span class="sourceLineNo">8342</span>      try {<a name="line.8342"></a>
+<span class="sourceLineNo">8343</span>        checkRow(ret, "calculated split");<a name="line.8343"></a>
+<span class="sourceLineNo">8344</span>      } catch (IOException e) {<a name="line.8344"></a>
+<span class="sourceLineNo">8345</span>        LOG.error("Ignoring invalid split", e);<a name="line.8345"></a>
+<span class="sourceLineNo">8346</span>        return null;<a name="line.8346"></a>
+<span class="sourceLineNo">8347</span>      }<a name="line.8347"></a>
+<span class="sourceLineNo">8348</span>    }<a name="line.8348"></a>
+<span class="sourceLineNo">8349</span>    return ret;<a name="line.8349"></a>
+<span class="sourceLineNo">8350</span>  }<a name="line.8350"></a>
 <span class="sourceLineNo">8351</span><a name="line.8351"></a>
-<span class="sourceLineNo">8352</span>    byte[] ret = splitPolicy.getSplitPoint();<a name="line.8352"></a>
-<span class="sourceLineNo">8353</span><a name="line.8353"></a>
-<span class="sourceLineNo">8354</span>    if (ret != null) {<a name="line.8354"></a>
-<span class="sourceLineNo">8355</span>      try {<a name="line.8355"></a>
-<span class="sourceLineNo">8356</span>        checkRow(ret, "calculated split");<a name="line.8356"></a>
-<span class="sourceLineNo">8357</span>      } catch (IOException e) {<a name="line.8357"></a>
-<span class="sourceLineNo">8358</span>        LOG.error("Ignoring invalid split", e);<a name="line.8358"></a>
-<span class="sourceLineNo">8359</span>        return null;<a name="line.8359"></a>
-<span class="sourceLineNo">8360</span>      }<a name="line.8360"></a>
-<span class="sourceLineNo">8361</span>    }<a name="line.8361"></a>
-<span class="sourceLineNo">8362</span>    return ret;<a name="line.8362"></a>
+<span class="sourceLineNo">8352</span>  /**<a name="line.8352"></a>
+<span class="sourceLineNo">8353</span>   * @return The priority that this region should have in the compaction queue<a name="line.8353"></a>
+<span class="sourceLineNo">8354</span>   */<a name="line.8354"></a>
+<span class="sourceLineNo">8355</span>  public int getCompactPriority() {<a name="line.8355"></a>
+<span class="sourceLineNo">8356</span>    return stores.values().stream().mapToInt(HStore::getCompactPriority).min()<a name="line.8356"></a>
+<span class="sourceLineNo">8357</span>        .orElse(Store.NO_PRIORITY);<a name="line.8357"></a>
+<span class="sourceLineNo">8358</span>  }<a name="line.8358"></a>
+<span class="sourceLineNo">8359</span><a name="line.8359"></a>
+<span class="sourceLineNo">8360</span>  /** @return the coprocessor host */<a name="line.8360"></a>
+<span class="sourceLineNo">8361</span>  public RegionCoprocessorHost getCoprocessorHost() {<a name="line.8361"></a>
+<span class="sourceLineNo">8362</span>    return coprocessorHost;<a name="line.8362"></a>
 <span class="sourceLineNo">8363</span>  }<a name="line.8363"></a>
 <span class="sourceLineNo">8364</span><a name="line.8364"></a>
-<span class="sourceLineNo">8365</span>  /**<a name="line.8365"></a>
-<span class="sourceLineNo">8366</span>   * @return The priority that this region should have in the compaction queue<a name="line.8366"></a>
-<span class="sourceLineNo">8367</span>   */<a name="line.8367"></a>
-<span class="sourceLineNo">8368</span>  public int getCompactPriority() {<a name="line.8368"></a>
-<span class="sourceLineNo">8369</span>    return stores.values().stream().mapToInt(HStore::getCompactPriority).min()<a name="line.8369"></a>
-<span class="sourceLineNo">8370</span>        .orElse(Store.NO_PRIORITY);<a name="line.8370"></a>
-<span class="sourceLineNo">8371</span>  }<a name="line.8371"></a>
-<span class="sourceLineNo">8372</span><a name="line.8372"></a>
-<span class="sourceLineNo">8373</span>  /** @return the coprocessor host */<a name="line.8373"></a>
-<span class="sourceLineNo">8374</span>  public RegionCoprocessorHost getCoprocessorHost() {<a name="line.8374"></a>
-<span class="sourceLineNo">8375</span>    return coprocessorHost;<a name="line.8375"></a>
-<span class="sourceLineNo">8376</span>  }<a name="line.8376"></a>
-<span class="sourceLineNo">8377</span><a name="line.8377"></a>
-<span class="sourceLineNo">8378</span>  /** @param coprocessorHost the new coprocessor host */<a name="line.8378"></a>
-<span class="sourceLineNo">8379</span>  @VisibleForTesting<a name="line.8379"></a>
-<span class="sourceLineNo">8380</span>  public void setCoprocessorHost(final RegionCoprocessorHost coprocessorHost) {<a name="line.8380"></a>
-<span class="sourceLineNo">8381</span>    this.coprocessorHost = coprocessorHost;<a name="line.8381"></a>
-<span class="sourceLineNo">8382</span>  }<a name="line.8382"></a>
-<span class="sourceLineNo">8383</span><a name="line.8383"></a>
-<span class="sourceLineNo">8384</span>  @Override<a name="line.8384"></a>
-<span class="sourceLineNo">8385</span>  public void startRegionOperation() throws IOException {<a name="line.8385"></a>
-<span class="sourceLineNo">8386</span>    startRegionOperation(Operation.ANY);<a name="line.8386"></a>
-<span class="sourceLineNo">8387</span>  }<a name="line.8387"></a>
-<span class="sourceLineNo">8388</span><a name="line.8388"></a>
-<span class="sourceLineNo">8389</span>  @Override<a name="line.8389"></a>
-<span class="sourceLineNo">8390</span>  public void startRegionOperation(Operation op) throws IOException {<a name="line.8390"></a>
-<span class="sourceLineNo">8391</span>    switch (op) {<a name="line.8391"></a>
-<span class="sourceLineNo">8392</span>      case GET:  // read operations<a name="line.8392"></a>
-<span class="sourceLineNo">8393</span>      case SCAN:<a name="line.8393"></a>
-<span class="sourceLineNo">8394</span>        checkReadsEnabled();<a name="line.8394"></a>
-<span class="sourceLineNo">8395</span>        break;<a name="line.8395"></a>
-<span class="sourceLineNo">8396</span>      default:<a name="line.8396"></a>
-<span class="sourceLineNo">8397</span>        break;<a name="line.8397"></a>
-<span class="sourceLineNo">8398</span>    }<a name="line.8398"></a>
-<span class="sourceLineNo">8399</span>    if (op == Operation.MERGE_REGION || op == Operation.SPLIT_REGION<a name="line.8399"></a>
-<span class="sourceLineNo">8400</span>        || op == Operation.COMPACT_REGION || op == Operation.COMPACT_SWITCH) {<a name="line.8400"></a>
-<span class="sourceLineNo">8401</span>      // split, merge or compact region doesn't need to check the closing/closed state or lock the<a name="line.8401"></a>
-<span class="sourceLineNo">8402</span>      // region<a name="line.8402"></a>
-<span class="sourceLineNo">8403</span>      return;<a name="line.8403"></a>
+<span class="sourceLineNo">8365</span>  /** @param coprocessorHost the new coprocessor host */<a name="line.8365"></a>
+<span class="sourceLineNo">8366</span>  @VisibleForTesting<a name="line.8366"></a>
+<span class="sourceLineNo">8367</span>  public void setCoprocessorHost(final RegionCoprocessorHost coprocessorHost) {<a name="line.8367"></a>
+<span class="sourceLineNo">8368</span>    this.coprocessorHost = coprocessorHost;<a name="line.8368"></a>
+<span class="sourceLineNo">8369</span>  }<a name="line.8369"></a>
+<span class="sourceLineNo">8370</span><a name="line.8370"></a>
+<span class="sourceLineNo">8371</span>  @Override<a name="line.8371"></a>
+<span class="sourceLineNo">8372</span>  public void startRegionOperation() throws IOException {<a name="line.8372"></a>
+<span class="sourceLineNo">8373</span>    startRegionOperation(Operation.ANY);<a name="line.8373"></a>
+<span class="sourceLineNo">8374</span>  }<a name="line.8374"></a>
+<span class="sourceLineNo">8375</span><a name="line.8375"></a>
+<span class="sourceLineNo">8376</span>  @Override<a name="line.8376"></a>
+<span class="sourceLineNo">8377</span>  public void startRegionOperation(Operation op) throws IOException {<a name="line.8377"></a>
+<span class="sourceLineNo">8378</span>    switch (op) {<a name="line.8378"></a>
+<span class="sourceLineNo">8379</span>      case GET:  // read operations<a name="line.8379"></a>
+<span class="sourceLineNo">8380</span>      case SCAN:<a name="line.8380"></a>
+<span class="sourceLineNo">8381</span>        checkReadsEnabled();<a name="line.8381"></a>
+<span class="sourceLineNo">8382</span>        break;<a name="line.8382"></a>
+<span class="sourceLineNo">8383</span>      default:<a name="line.8383"></a>
+<span class="sourceLineNo">8384</span>        break;<a name="line.8384"></a>
+<span class="sourceLineNo">8385</span>    }<a name="line.8385"></a>
+<span class="sourceLineNo">8386</span>    if (op == Operation.MERGE_REGION || op == Operation.SPLIT_REGION<a name="line.8386"></a>
+<span class="sourceLineNo">8387</span>        || op == Operation.COMPACT_REGION || op == Operation.COMPACT_SWITCH) {<a name="line.8387"></a>
+<span class="sourceLineNo">8388</span>      // split, merge or compact region doesn't need to check the closing/closed state or lock the<a name="line.8388"></a>
+<span class="sourceLineNo">8389</span>      // region<a name="line.8389"></a>
+<span class="sourceLineNo">8390</span>      return;<a name="line.8390"></a>
+<span class="sourceLineNo">8391</span>    }<a name="line.8391"></a>
+<span class="sourceLineNo">8392</span>    if (this.closing.get()) {<a name="line.8392"></a>
+<span class="sourceLineNo">8393</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closing");<a name="line.8393"></a>
+<span class="sourceLineNo">8394</span>    }<a name="line.8394"></a>
+<span class="sourceLineNo">8395</span>    lock(lock.readLock());<a name="line.8395"></a>
+<span class="sourceLineNo">8396</span>    if (this.closed.get()) {<a name="line.8396"></a>
+<span class="sourceLineNo">8397</span>      lock.readLock().unlock();<a name="line.8397"></a>
+<span class="sourceLineNo">8398</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closed");<a name="line.8398"></a>
+<span class="sourceLineNo">8399</span>    }<a name="line.8399"></a>
+<span class="sourceLineNo">8400</span>    // The unit for snapshot is a region. So, all stores for this region must be<a name="line.8400"></a>
+<span class="sourceLineNo">8401</span>    // prepared for snapshot operation before proceeding.<a name="line.8401"></a>
+<span class="sourceLineNo">8402</span>    if (op == Operation.SNAPSHOT) {<a name="line.8402"></a>
+<span class="sourceLineNo">8403</span>      stores.values().forEach(HStore::preSnapshotOperation);<a name="line.8403"></a>
 <span class="sourceLineNo">8404</span>    }<a name="line.8404"></a>
-<span class="sourceLineNo">8405</span>    if (this.closing.get()) {<a name="line.8405"></a>
-<span class="sourceLineNo">8406</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closing");<a name="line.8406"></a>
-<span class="sourceLineNo">8407</span>    }<a name="line.8407"></a>
-<span class="sourceLineNo">8408</span>    lock(lock.readLock());<a name="line.8408"></a>
-<span class="sourceLineNo">8409</span>    if (this.closed.get()) {<a name="line.8409"></a>
+<span class="sourceLineNo">8405</span>    try {<a name="line.8405"></a>
+<span class="sourceLineNo">8406</span>      if (coprocessorHost != null) {<a name="line.8406"></a>
+<span class="sourceLineNo">8407</span>        coprocessorHost.postStartRegionOperation(op);<a name="line.8407"></a>
+<span class="sourceLineNo">8408</span>      }<a name="line.8408"></a>
+<span class="sourceLineNo">8409</span>    } catch (Exception e) {<a name="line.8409"></a>
 <span class="sourceLineNo">8410</span>      lock.readLock().unlock();<a name="line.8410"></a>
-<span class="sourceLineNo">8411</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closed");<a name="line.8411"></a>
+<span class="sourceLineNo">8411</span>      throw new IOException(e);<a name="line.8411"></a>
 <span class="sourceLineNo">8412</span>    }<a name="line.8412"></a>
-<span class="sourceLineNo">8413</span>    // The unit for snapshot is a region. So, all stores for this region must be<a name="line.8413"></a>
-<span class="sourceLineNo">8414</span>    // prepared for snapshot operation before proceeding.<a name="line.8414"></a>
-<span class="sourceLineNo">8415</span>    if (op == Operation.SNAPSHOT) {<a name="line.8415"></a>
-<span class="sourceLineNo">8416</span>      stores.values().forEach(HStore::preSnapshotOperation);<a name="line.8416"></a>
-<span class="sourceLineNo">8417</span>    }<a name="line.8417"></a>
-<span class="sourceLineNo">8418</span>    try {<a name="line.8418"></a>
-<span class="sourceLineNo">8419</span>      if (coprocessorHost != null) {<a name="line.8419"></a>
-<span class="sourceLineNo">8420</span>        coprocessorHost.postStartRegionOperation(op);<a name="line.8420"></a>
-<span class="sourceLineNo">8421</span>      }<a name="line.8421"></a>
-<span class="sourceLineNo">8422</span>    } catch (Exception e) {<a name="line.8422"></a>
-<span class="sourceLineNo">8423</span>      lock.readLock().unlock();<a name="line.8423"></a>
-<span class="sourceLineNo">8424</span>      throw new IOException(e);<a name="line.8424"></a>
-<span class="sourceLineNo">8425</span>    }<a name="line.8425"></a>
-<span class="sourceLineNo">8426</span>  }<a name="line.8426"></a>
-<span class="sourceLineNo">8427</span><a name="line.8427"></a>
-<span class="sourceLineNo">8428</span>  @Override<a name="line.8428"></a>
-<span class="sourceLineNo">8429</span>  public void closeRegionOperation() throws IOException {<a name="line.8429"></a>
-<span class="sourceLineNo">8430</span>    closeRegionOperation(Operation.ANY);<a name="line.8430"></a>
-<span class="sourceLineNo">8431</span>  }<a name="line.8431"></a>
-<span class="sourceLineNo">8432</span><a name="line.8432"></a>
-<span class="sourceLineNo">8433</span>  @Override<a name="line.8433"></a>
-<span class="sourceLineNo">8434</span>  public void closeRegionOperation(Operation operation) throws IOException {<a name="line.8434"></a>
-<span class="sourceLineNo">8435</span>    if (operation == Operation.SNAPSHOT) {<a name="line.8435"></a>
-<span class="sourceLineNo">8436</span>      stores.values().forEach(HStore::postSnapshotOperation);<a name="line.8436"></a>
-<span class="sourceLineNo">8437</span>    }<a name="line.8437"></a>
-<span class="sourceLineNo">8438</span>    lock.readLock().unlock();<a name="line.8438"></a>
-<span class="sourceLineNo">8439</span>    if (coprocessorHost != null) {<a name="line.8439"></a>
-<span class="sourceLineNo">8440</span>      coprocessorHost.postCloseRegionOperation(operation);<a name="line.8440"></a>
-<span class="sourceLineNo">8441</span>    }<a name="line.8441"></a>
-<span class="sourceLineNo">8442</span>  }<a name="line.8442"></a>
-<span class="sourceLineNo">8443</span><a name="line.8443"></a>
-<span class="sourceLineNo">8444</span>  /**<a name="line.8444"></a>
-<span class="sourceLineNo">8445</span>   * This method needs to be called before any public call that reads or<a name="line.8445"></a>
-<span class="sourceLineNo">8446</span>   * modifies stores in bulk. It has to be called just before a try.<a name="line.8446"></a>
-<span class="sourceLineNo">8447</span>   * #closeBulkRegionOperation needs to be called in the try's finally block<a name="line.8447"></a>
-<span class="sourceLineNo">8448</span>   * Acquires a writelock and checks if the region is closing or closed.<a name="line.8448"></a>
-<span class="sourceLineNo">8449</span>   * @throws NotServingRegionException when the region is closing or closed<a name="line.8449"></a>
-<span class="sourceLineNo">8450</span>   * @throws RegionTooBusyException if failed to get the lock in time<a name="line.8450"></a>
-<span class="sourceLineNo">8451</span>   * @throws InterruptedIOException if interrupted while waiting for a lock<a name="line.8451"></a>
-<span class="sourceLineNo">8452</span>   */<a name="line.8452"></a>
-<span class="sourceLineNo">8453</span>  private void startBulkRegionOperation(boolean writeLockNeeded)<a name="line.8453"></a>
-<span class="sourceLineNo">8454</span>      throws NotServingRegionException, RegionTooBusyException, InterruptedIOException {<a name="line.8454"></a>
-<span class="sourceLineNo">8455</span>    if (this.closing.get()) {<a name="line.8455"></a>
-<span class="sourceLineNo">8456</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closing");<a name="line.8456"></a>
-<span class="sourceLineNo">8457</span>    }<a name="line.8457"></a>
-<span class="sourceLineNo">8458</span>    if (writeLockNeeded) lock(lock.writeLock());<a name="line.8458"></a>
-<span class="sourceLineNo">8459</span>    else lock(lock.readLock());<a name="line.8459"></a>
-<span class="sourceLineNo">8460</span>    if (this.closed.get()) {<a name="line.8460"></a>
-<span class="sourceLineNo">8461</span>      if (writeLockNeeded) lock.writeLock().unlock();<a name="line.8461"></a>
-<span class="sourceLineNo">8462</span>      else lock.readLock().unlock();<a name="line.8462"></a>
-<span class="sourceLineNo">8463</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closed");<a name="line.8463"></a>
-<span class="sourceLineNo">8464</span>    }<a name="line.8464"></a>
-<span class="sourceLineNo">8465</span>  }<a name="line.8465"></a>
-<span class="sourceLineNo">8466</span><a name="line.8466"></a>
-<span class="sourceLineNo">8467</span>  /**<a name="line.8467"></a>
-<span class="sourceLineNo">8468</span>   * Closes the lock. This needs to be called in the finally block corresponding<a name="line.8468"></a>
-<span class="sourceLineNo">8469</span>   * to the try block of #startRegionOperation<a name="line.8469"></a>
-<span class="sourceLineNo">8470</span>   */<a name="line.8470"></a>
-<span class="sourceLineNo">8471</span>  private void closeBulkRegionOperation(){<a name="line.8471"></a>
-<span class="sourceLineNo">8472</span>    if (lock.writeLock().isHeldByCurrentThread()) lock.writeLock().unlock();<a name="line.8472"></a>
-<span class="sourceLineNo">8473</span>    else lock.readLock().unlock();<a name="line.8473"></a>
-<span class="sourceLineNo">8474</span>  }<a name="line.8474"></a>
-<span class="sourceLineNo">8475</span><a name="line.8475"></a>
-<span class="sourceLineNo">8476</span>  /**<a name="line.8476"></a>
-<span class="sourceLineNo">8477</span>   * Update LongAdders for number of puts without wal and the size of possible data loss.<a name="line.8477"></a>
-<span class="sourceLineNo">8478</span>   * These information are exposed by the region server metrics.<a name="line.8478"></a>
-<span class="sourceLineNo">8479</span>   */<a name="line.8479"></a>
-<span class="sourceLineNo">8480</span>  private void recordMutationWithoutWal(final Map&lt;byte [], List&lt;Cell&gt;&gt; familyMap) {<a name="line.8480"></a>
-<span class="sourceLineNo">8481</span>    numMutationsWithoutWAL.increment();<a name="line.8481"></a>
-<span class="sourceLineNo">8482</span>    if (numMutationsWithoutWAL.sum() &lt;= 1) {<a name="line.8482"></a>
-<span class="sourceLineNo">8483</span>      LOG.info("writing data to region " + this +<a name="line.8483"></a>
-<span class="sourceLineNo">8484</span>               " with WAL disabled. Data may be lost in the event of a crash.");<a name="line.8484"></a>
-<span class="sourceLineNo">8485</span>    }<a name="line.8485"></a>
-<span class="sourceLineNo">8486</span><a name="line.8486"></a>
-<span class="sourceLineNo">8487</span>    long mutationSize = 0;<a name="line.8487"></a>
-<span class="sourceLineNo">8488</span>    for (List&lt;Cell&gt; cells: familyMap.values()) {<a name="line.8488"></a>
-<span class="sourceLineNo">8489</span>      // Optimization: 'foreach' loop is not used. See:<a name="line.8489"></a>
-<span class="sourceLineNo">8490</span>      // HBASE-12023 HRegion.applyFamilyMapToMemstore creates too many iterator objects<a name="line.8490"></a>
-<span class="sourceLineNo">8491</span>      assert cells instanceof RandomAccess;<a name="line.8491"></a>
-<span class="sourceLineNo">8492</span>      int listSize = cells.size();<a name="line.8492"></a>
-<span class="sourceLineNo">8493</span>      for (int i=0; i &lt; listSize; i++) {<a name="line.8493"></a>
-<span class="sourceLineNo">8494</span>        Cell cell = cells.get(i);<a name="line.8494"></a>
-<span class="sourceLineNo">8495</span>        mutationSize += KeyValueUtil.length(cell);<a name="line.8495"></a>
-<span class="sourceLineNo">8496</span>      }<a name="line.8496"></a>
-<span class="sourceLineNo">8497</span>    }<a name="line.8497"></a>
-<span class="sourceLineNo">8498</span><a name="line.8498"></a>
-<span class="sourceLineNo">8499</span>    dataInMemoryWithoutWAL.add(mutationSize);<a name="line.8499"></a>
-<span class="sourceLineNo">8500</span>  }<a name="line.8500"></a>
-<span class="sourceLineNo">8501</span><a name="line.8501"></a>
-<span class="sourceLineNo">8502</span>  private void lock(final Lock lock) throws RegionTooBusyException, InterruptedIOException {<a name="line.8502"></a>
-<span class="sourceLineNo">8503</span>    lock(lock, 1);<a name="line.8503"></a>
-<span class="sourceLineNo">8504</span>  }<a name="line.8504"></a>
-<span class="sourceLineNo">8505</span><a name="line.8505"></a>
-<span class="sourceLineNo">8506</span>  /**<a name="line.8506"></a>
-<span class="sourceLineNo">8507</span>   * Try to acquire a lock.  Throw RegionTooBusyException<a name="line.8507"></a>
-<span class="sourceLineNo">8508</span>   * if failed to get the lock in time. Throw InterruptedIOException<a name="line.8508"></a>
-<span class="sourceLineNo">8509</span>   * if interrupted while waiting for the lock.<a name="line.8509"></a>
-<span class="sourceLineNo">8510</span>   */<a name="line.8510"></a>
-<span class="sourceLineNo">8511</span>  private void lock(final Lock lock, final int multiplier)<a name="line.8511"></a>
-<span class="sourceLineNo">8512</span>      throws RegionTooBusyException, InterruptedIOException {<a name="line.8512"></a>
-<span class="sourceLineNo">8513</span>    try {<a name="line.8513"></a>
-<span class="sourceLineNo">8514</span>      final long waitTime = Math.min(maxBusyWaitDuration,<a name="line.8514"></a>
-<span class="sourceLineNo">8515</span>          busyWaitDuration * Math.min(multiplier, maxBusyWaitMultiplier));<a name="line.8515"></a>
-<span class="sourceLineNo">8516</span>      if (!lock.tryLock(waitTime, TimeUnit.MILLISECONDS)) {<a name="line.8516"></a>
-<span class="sourceLineNo">8517</span>        // Don't print millis. Message is used as a key over in<a name="line.8517"></a>
-<span class="sourceLineNo">8518</span>        // RetriesExhaustedWithDetailsException processing.<a name="line.8518"></a>
-<span class="sourceLineNo">8519</span>        throw new RegionTooBusyException("Failed to obtain lock; regionName=" +<a name="line.8519"></a>
-<span class="sourceLineNo">8520</span>            (this.getRegionInfo() == null? "unknown":<a name="line.8520"></a>
-<span class="sourceLineNo">8521</span>                this.getRegionInfo().getRegionNameAsString()) +<a name="line.8521"></a>
-<span class="sourceLineNo">8522</span>            ", server=" + (this.getRegionServerServices() == null? "unknown":<a name="line.8522"></a>
-<span class="sourceLineNo">8523</span>                this.getRegionServerServices().getServerName()));<a name="line.8523"></a>
-<span class="sourceLineNo">8524</span>      }<a name="line.8524"></a>
-<span class="sourceLineNo">8525</span>    } catch (InterruptedException ie) {<a name="line.8525"></a>
-<span class="sourceLineNo">8526</span>      LOG.info("Interrupted while waiting for a lock");<a name="line.8526"></a>
-<span class="sourceLineNo">8527</span>      InterruptedIOException iie = new InterruptedIOException();<a name="line.8527"></a>
-<span class="sourceLineNo">8528</span>      iie.initCause(ie);<a name="line.8528"></a>
-<span class="sourceLineNo">8529</span>      throw iie;<a name="line.8529"></a>
-<span class="sourceLineNo">8530</span>    }<a name="line.8530"></a>
-<span class="sourceLineNo">8531</span>  }<a name="line.8531"></a>
-<span class="sourceLineNo">8532</span><a name="line.8532"></a>
-<span class="sourceLineNo">8533</span>  /**<a name="line.8533"></a>
-<span class="sourceLineNo">8534</span>   * Calls sync with the given transaction ID<a name="line.8534"></a>
-<span class="sourceLineNo">8535</span>   * @param txid should sync up to which transaction<a name="line.8535"></a>
-<span class="sourceLineNo">8536</span>   * @throws IOException If anything goes wrong with DFS<a name="line.8536"></a>
-<span class="sourceLineNo">8537</span>   */<a name="line.8537"></a>
-<span class="sourceLineNo">8538</span>  private void sync(long txid, Durability durability) throws IOException {<a name="line.8538"></a>
-<span class="sourceLineNo">8539</span>    if (this.getRegionInfo().isMetaRegion()) {<a name="line.8539"></a>
-<span class="sourceLineNo">8540</span>      this.wal.sync(txid);<a name="line.8540"></a>
-<span class="sourceLineNo">8541</span>    } else {<a name="line.8541"></a>
-<span class="sourceLineNo">8542</span>      switch(durability) {<a name="line.8542"></a>
-<span class="sourceLineNo">8543</span>      case USE_DEFAULT:<a name="line.8543"></a>
-<span class="sourceLineNo">8544</span>        // do what table defaults to<a name="line.8544"></a>
-<span class="sourceLineNo">8545</span>        if (shouldSyncWAL()) {<a name="line.8545"></a>
-<span class="sourceLineNo">8546</span>          this.wal.sync(txid);<a name="line.8546"></a>
-<span class="sourceLineNo">8547</span>        }<a name="line.8547"></a>
-<span class="sourceLineNo">8548</span>        break;<a name="line.8548"></a>
-<span class="sourceLineNo">8549</span>      case SKIP_WAL:<a name="line.8549"></a>
-<span class="sourceLineNo">8550</span>        // nothing do to<a name="line.8550"></a>
-<span class="sourceLineNo">8551</span>        break;<a name="line.8551"></a>
-<span class="sourceLineNo">8552</span>      case ASYNC_WAL:<a name="line.8552"></a>
-<span class="sourceLineNo">8553</span>        // nothing do to<a name="line.8553"></a>
-<span class="sourceLineNo">8554</span>        break;<a name="line.8554"></a>
-<span class="sourceLineNo">8555</span>      case SYNC_WAL:<a name="line.8555"></a>
-<span class="sourceLineNo">8556</span>          this.wal.sync(txid, false);<a name="line.8556"></a>
-<span class="sourceLineNo">8557</span>          break;<a name="line.8557"></a>
-<span class="sourceLineNo">8558</span>      case FSYNC_WAL:<a name="line.8558"></a>
-<span class="sourceLineNo">8559</span>          this.wal.sync(txid, true);<a name="line.8559"></a>
-<span class="sourceLineNo">8560</span>          break;<a name="line.8560"></a>
-<span class="sourceLineNo">8561</span>      default:<a name="line.8561"></a>
-<span class="sourceLineNo">8562</span>        throw new RuntimeException("Unknown durability " + durability);<a name="line.8562"></a>
-<span class="sourceLineNo">8563</span>      }<a name="line.8563"></a>
-<span class="sourceLineNo">8564</span>    }<a name="line.8564"></a>
-<span class="sourceLineNo">8565</span>  }<a name="line.8565"></a>
-<span class="sourceLineNo">8566</span><a name="line.8566"></a>
-<span class="sourceLineNo">8567</span>  /**<a name="line.8567"></a>
-<span class="sourceLineNo">8568</span>   * Check whether we should sync the wal from the table's durability settings<a name="line.8568"></a>
-<span class="sourceLineNo">8569</span>   */<a name="line.8569"></a>
-<span class="sourceLineNo">8570</span>  private boolean shouldSyncWAL() {<a name="line.8570"></a>
-<span class="sourceLineNo">8571</span>    return regionDurability.ordinal() &gt;  Durability.ASYNC_WAL.ordinal();<a name="line.8571"></a>
-<span class="sourceLineNo">8572</span>  }<a name="line.8572"></a>
-<span class="sourceLineNo">8573</span><a name="line.8573"></a>
-<span class="sourceLineNo">8574</span>  /**<a name="line.8574"></a>
-<span class="sourceLineNo">8575</span>   * A mocked list implementation - discards all updates.<a name="line.8575"></a>
-<span class="sourceLineNo">8576</span>   */<a name="line.8576"></a>
-<span class="sourceLineNo">8577</span>  private static final List&lt;Cell&gt; MOCKED_LIST = new AbstractList&lt;Cell&gt;() {<a name="line.8577"></a>
-<span class="sourceLineNo">8578</span><a name="line.8578"></a>
-<span class="sourceLineNo">8579</span>    @Override<a name="line.8579"></a>
-<span class="sourceLineNo">8580</span>    public void add(int index, Cell element) {<a name="line.8580"></a>
-<span class="sourceLineNo">8581</span>      // do nothing<a name="line.8581"></a>
-<span class="sourceLineNo">8582</span>    }<a name="line.8582"></a>
-<span class="sourceLineNo">8583</span><a name="line.8583"></a>
-<span class="sourceLineNo">8584</span>    @Override<a name="line.8584"></a>
-<span class="sourceLineNo">8585</span>    public boolean addAll(int index, Collection&lt;? extends Cell&gt; c) {<a name="line.8585"></a>
-<span class="sourceLineNo">8586</span>      return false; // this list is never changed as a result of an update<a name="line.8586"></a>
-<span class="sourceLineNo">8587</span>    }<a name="line.8587"></a>
-<span class="sourceLineNo">8588</span><a name="line.8588"></a>
-<span class="sourceLineNo">8589</span>    @Override<a name="line.8589"></a>
-<span class="sourceLineNo">8590</span>    public KeyValue get(int index) {<a name="line.8590"></a>
-<span class="sourceLineNo">8591</span>      throw new UnsupportedOperationException();<a name="line.8591"></a>
-<span class="sourceLineNo">8592</span>    }<a name="line.8592"></a>
-<span class="sourceLineNo">8593</span><a name="line.8593"></a>
-<span class="sourceLineNo">8594</span>    @Override<a name="line.8594"></a>
-<span class="sourceLineNo">8595</span>    public int size() {<a name="line.8595"></a>
-<span class="sourceLineNo">8596</span>      return 0;<a name="line.8596"></a>
-<span class="sourceLineNo">8597</span>    }<a name="line.8597"></a>
-<span class="sourceLineNo">8598</span>  };<a name="line.8598"></a>
-<span class="sourceLineNo">8599</span><a name="line.8599"></a>
-<span class="sourceLineNo">8600</span>  /** @return the latest sequence number that was read from storage when this region was opened */<a name="line.8600"></a>
-<span class="sourceLineNo">8601</span>  public long getOpenSeqNum() {<a name="line.8601"></a>
-<span class="sourceLineNo">8602</span>    return this.openSeqNum;<a name="line.8602"></a>
-<span class="sourceLineNo">8603</span>  }<a name="line.8603"></a>
-<span class="sourceLineNo">8604</span><a name="line.8604"></a>
-<span class="sourceLineNo">8605</span>  @Override<a name="line.8605"></a>
-<span class="sourceLineNo">8606</span>  public Map&lt;byte[], Long&gt; getMaxStoreSeqId() {<a name="line.8606"></a>
-<span class="sourceLineNo">8607</span>    return this.maxSeqIdInStores;<a name="line.8607"></a>
-<span class="sourceLineNo">8608</span>  }<a name="line.8608"></a>
-<span class="sourceLineNo">8609</span><a name="line.8609"></a>
-<span class="sourceLineNo">8610</span>  public long getOldestSeqIdOfStore(byte[] familyName) {<a name="line.8610"></a>
-<span class="sourceLineNo">8611</span>    return wal.getEarliestMemStoreSeqNum(getRegionInfo().getEncodedNameAsBytes(), familyName);<a name="line.8611"></a>
-<span class="sourceLineNo">8612</span>  }<a name="line.8612"></a>
-<span class="sourceLineNo">8613</span><a name="line.8613"></a>
-<span class="sourceLineNo">8614</span>  @Override<a name="line.8614"></a>
-<span class="sourceLineNo">8615</span>  public CompactionState getCompactionState() {<a name="line.8615"></a>
-<span class="sourceLineNo">8616</span>    boolean hasMajor = majorInProgress.get() &gt; 0, hasMinor = minorInProgress.get() &gt; 0;<a name="line.8616"></a>
-<span class="sourceLineNo">8617</span>    return (hasMajor ? (hasMinor ? CompactionState.MAJOR_AND_MINOR : CompactionState.MAJOR)<a name="line.8617"></a>
-<span class="sourceLineNo">8618</span>        : (hasMinor ? CompactionState.MINOR : CompactionState.NONE));<a name="line.8618"></a>
-<span class="sourceLineNo">8619</span>  }<a name="line.8619"></a>
-<span class="sourceLineNo">8620</span><a name="line.8620"></a>
-<span class="sourceLineNo">8621</span>  public void reportCompactionRequestStart(boolean isMajor){<a name="line.8621"></a>
-<span class="sourceLineNo">8622</span>    (isMajor ? majorInProgress : minorInProgress).incrementAndGet();<a name="line.8622"></a>
-<span class="sourceLineNo">8623</span>  }<a name="line.8623"></a>
-<span class="sourceLineNo">8624</span><a name="line.8624"></a>
-<span class="sourceLineNo">8625</span>  public void reportCompactionRequestEnd(boolean isMajor, int numFiles, long filesSizeCompacted) {<a name="line.8625"></a>
-<span class="sourceLineNo">8626</span>    int newValue = (isMajor ? majorInProgress : minorInProgress).decrementAndGet();<a name="line.8626"></a>
-<span class="sourceLineNo">8627</span><a name="line.8627"></a>
-<span class="sourceLineNo">8628</span>    // metrics<a name="line.8628"></a>
-<span class="sourceLineNo">8629</span>    compactionsFinished.increment();<a name="line.8629"></a>
-<span class="sourceLineNo">8630</span>    compactionNumFilesCompacted.add(numFiles);<a name="line.8630"></a>
-<span class="sourceLineNo">8631</span>    compactionNumBytesCompacted.add(filesSizeCompacted);<a name="line.8631"></a>
-<span class="sourceLineNo">8632</span><a name="line.8632"></a>
-<span class="sourceLineNo">8633</span>    assert newValue &gt;= 0;<a name="line.8633"></a>
-<span class="sourceLineNo">8634</span>  }<a name="line.8634"></a>
-<span class="sourceLineNo">8635</span><a name="line.8635"></a>
-<span class="sourceLineNo">8636</span>  public void reportCompactionRequestFailure() {<a name="line.8636"></a>
-<span class="sourceLineNo">8637</span>    compactionsFailed.increment();<a name="line.8637"></a>
-<span class="sourceLineNo">8638</span>  }<a name="line.8638"></a>
-<span class="sourceLineNo">8639</span><a name="line.8639"></a>
-<span class="sourceLineNo">8640</span>  public void incrementCompactionsQueuedCount() {<a name="line.8640"></a>
-<span class="sourceLineNo">8641</span>    compactionsQueued.increment();<a name="line.8641"></a>
+<span class="sourceLineNo">8413</span>  }<a name="line.8413"></a>
+<span class="sourceLineNo">8414</span><a name="line.8414"></a>
+<span class="sourceLineNo">8415</span>  @Override<a name="line.8415"></a>
+<span class="sourceLineNo">8416</span>  public void closeRegionOperation() throws IOException {<a name="line.8416"></a>
+<span class="sourceLineNo">8417</span>    closeRegionOperation(Operation.ANY);<a name="line.8417"></a>
+<span class="sourceLineNo">8418</span>  }<a name="line.8418"></a>
+<span class="sourceLineNo">8419</span><a name="line.8419"></a>
+<span class="sourceLineNo">8420</span>  @Override<a name="line.8420"></a>
+<span class="sourceLineNo">8421</span>  public void closeRegionOperation(Operation operation) throws IOException {<a name="line.8421"></a>
+<span class="sourceLineNo">8422</span>    if (operation == Operation.SNAPSHOT) {<a name="line.8422"></a>
+<span class="sourceLineNo">8423</span>      stores.values().forEach(HStore::postSnapshotOperation);<a name="line.8423"></a>
+<span class="sourceLineNo">8424</span>    }<a name="line.8424"></a>
+<span class="sourceLineNo">8425</span>    lock.readLock().unlock();<a name="line.8425"></a>
+<span class="sourceLineNo">8426</span>    if (coprocessorHost != null) {<a name="line.8426"></a>
+<span class="sourceLineNo">8427</span>      coprocessorHost.postCloseRegionOperation(operation);<a name="line.8427"></a>
+<span class="sourceLineNo">8428</span>    }<a name="line.8428"></a>
+<span class="sourceLineNo">8429</span>  }<a name="line.8429"></a>
+<span class="sourceLineNo">8430</span><a name="line.8430"></a>
+<span class="sourceLineNo">8431</span>  /**<a name="line.8431"></a>
+<span class="sourceLineNo">8432</span>   * This method needs to be called before any public call that reads or<a name="line.8432"></a>
+<span class="sourceLineNo">8433</span>   * modifies stores in bulk. It has to be called just before a try.<a name="line.8433"></a>
+<span class="sourceLineNo">8434</span>   * #closeBulkRegionOperation needs to be called in the try's finally block<a name="line.8434"></a>
+<span class="sourceLineNo">8435</span>   * Acquires a writelock and checks if the region is closing or closed.<a name="line.8435"></a>
+<span class="sourceLineNo">8436</span>   * @throws NotServingRegionException when the region is closing or closed<a name="line.8436"></a>
+<span class="sourceLineNo">8437</span>   * @throws RegionTooBusyException if failed to get the lock in time<a name="line.8437"></a>
+<span class="sourceLineNo">8438</span>   * @throws InterruptedIOException if interrupted while waiting for a lock<a name="line.8438"></a>
+<span class="sourceLineNo">8439</span>   */<a name="line.8439"></a>
+<span class="sourceLineNo">8440</span>  private void startBulkRegionOperation(boolean writeLockNeeded)<a name="line.8440"></a>
+<span class="sourceLineNo">8441</span>      throws NotServingRegionException, RegionTooBusyException, InterruptedIOException {<a name="line.8441"></a>
+<span class="sourceLineNo">8442</span>    if (this.closing.get()) {<a name="line.8442"></a>
+<span class="sourceLineNo">8443</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closing");<a name="line.8443"></a>
+<span class="sourceLineNo">8444</span>    }<a name="line.8444"></a>
+<span class="sourceLineNo">8445</span>    if (writeLockNeeded) lock(lock.writeLock());<a name="line.8445"></a>
+<span class="sourceLineNo">8446</span>    else lock(lock.readLock());<a name="line.8446"></a>
+<span class="sourceLineNo">8447</span>    if (this.closed.get()) {<a name="line.8447"></a>
+<span class="sourceLineNo">8448</span>      if (writeLockNeeded) lock.writeLock().unlock();<a name="line.8448"></a>
+<span class="sourceLineNo">8449</span>      else lock.readLock().unlock();<a name="line.8449"></a>
+<span class="sourceLineNo">8450</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closed");<a name="line.8450"></a>
+<span class="sourceLineNo">8451</span>    }<a name="line.8451"></a>
+<span class="sourceLineNo">8452</span>  }<a name="line.8452"></a>
+<span class="sourceLineNo">8453</span><a name="line.8453"></a>
+<span class="sourceLineNo">8454</span>  /**<a name="line.8454"></a>
+<span class="sourceLineNo">8455</span>   * Closes the lock. This needs to be called in the finally block corresponding<a name="line.8455"></a>
+<span class="sourceLineNo">8456</span>   * to the try block of #startRegionOperation<a name="line.8456"></a>
+<span class="sourceLineNo">8457</span>   */<a name="line.8457"></a>
+<span class="sourceLineNo">8458</span>  private void closeBulkRegionOperation(){<a name="line.8458"></a>
+<span class="sourceLineNo">8459</span>    if (lock.writeLock().isHeldByCurrentThread()) lock.writeLock().unlock();<a name="line.8459"></a>
+<span class="sourceLineNo">8460</span>    else lock.readLock().unlock();<a name="line.8460"></a>
+<span class="sourceLineNo">8461</span>  }<a name="line.8461"></a>
+<span class="sourceLineNo">8462</span><a name="line.8462"></a>
+<span class="sourceLineNo">8463</span>  /**<a name="line.8463"></a>
+<span class="sourceLineNo">8464</span>   * Update LongAdders for number of puts without wal and the size of possible data loss.<a name="line.8464"></a>
+<span class="sourceLineNo">8465</span>   * These information are exposed by the region server metrics.<a name="line.8465"></a>
+<span class="sourceLineNo">8466</span>   */<a name="line.8466"></a>
+<span class="sourceLineNo">8467</span>  private void recordMutationWithoutWal(final Map&lt;byte [], List&lt;Cell&gt;&gt; familyMap) {<a name="line.8467"></a>
+<span class="sourceLineNo">8468</span>    numMutationsWithoutWAL.increment();<a name="line.8468"></a>
+<span class="sourceLineNo">8469</span>    if (numMutationsWithoutWAL.sum() &lt;= 1) {<a name="line.8469"></a>
+<span class="sourceLineNo">8470</span>      LOG.info("writing data to region " + this +<a name="line.8470"></a>
+<span class="sourceLineNo">8471</span>               " with WAL disabled. Data may be lost in the event of a crash.");<a name="line.8471"></a>
+<span class="sourceLineNo">8472</span>    }<a name="line.8472"></a>
+<span class="sourceLineNo">8473</span><a name="line.8473"></a>
+<span class="sourceLineNo">8474</span>    long mutationSize = 0;<a name="line.8474"></a>
+<span class="sourceLineNo">8475</span>    for (List&lt;Cell&gt; cells: familyMap.values()) {<a name="line.8475"></a>
+<span class="sourceLineNo">8476</span>      // Optimization: 'foreach' loop is not used. See:<a name="line.8476"></a>
+<span class="sourceLineNo">8477</span>      // HBASE-12023 HRegion.applyFamilyMapToMemstore creates too many iterator objects<a name="line.8477"></a>
+<span class="sourceLineNo">8478</span>      assert cells instanceof RandomAccess;<a name="line.8478"></a>
+<span class="sourceLineNo">8479</span>      int listSize = cells.size();<a name="line.8479"></a>
+<span class="sourceLineNo">8480</span>      for (int i=0; i &lt; listSize; i++) {<a name="line.8480"></a>
+<span class="sourceLineNo">8481</span>        Cell cell = cells.get(i);<a name="line.8481"></a>
+<span class="sourceLineNo">8482</span>        mutationSize += KeyValueUtil.length(cell);<a name="line.8482"></a>
+<span class="sourceLineNo">8483</span>      }<a name="line.8483"></a>
+<span class="sourceLineNo">8484</span>    }<a name="line.8484"></a>
+<span class="sourceLineNo">8485</span><a name="line.8485"></a>
+<span class="sourceLineNo">8486</span>    dataInMemoryWithoutWAL.add(mutationSize);<a name="line.8486"></a>
+<span class="sourceLineNo">8487</span>  }<a name="line.8487"></a>
+<span class="sourceLineNo">8488</span><a name="line.8488"></a>
+<span class="sourceLineNo">8489</span>  private void lock(final Lock lock) throws RegionTooBusyException, InterruptedIOException {<a name="line.8489"></a>
+<span class="sourceLineNo">8490</span>    lock(lock, 1);<a name="line.8490"></a>
+<span class="sourceLineNo">8491</span>  }<a name="line.8491"></a>
+<span class="sourceLineNo">8492</span><a name="line.8492"></a>
+<span class="sourceLineNo">8493</span>  /**<a name="line.8493"></a>
+<span class="sourceLineNo">8494</span>   * Try to acquire a lock.  Throw RegionTooBusyException<a name="line.8494"></a>
+<span class="sourceLineNo">8495</span>   * if failed to get the lock in time. Throw InterruptedIOException<a name="line.8495"></a>
+<span class="sourceLineNo">8496</span>   * if interrupted while waiting for the lock.<a name="line.8496"></a>
+<span class="sourceLineNo">8497</span>   */<a name="line.8497"></a>
+<span class="sourceLineNo">8498</span>  private void lock(final Lock lock, final int multiplier)<a name="line.8498"></a>
+<span class="sourceLineNo">8499</span>      throws RegionTooBusyException, InterruptedIOException {<a name="line.8499"></a>
+<span class="sourceLineNo">8500</span>    try {<a name="line.8500"></a>
+<span class="sourceLineNo">8501</span>      final long waitTime = Math.min(maxBusyWaitDuration,<a name="line.8501"></a>
+<span class="sourceLineNo">8502</span>          busyWaitDuration * Math.min(multiplier, maxBusyWaitMultiplier));<a name="line.8502"></a>
+<span class="sourceLineNo">8503</span>      if (!lock.tryLock(waitTime, TimeUnit.MILLISECONDS)) {<a name="line.8503"></a>
+<span class="sourceLineNo">8504</span>        // Don't print millis. Message is used as a key over in<a name="line.8504"></a>
+<span class="sourceLineNo">8505</span>        // RetriesExhaustedWithDetailsException processing.<a name="line.8505"></a>
+<span class="sourceLineNo">8506</span>        throw new RegionTooBusyException("Failed to obtain lock; regionName=" +<a name="line.8506"></a>
+<span class="sourceLineNo">8507</span>            (this.getRegionInfo() == null? "unknown":<a name="line.8507"></a>
+<span class="sourceLineNo">8508</span>                this.getRegionInfo().getRegionNameAsString()) +<a name="line.8508"></a>
+<span class="sourceLineNo">8509</span>            ", server=" + (this.getRegionServerServices() == null? "unknown":<a name="line.8509"></a>
+<span class="sourceLineNo">8510</span>                this.getRegionServerServices().getServerName()));<a name="line.8510"></a>
+<span class="sourceLineNo">8511</span>      }<a name="line.8511"></a>
+<span class="sourceLineNo">8512</span>    } catch (InterruptedException ie) {<a name="line.8512"></a>
+<span class="sourceLineNo">8513</span>      LOG.info("Interrupted while waiting for a lock");<a name="line.8513"></a>
+<span class="sourceLineNo">8514</span>      InterruptedIOException iie = new InterruptedIOException();<a name="line.8514"></a>
+<span class="sourceLineNo">8515</span>      iie.initCause(ie);<a name="line.8515"></a>
+<span class="sourceLineNo">8516</span>      throw iie;<a name="line.8516"></a>
+<span class="sourceLineNo">8517</span>    }<a name="line.8517"></a>
+<span class="sourceLineNo">8518</span>  }<a name="line.8518"></a>
+<span class="sourceLineNo">8519</span><a name="line.8519"></a>
+<span class="sourceLineNo">8520</span>  /**<a name="line.8520"></a>
+<span class="sourceLineNo">8521</span>   * Calls sync with the given transaction ID<a name="line.8521"></a>
+<span class="sourceLineNo">8522</span>   * @param txid should sync up to which transaction<a name="line.8522"></a>
+<span class="sourceLineNo">8523</span>   * @throws IOException If anything goes wrong with DFS<a name="line.8523"></a>
+<span class="sourceLineNo">8524</span>   */<a name="line.8524"></a>
+<span class="sourceLineNo">8525</span>  private void sync(long txid, Durability durability) throws IOException {<a name="line.8525"></a>
+<span class="sourceLineNo">8526</span>    if (this.getRegionInfo().isMetaRegion()) {<a name="line.8526"></a>
+<span class="sourceLineNo">8527</span>      this.wal.sync(txid);<a name="line.8527"></a>
+<span class="sourceLineNo">8528</span>    } else {<a name="line.8528"></a>
+<span class="sourceLineNo">8529</span>      switch(durability) {<a name="line.8529"></a>
+<span class="sourceLineNo">8530</span>      case USE_DEFAULT:<a name="line.8530"></a>
+<span class="sourceLineNo">8531</span>        // do what table defaults to<a name="line.8531"></a>
+<span class="sourceLineNo">8532</span>        if (shouldSyncWAL()) {<a name="line.8532"></a>
+<span class="sourceLineNo">8533</span>          this.wal.sync(txid);<a name="line.8533"></a>
+<span class="sourceLineNo">8534</span>        }<a name="line.8534"></a>
+<span class="sourceLineNo">8535</span>        break;<a name="line.8535"></a>
+<span class="sourceLineNo">8536</span>      case SKIP_WAL:<a name="line.8536"></a>
+<span class="sourceLineNo">8537</span>        // nothing do to<a name="line.8537"></a>
+<span class="sourceLineNo">8538</span>        break;<a name="line.8538"></a>
+<span class="sourceLineNo">8539</span>      case ASYNC_WAL:<a name="line.8539"></a>
+<span class="sourceLineNo">8540</span>        // nothing do to<a name="line.8540"></a>
+<span class="sourceLineNo">8541</span>        break;<a name="line.8541"></a>
+<span class="sourceLineNo">8542</span>      case SYNC_WAL:<a name="line.8542"></a>
+<span class="sourceLineNo">8543</span>          this.wal.sync(txid, false);<a name="line.8543"></a>
+<span class="sourceLineNo">8544</span>          break;<a name="line.8544"></a>
+<span class="sourceLineNo">8545</span>      case FSYNC_WAL:<a name="line.8545"></a>
+<span class="sourceLineNo">8546</span>          this.wal.sync(txid, true);<a name="line.8546"></a>
+<span class="sourceLineNo">8547</span>          break;<a name="line.8547"></a>
+<span class="sourceLineNo">8548</span>      default:<a name="line.8548"></a>
+<span class="sourceLineNo">8549</span>        throw new RuntimeException("Unknown durability " + durability);<a name="line.8549"></a>
+<span class="sourceLineNo">8550</span>      }<a name="line.8550"></a>
+<span class="sourceLineNo">8551</span>    }<a name="line.8551"></a>
+<span class="sourceLineNo">8552</span>  }<a name="line.8552"></a>
+<span class="sourceLineNo">8553</span><a name="line.8553"></a>
+<span class="sourceLineNo">8554</span>  /**<a name="line.8554"></a>
+<span class="sourceLineNo">8555</span>   * Check whether we should sync the wal from the table's durability settings<a name="line.8555"></a>
+<span class="sourceLineNo">8556</span>   */<a name="line.8556"></a>
+<span class="sourceLineNo">8557</span>  private boolean shouldSyncWAL() {<a name="line.8557"></a>
+<span class="sourceLineNo">8558</span>    return regionDurability.ordinal() &gt;  Durability.ASYNC_WAL.ordinal();<a name="line.8558"></a>
+<span class="sourceLineNo">8559</span>  }<a name="line.8559"></a>
+<span class="sourceLineNo">8560</span><a name="line.8560"></a>
+<span class="sourceLineNo">8561</span>  /**<a name="line.8561"></a>
+<span class="sourceLineNo">8562</span>   * A mocked list implementation - discards all updates.<a name="line.8562"></a>
+<span class="sourceLineNo">8563</span>   */<a name="line.8563"></a>
+<span class="sourceLineNo">8564</span>  private static final List&lt;Cell&gt; MOCKED_LIST = new AbstractList&lt;Cell&gt;() {<a name="line.8564"></a>
+<span class="sourceLineNo">8565</span><a name="line.8565"></a>
+<span class="sourceLineNo">8566</span>    @Override<a name="line.8566"></a>
+<span class="sourceLineNo">8567</span>    public void add(int index, Cell element) {<a name="line.8567"></a>
+<span class="sourceLineNo">8568</span>      // do nothing<a name="line.8568"></a>
+<span class="sourceLineNo">8569</span>    }<a name="line.8569"></a>
+<span class="sourceLineNo">8570</span><a name="line.8570"></a>
+<span class="sourceLineNo">8571</span>    @Override<a name="line.8571"></a>
+<span class="sourceLineNo">8572</span>    public boolean addAll(int index, Collection&lt;? extends Cell&gt; c) {<a name="line.8572"></a>
+<span class="sourceLineNo">8573</span>      return false; // this list is never changed as a result of an update<a name="line.8573"></a>
+<span class="sourceLineNo">8574</span>    }<a name="line.8574"></a>
+<span class="sourceLineNo">8575</span><a name="line.8575"></a>
+<span class="sourceLineNo">8576</span>    @Override<a name="line.8576"></a>
+<span class="sourceLineNo">8577</span>    public KeyValue get(int index) {<a name="line.8577"></a>
+<span class="sourceLineNo">8578</span>      throw new UnsupportedOperationException();<a name="line.8578"></a>
+<span class="sourceLineNo">8579</span>    }<a name="line.8579"></a>
+<span class="sourceLineNo">8580</span><a name="line.8580"></a>
+<span class="sourceLineNo">8581</span>    @Override<a name="line.8581"></a>
+<span class="sourceLineNo">8582</span>    public int size() {<a name="line.8582"></a>
+<span class="sourceLineNo">8583</span>      return 0;<a name="line.8583"></a>
+<span class="sourceLineNo">8584</span>    }<a name="line.8584"></a>
+<span class="sourceLineNo">8585</span>  };<a name="line.8585"></a>
+<span class="sourceLineNo">8586</span><a name="line.8586"></a>
+<span class="sourceLineNo">8587</span>  /** @return the latest sequence number that was read from storage when this region was opened */<a name="line.8587"></a>
+<span class="sourceLineNo">8588</span>  public long getOpenSeqNum() {<a name="line.8588"></a>
+<span class="sourceLineNo">8589</span>    return this.openSeqNum;<a name="line.8589"></a>
+<span class="sourceLineNo">8590</span>  }<a name="line.8590"></a>
+<span class="sourceLineNo">8591</span><a name="line.8591"></a>
+<span class="sourceLineNo">8592</span>  @Override<a name="line.8592"></a>
+<span class="sourceLineNo">8593</span>  public Map&lt;byte[], Long&gt; getMaxStoreSeqId() {<a name="line.8593"></a>
+<span class="sourceLineNo">8594</span>    return this.maxSeqIdInStores;<a name="line.8594"></a>
+<span class="sourceLineNo">8595</span>  }<a name="line.8595"></a>
+<span class="sourceLineNo">8596</span><a name="line.8596"></a>
+<span class="sourceLineNo">8597</span>  public long getOldestSeqIdOfStore(byte[] familyName) {<a name="line.8597"></a>
+<span class="sourceLineNo">8598</span>    return wal.getEarliestMemStoreSeqNum(getRegionInfo().getEncodedNameAsBytes(), familyName);<a name="line.8598"></a>
+<span class="sourceLineNo">8599</span>  }<a name="line.8599"></a>
+<span class="sourceLineNo">8600</span><a name="line.8600"></a>
+<span class="sourceLineNo">8601</span>  @Override<a name="line.8601"></a>
+<span class="sourceLineNo">8602</span>  public CompactionState getCompactionState() {<a name="line.8602"></a>
+<span class="sourceLineNo">8603</span>    boolean hasMajor = majorInProgress.get() &gt; 0, hasMinor = minorInProgress.get() &gt; 0;<a name="line.8603"></a>
+<span class="sourceLineNo">8604</span>    return (hasMajor ? (hasMinor ? CompactionState.MAJOR_AND_MINOR : CompactionState.MAJOR)<a name="line.8604"></a>
+<span class="sourceLineNo">8605</span>        : (hasMinor ? CompactionState.MINOR : CompactionState.NONE));<a name="line.8605"></a>
+<span class="sourceLineNo">8606</span>  }<a name="line.8606"></a>
+<span class="sourceLineNo">8607</span><a name="line.8607"></a>
+<span class="sourceLineNo">8608</span>  public void reportCompactionRequestStart(boolean isMajor){<a name="line.8608"></a>
+<span class="sourceLineNo">8609</span>    (isMajor ? majorInProgress : minorInProgress).incrementAndGet();<a name="line.8609"></a>
+<span class="sourceLineNo">8610</span>  }<a name="line.8610"></a>
+<span class="sourceLineNo">8611</span><a name="line.8611"></a>
+<span class="sourceLineNo">8612</span>  public void reportCompactionRequestEnd(boolean isMajor, int numFiles, long filesSizeCompacted) {<a name="line.8612"></a>
+<span class="sourceLineNo">8613</span>    int newValue = (isMajor ? majorInProgress : minorInProgress).decrementAndGet();<a name="line.8613"></a>
+<span class="sourceLineNo">8614</span><a name="line.8614"></a>
+<span class="sourceLineNo">8615</span>    // metrics<a name="line.8615"></a>
+<span class="sourceLineNo">8616</span>    compactionsFinished.increment();<a name="line.8616"></a>
+<span class="sourceLineNo">8617</span>    compactionNumFilesCompacted.add(numFiles);<a name="line.8617"></a>
+<span class="sourceLineNo">8618</span>    compactionNumBytesCompacted.add(filesSizeCompacted);<a name="line.8618"></a>
+<span class="sourceLineNo">8619</span><a name="line.8619"></a>
+<span class="sourceLineNo">8620</span>    assert newValue &gt;= 0;<a name="line.8620"></a>
+<span class="sourceLineNo">8621</span>  }<a name="line.8621"></a>
+<span class="sourceLineNo">8622</span><a name="line.8622"></a>
+<span class="sourceLineNo">8623</span>  public void reportCompactionRequestFailure() {<a name="line.8623"></a>
+<span class="sourceLineNo">8624</span>    compactionsFailed.increment();<a name="line.8624"></a>
+<span class="sourceLineNo">8625</span>  }<a name="line.8625"></a>
+<span class="sourceLineNo">8626</span><a name="line.8626"></a>
+<span class="sourceLineNo">8627</span>  public void incrementCompactionsQueuedCount() {<a name="line.8627"></a>
+<span class="sourceLineNo">8628</span>    compactionsQueued.increment();<a name="line.8628"></a>
+<span class="sourceLineNo">8629</span>  }<a name="line.8629"></a>
+<span class="sourceLineNo">8630</span><a name="line.8630"></a>
+<span class="sourceLineNo">8631</span>  public void decrementCompactionsQueuedCount() {<a name="line.8631"></a>
+<span class="sourceLineNo">8632</span>    compactionsQueued.decrement();<a name="line.8632"></a>
+<span class="sourceLineNo">8633</span>  }<a name="line.8633"></a>
+<span class="sourceLineNo">8634</span><a name="line.8634"></a>
+<span class="sourceLineNo">8635</span>  public void incrementFlushesQueuedCount() {<a name="line.8635"></a>
+<span class="sourceLineNo">8636</span>    flushesQueued.increment();<a name="line.8636"></a>
+<span class="sourceLineNo">8637</span>  }<a name="line.8637"></a>
+<span class="sourceLineNo">8638</span><a name="line.8638"></a>
+<span class="sourceLineNo">8639</span>  @VisibleForTesting<a name="line.8639"></a>
+<span class="sourceLineNo">8640</span>  public long getReadPoint() {<a name="line.8640"></a>
+<span class="sourceLineNo">8641</span>    return getReadPoint(IsolationLevel.READ_COMMITTED);<a name="line.8641"></a>
 <span class="sourceLineNo">8642</span>  }<a name="line.8642"></a>
 <span class="sourceLineNo">8643</span><a name="line.8643"></a>
-<span class="sourceLineNo">8644</span>  public void decrementCompactionsQueuedCount() {<a name="line.8644"></a>
-<span class="sourceLineNo">8645</span>    compactionsQueued.decrement();<a name="line.8645"></a>
-<span class="sourceLineNo">8646</span>  }<a name="line.8646"></a>
-<span class="sourceLineNo">8647</span><a name="line.8647"></a>
-<span class="sourceLineNo">8648</span>  public void incrementFlushesQueuedCount() {<a name="line.8648"></a>
-<span class="sourceLineNo">8649</span>    flushesQueued.increment();<a name="line.8649"></a>
+<span class="sourceLineNo">8644</span>  /**<a name="line.8644"></a>
+<span class="sourceLineNo">8645</span>   * {@inheritDoc}<a name="line.8645"></a>
+<span class="sourceLineNo">8646</span>   */<a name="line.8646"></a>
+<span class="sourceLineNo">8647</span>  @Override<a name="line.8647"></a>
+<span class="sourceLineNo">8648</span>  public void onConfigurationChange(Configuration conf) {<a name="line.8648"></a>
+<span class="sourceLineNo">8649</span>    this.storeHotnessProtector.update(conf);<a name="line.8649"></a>
 <span class="sourceLineNo">8650</span>  }<a name="line.8650"></a>
 <span class="sourceLineNo">8651</span><a name="line.8651"></a>
-<span class="sourceLineNo">8652</span>  @VisibleForTesting<a name="line.8652"></a>
-<span class="sourceLineNo">8653</span>  public long getReadPoint() {<a name="line.8653"></a>
-<span class="sourceLineNo">8654</span>    return getReadPoint(IsolationLevel.READ_COMMITTED);<a name="line.8654"></a>
-<span class="sourceLineNo">8655</span>  }<a name="line.8655"></a>
-<span class="sourceLineNo">8656</span><a name="line.8656"></a>
-<span class="sourceLineNo">8657</span>  /**<a name="line.8657"></a>
-<span class="sourceLineNo">8658</span>   * {@inheritDoc}<a name="line.8658"></a>
-<span class="sourceLineNo">8659</span>   */<a name="line.8659"></a>
-<span class="sourceLineNo">8660</span>  @Override<a name="line.8660"></a>
-<span class="sourceLineNo">8661</span>  public void onConfigurationChange(Configuration conf) {<a name="line.8661"></a>
-<span class="sourceLineNo">8662</span>    this.storeHotnessProtector.update(conf);<a name="line.8662"></a>
-<span class="sourceLineNo">8663</span>  }<a name="line.8663"></a>
-<span class="sourceLineNo">8664</span><a name="line.8664"></a>
-<span class="sourceLineNo">8665</span>  /**<a name="line.8665"></a>
-<span class="sourceLineNo">8666</span>   * {@inheritDoc}<a name="line.8666"></a>
-<span class="sourceLineNo">8667</span>   */<a name="line.8667"></a>
-<span class="sourceLineNo">8668</span>  @Override<a name="line.8668"></a>
-<span class="sourceLineNo">8669</span>  public void registerChildren(ConfigurationManager manager) {<a name="line.8669"></a>
-<span class="sourceLineNo">8670</span>    configurationManager = Optional.of(manager);<a name="line.8670"></a>
-<span class="sourceLineNo">8671</span>    stores.values().forEach(manager::registerObserver);<a name="line.8671"></a>
-<span class="sourceLineNo">8672</span>  }<a name="line.8672"></a>
-<span class="sourceLineNo">8673</span><a name="line.8673"></a>
-<span class="sourceLineNo">8674</span>  /**<a name="line.8674"></a>
-<span class="sourceLineNo">8675</span>   * {@inheritDoc}<a name="line.8675"></a>
-<span class="sourceLineNo">8676</span>   */<a name="line.8676"></a>
-<span class="sourceLineNo">8677</span>  @Override<a name="line.8677"></a>
-<span class="sourceLineNo">8678</span>  public void deregisterChildren(ConfigurationManager manager) {<a name="line.8678"></a>
-<span class="sourceLineNo">8679</span>    stores.values().forEach(configurationManager.get()::deregisterObserver);<a name="line.8679"></a>
-<span class="sourceLineNo">8680</span>  }<a name="line.8680"></a>
-<span class="sourceLineNo">8681</span><a name="line.8681"></a>
-<span class="sourceLineNo">8682</span>  @Override<a name="line.8682"></a>
-<span class="sourceLineNo">8683</span>  public CellComparator getCellComparator() {<a name="line.8683"></a>
-<span class="sourceLineNo">8684</span>    return this.getRegionInfo().isMetaRegion() ? CellComparatorImpl.META_COMPARATOR<a name="line.8684"></a>
-<span class="sourceLineNo">8685</span>        : CellComparatorImpl.COMPARATOR;<a name="line.8685"></a>
-<span class="sourceLineNo">8686</span>  }<a name="line.8686"></a>
-<span class="sourceLineNo">8687</span><a name="line.8687"></a>
-<span class="sourceLineNo">8688</span>  public long getMemStoreFlushSize() {<a name="line.8688"></a>
-<span class="sourceLineNo">8689</span>    return this.memstoreFlushSize;<a name="line.8689"></a>
-<span class="sourceLineNo">8690</span>  }<a name="line.8690"></a>
-<span class="sourceLineNo">8691</span><a name="line.8691"></a>
-<span class="sourceLineNo">8692</span><a name="line.8692"></a>
-<span class="sourceLineNo">8693</span>  //// method for debugging tests<a name="line.8693"></a>
-<span class="sourceLineNo">8694</span>  void throwException(String title, String regionName) {<a name="line.8694"></a>
-<span class="sourceLineNo">8695</span>    StringBuilder buf = new StringBuilder();<a name="line.8695"></a>
-<span class="sourceLineNo">8696</span>    buf.append(title + ", ");<a name="line.8696"></a>
-<span class="sourceLineNo">8697</span>    buf.append(getRegionInfo().toString());<a name="line.8697"></a>
-<span class="sourceLineNo">8698</span>    buf.append(getRegionInfo().isMetaRegion() ? " meta region " : " ");<a name="line.8698"></a>
-<span class="sourceLineNo">8699</span>    buf.append("stores: ");<a name="line.8699"></a>
-<span class="sourceLineNo">8700</span>    for (HStore s : stores.values()) {<a name="line.8700"></a>
-<span class="sourceLineNo">8701</span>      buf.append(s.getColumnFamilyDescriptor().getNameAsString());<a name="line.8701"></a>
-<span class="sourceLineNo">8702</span>      buf.append(" size: ");<a name="line.8702"></a>
-<span class="sourceLineNo">8703</span>      buf.append(s.getMemStoreSize().getDataSize());<a name="line.8703"></a>
-<span class="sourceLineNo">8704</span>      buf.append(" ");<a name="line.8704"></a>
-<span class="sourceLineNo">8705</span>    }<a name="line.8705"></a>
-<span class="sourceLineNo">8706</span>    buf.append("end-of-stores");<a name="line.8706"></a>
-<span class="sourceLineNo">8707</span>    buf.append(", memstore size ");<a name="line.8707"></a>
-<span class="sourceLineNo">8708</span>    buf.append(getMemStoreDataSize());<a name="line.8708"></a>
-<span class="sourceLineNo">8709</span>    if (getRegionInfo().getRegionNameAsString().startsWith(regionName)) {<a name="line.8709"></a>
-<span class="sourceLineNo">8710</span>      throw new RuntimeException(buf.toString());<a name="line.8710"></a>
-<span class="sourceLineNo">8711</span>    }<a name="line.8711"></a>
-<span class="sourceLineNo">8712</span>  }<a name="line.8712"></a>
-<span class="sourceLineNo">8713</span><a name="line.8713"></a>
-<span class="sourceLineNo">8714</span>  @Override<a name="line.8714"></a>
-<span class="sourceLineNo">8715</span>  public void requestCompaction(String why, int priority, boolean major,<a name="line.8715"></a>
-<span class="sourceLineNo">8716</span>      CompactionLifeCycleTracker tracker) throws IOException {<a name="line.8716"></a>
-<span class="sourceLineNo">8717</span>    if (major) {<a name="line.8717"></a>
-<span class="sourceLineNo">8718</span>      stores.values().forEach(HStore::triggerMajorCompaction);<a name="line.8718"></a>
-<span class="sourceLineNo">8719</span>    }<a name="line.8719"></a>
-<span class="sourceLineNo">8720</span>    rsServices.getCompactionRequestor().requestCompaction(this, why, priority, tracker,<a name="line.8720"></a>
-<span class="sourceLineNo">8721</span>        RpcServer.getRequestUser().orElse(null));<a name="line.8721"></a>
-<span class="sourceLineNo">8722</span>  }<a name="line.8722"></a>
-<span class="sourceLineNo">8723</span><a name="line.8723"></a>
-<span class="sourceLineNo">8724</span>  @Override<a name="line.8724"></a>
-<span class="sourceLineNo">8725</span>  public void requestCompaction(byte[] family, String why, int priority, boolean major,<a name="line.8725"></a>
-<span class="sourceLineNo">8726</span>      CompactionLifeCycleTracker tracker) throws IOException {<a name="line.8726"></a>
-<span class="sourceLineNo">8727</span>    HStore store = stores.get(family);<a name="line.8727"></a>
-<span class="sourceLineNo">8728</span>    if (store == null) {<a name="line.8728"></a>
-<span class="sourceLineNo">8729</span>      throw new NoSuchColumnFamilyException("column family " + Bytes.toString(family) +<a name="line.8729"></a>
-<span class="sourceLineNo">8730</span>          " does not exist in region " + getRegionInfo().getRegionNameAsString());<a name="line.8730"></a>
-<span class="sourceLineNo">8731</span>    }<a name="line.8731"></a>
-<span class="sourceLineNo">8732</span>    if (major) {<a name="line.8732"></a>
-<span class="sourceLineNo">8733</span>      store.triggerMajorCompaction();<a name="line.8733"></a>
-<span class="sourceLineNo">8734</span>    }<a name="line.8734"></a>
-<span class="sourceLineNo">8735</span>    rsServices.getCompactionRequestor().requestCompaction(this, store, why, priority, tracker,<a name="line.8735"></a>
-<span class="sourceLineNo">8736</span>        RpcServer.getRequestUser().orElse(null));<a name="line.8736"></a>
+<span class="sourceLineNo">8652</span>  /**<a name="line.8652"></a>
+<span class="sourceLineNo">8653</span>   * {@inheritDoc}<a name="line.8653"></a>
+<span class="sourceLineNo">8654</span>   */<a name="line.8654"></a>
+<span class="sourceLineNo">8655</span>  @Override<a name="line.8655"></a>
+<span class="sourceLineNo">8656</span>  public void registerChildren(ConfigurationManager manager) {<a name="line.8656"></a>
+<span class="sourceLineNo">8657</span>    configurationManager = Optional.of(manager);<a name="line.8657"></a>
+<span class="sourceLineNo">8658</span>    stores.values().forEach(manager::registerObserver);<a name="line.8658"></a>
+<span class="sourceLineNo">8659</span>  }<a name="line.8659"></a>
+<span class="sourceLineNo">8660</span><a name="line.8660"></a>
+<span class="sourceLineNo">8661</span>  /**<a name="line.8661"></a>
+<span class="sourceLineNo">8662</span>   * {@inheritDoc}<a name="line.8662"></a>
+<span class="sourceLineNo">8663</span>   */<a name="line.8663"></a>
+<span class="sourceLineNo">8664</span>  @Override<a name="line.8664"></a>
+<span class="sourceLineNo">8665</span>  public void deregisterChildren(ConfigurationManager manager) {<a name="line.8665"></a>
+<span class="sourceLineNo">8666</span>    stores.values().forEach(configurationManager.get()::deregisterObserver);<a name="line.8666"></a>
+<span class="sourceLineNo">8667</span>  }<a name="line.8667"></a>
+<span class="sourceLineNo">8668</span><a name="line.8668"></a>
+<span class="sourceLineNo">8669</span>  @Override<a name="line.8669"></a>
+<span class="sourceLineNo">8670</span>  public CellComparator getCellComparator() {<a name="line.8670"></a>
+<span class="sourceLineNo">8671</span>    return this.getRegionInfo().isMetaRegion() ? CellComparatorImpl.META_COMPARATOR<a name="line.8671"></a>
+<span class="sourceLineNo">8672</span>        : CellComparatorImpl.COMPARATOR;<a name="line.8672"></a>
+<span class="sourceLineNo">8673</span>  }<a name="line.8673"></a>
+<span class="sourceLineNo">8674</span><a name="line.8674"></a>
+<span class="sourceLineNo">8675</span>  public long getMemStoreFlushSize() {<a name="line.8675"></a>
+<span class="sourceLineNo">8676</span>    return this.memstoreFlushSize;<a name="line.8676"></a>
+<span class="sourceLineNo">8677</span>  }<a name="line.8677"></a>
+<span class="sourceLineNo">8678</span><a name="line.8678"></a>
+<span class="sourceLineNo">8679</span><a name="line.8679"></a>
+<span class="sourceLineNo">8680</span>  //// method for debugging tests<a name="line.8680"></a>
+<span class="sourceLineNo">8681</span>  void throwException(String title, String regionName) {<a name="line.8681"></a>
+<span class="sourceLineNo">8682</span>    StringBuilder buf = new StringBuilder();<a name="line.8682"></a>
+<span class="sourceLineNo">8683</span>    buf.append(title + ", ");<a name="line.8683"></a>
+<span class="sourceLineNo">8684</span>    buf.append(getRegionInfo().toString());<a name="line.8684"></a>
+<span class="sourceLineNo">8685</span>    buf.append(getRegionInfo().isMetaRegion() ? " meta region " : " ");<a name="line.8685"></a>
+<span class="sourceLineNo">8686</span>    buf.append("stores: ");<a name="line.8686"></a>
+<span class="sourceLineNo">8687</span>    for (HStore s : stores.values()) {<a name="line.8687"></a>
+<span class="sourceLineNo">8688</span>      buf.append(s.getColumnFamilyDescriptor().getNameAsString());<a name="line.8688"></a>
+<span class="sourceLineNo">8689</span>      buf.append(" size: ");<a name="line.8689"></a>
+<span class="sourceLineNo">8690</span>      buf.append(s.getMemStoreSize().getDataSize());<a name="line.8690"></a>
+<span class="sourceLineNo">8691</span>      buf.append(" ");<a name="line.8691"></a>
+<span class="sourceLineNo">8692</span>    }<a name="line.8692"></a>
+<span class="sourceLineNo">8693</span>    buf.append("end-of-stores");<a name="line.8693"></a>
+<span class="sourceLineNo">8694</span>    buf.append(", memstore size ");<a name="line.8694"></a>
+<span class="sourceLineNo">8695</span>    buf.append(getMemStoreDataSize());<a name="line.8695"></a>
+<span class="sourceLineNo">8696</span>    if (getRegionInfo().getRegionNameAsString().startsWith(regionName)) {<a name="line.8696"></a>
+<span class="sourceLineNo">8697</span>      throw new RuntimeException(buf.toString());<a name="line.8697"></a>
+<span class="sourceLineNo">8698</span>    }<a name="line.8698"></a>
+<span class="sourceLineNo">8699</span>  }<a name="line.8699"></a>
+<span class="sourceLineNo">8700</span><a name="line.8700"></a>
+<span class="sourceLineNo">8701</span>  @Override<a name="line.8701"></a>
+<span class="sourceLineNo">8702</span>  public void requestCompaction(String why, int priority, boolean major,<a name="line.8702"></a>
+<span class="sourceLineNo">8703</span>      CompactionLifeCycleTracker tracker) throws IOException {<a name="line.8703"></a>
+<span class="sourceLineNo">8704</span>    if (major) {<a name="line.8704"></a>
+<span class="sourceLineNo">8705</span>      stores.values().forEach(HStore::triggerMajorCompaction);<a name="line.8705"></a>
+<span class="sourceLineNo">8706</span>    }<a name="line.8706"></a>
+<span class="sourceLineNo">8707</span>    rsServices.getCompactionRequestor().requestCompaction(this, why, priority, tracker,<a name="line.8707"></a>
+<span class="sourceLineNo">8708</span>        RpcServer.getRequestUser().orElse(null));<a name="line.8708"></a>
+<span class="sourceLineNo">8709</span>  }<a name="line.8709"></a>
+<span class="sourceLineNo">8710</span><a name="line.8710"></a>
+<span class="sourceLineNo">8711</span>  @Override<a name="line.8711"></a>
+<span class="sourceLineNo">8712</span>  public void requestCompaction(byte[] family, String why, int priority, boolean major,<a name="line.8712"></a>
+<span class="sourceLineNo">8713</span>      CompactionLifeCycleTracker tracker) throws IOException {<a name="line.8713"></a>
+<span class="sourceLineNo">8714</span>    HStore store = stores.get(family);<a name="line.8714"></a>
+<span class="sourceLineNo">8715</span>    if (store == null) {<a name="line.8715"></a>
+<span class="sourceLineNo">8716</span>      throw new NoSuchColumnFamilyException("column family " + Bytes.toString(family) +<a name="line.8716"></a>
+<span class="sourceLineNo">8717</span>          " does not exist in region " + getRegionInfo().getRegionNameAsString());<a name="line.8717"></a>
+<span class="sourceLineNo">8718</span>    }<a name="line.8718"></a>
+<span class="sourceLineNo">8719</span>    if (major) {<a name="line.8719"></a>
+<span class="sourceLineNo">8720</span>      store.triggerMajorCompaction();<a name="line.8720"></a>
+<span class="sourceLineNo">8721</span>    }<a name="line.8721"></a>
+<span class="sourceLineNo">8722</span>    rsServices.getCompactionRequestor().requestCompaction(this, store, why, priority, tracker,<a name="line.8722"></a>
+<span class="sourceLineNo">8723</span>        RpcServer.getRequestUser().orElse(null));<a name="line.8723"></a>
+<span class="sourceLineNo">8724</span>  }<a name="line.8724"></a>
+<span class="sourceLineNo">8725</span><a name="line.8725"></a>
+<span class="sourceLineNo">8726</span>  private void requestFlushIfNeeded() throws RegionTooBusyException {<a name="line.8726"></a>
+<span class="sourceLineNo">8727</span>    if(isFlushSize(this.memStoreSizing.getMemStoreSize())) {<a name="line.8727"></a>
+<span class="sourceLineNo">8728</span>      requestFlush();<a name="line.8728"></a>
+<span class="sourceLineNo">8729</span>    }<a name="line.8729"></a>
+<span class="sourceLineNo">8730</span>  }<a name="line.8730"></a>
+<span class="sourceLineNo">8731</span><a name="line.8731"></a>
+<span class="sourceLineNo">8732</span>  private void requestFlush() {<a name="line.8732"></a>
+<span class="sourceLineNo">8733</span>    if (this.rsServices == null) {<a name="line.8733"></a>
+<span class="sourceLineNo">8734</span>      return;<a name="line.8734"></a>
+<span class="sourceLineNo">8735</span>    }<a name="line.8735"></a>
+<span class="sourceLineNo">8736</span>    requestFlush0(FlushLifeCycleTracker.DUMMY);<a name="line.8736"></a>
 <span class="sourceLineNo">8737</span>  }<a name="line.8737"></a>
 <span class="sourceLineNo">8738</span><a name="line.8738"></a>
-<span class="sourceLineNo">8739</span>  private void requestFlushIfNeeded() throws RegionTooBusyException {<a name="line.8739"></a>
-<span class="sourceLineNo">8740</span>    if(isFlushSize(this.memStoreSizing.getMemStoreSize())) {<a name="line.8740"></a>
-<span class="sourceLineNo">8741</span>      requestFlush();<a name="line.8741"></a>
-<span class="sourceLineNo">8742</span>    }<a name="line.8742"></a>
-<span class="sourceLineNo">8743</span>  }<a name="line.8743"></a>
-<span class="sourceLineNo">8744</span><a name="line.8744"></a>
-<span class="sourceLineNo">8745</span>  private void requestFlush() {<a name="line.8745"></a>
-<span class="sourceLineNo">8746</span>    if (this.rsServices == null) {<a name="line.8746"></a>
-<span class="sourceLineNo">8747</span>      return;<a name="line.8747"></a>
-<span class="sourceLineNo">8748</span>    }<a name="line.8748"></a>
-<span class="sourceLineNo">8749</span>    requestFlush0(FlushLifeCycleTracker.DUMMY);<a name="line.8749"></a>
-<span class="sourceLineNo">8750</span>  }<a name="line.8750"></a>
-<span class="sourceLineNo">8751</span><a name="line.8751"></a>
-<span class="sourceLineNo">8752</span>  private void requestFlush0(FlushLifeCycleTracker tracker) {<a name="line.8752"></a>
-<span class="sourceLineNo">8753</span>    boolean shouldFlush = false;<a name="line.8753"></a>
-<span class="sourceLineNo">8754</span>    synchronized (writestate) {<a name="line.8754"></a>
-<span class="sourceLineNo">8755</span>      if (!this.writestate.isFlushRequested()) {<a name="line.8755"></a>
-<span class="sourceLineNo">8756</span>        shouldFlush = true;<a name="line.8756"></a>
-<span class="sourceLineNo">8757</span>        writestate.flushRequested = true;<a name="line.8757"></a>
-<span class="sourceLineNo">8758</span>      }<a name="line.8758"></a>
-<span class="sourceLineNo">8759</span>    }<a name="line.8759"></a>
-<span class="sourceLineNo">8760</span>    if (shouldFlush) {<a name="line.8760"></a>
-<span class="sourceLineNo">8761</span>      // Make request outside of synchronize block; HBASE-818.<a name="line.8761"></a>
-<span class="sourceLineNo">8762</span>      this.rsServices.getFlushRequester().requestFlush(this, false, tracker);<a name="line.8762"></a>
-<span class="sourceLineNo">8763</span>      if (LOG.isDebugEnabled()) {<a name="line.8763"></a>
-<span class="sourceLineNo">8764</span>        LOG.debug("Flush requested on " + this.getRegionInfo().getEncodedName());<a name="line.8764"></a>
-<span class="sourceLineNo">8765</span>      }<a name="line.8765"></a>
-<span class="sourceLineNo">8766</span>    } else {<a name="line.8766"></a>
-<span class="sourceLineNo">8767</span>      tracker.notExecuted("Flush already requested on " + this);<a name="line.8767"></a>
-<span class="sourceLineNo">8768</span>    }<a name="line.8768"></a>
-<span class="sourceLineNo">8769</span>  }<a name="line.8769"></a>
-<span class="sourceLineNo">8770</span><a name="line.8770"></a>
-<span class="sourceLineNo">8771</span>  @Override<a name="line.8771"></a>
-<span class="sourceLineNo">8772</span>  public void requestFlush(FlushLifeCycleTracker tracker) throws IOException {<a name="line.8772"></a>
-<span class="sourceLineNo">8773</span>    requestFlush0(tracker);<a name="line.8773"></a>
-<span class="sourceLineNo">8774</span>  }<a name="line.8774"></a>
-<span class="sourceLineNo">8775</span><a name="line.8775"></a>
-<span class="sourceLineNo">8776</span>  /**<a name="line.8776"></a>
-<span class="sourceLineNo">8777</span>   * This method modifies the region's configuration in order to inject replication-related<a name="line.8777"></a>
-<span class="sourceLineNo">8778</span>   * features<a name="line.8778"></a>
-<span class="sourceLineNo">8779</span>   * @param conf region configurations<a name="line.8779"></a>
-<span class="sourceLineNo">8780</span>   */<a name="line.8780"></a>
-<span class="sourceLineNo">8781</span>  static void decorateRegionConfiguration(Configuration conf) {<a name="line.8781"></a>
-<span class="sourceLineNo">8782</span>    if (ReplicationUtils.isReplicationForBulkLoadDataEnabled(conf)) {<a name="line.8782"></a>
-<span class="sourceLineNo">8783</span>      String plugins = conf.get(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,"");<a name="line.8783"></a>
-<span class="sourceLineNo">8784</span>      String replicationCoprocessorClass = ReplicationObserver.class.getCanonicalName();<a name="line.8784"></a>
-<span class="sourceLineNo">8785</span>      if (!plugins.contains(replicationCoprocessorClass)) {<a name="line.8785"></a>
-<span class="sourceLineNo">8786</span>        conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,<a name="line.8786"></a>
-<span class="sourceLineNo">8787</span>            (plugins.equals("") ? "" : (plugins + ",")) + replicationCoprocessorClass);<a name="line.8787"></a>
-<span class="sourceLineNo">8788</span>      }<a name="line.8788"></a>
-<span class="sourceLineNo">8789</span>    }<a name="line.8789"></a>
-<span class="sourceLineNo">8790</span>  }<a name="line.8790"></a>
-<span class="sourceLineNo">8791</span>}<a name="line.8791"></a>
+<span class="sourceLineNo">8739</span>  private void requestFlush0(FlushLifeCycleTracker tracker) {<a name="line.8739"></a>
+<span class="sourceLineNo">8740</span>    boolean shouldFlush = false;<a name="line.8740"></a>
+<span class="sourceLineNo">8741</span>    synchronized (writestate) {<a name="line.8741"></a>
+<span class="sourceLineNo">8742</span>      if (!this.writestate.isFlushRequested()) {<a name="line.8742"></a>
+<span class="sourceLineNo">8743</span>        shouldFlush = true;<a name="line.8743"></a>
+<span class="sourceLineNo">8744</span>        writestate.flushRequested = true;<a name="line.8744"></a>
+<span class="sourceLineNo">8745</span>      }<a name="line.8745"></a>
+<span class="sourceLineNo">8746</span>    }<a name="line.8746"></a>
+<span class="sourceLineNo">8747</span>    if (shouldFlush) {<a name="line.8747"></a>
+<span class="sourceLineNo">8748</span>      // Make request outside of synchronize block; HBASE-818.<a name="line.8748"></a>
+<span class="sourceLineNo">8749</span>      this.rsServices.getFlushRequester().requestFlush(this, false, tracker);<a name="line.8749"></a>
+<span class="sourceLineNo">8750</span>      if (LOG.isDebugEnabled()) {<a name="line.8750"></a>
+<span class="sourceLineNo">8751</span>        LOG.debug("Flush requested on " + this.getRegionInfo().getEncodedName());<a name="line.8751"></a>
+<span class="sourceLineNo">8752</span>      }<a name="line.8752"></a>
+<span class="sourceLineNo">8753</span>    } else {<a name="line.8753"></a>
+<span class="sourceLineNo">8754</span>      tracker.notExecuted("Flush already requested on " + this);<a name="line.8754"></a>
+<span class="sourceLineNo">8755</span>    }<a name="line.8755"></a>
+<span class="sourceLineNo">8756</span>  }<a name="line.8756"></a>
+<span class="sourceLineNo">8757</span><a name="line.8757"></a>
+<span class="sourceLineNo">8758</span>  @Override<a name="line.8758"></a>
+<span class="sourceLineNo">8759</span>  public void requestFlush(FlushLifeCycleTracker tracker) throws IOException {<a name="line.8759"></a>
+<span class="sourceLineNo">8760</span>    requestFlush0(tracker);<a name="line.8760"></a>
+<span class="sourceLineNo">8761</span>  }<a name="line.8761"></a>
+<span class="sourceLineNo">8762</span><a name="line.8762"></a>
+<span class="sourceLineNo">8763</span>  /**<a name="line.8763"></a>
+<span class="sourceLineNo">8764</span>   * This method modifies the region's configuration in order to inject replication-related<a name="line.8764"></a>
+<span class="sourceLineNo">8765</span>   * features<a name="line.8765"></a>
+<span class="sourceLineNo">8766</span>   * @param conf region configurations<a name="line.8766"></a>
+<span class="sourceLineNo">8767</span>   */<a name="line.8767"></a>
+<span class="sourceLineNo">8768</span>  static void decorateRegionConfiguration(Configuration conf) {<a name="line.8768"></a>
+<span class="sourceLineNo">8769</span>    if (ReplicationUtils.isReplicationForBulkLoadDataEnabled(conf)) {<a name="line.8769"></a>
+<span class="sourceLineNo">8770</span>      String plugins = conf.get(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,"");<a name="line.8770"></a>
+<span class="sourceLineNo">8771</span>      String replicationCoprocessorClass = ReplicationObserver.class.getCanonicalName();<a name="line.8771"></a>
+<span class="sourceLineNo">8772</span>      if (!plugins.contains(replicationCoprocessorClass)) {<a name="line.8772"></a>
+<span class="sourceLineNo">8773</span>        conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,<a name="line.8773"></a>
+<span class="sourceLineNo">8774</span>            (plugins.equals("") ? "" : (plugins + ",")) + replicationCoprocessorClass);<a name="line.8774"></a>
+<span class="sourceLineNo">8775</span>      }<a name="line.8775"></a>
+<span class="sourceLineNo">8776</span>    }<a name="line.8776"></a>
+<span class="sourceLineNo">8777</span>  }<a name="line.8777"></a>
+<span class="sourceLineNo">8778</span>}<a name="line.8778"></a>
 
 
 
index 68e9bfe..0f5a095 100644 (file)
 <span class="sourceLineNo">7963</span><a name="line.7963"></a>
 <span class="sourceLineNo">7964</span>  /**<a name="line.7964"></a>
 <span class="sourceLineNo">7965</span>   * Reckon the Cells to apply to WAL, memstore, and to return to the Client; these Sets are not<a name="line.7965"></a>
-<span class="sourceLineNo">7966</span>   * always the same dependent on whether to write WAL or if the amount to increment is zero (in<a name="line.7966"></a>
-<span class="sourceLineNo">7967</span>   * this case we write back nothing, just return latest Cell value to the client).<a name="line.7967"></a>
-<span class="sourceLineNo">7968</span>   *<a name="line.7968"></a>
-<span class="sourceLineNo">7969</span>   * @param results Fill in here what goes back to the Client if it is non-null (if null, client<a name="line.7969"></a>
-<span class="sourceLineNo">7970</span>   *  doesn't want results).<a name="line.7970"></a>
-<span class="sourceLineNo">7971</span>   * @param forMemStore Fill in here what to apply to the MemStore (by Store).<a name="line.7971"></a>
-<span class="sourceLineNo">7972</span>   * @return A WALEdit to apply to WAL or null if we are to skip the WAL.<a name="line.7972"></a>
-<span class="sourceLineNo">7973</span>   */<a name="line.7973"></a>
-<span class="sourceLineNo">7974</span>  private WALEdit reckonDeltas(Operation op, Mutation mutation, Durability effectiveDurability,<a name="line.7974"></a>
-<span class="sourceLineNo">7975</span>      Map&lt;HStore, List&lt;Cell&gt;&gt; forMemStore, List&lt;Cell&gt; results) throws IOException {<a name="line.7975"></a>
-<span class="sourceLineNo">7976</span>    WALEdit walEdit = null;<a name="line.7976"></a>
-<span class="sourceLineNo">7977</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.7977"></a>
-<span class="sourceLineNo">7978</span>    final boolean writeToWAL = effectiveDurability != Durability.SKIP_WAL;<a name="line.7978"></a>
-<span class="sourceLineNo">7979</span>    // Process a Store/family at a time.<a name="line.7979"></a>
-<span class="sourceLineNo">7980</span>    for (Map.Entry&lt;byte [], List&lt;Cell&gt;&gt; entry: mutation.getFamilyCellMap().entrySet()) {<a name="line.7980"></a>
-<span class="sourceLineNo">7981</span>      final byte[] columnFamilyName = entry.getKey();<a name="line.7981"></a>
-<span class="sourceLineNo">7982</span>      List&lt;Cell&gt; deltas = entry.getValue();<a name="line.7982"></a>
-<span class="sourceLineNo">7983</span>      HStore store = this.stores.get(columnFamilyName);<a name="line.7983"></a>
-<span class="sourceLineNo">7984</span>      // Reckon for the Store what to apply to WAL and MemStore.<a name="line.7984"></a>
-<span class="sourceLineNo">7985</span>      List&lt;Cell&gt; toApply =<a name="line.7985"></a>
-<span class="sourceLineNo">7986</span>        reckonDeltasByStore(store, op, mutation, effectiveDurability, now, deltas, results);<a name="line.7986"></a>
-<span class="sourceLineNo">7987</span>      if (!toApply.isEmpty()) {<a name="line.7987"></a>
-<span class="sourceLineNo">7988</span>        forMemStore.put(store, toApply);<a name="line.7988"></a>
-<span class="sourceLineNo">7989</span>        if (writeToWAL) {<a name="line.7989"></a>
-<span class="sourceLineNo">7990</span>          if (walEdit == null) {<a name="line.7990"></a>
-<span class="sourceLineNo">7991</span>            walEdit = new WALEdit();<a name="line.7991"></a>
-<span class="sourceLineNo">7992</span>          }<a name="line.7992"></a>
-<span class="sourceLineNo">7993</span>          walEdit.getCells().addAll(toApply);<a name="line.7993"></a>
-<span class="sourceLineNo">7994</span>        }<a name="line.7994"></a>
-<span class="sourceLineNo">7995</span>      }<a name="line.7995"></a>
-<span class="sourceLineNo">7996</span>    }<a name="line.7996"></a>
-<span class="sourceLineNo">7997</span>    return walEdit;<a name="line.7997"></a>
-<span class="sourceLineNo">7998</span>  }<a name="line.7998"></a>
-<span class="sourceLineNo">7999</span><a name="line.7999"></a>
-<span class="sourceLineNo">8000</span>  /**<a name="line.8000"></a>
-<span class="sourceLineNo">8001</span>   * Reckon the Cells to apply to WAL, memstore, and to return to the Client in passed<a name="line.8001"></a>
-<span class="sourceLineNo">8002</span>   * column family/Store.<a name="line.8002"></a>
-<span class="sourceLineNo">8003</span>   *<a name="line.8003"></a>
-<span class="sourceLineNo">8004</span>   * Does Get of current value and then adds passed in deltas for this Store returning the result.<a name="line.8004"></a>
-<span class="sourceLineNo">8005</span>   *<a name="line.8005"></a>
-<span class="sourceLineNo">8006</span>   * @param op Whether Increment or Append<a name="line.8006"></a>
-<span class="sourceLineNo">8007</span>   * @param mutation The encompassing Mutation object<a name="line.8007"></a>
-<span class="sourceLineNo">8008</span>   * @param deltas Changes to apply to this Store; either increment amount or data to append<a name="line.8008"></a>
-<span class="sourceLineNo">8009</span>   * @param results In here we accumulate all the Cells we are to return to the client; this List<a name="line.8009"></a>
-<span class="sourceLineNo">8010</span>   *  can be larger than what we return in case where delta is zero; i.e. don't write<a name="line.8010"></a>
-<span class="sourceLineNo">8011</span>   *  out new values, just return current value. If null, client doesn't want results returned.<a name="line.8011"></a>
-<span class="sourceLineNo">8012</span>   * @return Resulting Cells after &lt;code&gt;deltas&lt;/code&gt; have been applied to current<a name="line.8012"></a>
-<span class="sourceLineNo">8013</span>   *  values. Side effect is our filling out of the &lt;code&gt;results&lt;/code&gt; List.<a name="line.8013"></a>
-<span class="sourceLineNo">8014</span>   */<a name="line.8014"></a>
-<span class="sourceLineNo">8015</span>  private List&lt;Cell&gt; reckonDeltasByStore(HStore store, Operation op, Mutation mutation,<a name="line.8015"></a>
-<span class="sourceLineNo">8016</span>      Durability effectiveDurability, long now, List&lt;Cell&gt; deltas, List&lt;Cell&gt; results)<a name="line.8016"></a>
-<span class="sourceLineNo">8017</span>      throws IOException {<a name="line.8017"></a>
-<span class="sourceLineNo">8018</span>    byte[] columnFamily = store.getColumnFamilyDescriptor().getName();<a name="line.8018"></a>
-<span class="sourceLineNo">8019</span>    List&lt;Cell&gt; toApply = new ArrayList&lt;&gt;(deltas.size());<a name="line.8019"></a>
-<span class="sourceLineNo">8020</span>    // Get previous values for all columns in this family.<a name="line.8020"></a>
-<span class="sourceLineNo">8021</span>    TimeRange tr = null;<a name="line.8021"></a>
-<span class="sourceLineNo">8022</span>    switch (op) {<a name="line.8022"></a>
-<span class="sourceLineNo">8023</span>      case INCREMENT:<a name="line.8023"></a>
-<span class="sourceLineNo">8024</span>        tr = ((Increment)mutation).getTimeRange();<a name="line.8024"></a>
-<span class="sourceLineNo">8025</span>        break;<a name="line.8025"></a>
-<span class="sourceLineNo">8026</span>      case APPEND:<a name="line.8026"></a>
-<span class="sourceLineNo">8027</span>        tr = ((Append)mutation).getTimeRange();<a name="line.8027"></a>
+<span class="sourceLineNo">7966</span>   * always the same dependent on whether to write WAL.<a name="line.7966"></a>
+<span class="sourceLineNo">7967</span>   *<a name="line.7967"></a>
+<span class="sourceLineNo">7968</span>   * @param results Fill in here what goes back to the Client if it is non-null (if null, client<a name="line.7968"></a>
+<span class="sourceLineNo">7969</span>   *  doesn't want results).<a name="line.7969"></a>
+<span class="sourceLineNo">7970</span>   * @param forMemStore Fill in here what to apply to the MemStore (by Store).<a name="line.7970"></a>
+<span class="sourceLineNo">7971</span>   * @return A WALEdit to apply to WAL or null if we are to skip the WAL.<a name="line.7971"></a>
+<span class="sourceLineNo">7972</span>   */<a name="line.7972"></a>
+<span class="sourceLineNo">7973</span>  private WALEdit reckonDeltas(Operation op, Mutation mutation, Durability effectiveDurability,<a name="line.7973"></a>
+<span class="sourceLineNo">7974</span>      Map&lt;HStore, List&lt;Cell&gt;&gt; forMemStore, List&lt;Cell&gt; results) throws IOException {<a name="line.7974"></a>
+<span class="sourceLineNo">7975</span>    WALEdit walEdit = null;<a name="line.7975"></a>
+<span class="sourceLineNo">7976</span>    long now = EnvironmentEdgeManager.currentTime();<a name="line.7976"></a>
+<span class="sourceLineNo">7977</span>    final boolean writeToWAL = effectiveDurability != Durability.SKIP_WAL;<a name="line.7977"></a>
+<span class="sourceLineNo">7978</span>    // Process a Store/family at a time.<a name="line.7978"></a>
+<span class="sourceLineNo">7979</span>    for (Map.Entry&lt;byte [], List&lt;Cell&gt;&gt; entry: mutation.getFamilyCellMap().entrySet()) {<a name="line.7979"></a>
+<span class="sourceLineNo">7980</span>      final byte[] columnFamilyName = entry.getKey();<a name="line.7980"></a>
+<span class="sourceLineNo">7981</span>      List&lt;Cell&gt; deltas = entry.getValue();<a name="line.7981"></a>
+<span class="sourceLineNo">7982</span>      HStore store = this.stores.get(columnFamilyName);<a name="line.7982"></a>
+<span class="sourceLineNo">7983</span>      // Reckon for the Store what to apply to WAL and MemStore.<a name="line.7983"></a>
+<span class="sourceLineNo">7984</span>      List&lt;Cell&gt; toApply =<a name="line.7984"></a>
+<span class="sourceLineNo">7985</span>        reckonDeltasByStore(store, op, mutation, effectiveDurability, now, deltas, results);<a name="line.7985"></a>
+<span class="sourceLineNo">7986</span>      if (!toApply.isEmpty()) {<a name="line.7986"></a>
+<span class="sourceLineNo">7987</span>        forMemStore.put(store, toApply);<a name="line.7987"></a>
+<span class="sourceLineNo">7988</span>        if (writeToWAL) {<a name="line.7988"></a>
+<span class="sourceLineNo">7989</span>          if (walEdit == null) {<a name="line.7989"></a>
+<span class="sourceLineNo">7990</span>            walEdit = new WALEdit();<a name="line.7990"></a>
+<span class="sourceLineNo">7991</span>          }<a name="line.7991"></a>
+<span class="sourceLineNo">7992</span>          walEdit.getCells().addAll(toApply);<a name="line.7992"></a>
+<span class="sourceLineNo">7993</span>        }<a name="line.7993"></a>
+<span class="sourceLineNo">7994</span>      }<a name="line.7994"></a>
+<span class="sourceLineNo">7995</span>    }<a name="line.7995"></a>
+<span class="sourceLineNo">7996</span>    return walEdit;<a name="line.7996"></a>
+<span class="sourceLineNo">7997</span>  }<a name="line.7997"></a>
+<span class="sourceLineNo">7998</span><a name="line.7998"></a>
+<span class="sourceLineNo">7999</span>  /**<a name="line.7999"></a>
+<span class="sourceLineNo">8000</span>   * Reckon the Cells to apply to WAL, memstore, and to return to the Client in passed<a name="line.8000"></a>
+<span class="sourceLineNo">8001</span>   * column family/Store.<a name="line.8001"></a>
+<span class="sourceLineNo">8002</span>   *<a name="line.8002"></a>
+<span class="sourceLineNo">8003</span>   * Does Get of current value and then adds passed in deltas for this Store returning the result.<a name="line.8003"></a>
+<span class="sourceLineNo">8004</span>   *<a name="line.8004"></a>
+<span class="sourceLineNo">8005</span>   * @param op Whether Increment or Append<a name="line.8005"></a>
+<span class="sourceLineNo">8006</span>   * @param mutation The encompassing Mutation object<a name="line.8006"></a>
+<span class="sourceLineNo">8007</span>   * @param deltas Changes to apply to this Store; either increment amount or data to append<a name="line.8007"></a>
+<span class="sourceLineNo">8008</span>   * @param results In here we accumulate all the Cells we are to return to the client. If null,<a name="line.8008"></a>
+<span class="sourceLineNo">8009</span>   *                client doesn't want results returned.<a name="line.8009"></a>
+<span class="sourceLineNo">8010</span>   * @return Resulting Cells after &lt;code&gt;deltas&lt;/code&gt; have been applied to current<a name="line.8010"></a>
+<span class="sourceLineNo">8011</span>   *  values. Side effect is our filling out of the &lt;code&gt;results&lt;/code&gt; List.<a name="line.8011"></a>
+<span class="sourceLineNo">8012</span>   */<a name="line.8012"></a>
+<span class="sourceLineNo">8013</span>  private List&lt;Cell&gt; reckonDeltasByStore(HStore store, Operation op, Mutation mutation,<a name="line.8013"></a>
+<span class="sourceLineNo">8014</span>      Durability effectiveDurability, long now, List&lt;Cell&gt; deltas, List&lt;Cell&gt; results)<a name="line.8014"></a>
+<span class="sourceLineNo">8015</span>      throws IOException {<a name="line.8015"></a>
+<span class="sourceLineNo">8016</span>    byte[] columnFamily = store.getColumnFamilyDescriptor().getName();<a name="line.8016"></a>
+<span class="sourceLineNo">8017</span>    List&lt;Cell&gt; toApply = new ArrayList&lt;&gt;(deltas.size());<a name="line.8017"></a>
+<span class="sourceLineNo">8018</span>    // Get previous values for all columns in this family.<a name="line.8018"></a>
+<span class="sourceLineNo">8019</span>    TimeRange tr = null;<a name="line.8019"></a>
+<span class="sourceLineNo">8020</span>    switch (op) {<a name="line.8020"></a>
+<span class="sourceLineNo">8021</span>      case INCREMENT:<a name="line.8021"></a>
+<span class="sourceLineNo">8022</span>        tr = ((Increment)mutation).getTimeRange();<a name="line.8022"></a>
+<span class="sourceLineNo">8023</span>        break;<a name="line.8023"></a>
+<span class="sourceLineNo">8024</span>      case APPEND:<a name="line.8024"></a>
+<span class="sourceLineNo">8025</span>        tr = ((Append)mutation).getTimeRange();<a name="line.8025"></a>
+<span class="sourceLineNo">8026</span>        break;<a name="line.8026"></a>
+<span class="sourceLineNo">8027</span>      default:<a name="line.8027"></a>
 <span class="sourceLineNo">8028</span>        break;<a name="line.8028"></a>
-<span class="sourceLineNo">8029</span>      default:<a name="line.8029"></a>
-<span class="sourceLineNo">8030</span>        break;<a name="line.8030"></a>
-<span class="sourceLineNo">8031</span>    }<a name="line.8031"></a>
-<span class="sourceLineNo">8032</span>    List&lt;Cell&gt; currentValues = get(mutation, store, deltas,null, tr);<a name="line.8032"></a>
-<span class="sourceLineNo">8033</span>    // Iterate the input columns and update existing values if they were found, otherwise<a name="line.8033"></a>
-<span class="sourceLineNo">8034</span>    // add new column initialized to the delta amount<a name="line.8034"></a>
-<span class="sourceLineNo">8035</span>    int currentValuesIndex = 0;<a name="line.8035"></a>
-<span class="sourceLineNo">8036</span>    for (int i = 0; i &lt; deltas.size(); i++) {<a name="line.8036"></a>
-<span class="sourceLineNo">8037</span>      Cell delta = deltas.get(i);<a name="line.8037"></a>
-<span class="sourceLineNo">8038</span>      Cell currentValue = null;<a name="line.8038"></a>
-<span class="sourceLineNo">8039</span>      boolean firstWrite = false;<a name="line.8039"></a>
-<span class="sourceLineNo">8040</span>      if (currentValuesIndex &lt; currentValues.size() &amp;&amp;<a name="line.8040"></a>
-<span class="sourceLineNo">8041</span>          CellUtil.matchingQualifier(currentValues.get(currentValuesIndex), delta)) {<a name="line.8041"></a>
-<span class="sourceLineNo">8042</span>        currentValue = currentValues.get(currentValuesIndex);<a name="line.8042"></a>
-<span class="sourceLineNo">8043</span>        if (i &lt; (deltas.size() - 1) &amp;&amp; !CellUtil.matchingQualifier(delta, deltas.get(i + 1))) {<a name="line.8043"></a>
-<span class="sourceLineNo">8044</span>          currentValuesIndex++;<a name="line.8044"></a>
-<span class="sourceLineNo">8045</span>        }<a name="line.8045"></a>
-<span class="sourceLineNo">8046</span>      } else {<a name="line.8046"></a>
-<span class="sourceLineNo">8047</span>        firstWrite = true;<a name="line.8047"></a>
-<span class="sourceLineNo">8048</span>      }<a name="line.8048"></a>
-<span class="sourceLineNo">8049</span>      // Switch on whether this an increment or an append building the new Cell to apply.<a name="line.8049"></a>
-<span class="sourceLineNo">8050</span>      Cell newCell = null;<a name="line.8050"></a>
-<span class="sourceLineNo">8051</span>      MutationType mutationType = null;<a name="line.8051"></a>
-<span class="sourceLineNo">8052</span>      boolean apply = true;<a name="line.8052"></a>
-<span class="sourceLineNo">8053</span>      switch (op) {<a name="line.8053"></a>
-<span class="sourceLineNo">8054</span>        case INCREMENT:<a name="line.8054"></a>
-<span class="sourceLineNo">8055</span>          mutationType = MutationType.INCREMENT;<a name="line.8055"></a>
-<span class="sourceLineNo">8056</span>          // If delta amount to apply is 0, don't write WAL or MemStore.<a name="line.8056"></a>
-<span class="sourceLineNo">8057</span>          long deltaAmount = getLongValue(delta);<a name="line.8057"></a>
-<span class="sourceLineNo">8058</span>          // TODO: Does zero value mean reset Cell? For example, the ttl.<a name="line.8058"></a>
-<span class="sourceLineNo">8059</span>          apply = deltaAmount != 0;<a name="line.8059"></a>
-<span class="sourceLineNo">8060</span>          final long newValue = currentValue == null ? deltaAmount : getLongValue(currentValue) + deltaAmount;<a name="line.8060"></a>
-<span class="sourceLineNo">8061</span>          newCell = reckonDelta(delta, currentValue, columnFamily, now, mutation, (oldCell) -&gt; Bytes.toBytes(newValue));<a name="line.8061"></a>
+<span class="sourceLineNo">8029</span>    }<a name="line.8029"></a>
+<span class="sourceLineNo">8030</span>    List&lt;Cell&gt; currentValues = get(mutation, store, deltas,null, tr);<a name="line.8030"></a>
+<span class="sourceLineNo">8031</span>    // Iterate the input columns and update existing values if they were found, otherwise<a name="line.8031"></a>
+<span class="sourceLineNo">8032</span>    // add new column initialized to the delta amount<a name="line.8032"></a>
+<span class="sourceLineNo">8033</span>    int currentValuesIndex = 0;<a name="line.8033"></a>
+<span class="sourceLineNo">8034</span>    for (int i = 0; i &lt; deltas.size(); i++) {<a name="line.8034"></a>
+<span class="sourceLineNo">8035</span>      Cell delta = deltas.get(i);<a name="line.8035"></a>
+<span class="sourceLineNo">8036</span>      Cell currentValue = null;<a name="line.8036"></a>
+<span class="sourceLineNo">8037</span>      if (currentValuesIndex &lt; currentValues.size() &amp;&amp;<a name="line.8037"></a>
+<span class="sourceLineNo">8038</span>          CellUtil.matchingQualifier(currentValues.get(currentValuesIndex), delta)) {<a name="line.8038"></a>
+<span class="sourceLineNo">8039</span>        currentValue = currentValues.get(currentValuesIndex);<a name="line.8039"></a>
+<span class="sourceLineNo">8040</span>        if (i &lt; (deltas.size() - 1) &amp;&amp; !CellUtil.matchingQualifier(delta, deltas.get(i + 1))) {<a name="line.8040"></a>
+<span class="sourceLineNo">8041</span>          currentValuesIndex++;<a name="line.8041"></a>
+<span class="sourceLineNo">8042</span>        }<a name="line.8042"></a>
+<span class="sourceLineNo">8043</span>      }<a name="line.8043"></a>
+<span class="sourceLineNo">8044</span>      // Switch on whether this an increment or an append building the new Cell to apply.<a name="line.8044"></a>
+<span class="sourceLineNo">8045</span>      Cell newCell = null;<a name="line.8045"></a>
+<span class="sourceLineNo">8046</span>      MutationType mutationType = null;<a name="line.8046"></a>
+<span class="sourceLineNo">8047</span>      switch (op) {<a name="line.8047"></a>
+<span class="sourceLineNo">8048</span>        case INCREMENT:<a name="line.8048"></a>
+<span class="sourceLineNo">8049</span>          mutationType = MutationType.INCREMENT;<a name="line.8049"></a>
+<span class="sourceLineNo">8050</span>          long deltaAmount = getLongValue(delta);<a name="line.8050"></a>
+<span class="sourceLineNo">8051</span>          final long newValue = currentValue == null ? deltaAmount : getLongValue(currentValue) + deltaAmount;<a name="line.8051"></a>
+<span class="sourceLineNo">8052</span>          newCell = reckonDelta(delta, currentValue, columnFamily, now, mutation, (oldCell) -&gt; Bytes.toBytes(newValue));<a name="line.8052"></a>
+<span class="sourceLineNo">8053</span>          break;<a name="line.8053"></a>
+<span class="sourceLineNo">8054</span>        case APPEND:<a name="line.8054"></a>
+<span class="sourceLineNo">8055</span>          mutationType = MutationType.APPEND;<a name="line.8055"></a>
+<span class="sourceLineNo">8056</span>          newCell = reckonDelta(delta, currentValue, columnFamily, now, mutation, (oldCell) -&gt;<a name="line.8056"></a>
+<span class="sourceLineNo">8057</span>            ByteBuffer.wrap(new byte[delta.getValueLength() + oldCell.getValueLength()])<a name="line.8057"></a>
+<span class="sourceLineNo">8058</span>                    .put(oldCell.getValueArray(), oldCell.getValueOffset(), oldCell.getValueLength())<a name="line.8058"></a>
+<span class="sourceLineNo">8059</span>                    .put(delta.getValueArray(), delta.getValueOffset(), delta.getValueLength())<a name="line.8059"></a>
+<span class="sourceLineNo">8060</span>                    .array()<a name="line.8060"></a>
+<span class="sourceLineNo">8061</span>          );<a name="line.8061"></a>
 <span class="sourceLineNo">8062</span>          break;<a name="line.8062"></a>
-<span class="sourceLineNo">8063</span>        case APPEND:<a name="line.8063"></a>
-<span class="sourceLineNo">8064</span>          mutationType = MutationType.APPEND;<a name="line.8064"></a>
-<span class="sourceLineNo">8065</span>          // Always apply Append. TODO: Does empty delta value mean reset Cell? It seems to.<a name="line.8065"></a>
-<span class="sourceLineNo">8066</span>          newCell = reckonDelta(delta, currentValue, columnFamily, now, mutation, (oldCell) -&gt;<a name="line.8066"></a>
-<span class="sourceLineNo">8067</span>            ByteBuffer.wrap(new byte[delta.getValueLength() + oldCell.getValueLength()])<a name="line.8067"></a>
-<span class="sourceLineNo">8068</span>                    .put(oldCell.getValueArray(), oldCell.getValueOffset(), oldCell.getValueLength())<a name="line.8068"></a>
-<span class="sourceLineNo">8069</span>                    .put(delta.getValueArray(), delta.getValueOffset(), delta.getValueLength())<a name="line.8069"></a>
-<span class="sourceLineNo">8070</span>                    .array()<a name="line.8070"></a>
-<span class="sourceLineNo">8071</span>          );<a name="line.8071"></a>
-<span class="sourceLineNo">8072</span>          break;<a name="line.8072"></a>
-<span class="sourceLineNo">8073</span>        default: throw new UnsupportedOperationException(op.toString());<a name="line.8073"></a>
-<span class="sourceLineNo">8074</span>      }<a name="line.8074"></a>
-<span class="sourceLineNo">8075</span><a name="line.8075"></a>
-<span class="sourceLineNo">8076</span>      // Give coprocessors a chance to update the new cell<a name="line.8076"></a>
-<span class="sourceLineNo">8077</span>      if (coprocessorHost != null) {<a name="line.8077"></a>
-<span class="sourceLineNo">8078</span>        newCell =<a name="line.8078"></a>
-<span class="sourceLineNo">8079</span>            coprocessorHost.postMutationBeforeWAL(mutationType, mutation, currentValue, newCell);<a name="line.8079"></a>
-<span class="sourceLineNo">8080</span>      }<a name="line.8080"></a>
-<span class="sourceLineNo">8081</span>      // If apply, we need to update memstore/WAL with new value; add it toApply.<a name="line.8081"></a>
-<span class="sourceLineNo">8082</span>      if (apply || firstWrite) {<a name="line.8082"></a>
-<span class="sourceLineNo">8083</span>        toApply.add(newCell);<a name="line.8083"></a>
-<span class="sourceLineNo">8084</span>      }<a name="line.8084"></a>
-<span class="sourceLineNo">8085</span>      // Add to results to get returned to the Client. If null, cilent does not want results.<a name="line.8085"></a>
-<span class="sourceLineNo">8086</span>      if (results != null) {<a name="line.8086"></a>
-<span class="sourceLineNo">8087</span>        results.add(newCell);<a name="line.8087"></a>
-<span class="sourceLineNo">8088</span>      }<a name="line.8088"></a>
-<span class="sourceLineNo">8089</span>    }<a name="line.8089"></a>
-<span class="sourceLineNo">8090</span>    return toApply;<a name="line.8090"></a>
-<span class="sourceLineNo">8091</span>  }<a name="line.8091"></a>
-<span class="sourceLineNo">8092</span><a name="line.8092"></a>
-<span class="sourceLineNo">8093</span>  private static Cell reckonDelta(final Cell delta, final Cell currentCell,<a name="line.8093"></a>
-<span class="sourceLineNo">8094</span>                                  final byte[] columnFamily, final long now,<a name="line.8094"></a>
-<span class="sourceLineNo">8095</span>                                  Mutation mutation, Function&lt;Cell, byte[]&gt; supplier) throws IOException {<a name="line.8095"></a>
-<span class="sourceLineNo">8096</span>    // Forward any tags found on the delta.<a name="line.8096"></a>
-<span class="sourceLineNo">8097</span>    List&lt;Tag&gt; tags = TagUtil.carryForwardTags(delta);<a name="line.8097"></a>
-<span class="sourceLineNo">8098</span>    tags = TagUtil.carryForwardTTLTag(tags, mutation.getTTL());<a name="line.8098"></a>
-<span class="sourceLineNo">8099</span>    if (currentCell != null) {<a name="line.8099"></a>
-<span class="sourceLineNo">8100</span>      tags = TagUtil.carryForwardTags(tags, currentCell);<a name="line.8100"></a>
-<span class="sourceLineNo">8101</span>      byte[] newValue = supplier.apply(currentCell);<a name="line.8101"></a>
-<span class="sourceLineNo">8102</span>      return ExtendedCellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a name="line.8102"></a>
-<span class="sourceLineNo">8103</span>              .setRow(mutation.getRow(), 0, mutation.getRow().length)<a name="line.8103"></a>
-<span class="sourceLineNo">8104</span>              .setFamily(columnFamily, 0, columnFamily.length)<a name="line.8104"></a>
-<span class="sourceLineNo">8105</span>              // copy the qualifier if the cell is located in shared memory.<a name="line.8105"></a>
-<span class="sourceLineNo">8106</span>              .setQualifier(CellUtil.cloneQualifier(delta))<a name="line.8106"></a>
-<span class="sourceLineNo">8107</span>              .setTimestamp(Math.max(currentCell.getTimestamp() + 1, now))<a name="line.8107"></a>
-<span class="sourceLineNo">8108</span>              .setType(KeyValue.Type.Put.getCode())<a name="line.8108"></a>
-<span class="sourceLineNo">8109</span>              .setValue(newValue, 0, newValue.length)<a name="line.8109"></a>
-<span class="sourceLineNo">8110</span>              .setTags(TagUtil.fromList(tags))<a name="line.8110"></a>
-<span class="sourceLineNo">8111</span>              .build();<a name="line.8111"></a>
-<span class="sourceLineNo">8112</span>    } else {<a name="line.8112"></a>
-<span class="sourceLineNo">8113</span>      PrivateCellUtil.updateLatestStamp(delta, now);<a name="line.8113"></a>
-<span class="sourceLineNo">8114</span>      return CollectionUtils.isEmpty(tags) ? delta : PrivateCellUtil.createCell(delta, tags);<a name="line.8114"></a>
-<span class="sourceLineNo">8115</span>    }<a name="line.8115"></a>
-<span class="sourceLineNo">8116</span>  }<a name="line.8116"></a>
-<span class="sourceLineNo">8117</span><a name="line.8117"></a>
-<span class="sourceLineNo">8118</span>  /**<a name="line.8118"></a>
-<span class="sourceLineNo">8119</span>   * @return Get the long out of the passed in Cell<a name="line.8119"></a>
-<span class="sourceLineNo">8120</span>   */<a name="line.8120"></a>
-<span class="sourceLineNo">8121</span>  private static long getLongValue(final Cell cell) throws DoNotRetryIOException {<a name="line.8121"></a>
-<span class="sourceLineNo">8122</span>    int len = cell.getValueLength();<a name="line.8122"></a>
-<span class="sourceLineNo">8123</span>    if (len != Bytes.SIZEOF_LONG) {<a name="line.8123"></a>
-<span class="sourceLineNo">8124</span>      // throw DoNotRetryIOException instead of IllegalArgumentException<a name="line.8124"></a>
-<span class="sourceLineNo">8125</span>      throw new DoNotRetryIOException("Field is not a long, it's " + len + " bytes wide");<a name="line.8125"></a>
-<span class="sourceLineNo">8126</span>    }<a name="line.8126"></a>
-<span class="sourceLineNo">8127</span>    return PrivateCellUtil.getValueAsLong(cell);<a name="line.8127"></a>
-<span class="sourceLineNo">8128</span>  }<a name="line.8128"></a>
-<span class="sourceLineNo">8129</span><a name="line.8129"></a>
-<span class="sourceLineNo">8130</span>  /**<a name="line.8130"></a>
-<span class="sourceLineNo">8131</span>   * Do a specific Get on passed &lt;code&gt;columnFamily&lt;/code&gt; and column qualifiers.<a name="line.8131"></a>
-<span class="sourceLineNo">8132</span>   * @param mutation Mutation we are doing this Get for.<a name="line.8132"></a>
-<span class="sourceLineNo">8133</span>   * @param store Which column family on row (TODO: Go all Gets in one go)<a name="line.8133"></a>
-<span class="sourceLineNo">8134</span>   * @param coordinates Cells from &lt;code&gt;mutation&lt;/code&gt; used as coordinates applied to Get.<a name="line.8134"></a>
-<span class="sourceLineNo">8135</span>   * @return Return list of Cells found.<a name="line.8135"></a>
-<span class="sourceLineNo">8136</span>   */<a name="line.8136"></a>
-<span class="sourceLineNo">8137</span>  private List&lt;Cell&gt; get(Mutation mutation, HStore store, List&lt;Cell&gt; coordinates,<a name="line.8137"></a>
-<span class="sourceLineNo">8138</span>      IsolationLevel isolation, TimeRange tr) throws IOException {<a name="line.8138"></a>
-<span class="sourceLineNo">8139</span>    // Sort the cells so that they match the order that they appear in the Get results. Otherwise,<a name="line.8139"></a>
-<span class="sourceLineNo">8140</span>    // we won't be able to find the existing values if the cells are not specified in order by the<a name="line.8140"></a>
-<span class="sourceLineNo">8141</span>    // client since cells are in an array list.<a name="line.8141"></a>
-<span class="sourceLineNo">8142</span>    // TODO: I don't get why we are sorting. St.Ack 20150107<a name="line.8142"></a>
-<span class="sourceLineNo">8143</span>    sort(coordinates, store.getComparator());<a name="line.8143"></a>
-<span class="sourceLineNo">8144</span>    Get get = new Get(mutation.getRow());<a name="line.8144"></a>
-<span class="sourceLineNo">8145</span>    if (isolation != null) {<a name="line.8145"></a>
-<span class="sourceLineNo">8146</span>      get.setIsolationLevel(isolation);<a name="line.8146"></a>
-<span class="sourceLineNo">8147</span>    }<a name="line.8147"></a>
-<span class="sourceLineNo">8148</span>    for (Cell cell: coordinates) {<a name="line.8148"></a>
-<span class="sourceLineNo">8149</span>      get.addColumn(store.getColumnFamilyDescriptor().getName(), CellUtil.cloneQualifier(cell));<a name="line.8149"></a>
-<span class="sourceLineNo">8150</span>    }<a name="line.8150"></a>
-<span class="sourceLineNo">8151</span>    // Increments carry time range. If an Increment instance, put it on the Get.<a name="line.8151"></a>
-<span class="sourceLineNo">8152</span>    if (tr != null) {<a name="line.8152"></a>
-<span class="sourceLineNo">8153</span>      get.setTimeRange(tr.getMin(), tr.getMax());<a name="line.8153"></a>
-<span class="sourceLineNo">8154</span>    }<a name="line.8154"></a>
-<span class="sourceLineNo">8155</span>    return get(get, false);<a name="line.8155"></a>
-<span class="sourceLineNo">8156</span>  }<a name="line.8156"></a>
-<span class="sourceLineNo">8157</span><a name="line.8157"></a>
-<span class="sourceLineNo">8158</span>  /**<a name="line.8158"></a>
-<span class="sourceLineNo">8159</span>   * @return Sorted list of &lt;code&gt;cells&lt;/code&gt; using &lt;code&gt;comparator&lt;/code&gt;<a name="line.8159"></a>
-<span class="sourceLineNo">8160</span>   */<a name="line.8160"></a>
-<span class="sourceLineNo">8161</span>  private static List&lt;Cell&gt; sort(List&lt;Cell&gt; cells, final CellComparator comparator) {<a name="line.8161"></a>
-<span class="sourceLineNo">8162</span>    cells.sort(comparator);<a name="line.8162"></a>
-<span class="sourceLineNo">8163</span>    return cells;<a name="line.8163"></a>
-<span class="sourceLineNo">8164</span>  }<a name="line.8164"></a>
-<span class="sourceLineNo">8165</span><a name="line.8165"></a>
-<span class="sourceLineNo">8166</span>  public static final long FIXED_OVERHEAD = ClassSize.align(<a name="line.8166"></a>
-<span class="sourceLineNo">8167</span>      ClassSize.OBJECT +<a name="line.8167"></a>
-<span class="sourceLineNo">8168</span>      ClassSize.ARRAY +<a name="line.8168"></a>
-<span class="sourceLineNo">8169</span>      55 * ClassSize.REFERENCE + 3 * Bytes.SIZEOF_INT +<a name="line.8169"></a>
-<span class="sourceLineNo">8170</span>      (15 * Bytes.SIZEOF_LONG) +<a name="line.8170"></a>
-<span class="sourceLineNo">8171</span>      3 * Bytes.SIZEOF_BOOLEAN);<a name="line.8171"></a>
-<span class="sourceLineNo">8172</span><a name="line.8172"></a>
-<span class="sourceLineNo">8173</span>  // woefully out of date - currently missing:<a name="line.8173"></a>
-<span class="sourceLineNo">8174</span>  // 1 x HashMap - coprocessorServiceHandlers<a name="line.8174"></a>
-<span class="sourceLineNo">8175</span>  // 6 x LongAdder - numMutationsWithoutWAL, dataInMemoryWithoutWAL,<a name="line.8175"></a>
-<span class="sourceLineNo">8176</span>  //   checkAndMutateChecksPassed, checkAndMutateChecksFailed, readRequestsCount,<a name="line.8176"></a>
-<span class="sourceLineNo">8177</span>  //   writeRequestsCount, cpRequestsCount<a name="line.8177"></a>
-<span class="sourceLineNo">8178</span>  // 1 x HRegion$WriteState - writestate<a name="line.8178"></a>
-<span class="sourceLineNo">8179</span>  // 1 x RegionCoprocessorHost - coprocessorHost<a name="line.8179"></a>
-<span class="sourceLineNo">8180</span>  // 1 x RegionSplitPolicy - splitPolicy<a name="line.8180"></a>
-<span class="sourceLineNo">8181</span>  // 1 x MetricsRegion - metricsRegion<a name="line.8181"></a>
-<span class="sourceLineNo">8182</span>  // 1 x MetricsRegionWrapperImpl - metricsRegionWrapper<a name="line.8182"></a>
-<span class="sourceLineNo">8183</span>  public static final long DEEP_OVERHEAD = FIXED_OVERHEAD +<a name="line.8183"></a>
-<span class="sourceLineNo">8184</span>      ClassSize.OBJECT + // closeLock<a name="line.8184"></a>
-<span class="sourceLineNo">8185</span>      (2 * ClassSize.ATOMIC_BOOLEAN) + // closed, closing<a name="line.8185"></a>
-<span class="sourceLineNo">8186</span>      (3 * ClassSize.ATOMIC_LONG) + // numPutsWithoutWAL, dataInMemoryWithoutWAL,<a name="line.8186"></a>
-<span class="sourceLineNo">8187</span>                                    // compactionsFailed<a name="line.8187"></a>
-<span class="sourceLineNo">8188</span>      (2 * ClassSize.CONCURRENT_HASHMAP) +  // lockedRows, scannerReadPoints<a name="line.8188"></a>
-<span class="sourceLineNo">8189</span>      WriteState.HEAP_SIZE + // writestate<a name="line.8189"></a>
-<span class="sourceLineNo">8190</span>      ClassSize.CONCURRENT_SKIPLISTMAP + ClassSize.CONCURRENT_SKIPLISTMAP_ENTRY + // stores<a name="line.8190"></a>
-<span class="sourceLineNo">8191</span>      (2 * ClassSize.REENTRANT_LOCK) + // lock, updatesLock<a name="line.8191"></a>
-<span class="sourceLineNo">8192</span>      MultiVersionConcurrencyControl.FIXED_SIZE // mvcc<a name="line.8192"></a>
-<span class="sourceLineNo">8193</span>      + 2 * ClassSize.TREEMAP // maxSeqIdInStores, replicationScopes<a name="line.8193"></a>
-<span class="sourceLineNo">8194</span>      + 2 * ClassSize.ATOMIC_INTEGER // majorInProgress, minorInProgress<a name="line.8194"></a>
-<span class="sourceLineNo">8195</span>      + ClassSize.STORE_SERVICES // store services<a name="line.8195"></a>
-<span class="sourceLineNo">8196</span>      + StoreHotnessProtector.FIXED_SIZE<a name="line.8196"></a>
-<span class="sourceLineNo">8197</span>      ;<a name="line.8197"></a>
-<span class="sourceLineNo">8198</span><a name="line.8198"></a>
-<span class="sourceLineNo">8199</span>  @Override<a name="line.8199"></a>
-<span class="sourceLineNo">8200</span>  public long heapSize() {<a name="line.8200"></a>
-<span class="sourceLineNo">8201</span>    // this does not take into account row locks, recent flushes, mvcc entries, and more<a name="line.8201"></a>
-<span class="sourceLineNo">8202</span>    return DEEP_OVERHEAD + stores.values().stream().mapToLong(HStore::heapSize).sum();<a name="line.8202"></a>
-<span class="sourceLineNo">8203</span>  }<a name="line.8203"></a>
-<span class="sourceLineNo">8204</span><a name="line.8204"></a>
-<span class="sourceLineNo">8205</span>  /**<a name="line.8205"></a>
-<span class="sourceLineNo">8206</span>   * Registers a new protocol buffer {@link Service} subclass as a coprocessor endpoint to<a name="line.8206"></a>
-<span class="sourceLineNo">8207</span>   * be available for handling Region#execService(com.google.protobuf.RpcController,<a name="line.8207"></a>
-<span class="sourceLineNo">8208</span>   *    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.CoprocessorServiceCall) calls.<a name="line.8208"></a>
-<span class="sourceLineNo">8209</span>   *<a name="line.8209"></a>
-<span class="sourceLineNo">8210</span>   * &lt;p&gt;<a name="line.8210"></a>
-<span class="sourceLineNo">8211</span>   * Only a single instance may be registered per region for a given {@link Service} subclass (the<a name="line.8211"></a>
-<span class="sourceLineNo">8212</span>   * instances are keyed on {@link com.google.protobuf.Descriptors.ServiceDescriptor#getFullName()}.<a name="line.8212"></a>
-<span class="sourceLineNo">8213</span>   * After the first registration, subsequent calls with the same service name will fail with<a name="line.8213"></a>
-<span class="sourceLineNo">8214</span>   * a return value of {@code false}.<a name="line.8214"></a>
-<span class="sourceLineNo">8215</span>   * &lt;/p&gt;<a name="line.8215"></a>
-<span class="sourceLineNo">8216</span>   * @param instance the {@code Service} subclass instance to expose as a coprocessor endpoint<a name="line.8216"></a>
-<span class="sourceLineNo">8217</span>   * @return {@code true} if the registration was successful, {@code false}<a name="line.8217"></a>
-<span class="sourceLineNo">8218</span>   * otherwise<a name="line.8218"></a>
-<span class="sourceLineNo">8219</span>   */<a name="line.8219"></a>
-<span class="sourceLineNo">8220</span>  public boolean registerService(com.google.protobuf.Service instance) {<a name="line.8220"></a>
-<span class="sourceLineNo">8221</span>    /*<a name="line.8221"></a>
-<span class="sourceLineNo">8222</span>     * No stacking of instances is allowed for a single service name<a name="line.8222"></a>
-<span class="sourceLineNo">8223</span>     */<a name="line.8223"></a>
-<span class="sourceLineNo">8224</span>    com.google.protobuf.Descriptors.ServiceDescriptor serviceDesc = instance.getDescriptorForType();<a name="line.8224"></a>
-<span class="sourceLineNo">8225</span>    String serviceName = CoprocessorRpcUtils.getServiceName(serviceDesc);<a name="line.8225"></a>
-<span class="sourceLineNo">8226</span>    if (coprocessorServiceHandlers.containsKey(serviceName)) {<a name="line.8226"></a>
-<span class="sourceLineNo">8227</span>      LOG.error("Coprocessor service " + serviceName +<a name="line.8227"></a>
-<span class="sourceLineNo">8228</span>          " already registered, rejecting request from " + instance);<a name="line.8228"></a>
-<span class="sourceLineNo">8229</span>      return false;<a name="line.8229"></a>
-<span class="sourceLineNo">8230</span>    }<a name="line.8230"></a>
-<span class="sourceLineNo">8231</span><a name="line.8231"></a>
-<span class="sourceLineNo">8232</span>    coprocessorServiceHandlers.put(serviceName, instance);<a name="line.8232"></a>
-<span class="sourceLineNo">8233</span>    if (LOG.isDebugEnabled()) {<a name="line.8233"></a>
-<span class="sourceLineNo">8234</span>      LOG.debug("Registered coprocessor service: region=" +<a name="line.8234"></a>
-<span class="sourceLineNo">8235</span>          Bytes.toStringBinary(getRegionInfo().getRegionName()) +<a name="line.8235"></a>
-<span class="sourceLineNo">8236</span>          " service=" + serviceName);<a name="line.8236"></a>
-<span class="sourceLineNo">8237</span>    }<a name="line.8237"></a>
-<span class="sourceLineNo">8238</span>    return true;<a name="line.8238"></a>
-<span class="sourceLineNo">8239</span>  }<a name="line.8239"></a>
-<span class="sourceLineNo">8240</span><a name="line.8240"></a>
-<span class="sourceLineNo">8241</span>  /**<a name="line.8241"></a>
-<span class="sourceLineNo">8242</span>   * Executes a single protocol buffer coprocessor endpoint {@link Service} method using<a name="line.8242"></a>
-<span class="sourceLineNo">8243</span>   * the registered protocol handlers.  {@link Service} implementations must be registered via the<a name="line.8243"></a>
-<span class="sourceLineNo">8244</span>   * {@link #registerService(com.google.protobuf.Service)}<a name="line.8244"></a>
-<span class="sourceLineNo">8245</span>   * method before they are available.<a name="line.8245"></a>
-<span class="sourceLineNo">8246</span>   *<a name="line.8246"></a>
-<span class="sourceLineNo">8247</span>   * @param controller an {@code RpcContoller} implementation to pass to the invoked service<a name="line.8247"></a>
-<span class="sourceLineNo">8248</span>   * @param call a {@code CoprocessorServiceCall} instance identifying the service, method,<a name="line.8248"></a>
-<span class="sourceLineNo">8249</span>   *     and parameters for the method invocation<a name="line.8249"></a>
-<span class="sourceLineNo">8250</span>   * @return a protocol buffer {@code Message} instance containing the method's result<a name="line.8250"></a>
-<span class="sourceLineNo">8251</span>   * @throws IOException if no registered service handler is found or an error<a name="line.8251"></a>
-<span class="sourceLineNo">8252</span>   *     occurs during the invocation<a name="line.8252"></a>
-<span class="sourceLineNo">8253</span>   * @see #registerService(com.google.protobuf.Service)<a name="line.8253"></a>
-<span class="sourceLineNo">8254</span>   */<a name="line.8254"></a>
-<span class="sourceLineNo">8255</span>  public com.google.protobuf.Message execService(com.google.protobuf.RpcController controller,<a name="line.8255"></a>
-<span class="sourceLineNo">8256</span>      CoprocessorServiceCall call) throws IOException {<a name="line.8256"></a>
-<span class="sourceLineNo">8257</span>    String serviceName = call.getServiceName();<a name="line.8257"></a>
-<span class="sourceLineNo">8258</span>    com.google.protobuf.Service service = coprocessorServiceHandlers.get(serviceName);<a name="line.8258"></a>
-<span class="sourceLineNo">8259</span>    if (service == null) {<a name="line.8259"></a>
-<span class="sourceLineNo">8260</span>      throw new UnknownProtocolException(null, "No registered coprocessor service found for " +<a name="line.8260"></a>
-<span class="sourceLineNo">8261</span>          serviceName + " in region " + Bytes.toStringBinary(getRegionInfo().getRegionName()));<a name="line.8261"></a>
-<span class="sourceLineNo">8262</span>    }<a name="line.8262"></a>
-<span class="sourceLineNo">8263</span>    com.google.protobuf.Descriptors.ServiceDescriptor serviceDesc = service.getDescriptorForType();<a name="line.8263"></a>
+<span class="sourceLineNo">8063</span>        default: throw new UnsupportedOperationException(op.toString());<a name="line.8063"></a>
+<span class="sourceLineNo">8064</span>      }<a name="line.8064"></a>
+<span class="sourceLineNo">8065</span><a name="line.8065"></a>
+<span class="sourceLineNo">8066</span>      // Give coprocessors a chance to update the new cell<a name="line.8066"></a>
+<span class="sourceLineNo">8067</span>      if (coprocessorHost != null) {<a name="line.8067"></a>
+<span class="sourceLineNo">8068</span>        newCell =<a name="line.8068"></a>
+<span class="sourceLineNo">8069</span>            coprocessorHost.postMutationBeforeWAL(mutationType, mutation, currentValue, newCell);<a name="line.8069"></a>
+<span class="sourceLineNo">8070</span>      }<a name="line.8070"></a>
+<span class="sourceLineNo">8071</span>      toApply.add(newCell);<a name="line.8071"></a>
+<span class="sourceLineNo">8072</span>      // Add to results to get returned to the Client. If null, cilent does not want results.<a name="line.8072"></a>
+<span class="sourceLineNo">8073</span>      if (results != null) {<a name="line.8073"></a>
+<span class="sourceLineNo">8074</span>        results.add(newCell);<a name="line.8074"></a>
+<span class="sourceLineNo">8075</span>      }<a name="line.8075"></a>
+<span class="sourceLineNo">8076</span>    }<a name="line.8076"></a>
+<span class="sourceLineNo">8077</span>    return toApply;<a name="line.8077"></a>
+<span class="sourceLineNo">8078</span>  }<a name="line.8078"></a>
+<span class="sourceLineNo">8079</span><a name="line.8079"></a>
+<span class="sourceLineNo">8080</span>  private static Cell reckonDelta(final Cell delta, final Cell currentCell,<a name="line.8080"></a>
+<span class="sourceLineNo">8081</span>                                  final byte[] columnFamily, final long now,<a name="line.8081"></a>
+<span class="sourceLineNo">8082</span>                                  Mutation mutation, Function&lt;Cell, byte[]&gt; supplier) throws IOException {<a name="line.8082"></a>
+<span class="sourceLineNo">8083</span>    // Forward any tags found on the delta.<a name="line.8083"></a>
+<span class="sourceLineNo">8084</span>    List&lt;Tag&gt; tags = TagUtil.carryForwardTags(delta);<a name="line.8084"></a>
+<span class="sourceLineNo">8085</span>    tags = TagUtil.carryForwardTTLTag(tags, mutation.getTTL());<a name="line.8085"></a>
+<span class="sourceLineNo">8086</span>    if (currentCell != null) {<a name="line.8086"></a>
+<span class="sourceLineNo">8087</span>      tags = TagUtil.carryForwardTags(tags, currentCell);<a name="line.8087"></a>
+<span class="sourceLineNo">8088</span>      byte[] newValue = supplier.apply(currentCell);<a name="line.8088"></a>
+<span class="sourceLineNo">8089</span>      return ExtendedCellBuilderFactory.create(CellBuilderType.SHALLOW_COPY)<a name="line.8089"></a>
+<span class="sourceLineNo">8090</span>              .setRow(mutation.getRow(), 0, mutation.getRow().length)<a name="line.8090"></a>
+<span class="sourceLineNo">8091</span>              .setFamily(columnFamily, 0, columnFamily.length)<a name="line.8091"></a>
+<span class="sourceLineNo">8092</span>              // copy the qualifier if the cell is located in shared memory.<a name="line.8092"></a>
+<span class="sourceLineNo">8093</span>              .setQualifier(CellUtil.cloneQualifier(delta))<a name="line.8093"></a>
+<span class="sourceLineNo">8094</span>              .setTimestamp(Math.max(currentCell.getTimestamp() + 1, now))<a name="line.8094"></a>
+<span class="sourceLineNo">8095</span>              .setType(KeyValue.Type.Put.getCode())<a name="line.8095"></a>
+<span class="sourceLineNo">8096</span>              .setValue(newValue, 0, newValue.length)<a name="line.8096"></a>
+<span class="sourceLineNo">8097</span>              .setTags(TagUtil.fromList(tags))<a name="line.8097"></a>
+<span class="sourceLineNo">8098</span>              .build();<a name="line.8098"></a>
+<span class="sourceLineNo">8099</span>    } else {<a name="line.8099"></a>
+<span class="sourceLineNo">8100</span>      PrivateCellUtil.updateLatestStamp(delta, now);<a name="line.8100"></a>
+<span class="sourceLineNo">8101</span>      return CollectionUtils.isEmpty(tags) ? delta : PrivateCellUtil.createCell(delta, tags);<a name="line.8101"></a>
+<span class="sourceLineNo">8102</span>    }<a name="line.8102"></a>
+<span class="sourceLineNo">8103</span>  }<a name="line.8103"></a>
+<span class="sourceLineNo">8104</span><a name="line.8104"></a>
+<span class="sourceLineNo">8105</span>  /**<a name="line.8105"></a>
+<span class="sourceLineNo">8106</span>   * @return Get the long out of the passed in Cell<a name="line.8106"></a>
+<span class="sourceLineNo">8107</span>   */<a name="line.8107"></a>
+<span class="sourceLineNo">8108</span>  private static long getLongValue(final Cell cell) throws DoNotRetryIOException {<a name="line.8108"></a>
+<span class="sourceLineNo">8109</span>    int len = cell.getValueLength();<a name="line.8109"></a>
+<span class="sourceLineNo">8110</span>    if (len != Bytes.SIZEOF_LONG) {<a name="line.8110"></a>
+<span class="sourceLineNo">8111</span>      // throw DoNotRetryIOException instead of IllegalArgumentException<a name="line.8111"></a>
+<span class="sourceLineNo">8112</span>      throw new DoNotRetryIOException("Field is not a long, it's " + len + " bytes wide");<a name="line.8112"></a>
+<span class="sourceLineNo">8113</span>    }<a name="line.8113"></a>
+<span class="sourceLineNo">8114</span>    return PrivateCellUtil.getValueAsLong(cell);<a name="line.8114"></a>
+<span class="sourceLineNo">8115</span>  }<a name="line.8115"></a>
+<span class="sourceLineNo">8116</span><a name="line.8116"></a>
+<span class="sourceLineNo">8117</span>  /**<a name="line.8117"></a>
+<span class="sourceLineNo">8118</span>   * Do a specific Get on passed &lt;code&gt;columnFamily&lt;/code&gt; and column qualifiers.<a name="line.8118"></a>
+<span class="sourceLineNo">8119</span>   * @param mutation Mutation we are doing this Get for.<a name="line.8119"></a>
+<span class="sourceLineNo">8120</span>   * @param store Which column family on row (TODO: Go all Gets in one go)<a name="line.8120"></a>
+<span class="sourceLineNo">8121</span>   * @param coordinates Cells from &lt;code&gt;mutation&lt;/code&gt; used as coordinates applied to Get.<a name="line.8121"></a>
+<span class="sourceLineNo">8122</span>   * @return Return list of Cells found.<a name="line.8122"></a>
+<span class="sourceLineNo">8123</span>   */<a name="line.8123"></a>
+<span class="sourceLineNo">8124</span>  private List&lt;Cell&gt; get(Mutation mutation, HStore store, List&lt;Cell&gt; coordinates,<a name="line.8124"></a>
+<span class="sourceLineNo">8125</span>      IsolationLevel isolation, TimeRange tr) throws IOException {<a name="line.8125"></a>
+<span class="sourceLineNo">8126</span>    // Sort the cells so that they match the order that they appear in the Get results. Otherwise,<a name="line.8126"></a>
+<span class="sourceLineNo">8127</span>    // we won't be able to find the existing values if the cells are not specified in order by the<a name="line.8127"></a>
+<span class="sourceLineNo">8128</span>    // client since cells are in an array list.<a name="line.8128"></a>
+<span class="sourceLineNo">8129</span>    // TODO: I don't get why we are sorting. St.Ack 20150107<a name="line.8129"></a>
+<span class="sourceLineNo">8130</span>    sort(coordinates, store.getComparator());<a name="line.8130"></a>
+<span class="sourceLineNo">8131</span>    Get get = new Get(mutation.getRow());<a name="line.8131"></a>
+<span class="sourceLineNo">8132</span>    if (isolation != null) {<a name="line.8132"></a>
+<span class="sourceLineNo">8133</span>      get.setIsolationLevel(isolation);<a name="line.8133"></a>
+<span class="sourceLineNo">8134</span>    }<a name="line.8134"></a>
+<span class="sourceLineNo">8135</span>    for (Cell cell: coordinates) {<a name="line.8135"></a>
+<span class="sourceLineNo">8136</span>      get.addColumn(store.getColumnFamilyDescriptor().getName(), CellUtil.cloneQualifier(cell));<a name="line.8136"></a>
+<span class="sourceLineNo">8137</span>    }<a name="line.8137"></a>
+<span class="sourceLineNo">8138</span>    // Increments carry time range. If an Increment instance, put it on the Get.<a name="line.8138"></a>
+<span class="sourceLineNo">8139</span>    if (tr != null) {<a name="line.8139"></a>
+<span class="sourceLineNo">8140</span>      get.setTimeRange(tr.getMin(), tr.getMax());<a name="line.8140"></a>
+<span class="sourceLineNo">8141</span>    }<a name="line.8141"></a>
+<span class="sourceLineNo">8142</span>    return get(get, false);<a name="line.8142"></a>
+<span class="sourceLineNo">8143</span>  }<a name="line.8143"></a>
+<span class="sourceLineNo">8144</span><a name="line.8144"></a>
+<span class="sourceLineNo">8145</span>  /**<a name="line.8145"></a>
+<span class="sourceLineNo">8146</span>   * @return Sorted list of &lt;code&gt;cells&lt;/code&gt; using &lt;code&gt;comparator&lt;/code&gt;<a name="line.8146"></a>
+<span class="sourceLineNo">8147</span>   */<a name="line.8147"></a>
+<span class="sourceLineNo">8148</span>  private static List&lt;Cell&gt; sort(List&lt;Cell&gt; cells, final CellComparator comparator) {<a name="line.8148"></a>
+<span class="sourceLineNo">8149</span>    cells.sort(comparator);<a name="line.8149"></a>
+<span class="sourceLineNo">8150</span>    return cells;<a name="line.8150"></a>
+<span class="sourceLineNo">8151</span>  }<a name="line.8151"></a>
+<span class="sourceLineNo">8152</span><a name="line.8152"></a>
+<span class="sourceLineNo">8153</span>  public static final long FIXED_OVERHEAD = ClassSize.align(<a name="line.8153"></a>
+<span class="sourceLineNo">8154</span>      ClassSize.OBJECT +<a name="line.8154"></a>
+<span class="sourceLineNo">8155</span>      ClassSize.ARRAY +<a name="line.8155"></a>
+<span class="sourceLineNo">8156</span>      55 * ClassSize.REFERENCE + 3 * Bytes.SIZEOF_INT +<a name="line.8156"></a>
+<span class="sourceLineNo">8157</span>      (15 * Bytes.SIZEOF_LONG) +<a name="line.8157"></a>
+<span class="sourceLineNo">8158</span>      3 * Bytes.SIZEOF_BOOLEAN);<a name="line.8158"></a>
+<span class="sourceLineNo">8159</span><a name="line.8159"></a>
+<span class="sourceLineNo">8160</span>  // woefully out of date - currently missing:<a name="line.8160"></a>
+<span class="sourceLineNo">8161</span>  // 1 x HashMap - coprocessorServiceHandlers<a name="line.8161"></a>
+<span class="sourceLineNo">8162</span>  // 6 x LongAdder - numMutationsWithoutWAL, dataInMemoryWithoutWAL,<a name="line.8162"></a>
+<span class="sourceLineNo">8163</span>  //   checkAndMutateChecksPassed, checkAndMutateChecksFailed, readRequestsCount,<a name="line.8163"></a>
+<span class="sourceLineNo">8164</span>  //   writeRequestsCount, cpRequestsCount<a name="line.8164"></a>
+<span class="sourceLineNo">8165</span>  // 1 x HRegion$WriteState - writestate<a name="line.8165"></a>
+<span class="sourceLineNo">8166</span>  // 1 x RegionCoprocessorHost - coprocessorHost<a name="line.8166"></a>
+<span class="sourceLineNo">8167</span>  // 1 x RegionSplitPolicy - splitPolicy<a name="line.8167"></a>
+<span class="sourceLineNo">8168</span>  // 1 x MetricsRegion - metricsRegion<a name="line.8168"></a>
+<span class="sourceLineNo">8169</span>  // 1 x MetricsRegionWrapperImpl - metricsRegionWrapper<a name="line.8169"></a>
+<span class="sourceLineNo">8170</span>  public static final long DEEP_OVERHEAD = FIXED_OVERHEAD +<a name="line.8170"></a>
+<span class="sourceLineNo">8171</span>      ClassSize.OBJECT + // closeLock<a name="line.8171"></a>
+<span class="sourceLineNo">8172</span>      (2 * ClassSize.ATOMIC_BOOLEAN) + // closed, closing<a name="line.8172"></a>
+<span class="sourceLineNo">8173</span>      (3 * ClassSize.ATOMIC_LONG) + // numPutsWithoutWAL, dataInMemoryWithoutWAL,<a name="line.8173"></a>
+<span class="sourceLineNo">8174</span>                                    // compactionsFailed<a name="line.8174"></a>
+<span class="sourceLineNo">8175</span>      (2 * ClassSize.CONCURRENT_HASHMAP) +  // lockedRows, scannerReadPoints<a name="line.8175"></a>
+<span class="sourceLineNo">8176</span>      WriteState.HEAP_SIZE + // writestate<a name="line.8176"></a>
+<span class="sourceLineNo">8177</span>      ClassSize.CONCURRENT_SKIPLISTMAP + ClassSize.CONCURRENT_SKIPLISTMAP_ENTRY + // stores<a name="line.8177"></a>
+<span class="sourceLineNo">8178</span>      (2 * ClassSize.REENTRANT_LOCK) + // lock, updatesLock<a name="line.8178"></a>
+<span class="sourceLineNo">8179</span>      MultiVersionConcurrencyControl.FIXED_SIZE // mvcc<a name="line.8179"></a>
+<span class="sourceLineNo">8180</span>      + 2 * ClassSize.TREEMAP // maxSeqIdInStores, replicationScopes<a name="line.8180"></a>
+<span class="sourceLineNo">8181</span>      + 2 * ClassSize.ATOMIC_INTEGER // majorInProgress, minorInProgress<a name="line.8181"></a>
+<span class="sourceLineNo">8182</span>      + ClassSize.STORE_SERVICES // store services<a name="line.8182"></a>
+<span class="sourceLineNo">8183</span>      + StoreHotnessProtector.FIXED_SIZE<a name="line.8183"></a>
+<span class="sourceLineNo">8184</span>      ;<a name="line.8184"></a>
+<span class="sourceLineNo">8185</span><a name="line.8185"></a>
+<span class="sourceLineNo">8186</span>  @Override<a name="line.8186"></a>
+<span class="sourceLineNo">8187</span>  public long heapSize() {<a name="line.8187"></a>
+<span class="sourceLineNo">8188</span>    // this does not take into account row locks, recent flushes, mvcc entries, and more<a name="line.8188"></a>
+<span class="sourceLineNo">8189</span>    return DEEP_OVERHEAD + stores.values().stream().mapToLong(HStore::heapSize).sum();<a name="line.8189"></a>
+<span class="sourceLineNo">8190</span>  }<a name="line.8190"></a>
+<span class="sourceLineNo">8191</span><a name="line.8191"></a>
+<span class="sourceLineNo">8192</span>  /**<a name="line.8192"></a>
+<span class="sourceLineNo">8193</span>   * Registers a new protocol buffer {@link Service} subclass as a coprocessor endpoint to<a name="line.8193"></a>
+<span class="sourceLineNo">8194</span>   * be available for handling Region#execService(com.google.protobuf.RpcController,<a name="line.8194"></a>
+<span class="sourceLineNo">8195</span>   *    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.CoprocessorServiceCall) calls.<a name="line.8195"></a>
+<span class="sourceLineNo">8196</span>   *<a name="line.8196"></a>
+<span class="sourceLineNo">8197</span>   * &lt;p&gt;<a name="line.8197"></a>
+<span class="sourceLineNo">8198</span>   * Only a single instance may be registered per region for a given {@link Service} subclass (the<a name="line.8198"></a>
+<span class="sourceLineNo">8199</span>   * instances are keyed on {@link com.google.protobuf.Descriptors.ServiceDescriptor#getFullName()}.<a name="line.8199"></a>
+<span class="sourceLineNo">8200</span>   * After the first registration, subsequent calls with the same service name will fail with<a name="line.8200"></a>
+<span class="sourceLineNo">8201</span>   * a return value of {@code false}.<a name="line.8201"></a>
+<span class="sourceLineNo">8202</span>   * &lt;/p&gt;<a name="line.8202"></a>
+<span class="sourceLineNo">8203</span>   * @param instance the {@code Service} subclass instance to expose as a coprocessor endpoint<a name="line.8203"></a>
+<span class="sourceLineNo">8204</span>   * @return {@code true} if the registration was successful, {@code false}<a name="line.8204"></a>
+<span class="sourceLineNo">8205</span>   * otherwise<a name="line.8205"></a>
+<span class="sourceLineNo">8206</span>   */<a name="line.8206"></a>
+<span class="sourceLineNo">8207</span>  public boolean registerService(com.google.protobuf.Service instance) {<a name="line.8207"></a>
+<span class="sourceLineNo">8208</span>    /*<a name="line.8208"></a>
+<span class="sourceLineNo">8209</span>     * No stacking of instances is allowed for a single service name<a name="line.8209"></a>
+<span class="sourceLineNo">8210</span>     */<a name="line.8210"></a>
+<span class="sourceLineNo">8211</span>    com.google.protobuf.Descriptors.ServiceDescriptor serviceDesc = instance.getDescriptorForType();<a name="line.8211"></a>
+<span class="sourceLineNo">8212</span>    String serviceName = CoprocessorRpcUtils.getServiceName(serviceDesc);<a name="line.8212"></a>
+<span class="sourceLineNo">8213</span>    if (coprocessorServiceHandlers.containsKey(serviceName)) {<a name="line.8213"></a>
+<span class="sourceLineNo">8214</span>      LOG.error("Coprocessor service " + serviceName +<a name="line.8214"></a>
+<span class="sourceLineNo">8215</span>          " already registered, rejecting request from " + instance);<a name="line.8215"></a>
+<span class="sourceLineNo">8216</span>      return false;<a name="line.8216"></a>
+<span class="sourceLineNo">8217</span>    }<a name="line.8217"></a>
+<span class="sourceLineNo">8218</span><a name="line.8218"></a>
+<span class="sourceLineNo">8219</span>    coprocessorServiceHandlers.put(serviceName, instance);<a name="line.8219"></a>
+<span class="sourceLineNo">8220</span>    if (LOG.isDebugEnabled()) {<a name="line.8220"></a>
+<span class="sourceLineNo">8221</span>      LOG.debug("Registered coprocessor service: region=" +<a name="line.8221"></a>
+<span class="sourceLineNo">8222</span>          Bytes.toStringBinary(getRegionInfo().getRegionName()) +<a name="line.8222"></a>
+<span class="sourceLineNo">8223</span>          " service=" + serviceName);<a name="line.8223"></a>
+<span class="sourceLineNo">8224</span>    }<a name="line.8224"></a>
+<span class="sourceLineNo">8225</span>    return true;<a name="line.8225"></a>
+<span class="sourceLineNo">8226</span>  }<a name="line.8226"></a>
+<span class="sourceLineNo">8227</span><a name="line.8227"></a>
+<span class="sourceLineNo">8228</span>  /**<a name="line.8228"></a>
+<span class="sourceLineNo">8229</span>   * Executes a single protocol buffer coprocessor endpoint {@link Service} method using<a name="line.8229"></a>
+<span class="sourceLineNo">8230</span>   * the registered protocol handlers.  {@link Service} implementations must be registered via the<a name="line.8230"></a>
+<span class="sourceLineNo">8231</span>   * {@link #registerService(com.google.protobuf.Service)}<a name="line.8231"></a>
+<span class="sourceLineNo">8232</span>   * method before they are available.<a name="line.8232"></a>
+<span class="sourceLineNo">8233</span>   *<a name="line.8233"></a>
+<span class="sourceLineNo">8234</span>   * @param controller an {@code RpcContoller} implementation to pass to the invoked service<a name="line.8234"></a>
+<span class="sourceLineNo">8235</span>   * @param call a {@code CoprocessorServiceCall} instance identifying the service, method,<a name="line.8235"></a>
+<span class="sourceLineNo">8236</span>   *     and parameters for the method invocation<a name="line.8236"></a>
+<span class="sourceLineNo">8237</span>   * @return a protocol buffer {@code Message} instance containing the method's result<a name="line.8237"></a>
+<span class="sourceLineNo">8238</span>   * @throws IOException if no registered service handler is found or an error<a name="line.8238"></a>
+<span class="sourceLineNo">8239</span>   *     occurs during the invocation<a name="line.8239"></a>
+<span class="sourceLineNo">8240</span>   * @see #registerService(com.google.protobuf.Service)<a name="line.8240"></a>
+<span class="sourceLineNo">8241</span>   */<a name="line.8241"></a>
+<span class="sourceLineNo">8242</span>  public com.google.protobuf.Message execService(com.google.protobuf.RpcController controller,<a name="line.8242"></a>
+<span class="sourceLineNo">8243</span>      CoprocessorServiceCall call) throws IOException {<a name="line.8243"></a>
+<span class="sourceLineNo">8244</span>    String serviceName = call.getServiceName();<a name="line.8244"></a>
+<span class="sourceLineNo">8245</span>    com.google.protobuf.Service service = coprocessorServiceHandlers.get(serviceName);<a name="line.8245"></a>
+<span class="sourceLineNo">8246</span>    if (service == null) {<a name="line.8246"></a>
+<span class="sourceLineNo">8247</span>      throw new UnknownProtocolException(null, "No registered coprocessor service found for " +<a name="line.8247"></a>
+<span class="sourceLineNo">8248</span>          serviceName + " in region " + Bytes.toStringBinary(getRegionInfo().getRegionName()));<a name="line.8248"></a>
+<span class="sourceLineNo">8249</span>    }<a name="line.8249"></a>
+<span class="sourceLineNo">8250</span>    com.google.protobuf.Descriptors.ServiceDescriptor serviceDesc = service.getDescriptorForType();<a name="line.8250"></a>
+<span class="sourceLineNo">8251</span><a name="line.8251"></a>
+<span class="sourceLineNo">8252</span>    cpRequestsCount.increment();<a name="line.8252"></a>
+<span class="sourceLineNo">8253</span>    String methodName = call.getMethodName();<a name="line.8253"></a>
+<span class="sourceLineNo">8254</span>    com.google.protobuf.Descriptors.MethodDescriptor methodDesc =<a name="line.8254"></a>
+<span class="sourceLineNo">8255</span>        CoprocessorRpcUtils.getMethodDescriptor(methodName, serviceDesc);<a name="line.8255"></a>
+<span class="sourceLineNo">8256</span><a name="line.8256"></a>
+<span class="sourceLineNo">8257</span>    com.google.protobuf.Message.Builder builder =<a name="line.8257"></a>
+<span class="sourceLineNo">8258</span>        service.getRequestPrototype(methodDesc).newBuilderForType();<a name="line.8258"></a>
+<span class="sourceLineNo">8259</span><a name="line.8259"></a>
+<span class="sourceLineNo">8260</span>    org.apache.hadoop.hbase.protobuf.ProtobufUtil.mergeFrom(builder,<a name="line.8260"></a>
+<span class="sourceLineNo">8261</span>        call.getRequest().toByteArray());<a name="line.8261"></a>
+<span class="sourceLineNo">8262</span>    com.google.protobuf.Message request =<a name="line.8262"></a>
+<span class="sourceLineNo">8263</span>        CoprocessorRpcUtils.getRequest(service, methodDesc, call.getRequest());<a name="line.8263"></a>
 <span class="sourceLineNo">8264</span><a name="line.8264"></a>
-<span class="sourceLineNo">8265</span>    cpRequestsCount.increment();<a name="line.8265"></a>
-<span class="sourceLineNo">8266</span>    String methodName = call.getMethodName();<a name="line.8266"></a>
-<span class="sourceLineNo">8267</span>    com.google.protobuf.Descriptors.MethodDescriptor methodDesc =<a name="line.8267"></a>
-<span class="sourceLineNo">8268</span>        CoprocessorRpcUtils.getMethodDescriptor(methodName, serviceDesc);<a name="line.8268"></a>
-<span class="sourceLineNo">8269</span><a name="line.8269"></a>
-<span class="sourceLineNo">8270</span>    com.google.protobuf.Message.Builder builder =<a name="line.8270"></a>
-<span class="sourceLineNo">8271</span>        service.getRequestPrototype(methodDesc).newBuilderForType();<a name="line.8271"></a>
-<span class="sourceLineNo">8272</span><a name="line.8272"></a>
-<span class="sourceLineNo">8273</span>    org.apache.hadoop.hbase.protobuf.ProtobufUtil.mergeFrom(builder,<a name="line.8273"></a>
-<span class="sourceLineNo">8274</span>        call.getRequest().toByteArray());<a name="line.8274"></a>
-<span class="sourceLineNo">8275</span>    com.google.protobuf.Message request =<a name="line.8275"></a>
-<span class="sourceLineNo">8276</span>        CoprocessorRpcUtils.getRequest(service, methodDesc, call.getRequest());<a name="line.8276"></a>
-<span class="sourceLineNo">8277</span><a name="line.8277"></a>
-<span class="sourceLineNo">8278</span>    if (coprocessorHost != null) {<a name="line.8278"></a>
-<span class="sourceLineNo">8279</span>      request = coprocessorHost.preEndpointInvocation(service, methodName, request);<a name="line.8279"></a>
-<span class="sourceLineNo">8280</span>    }<a name="line.8280"></a>
-<span class="sourceLineNo">8281</span><a name="line.8281"></a>
-<span class="sourceLineNo">8282</span>    final com.google.protobuf.Message.Builder responseBuilder =<a name="line.8282"></a>
-<span class="sourceLineNo">8283</span>        service.getResponsePrototype(methodDesc).newBuilderForType();<a name="line.8283"></a>
-<span class="sourceLineNo">8284</span>    service.callMethod(methodDesc, controller, request,<a name="line.8284"></a>
-<span class="sourceLineNo">8285</span>        new com.google.protobuf.RpcCallback&lt;com.google.protobuf.Message&gt;() {<a name="line.8285"></a>
-<span class="sourceLineNo">8286</span>      @Override<a name="line.8286"></a>
-<span class="sourceLineNo">8287</span>      public void run(com.google.protobuf.Message message) {<a name="line.8287"></a>
-<span class="sourceLineNo">8288</span>        if (message != null) {<a name="line.8288"></a>
-<span class="sourceLineNo">8289</span>          responseBuilder.mergeFrom(message);<a name="line.8289"></a>
-<span class="sourceLineNo">8290</span>        }<a name="line.8290"></a>
-<span class="sourceLineNo">8291</span>      }<a name="line.8291"></a>
-<span class="sourceLineNo">8292</span>    });<a name="line.8292"></a>
-<span class="sourceLineNo">8293</span><a name="line.8293"></a>
-<span class="sourceLineNo">8294</span>    if (coprocessorHost != null) {<a name="line.8294"></a>
-<span class="sourceLineNo">8295</span>      coprocessorHost.postEndpointInvocation(service, methodName, request, responseBuilder);<a name="line.8295"></a>
-<span class="sourceLineNo">8296</span>    }<a name="line.8296"></a>
-<span class="sourceLineNo">8297</span>    IOException exception =<a name="line.8297"></a>
-<span class="sourceLineNo">8298</span>        org.apache.hadoop.hbase.ipc.CoprocessorRpcUtils.getControllerException(controller);<a name="line.8298"></a>
-<span class="sourceLineNo">8299</span>    if (exception != null) {<a name="line.8299"></a>
-<span class="sourceLineNo">8300</span>      throw exception;<a name="line.8300"></a>
-<span class="sourceLineNo">8301</span>    }<a name="line.8301"></a>
-<span class="sourceLineNo">8302</span><a name="line.8302"></a>
-<span class="sourceLineNo">8303</span>    return responseBuilder.build();<a name="line.8303"></a>
-<span class="sourceLineNo">8304</span>  }<a name="line.8304"></a>
-<span class="sourceLineNo">8305</span><a name="line.8305"></a>
-<span class="sourceLineNo">8306</span>  boolean shouldForceSplit() {<a name="line.8306"></a>
-<span class="sourceLineNo">8307</span>    return this.splitRequest;<a name="line.8307"></a>
+<span class="sourceLineNo">8265</span>    if (coprocessorHost != null) {<a name="line.8265"></a>
+<span class="sourceLineNo">8266</span>      request = coprocessorHost.preEndpointInvocation(service, methodName, request);<a name="line.8266"></a>
+<span class="sourceLineNo">8267</span>    }<a name="line.8267"></a>
+<span class="sourceLineNo">8268</span><a name="line.8268"></a>
+<span class="sourceLineNo">8269</span>    final com.google.protobuf.Message.Builder responseBuilder =<a name="line.8269"></a>
+<span class="sourceLineNo">8270</span>        service.getResponsePrototype(methodDesc).newBuilderForType();<a name="line.8270"></a>
+<span class="sourceLineNo">8271</span>    service.callMethod(methodDesc, controller, request,<a name="line.8271"></a>
+<span class="sourceLineNo">8272</span>        new com.google.protobuf.RpcCallback&lt;com.google.protobuf.Message&gt;() {<a name="line.8272"></a>
+<span class="sourceLineNo">8273</span>      @Override<a name="line.8273"></a>
+<span class="sourceLineNo">8274</span>      public void run(com.google.protobuf.Message message) {<a name="line.8274"></a>
+<span class="sourceLineNo">8275</span>        if (message != null) {<a name="line.8275"></a>
+<span class="sourceLineNo">8276</span>          responseBuilder.mergeFrom(message);<a name="line.8276"></a>
+<span class="sourceLineNo">8277</span>        }<a name="line.8277"></a>
+<span class="sourceLineNo">8278</span>      }<a name="line.8278"></a>
+<span class="sourceLineNo">8279</span>    });<a name="line.8279"></a>
+<span class="sourceLineNo">8280</span><a name="line.8280"></a>
+<span class="sourceLineNo">8281</span>    if (coprocessorHost != null) {<a name="line.8281"></a>
+<span class="sourceLineNo">8282</span>      coprocessorHost.postEndpointInvocation(service, methodName, request, responseBuilder);<a name="line.8282"></a>
+<span class="sourceLineNo">8283</span>    }<a name="line.8283"></a>
+<span class="sourceLineNo">8284</span>    IOException exception =<a name="line.8284"></a>
+<span class="sourceLineNo">8285</span>        org.apache.hadoop.hbase.ipc.CoprocessorRpcUtils.getControllerException(controller);<a name="line.8285"></a>
+<span class="sourceLineNo">8286</span>    if (exception != null) {<a name="line.8286"></a>
+<span class="sourceLineNo">8287</span>      throw exception;<a name="line.8287"></a>
+<span class="sourceLineNo">8288</span>    }<a name="line.8288"></a>
+<span class="sourceLineNo">8289</span><a name="line.8289"></a>
+<span class="sourceLineNo">8290</span>    return responseBuilder.build();<a name="line.8290"></a>
+<span class="sourceLineNo">8291</span>  }<a name="line.8291"></a>
+<span class="sourceLineNo">8292</span><a name="line.8292"></a>
+<span class="sourceLineNo">8293</span>  boolean shouldForceSplit() {<a name="line.8293"></a>
+<span class="sourceLineNo">8294</span>    return this.splitRequest;<a name="line.8294"></a>
+<span class="sourceLineNo">8295</span>  }<a name="line.8295"></a>
+<span class="sourceLineNo">8296</span><a name="line.8296"></a>
+<span class="sourceLineNo">8297</span>  byte[] getExplicitSplitPoint() {<a name="line.8297"></a>
+<span class="sourceLineNo">8298</span>    return this.explicitSplitPoint;<a name="line.8298"></a>
+<span class="sourceLineNo">8299</span>  }<a name="line.8299"></a>
+<span class="sourceLineNo">8300</span><a name="line.8300"></a>
+<span class="sourceLineNo">8301</span>  void forceSplit(byte[] sp) {<a name="line.8301"></a>
+<span class="sourceLineNo">8302</span>    // This HRegion will go away after the forced split is successful<a name="line.8302"></a>
+<span class="sourceLineNo">8303</span>    // But if a forced split fails, we need to clear forced split.<a name="line.8303"></a>
+<span class="sourceLineNo">8304</span>    this.splitRequest = true;<a name="line.8304"></a>
+<span class="sourceLineNo">8305</span>    if (sp != null) {<a name="line.8305"></a>
+<span class="sourceLineNo">8306</span>      this.explicitSplitPoint = sp;<a name="line.8306"></a>
+<span class="sourceLineNo">8307</span>    }<a name="line.8307"></a>
 <span class="sourceLineNo">8308</span>  }<a name="line.8308"></a>
 <span class="sourceLineNo">8309</span><a name="line.8309"></a>
-<span class="sourceLineNo">8310</span>  byte[] getExplicitSplitPoint() {<a name="line.8310"></a>
-<span class="sourceLineNo">8311</span>    return this.explicitSplitPoint;<a name="line.8311"></a>
-<span class="sourceLineNo">8312</span>  }<a name="line.8312"></a>
-<span class="sourceLineNo">8313</span><a name="line.8313"></a>
-<span class="sourceLineNo">8314</span>  void forceSplit(byte[] sp) {<a name="line.8314"></a>
-<span class="sourceLineNo">8315</span>    // This HRegion will go away after the forced split is successful<a name="line.8315"></a>
-<span class="sourceLineNo">8316</span>    // But if a forced split fails, we need to clear forced split.<a name="line.8316"></a>
-<span class="sourceLineNo">8317</span>    this.splitRequest = true;<a name="line.8317"></a>
-<span class="sourceLineNo">8318</span>    if (sp != null) {<a name="line.8318"></a>
-<span class="sourceLineNo">8319</span>      this.explicitSplitPoint = sp;<a name="line.8319"></a>
-<span class="sourceLineNo">8320</span>    }<a name="line.8320"></a>
-<span class="sourceLineNo">8321</span>  }<a name="line.8321"></a>
-<span class="sourceLineNo">8322</span><a name="line.8322"></a>
-<span class="sourceLineNo">8323</span>  void clearSplit() {<a name="line.8323"></a>
-<span class="sourceLineNo">8324</span>    this.splitRequest = false;<a name="line.8324"></a>
-<span class="sourceLineNo">8325</span>    this.explicitSplitPoint = null;<a name="line.8325"></a>
-<span class="sourceLineNo">8326</span>  }<a name="line.8326"></a>
-<span class="sourceLineNo">8327</span><a name="line.8327"></a>
-<span class="sourceLineNo">8328</span>  /**<a name="line.8328"></a>
-<span class="sourceLineNo">8329</span>   * Return the splitpoint. null indicates the region isn't splittable<a name="line.8329"></a>
-<span class="sourceLineNo">8330</span>   * If the splitpoint isn't explicitly specified, it will go over the stores<a name="line.8330"></a>
-<span class="sourceLineNo">8331</span>   * to find the best splitpoint. Currently the criteria of best splitpoint<a name="line.8331"></a>
-<span class="sourceLineNo">8332</span>   * is based on the size of the store.<a name="line.8332"></a>
-<span class="sourceLineNo">8333</span>   */<a name="line.8333"></a>
-<span class="sourceLineNo">8334</span>  public byte[] checkSplit() {<a name="line.8334"></a>
-<span class="sourceLineNo">8335</span>    // Can't split META<a name="line.8335"></a>
-<span class="sourceLineNo">8336</span>    if (this.getRegionInfo().isMetaRegion()) {<a name="line.8336"></a>
-<span class="sourceLineNo">8337</span>      if (shouldForceSplit()) {<a name="line.8337"></a>
-<span class="sourceLineNo">8338</span>        LOG.warn("Cannot split meta region in HBase 0.20 and above");<a name="line.8338"></a>
-<span class="sourceLineNo">8339</span>      }<a name="line.8339"></a>
-<span class="sourceLineNo">8340</span>      return null;<a name="line.8340"></a>
-<span class="sourceLineNo">8341</span>    }<a name="line.8341"></a>
-<span class="sourceLineNo">8342</span><a name="line.8342"></a>
-<span class="sourceLineNo">8343</span>    // Can't split a region that is closing.<a name="line.8343"></a>
-<span class="sourceLineNo">8344</span>    if (this.isClosing()) {<a name="line.8344"></a>
-<span class="sourceLineNo">8345</span>      return null;<a name="line.8345"></a>
-<span class="sourceLineNo">8346</span>    }<a name="line.8346"></a>
-<span class="sourceLineNo">8347</span><a name="line.8347"></a>
-<span class="sourceLineNo">8348</span>    if (!splitPolicy.shouldSplit()) {<a name="line.8348"></a>
-<span class="sourceLineNo">8349</span>      return null;<a name="line.8349"></a>
-<span class="sourceLineNo">8350</span>    }<a name="line.8350"></a>
+<span class="sourceLineNo">8310</span>  void clearSplit() {<a name="line.8310"></a>
+<span class="sourceLineNo">8311</span>    this.splitRequest = false;<a name="line.8311"></a>
+<span class="sourceLineNo">8312</span>    this.explicitSplitPoint = null;<a name="line.8312"></a>
+<span class="sourceLineNo">8313</span>  }<a name="line.8313"></a>
+<span class="sourceLineNo">8314</span><a name="line.8314"></a>
+<span class="sourceLineNo">8315</span>  /**<a name="line.8315"></a>
+<span class="sourceLineNo">8316</span>   * Return the splitpoint. null indicates the region isn't splittable<a name="line.8316"></a>
+<span class="sourceLineNo">8317</span>   * If the splitpoint isn't explicitly specified, it will go over the stores<a name="line.8317"></a>
+<span class="sourceLineNo">8318</span>   * to find the best splitpoint. Currently the criteria of best splitpoint<a name="line.8318"></a>
+<span class="sourceLineNo">8319</span>   * is based on the size of the store.<a name="line.8319"></a>
+<span class="sourceLineNo">8320</span>   */<a name="line.8320"></a>
+<span class="sourceLineNo">8321</span>  public byte[] checkSplit() {<a name="line.8321"></a>
+<span class="sourceLineNo">8322</span>    // Can't split META<a name="line.8322"></a>
+<span class="sourceLineNo">8323</span>    if (this.getRegionInfo().isMetaRegion()) {<a name="line.8323"></a>
+<span class="sourceLineNo">8324</span>      if (shouldForceSplit()) {<a name="line.8324"></a>
+<span class="sourceLineNo">8325</span>        LOG.warn("Cannot split meta region in HBase 0.20 and above");<a name="line.8325"></a>
+<span class="sourceLineNo">8326</span>      }<a name="line.8326"></a>
+<span class="sourceLineNo">8327</span>      return null;<a name="line.8327"></a>
+<span class="sourceLineNo">8328</span>    }<a name="line.8328"></a>
+<span class="sourceLineNo">8329</span><a name="line.8329"></a>
+<span class="sourceLineNo">8330</span>    // Can't split a region that is closing.<a name="line.8330"></a>
+<span class="sourceLineNo">8331</span>    if (this.isClosing()) {<a name="line.8331"></a>
+<span class="sourceLineNo">8332</span>      return null;<a name="line.8332"></a>
+<span class="sourceLineNo">8333</span>    }<a name="line.8333"></a>
+<span class="sourceLineNo">8334</span><a name="line.8334"></a>
+<span class="sourceLineNo">8335</span>    if (!splitPolicy.shouldSplit()) {<a name="line.8335"></a>
+<span class="sourceLineNo">8336</span>      return null;<a name="line.8336"></a>
+<span class="sourceLineNo">8337</span>    }<a name="line.8337"></a>
+<span class="sourceLineNo">8338</span><a name="line.8338"></a>
+<span class="sourceLineNo">8339</span>    byte[] ret = splitPolicy.getSplitPoint();<a name="line.8339"></a>
+<span class="sourceLineNo">8340</span><a name="line.8340"></a>
+<span class="sourceLineNo">8341</span>    if (ret != null) {<a name="line.8341"></a>
+<span class="sourceLineNo">8342</span>      try {<a name="line.8342"></a>
+<span class="sourceLineNo">8343</span>        checkRow(ret, "calculated split");<a name="line.8343"></a>
+<span class="sourceLineNo">8344</span>      } catch (IOException e) {<a name="line.8344"></a>
+<span class="sourceLineNo">8345</span>        LOG.error("Ignoring invalid split", e);<a name="line.8345"></a>
+<span class="sourceLineNo">8346</span>        return null;<a name="line.8346"></a>
+<span class="sourceLineNo">8347</span>      }<a name="line.8347"></a>
+<span class="sourceLineNo">8348</span>    }<a name="line.8348"></a>
+<span class="sourceLineNo">8349</span>    return ret;<a name="line.8349"></a>
+<span class="sourceLineNo">8350</span>  }<a name="line.8350"></a>
 <span class="sourceLineNo">8351</span><a name="line.8351"></a>
-<span class="sourceLineNo">8352</span>    byte[] ret = splitPolicy.getSplitPoint();<a name="line.8352"></a>
-<span class="sourceLineNo">8353</span><a name="line.8353"></a>
-<span class="sourceLineNo">8354</span>    if (ret != null) {<a name="line.8354"></a>
-<span class="sourceLineNo">8355</span>      try {<a name="line.8355"></a>
-<span class="sourceLineNo">8356</span>        checkRow(ret, "calculated split");<a name="line.8356"></a>
-<span class="sourceLineNo">8357</span>      } catch (IOException e) {<a name="line.8357"></a>
-<span class="sourceLineNo">8358</span>        LOG.error("Ignoring invalid split", e);<a name="line.8358"></a>
-<span class="sourceLineNo">8359</span>        return null;<a name="line.8359"></a>
-<span class="sourceLineNo">8360</span>      }<a name="line.8360"></a>
-<span class="sourceLineNo">8361</span>    }<a name="line.8361"></a>
-<span class="sourceLineNo">8362</span>    return ret;<a name="line.8362"></a>
+<span class="sourceLineNo">8352</span>  /**<a name="line.8352"></a>
+<span class="sourceLineNo">8353</span>   * @return The priority that this region should have in the compaction queue<a name="line.8353"></a>
+<span class="sourceLineNo">8354</span>   */<a name="line.8354"></a>
+<span class="sourceLineNo">8355</span>  public int getCompactPriority() {<a name="line.8355"></a>
+<span class="sourceLineNo">8356</span>    return stores.values().stream().mapToInt(HStore::getCompactPriority).min()<a name="line.8356"></a>
+<span class="sourceLineNo">8357</span>        .orElse(Store.NO_PRIORITY);<a name="line.8357"></a>
+<span class="sourceLineNo">8358</span>  }<a name="line.8358"></a>
+<span class="sourceLineNo">8359</span><a name="line.8359"></a>
+<span class="sourceLineNo">8360</span>  /** @return the coprocessor host */<a name="line.8360"></a>
+<span class="sourceLineNo">8361</span>  public RegionCoprocessorHost getCoprocessorHost() {<a name="line.8361"></a>
+<span class="sourceLineNo">8362</span>    return coprocessorHost;<a name="line.8362"></a>
 <span class="sourceLineNo">8363</span>  }<a name="line.8363"></a>
 <span class="sourceLineNo">8364</span><a name="line.8364"></a>
-<span class="sourceLineNo">8365</span>  /**<a name="line.8365"></a>
-<span class="sourceLineNo">8366</span>   * @return The priority that this region should have in the compaction queue<a name="line.8366"></a>
-<span class="sourceLineNo">8367</span>   */<a name="line.8367"></a>
-<span class="sourceLineNo">8368</span>  public int getCompactPriority() {<a name="line.8368"></a>
-<span class="sourceLineNo">8369</span>    return stores.values().stream().mapToInt(HStore::getCompactPriority).min()<a name="line.8369"></a>
-<span class="sourceLineNo">8370</span>        .orElse(Store.NO_PRIORITY);<a name="line.8370"></a>
-<span class="sourceLineNo">8371</span>  }<a name="line.8371"></a>
-<span class="sourceLineNo">8372</span><a name="line.8372"></a>
-<span class="sourceLineNo">8373</span>  /** @return the coprocessor host */<a name="line.8373"></a>
-<span class="sourceLineNo">8374</span>  public RegionCoprocessorHost getCoprocessorHost() {<a name="line.8374"></a>
-<span class="sourceLineNo">8375</span>    return coprocessorHost;<a name="line.8375"></a>
-<span class="sourceLineNo">8376</span>  }<a name="line.8376"></a>
-<span class="sourceLineNo">8377</span><a name="line.8377"></a>
-<span class="sourceLineNo">8378</span>  /** @param coprocessorHost the new coprocessor host */<a name="line.8378"></a>
-<span class="sourceLineNo">8379</span>  @VisibleForTesting<a name="line.8379"></a>
-<span class="sourceLineNo">8380</span>  public void setCoprocessorHost(final RegionCoprocessorHost coprocessorHost) {<a name="line.8380"></a>
-<span class="sourceLineNo">8381</span>    this.coprocessorHost = coprocessorHost;<a name="line.8381"></a>
-<span class="sourceLineNo">8382</span>  }<a name="line.8382"></a>
-<span class="sourceLineNo">8383</span><a name="line.8383"></a>
-<span class="sourceLineNo">8384</span>  @Override<a name="line.8384"></a>
-<span class="sourceLineNo">8385</span>  public void startRegionOperation() throws IOException {<a name="line.8385"></a>
-<span class="sourceLineNo">8386</span>    startRegionOperation(Operation.ANY);<a name="line.8386"></a>
-<span class="sourceLineNo">8387</span>  }<a name="line.8387"></a>
-<span class="sourceLineNo">8388</span><a name="line.8388"></a>
-<span class="sourceLineNo">8389</span>  @Override<a name="line.8389"></a>
-<span class="sourceLineNo">8390</span>  public void startRegionOperation(Operation op) throws IOException {<a name="line.8390"></a>
-<span class="sourceLineNo">8391</span>    switch (op) {<a name="line.8391"></a>
-<span class="sourceLineNo">8392</span>      case GET:  // read operations<a name="line.8392"></a>
-<span class="sourceLineNo">8393</span>      case SCAN:<a name="line.8393"></a>
-<span class="sourceLineNo">8394</span>        checkReadsEnabled();<a name="line.8394"></a>
-<span class="sourceLineNo">8395</span>        break;<a name="line.8395"></a>
-<span class="sourceLineNo">8396</span>      default:<a name="line.8396"></a>
-<span class="sourceLineNo">8397</span>        break;<a name="line.8397"></a>
-<span class="sourceLineNo">8398</span>    }<a name="line.8398"></a>
-<span class="sourceLineNo">8399</span>    if (op == Operation.MERGE_REGION || op == Operation.SPLIT_REGION<a name="line.8399"></a>
-<span class="sourceLineNo">8400</span>        || op == Operation.COMPACT_REGION || op == Operation.COMPACT_SWITCH) {<a name="line.8400"></a>
-<span class="sourceLineNo">8401</span>      // split, merge or compact region doesn't need to check the closing/closed state or lock the<a name="line.8401"></a>
-<span class="sourceLineNo">8402</span>      // region<a name="line.8402"></a>
-<span class="sourceLineNo">8403</span>      return;<a name="line.8403"></a>
+<span class="sourceLineNo">8365</span>  /** @param coprocessorHost the new coprocessor host */<a name="line.8365"></a>
+<span class="sourceLineNo">8366</span>  @VisibleForTesting<a name="line.8366"></a>
+<span class="sourceLineNo">8367</span>  public void setCoprocessorHost(final RegionCoprocessorHost coprocessorHost) {<a name="line.8367"></a>
+<span class="sourceLineNo">8368</span>    this.coprocessorHost = coprocessorHost;<a name="line.8368"></a>
+<span class="sourceLineNo">8369</span>  }<a name="line.8369"></a>
+<span class="sourceLineNo">8370</span><a name="line.8370"></a>
+<span class="sourceLineNo">8371</span>  @Override<a name="line.8371"></a>
+<span class="sourceLineNo">8372</span>  public void startRegionOperation() throws IOException {<a name="line.8372"></a>
+<span class="sourceLineNo">8373</span>    startRegionOperation(Operation.ANY);<a name="line.8373"></a>
+<span class="sourceLineNo">8374</span>  }<a name="line.8374"></a>
+<span class="sourceLineNo">8375</span><a name="line.8375"></a>
+<span class="sourceLineNo">8376</span>  @Override<a name="line.8376"></a>
+<span class="sourceLineNo">8377</span>  public void startRegionOperation(Operation op) throws IOException {<a name="line.8377"></a>
+<span class="sourceLineNo">8378</span>    switch (op) {<a name="line.8378"></a>
+<span class="sourceLineNo">8379</span>      case GET:  // read operations<a name="line.8379"></a>
+<span class="sourceLineNo">8380</span>      case SCAN:<a name="line.8380"></a>
+<span class="sourceLineNo">8381</span>        checkReadsEnabled();<a name="line.8381"></a>
+<span class="sourceLineNo">8382</span>        break;<a name="line.8382"></a>
+<span class="sourceLineNo">8383</span>      default:<a name="line.8383"></a>
+<span class="sourceLineNo">8384</span>        break;<a name="line.8384"></a>
+<span class="sourceLineNo">8385</span>    }<a name="line.8385"></a>
+<span class="sourceLineNo">8386</span>    if (op == Operation.MERGE_REGION || op == Operation.SPLIT_REGION<a name="line.8386"></a>
+<span class="sourceLineNo">8387</span>        || op == Operation.COMPACT_REGION || op == Operation.COMPACT_SWITCH) {<a name="line.8387"></a>
+<span class="sourceLineNo">8388</span>      // split, merge or compact region doesn't need to check the closing/closed state or lock the<a name="line.8388"></a>
+<span class="sourceLineNo">8389</span>      // region<a name="line.8389"></a>
+<span class="sourceLineNo">8390</span>      return;<a name="line.8390"></a>
+<span class="sourceLineNo">8391</span>    }<a name="line.8391"></a>
+<span class="sourceLineNo">8392</span>    if (this.closing.get()) {<a name="line.8392"></a>
+<span class="sourceLineNo">8393</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closing");<a name="line.8393"></a>
+<span class="sourceLineNo">8394</span>    }<a name="line.8394"></a>
+<span class="sourceLineNo">8395</span>    lock(lock.readLock());<a name="line.8395"></a>
+<span class="sourceLineNo">8396</span>    if (this.closed.get()) {<a name="line.8396"></a>
+<span class="sourceLineNo">8397</span>      lock.readLock().unlock();<a name="line.8397"></a>
+<span class="sourceLineNo">8398</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closed");<a name="line.8398"></a>
+<span class="sourceLineNo">8399</span>    }<a name="line.8399"></a>
+<span class="sourceLineNo">8400</span>    // The unit for snapshot is a region. So, all stores for this region must be<a name="line.8400"></a>
+<span class="sourceLineNo">8401</span>    // prepared for snapshot operation before proceeding.<a name="line.8401"></a>
+<span class="sourceLineNo">8402</span>    if (op == Operation.SNAPSHOT) {<a name="line.8402"></a>
+<span class="sourceLineNo">8403</span>      stores.values().forEach(HStore::preSnapshotOperation);<a name="line.8403"></a>
 <span class="sourceLineNo">8404</span>    }<a name="line.8404"></a>
-<span class="sourceLineNo">8405</span>    if (this.closing.get()) {<a name="line.8405"></a>
-<span class="sourceLineNo">8406</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closing");<a name="line.8406"></a>
-<span class="sourceLineNo">8407</span>    }<a name="line.8407"></a>
-<span class="sourceLineNo">8408</span>    lock(lock.readLock());<a name="line.8408"></a>
-<span class="sourceLineNo">8409</span>    if (this.closed.get()) {<a name="line.8409"></a>
+<span class="sourceLineNo">8405</span>    try {<a name="line.8405"></a>
+<span class="sourceLineNo">8406</span>      if (coprocessorHost != null) {<a name="line.8406"></a>
+<span class="sourceLineNo">8407</span>        coprocessorHost.postStartRegionOperation(op);<a name="line.8407"></a>
+<span class="sourceLineNo">8408</span>      }<a name="line.8408"></a>
+<span class="sourceLineNo">8409</span>    } catch (Exception e) {<a name="line.8409"></a>
 <span class="sourceLineNo">8410</span>      lock.readLock().unlock();<a name="line.8410"></a>
-<span class="sourceLineNo">8411</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closed");<a name="line.8411"></a>
+<span class="sourceLineNo">8411</span>      throw new IOException(e);<a name="line.8411"></a>
 <span class="sourceLineNo">8412</span>    }<a name="line.8412"></a>
-<span class="sourceLineNo">8413</span>    // The unit for snapshot is a region. So, all stores for this region must be<a name="line.8413"></a>
-<span class="sourceLineNo">8414</span>    // prepared for snapshot operation before proceeding.<a name="line.8414"></a>
-<span class="sourceLineNo">8415</span>    if (op == Operation.SNAPSHOT) {<a name="line.8415"></a>
-<span class="sourceLineNo">8416</span>      stores.values().forEach(HStore::preSnapshotOperation);<a name="line.8416"></a>
-<span class="sourceLineNo">8417</span>    }<a name="line.8417"></a>
-<span class="sourceLineNo">8418</span>    try {<a name="line.8418"></a>
-<span class="sourceLineNo">8419</span>      if (coprocessorHost != null) {<a name="line.8419"></a>
-<span class="sourceLineNo">8420</span>        coprocessorHost.postStartRegionOperation(op);<a name="line.8420"></a>
-<span class="sourceLineNo">8421</span>      }<a name="line.8421"></a>
-<span class="sourceLineNo">8422</span>    } catch (Exception e) {<a name="line.8422"></a>
-<span class="sourceLineNo">8423</span>      lock.readLock().unlock();<a name="line.8423"></a>
-<span class="sourceLineNo">8424</span>      throw new IOException(e);<a name="line.8424"></a>
-<span class="sourceLineNo">8425</span>    }<a name="line.8425"></a>
-<span class="sourceLineNo">8426</span>  }<a name="line.8426"></a>
-<span class="sourceLineNo">8427</span><a name="line.8427"></a>
-<span class="sourceLineNo">8428</span>  @Override<a name="line.8428"></a>
-<span class="sourceLineNo">8429</span>  public void closeRegionOperation() throws IOException {<a name="line.8429"></a>
-<span class="sourceLineNo">8430</span>    closeRegionOperation(Operation.ANY);<a name="line.8430"></a>
-<span class="sourceLineNo">8431</span>  }<a name="line.8431"></a>
-<span class="sourceLineNo">8432</span><a name="line.8432"></a>
-<span class="sourceLineNo">8433</span>  @Override<a name="line.8433"></a>
-<span class="sourceLineNo">8434</span>  public void closeRegionOperation(Operation operation) throws IOException {<a name="line.8434"></a>
-<span class="sourceLineNo">8435</span>    if (operation == Operation.SNAPSHOT) {<a name="line.8435"></a>
-<span class="sourceLineNo">8436</span>      stores.values().forEach(HStore::postSnapshotOperation);<a name="line.8436"></a>
-<span class="sourceLineNo">8437</span>    }<a name="line.8437"></a>
-<span class="sourceLineNo">8438</span>    lock.readLock().unlock();<a name="line.8438"></a>
-<span class="sourceLineNo">8439</span>    if (coprocessorHost != null) {<a name="line.8439"></a>
-<span class="sourceLineNo">8440</span>      coprocessorHost.postCloseRegionOperation(operation);<a name="line.8440"></a>
-<span class="sourceLineNo">8441</span>    }<a name="line.8441"></a>
-<span class="sourceLineNo">8442</span>  }<a name="line.8442"></a>
-<span class="sourceLineNo">8443</span><a name="line.8443"></a>
-<span class="sourceLineNo">8444</span>  /**<a name="line.8444"></a>
-<span class="sourceLineNo">8445</span>   * This method needs to be called before any public call that reads or<a name="line.8445"></a>
-<span class="sourceLineNo">8446</span>   * modifies stores in bulk. It has to be called just before a try.<a name="line.8446"></a>
-<span class="sourceLineNo">8447</span>   * #closeBulkRegionOperation needs to be called in the try's finally block<a name="line.8447"></a>
-<span class="sourceLineNo">8448</span>   * Acquires a writelock and checks if the region is closing or closed.<a name="line.8448"></a>
-<span class="sourceLineNo">8449</span>   * @throws NotServingRegionException when the region is closing or closed<a name="line.8449"></a>
-<span class="sourceLineNo">8450</span>   * @throws RegionTooBusyException if failed to get the lock in time<a name="line.8450"></a>
-<span class="sourceLineNo">8451</span>   * @throws InterruptedIOException if interrupted while waiting for a lock<a name="line.8451"></a>
-<span class="sourceLineNo">8452</span>   */<a name="line.8452"></a>
-<span class="sourceLineNo">8453</span>  private void startBulkRegionOperation(boolean writeLockNeeded)<a name="line.8453"></a>
-<span class="sourceLineNo">8454</span>      throws NotServingRegionException, RegionTooBusyException, InterruptedIOException {<a name="line.8454"></a>
-<span class="sourceLineNo">8455</span>    if (this.closing.get()) {<a name="line.8455"></a>
-<span class="sourceLineNo">8456</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closing");<a name="line.8456"></a>
-<span class="sourceLineNo">8457</span>    }<a name="line.8457"></a>
-<span class="sourceLineNo">8458</span>    if (writeLockNeeded) lock(lock.writeLock());<a name="line.8458"></a>
-<span class="sourceLineNo">8459</span>    else lock(lock.readLock());<a name="line.8459"></a>
-<span class="sourceLineNo">8460</span>    if (this.closed.get()) {<a name="line.8460"></a>
-<span class="sourceLineNo">8461</span>      if (writeLockNeeded) lock.writeLock().unlock();<a name="line.8461"></a>
-<span class="sourceLineNo">8462</span>      else lock.readLock().unlock();<a name="line.8462"></a>
-<span class="sourceLineNo">8463</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closed");<a name="line.8463"></a>
-<span class="sourceLineNo">8464</span>    }<a name="line.8464"></a>
-<span class="sourceLineNo">8465</span>  }<a name="line.8465"></a>
-<span class="sourceLineNo">8466</span><a name="line.8466"></a>
-<span class="sourceLineNo">8467</span>  /**<a name="line.8467"></a>
-<span class="sourceLineNo">8468</span>   * Closes the lock. This needs to be called in the finally block corresponding<a name="line.8468"></a>
-<span class="sourceLineNo">8469</span>   * to the try block of #startRegionOperation<a name="line.8469"></a>
-<span class="sourceLineNo">8470</span>   */<a name="line.8470"></a>
-<span class="sourceLineNo">8471</span>  private void closeBulkRegionOperation(){<a name="line.8471"></a>
-<span class="sourceLineNo">8472</span>    if (lock.writeLock().isHeldByCurrentThread()) lock.writeLock().unlock();<a name="line.8472"></a>
-<span class="sourceLineNo">8473</span>    else lock.readLock().unlock();<a name="line.8473"></a>
-<span class="sourceLineNo">8474</span>  }<a name="line.8474"></a>
-<span class="sourceLineNo">8475</span><a name="line.8475"></a>
-<span class="sourceLineNo">8476</span>  /**<a name="line.8476"></a>
-<span class="sourceLineNo">8477</span>   * Update LongAdders for number of puts without wal and the size of possible data loss.<a name="line.8477"></a>
-<span class="sourceLineNo">8478</span>   * These information are exposed by the region server metrics.<a name="line.8478"></a>
-<span class="sourceLineNo">8479</span>   */<a name="line.8479"></a>
-<span class="sourceLineNo">8480</span>  private void recordMutationWithoutWal(final Map&lt;byte [], List&lt;Cell&gt;&gt; familyMap) {<a name="line.8480"></a>
-<span class="sourceLineNo">8481</span>    numMutationsWithoutWAL.increment();<a name="line.8481"></a>
-<span class="sourceLineNo">8482</span>    if (numMutationsWithoutWAL.sum() &lt;= 1) {<a name="line.8482"></a>
-<span class="sourceLineNo">8483</span>      LOG.info("writing data to region " + this +<a name="line.8483"></a>
-<span class="sourceLineNo">8484</span>               " with WAL disabled. Data may be lost in the event of a crash.");<a name="line.8484"></a>
-<span class="sourceLineNo">8485</span>    }<a name="line.8485"></a>
-<span class="sourceLineNo">8486</span><a name="line.8486"></a>
-<span class="sourceLineNo">8487</span>    long mutationSize = 0;<a name="line.8487"></a>
-<span class="sourceLineNo">8488</span>    for (List&lt;Cell&gt; cells: familyMap.values()) {<a name="line.8488"></a>
-<span class="sourceLineNo">8489</span>      // Optimization: 'foreach' loop is not used. See:<a name="line.8489"></a>
-<span class="sourceLineNo">8490</span>      // HBASE-12023 HRegion.applyFamilyMapToMemstore creates too many iterator objects<a name="line.8490"></a>
-<span class="sourceLineNo">8491</span>      assert cells instanceof RandomAccess;<a name="line.8491"></a>
-<span class="sourceLineNo">8492</span>      int listSize = cells.size();<a name="line.8492"></a>
-<span class="sourceLineNo">8493</span>      for (int i=0; i &lt; listSize; i++) {<a name="line.8493"></a>
-<span class="sourceLineNo">8494</span>        Cell cell = cells.get(i);<a name="line.8494"></a>
-<span class="sourceLineNo">8495</span>        mutationSize += KeyValueUtil.length(cell);<a name="line.8495"></a>
-<span class="sourceLineNo">8496</span>      }<a name="line.8496"></a>
-<span class="sourceLineNo">8497</span>    }<a name="line.8497"></a>
-<span class="sourceLineNo">8498</span><a name="line.8498"></a>
-<span class="sourceLineNo">8499</span>    dataInMemoryWithoutWAL.add(mutationSize);<a name="line.8499"></a>
-<span class="sourceLineNo">8500</span>  }<a name="line.8500"></a>
-<span class="sourceLineNo">8501</span><a name="line.8501"></a>
-<span class="sourceLineNo">8502</span>  private void lock(final Lock lock) throws RegionTooBusyException, InterruptedIOException {<a name="line.8502"></a>
-<span class="sourceLineNo">8503</span>    lock(lock, 1);<a name="line.8503"></a>
-<span class="sourceLineNo">8504</span>  }<a name="line.8504"></a>
-<span class="sourceLineNo">8505</span><a name="line.8505"></a>
-<span class="sourceLineNo">8506</span>  /**<a name="line.8506"></a>
-<span class="sourceLineNo">8507</span>   * Try to acquire a lock.  Throw RegionTooBusyException<a name="line.8507"></a>
-<span class="sourceLineNo">8508</span>   * if failed to get the lock in time. Throw InterruptedIOException<a name="line.8508"></a>
-<span class="sourceLineNo">8509</span>   * if interrupted while waiting for the lock.<a name="line.8509"></a>
-<span class="sourceLineNo">8510</span>   */<a name="line.8510"></a>
-<span class="sourceLineNo">8511</span>  private void lock(final Lock lock, final int multiplier)<a name="line.8511"></a>
-<span class="sourceLineNo">8512</span>      throws RegionTooBusyException, InterruptedIOException {<a name="line.8512"></a>
-<span class="sourceLineNo">8513</span>    try {<a name="line.8513"></a>
-<span class="sourceLineNo">8514</span>      final long waitTime = Math.min(maxBusyWaitDuration,<a name="line.8514"></a>
-<span class="sourceLineNo">8515</span>          busyWaitDuration * Math.min(multiplier, maxBusyWaitMultiplier));<a name="line.8515"></a>
-<span class="sourceLineNo">8516</span>      if (!lock.tryLock(waitTime, TimeUnit.MILLISECONDS)) {<a name="line.8516"></a>
-<span class="sourceLineNo">8517</span>        // Don't print millis. Message is used as a key over in<a name="line.8517"></a>
-<span class="sourceLineNo">8518</span>        // RetriesExhaustedWithDetailsException processing.<a name="line.8518"></a>
-<span class="sourceLineNo">8519</span>        throw new RegionTooBusyException("Failed to obtain lock; regionName=" +<a name="line.8519"></a>
-<span class="sourceLineNo">8520</span>            (this.getRegionInfo() == null? "unknown":<a name="line.8520"></a>
-<span class="sourceLineNo">8521</span>                this.getRegionInfo().getRegionNameAsString()) +<a name="line.8521"></a>
-<span class="sourceLineNo">8522</span>            ", server=" + (this.getRegionServerServices() == null? "unknown":<a name="line.8522"></a>
-<span class="sourceLineNo">8523</span>                this.getRegionServerServices().getServerName()));<a name="line.8523"></a>
-<span class="sourceLineNo">8524</span>      }<a name="line.8524"></a>
-<span class="sourceLineNo">8525</span>    } catch (InterruptedException ie) {<a name="line.8525"></a>
-<span class="sourceLineNo">8526</span>      LOG.info("Interrupted while waiting for a lock");<a name="line.8526"></a>
-<span class="sourceLineNo">8527</span>      InterruptedIOException iie = new InterruptedIOException();<a name="line.8527"></a>
-<span class="sourceLineNo">8528</span>      iie.initCause(ie);<a name="line.8528"></a>
-<span class="sourceLineNo">8529</span>      throw iie;<a name="line.8529"></a>
-<span class="sourceLineNo">8530</span>    }<a name="line.8530"></a>
-<span class="sourceLineNo">8531</span>  }<a name="line.8531"></a>
-<span class="sourceLineNo">8532</span><a name="line.8532"></a>
-<span class="sourceLineNo">8533</span>  /**<a name="line.8533"></a>
-<span class="sourceLineNo">8534</span>   * Calls sync with the given transaction ID<a name="line.8534"></a>
-<span class="sourceLineNo">8535</span>   * @param txid should sync up to which transaction<a name="line.8535"></a>
-<span class="sourceLineNo">8536</span>   * @throws IOException If anything goes wrong with DFS<a name="line.8536"></a>
-<span class="sourceLineNo">8537</span>   */<a name="line.8537"></a>
-<span class="sourceLineNo">8538</span>  private void sync(long txid, Durability durability) throws IOException {<a name="line.8538"></a>
-<span class="sourceLineNo">8539</span>    if (this.getRegionInfo().isMetaRegion()) {<a name="line.8539"></a>
-<span class="sourceLineNo">8540</span>      this.wal.sync(txid);<a name="line.8540"></a>
-<span class="sourceLineNo">8541</span>    } else {<a name="line.8541"></a>
-<span class="sourceLineNo">8542</span>      switch(durability) {<a name="line.8542"></a>
-<span class="sourceLineNo">8543</span>      case USE_DEFAULT:<a name="line.8543"></a>
-<span class="sourceLineNo">8544</span>        // do what table defaults to<a name="line.8544"></a>
-<span class="sourceLineNo">8545</span>        if (shouldSyncWAL()) {<a name="line.8545"></a>
-<span class="sourceLineNo">8546</span>          this.wal.sync(txid);<a name="line.8546"></a>
-<span class="sourceLineNo">8547</span>        }<a name="line.8547"></a>
-<span class="sourceLineNo">8548</span>        break;<a name="line.8548"></a>
-<span class="sourceLineNo">8549</span>      case SKIP_WAL:<a name="line.8549"></a>
-<span class="sourceLineNo">8550</span>        // nothing do to<a name="line.8550"></a>
-<span class="sourceLineNo">8551</span>        break;<a name="line.8551"></a>
-<span class="sourceLineNo">8552</span>      case ASYNC_WAL:<a name="line.8552"></a>
-<span class="sourceLineNo">8553</span>        // nothing do to<a name="line.8553"></a>
-<span class="sourceLineNo">8554</span>        break;<a name="line.8554"></a>
-<span class="sourceLineNo">8555</span>      case SYNC_WAL:<a name="line.8555"></a>
-<span class="sourceLineNo">8556</span>          this.wal.sync(txid, false);<a name="line.8556"></a>
-<span class="sourceLineNo">8557</span>          break;<a name="line.8557"></a>
-<span class="sourceLineNo">8558</span>      case FSYNC_WAL:<a name="line.8558"></a>
-<span class="sourceLineNo">8559</span>          this.wal.sync(txid, true);<a name="line.8559"></a>
-<span class="sourceLineNo">8560</span>          break;<a name="line.8560"></a>
-<span class="sourceLineNo">8561</span>      default:<a name="line.8561"></a>
-<span class="sourceLineNo">8562</span>        throw new RuntimeException("Unknown durability " + durability);<a name="line.8562"></a>
-<span class="sourceLineNo">8563</span>      }<a name="line.8563"></a>
-<span class="sourceLineNo">8564</span>    }<a name="line.8564"></a>
-<span class="sourceLineNo">8565</span>  }<a name="line.8565"></a>
-<span class="sourceLineNo">8566</span><a name="line.8566"></a>
-<span class="sourceLineNo">8567</span>  /**<a name="line.8567"></a>
-<span class="sourceLineNo">8568</span>   * Check whether we should sync the wal from the table's durability settings<a name="line.8568"></a>
-<span class="sourceLineNo">8569</span>   */<a name="line.8569"></a>
-<span class="sourceLineNo">8570</span>  private boolean shouldSyncWAL() {<a name="line.8570"></a>
-<span class="sourceLineNo">8571</span>    return regionDurability.ordinal() &gt;  Durability.ASYNC_WAL.ordinal();<a name="line.8571"></a>
-<span class="sourceLineNo">8572</span>  }<a name="line.8572"></a>
-<span class="sourceLineNo">8573</span><a name="line.8573"></a>
-<span class="sourceLineNo">8574</span>  /**<a name="line.8574"></a>
-<span class="sourceLineNo">8575</span>   * A mocked list implementation - discards all updates.<a name="line.8575"></a>
-<span class="sourceLineNo">8576</span>   */<a name="line.8576"></a>
-<span class="sourceLineNo">8577</span>  private static final List&lt;Cell&gt; MOCKED_LIST = new AbstractList&lt;Cell&gt;() {<a name="line.8577"></a>
-<span class="sourceLineNo">8578</span><a name="line.8578"></a>
-<span class="sourceLineNo">8579</span>    @Override<a name="line.8579"></a>
-<span class="sourceLineNo">8580</span>    public void add(int index, Cell element) {<a name="line.8580"></a>
-<span class="sourceLineNo">8581</span>      // do nothing<a name="line.8581"></a>
-<span class="sourceLineNo">8582</span>    }<a name="line.8582"></a>
-<span class="sourceLineNo">8583</span><a name="line.8583"></a>
-<span class="sourceLineNo">8584</span>    @Override<a name="line.8584"></a>
-<span class="sourceLineNo">8585</span>    public boolean addAll(int index, Collection&lt;? extends Cell&gt; c) {<a name="line.8585"></a>
-<span class="sourceLineNo">8586</span>      return false; // this list is never changed as a result of an update<a name="line.8586"></a>
-<span class="sourceLineNo">8587</span>    }<a name="line.8587"></a>
-<span class="sourceLineNo">8588</span><a name="line.8588"></a>
-<span class="sourceLineNo">8589</span>    @Override<a name="line.8589"></a>
-<span class="sourceLineNo">8590</span>    public KeyValue get(int index) {<a name="line.8590"></a>
-<span class="sourceLineNo">8591</span>      throw new UnsupportedOperationException();<a name="line.8591"></a>
-<span class="sourceLineNo">8592</span>    }<a name="line.8592"></a>
-<span class="sourceLineNo">8593</span><a name="line.8593"></a>
-<span class="sourceLineNo">8594</span>    @Override<a name="line.8594"></a>
-<span class="sourceLineNo">8595</span>    public int size() {<a name="line.8595"></a>
-<span class="sourceLineNo">8596</span>      return 0;<a name="line.8596"></a>
-<span class="sourceLineNo">8597</span>    }<a name="line.8597"></a>
-<span class="sourceLineNo">8598</span>  };<a name="line.8598"></a>
-<span class="sourceLineNo">8599</span><a name="line.8599"></a>
-<span class="sourceLineNo">8600</span>  /** @return the latest sequence number that was read from storage when this region was opened */<a name="line.8600"></a>
-<span class="sourceLineNo">8601</span>  public long getOpenSeqNum() {<a name="line.8601"></a>
-<span class="sourceLineNo">8602</span>    return this.openSeqNum;<a name="line.8602"></a>
-<span class="sourceLineNo">8603</span>  }<a name="line.8603"></a>
-<span class="sourceLineNo">8604</span><a name="line.8604"></a>
-<span class="sourceLineNo">8605</span>  @Override<a name="line.8605"></a>
-<span class="sourceLineNo">8606</span>  public Map&lt;byte[], Long&gt; getMaxStoreSeqId() {<a name="line.8606"></a>
-<span class="sourceLineNo">8607</span>    return this.maxSeqIdInStores;<a name="line.8607"></a>
-<span class="sourceLineNo">8608</span>  }<a name="line.8608"></a>
-<span class="sourceLineNo">8609</span><a name="line.8609"></a>
-<span class="sourceLineNo">8610</span>  public long getOldestSeqIdOfStore(byte[] familyName) {<a name="line.8610"></a>
-<span class="sourceLineNo">8611</span>    return wal.getEarliestMemStoreSeqNum(getRegionInfo().getEncodedNameAsBytes(), familyName);<a name="line.8611"></a>
-<span class="sourceLineNo">8612</span>  }<a name="line.8612"></a>
-<span class="sourceLineNo">8613</span><a name="line.8613"></a>
-<span class="sourceLineNo">8614</span>  @Override<a name="line.8614"></a>
-<span class="sourceLineNo">8615</span>  public CompactionState getCompactionState() {<a name="line.8615"></a>
-<span class="sourceLineNo">8616</span>    boolean hasMajor = majorInProgress.get() &gt; 0, hasMinor = minorInProgress.get() &gt; 0;<a name="line.8616"></a>
-<span class="sourceLineNo">8617</span>    return (hasMajor ? (hasMinor ? CompactionState.MAJOR_AND_MINOR : CompactionState.MAJOR)<a name="line.8617"></a>
-<span class="sourceLineNo">8618</span>        : (hasMinor ? CompactionState.MINOR : CompactionState.NONE));<a name="line.8618"></a>
-<span class="sourceLineNo">8619</span>  }<a name="line.8619"></a>
-<span class="sourceLineNo">8620</span><a name="line.8620"></a>
-<span class="sourceLineNo">8621</span>  public void reportCompactionRequestStart(boolean isMajor){<a name="line.8621"></a>
-<span class="sourceLineNo">8622</span>    (isMajor ? majorInProgress : minorInProgress).incrementAndGet();<a name="line.8622"></a>
-<span class="sourceLineNo">8623</span>  }<a name="line.8623"></a>
-<span class="sourceLineNo">8624</span><a name="line.8624"></a>
-<span class="sourceLineNo">8625</span>  public void reportCompactionRequestEnd(boolean isMajor, int numFiles, long filesSizeCompacted) {<a name="line.8625"></a>
-<span class="sourceLineNo">8626</span>    int newValue = (isMajor ? majorInProgress : minorInProgress).decrementAndGet();<a name="line.8626"></a>
-<span class="sourceLineNo">8627</span><a name="line.8627"></a>
-<span class="sourceLineNo">8628</span>    // metrics<a name="line.8628"></a>
-<span class="sourceLineNo">8629</span>    compactionsFinished.increment();<a name="line.8629"></a>
-<span class="sourceLineNo">8630</span>    compactionNumFilesCompacted.add(numFiles);<a name="line.8630"></a>
-<span class="sourceLineNo">8631</span>    compactionNumBytesCompacted.add(filesSizeCompacted);<a name="line.8631"></a>
-<span class="sourceLineNo">8632</span><a name="line.8632"></a>
-<span class="sourceLineNo">8633</span>    assert newValue &gt;= 0;<a name="line.8633"></a>
-<span class="sourceLineNo">8634</span>  }<a name="line.8634"></a>
-<span class="sourceLineNo">8635</span><a name="line.8635"></a>
-<span class="sourceLineNo">8636</span>  public void reportCompactionRequestFailure() {<a name="line.8636"></a>
-<span class="sourceLineNo">8637</span>    compactionsFailed.increment();<a name="line.8637"></a>
-<span class="sourceLineNo">8638</span>  }<a name="line.8638"></a>
-<span class="sourceLineNo">8639</span><a name="line.8639"></a>
-<span class="sourceLineNo">8640</span>  public void incrementCompactionsQueuedCount() {<a name="line.8640"></a>
-<span class="sourceLineNo">8641</span>    compactionsQueued.increment();<a name="line.8641"></a>
+<span class="sourceLineNo">8413</span>  }<a name="line.8413"></a>
+<span class="sourceLineNo">8414</span><a name="line.8414"></a>
+<span class="sourceLineNo">8415</span>  @Override<a name="line.8415"></a>
+<span class="sourceLineNo">8416</span>  public void closeRegionOperation() throws IOException {<a name="line.8416"></a>
+<span class="sourceLineNo">8417</span>    closeRegionOperation(Operation.ANY);<a name="line.8417"></a>
+<span class="sourceLineNo">8418</span>  }<a name="line.8418"></a>
+<span class="sourceLineNo">8419</span><a name="line.8419"></a>
+<span class="sourceLineNo">8420</span>  @Override<a name="line.8420"></a>
+<span class="sourceLineNo">8421</span>  public void closeRegionOperation(Operation operation) throws IOException {<a name="line.8421"></a>
+<span class="sourceLineNo">8422</span>    if (operation == Operation.SNAPSHOT) {<a name="line.8422"></a>
+<span class="sourceLineNo">8423</span>      stores.values().forEach(HStore::postSnapshotOperation);<a name="line.8423"></a>
+<span class="sourceLineNo">8424</span>    }<a name="line.8424"></a>
+<span class="sourceLineNo">8425</span>    lock.readLock().unlock();<a name="line.8425"></a>
+<span class="sourceLineNo">8426</span>    if (coprocessorHost != null) {<a name="line.8426"></a>
+<span class="sourceLineNo">8427</span>      coprocessorHost.postCloseRegionOperation(operation);<a name="line.8427"></a>
+<span class="sourceLineNo">8428</span>    }<a name="line.8428"></a>
+<span class="sourceLineNo">8429</span>  }<a name="line.8429"></a>
+<span class="sourceLineNo">8430</span><a name="line.8430"></a>
+<span class="sourceLineNo">8431</span>  /**<a name="line.8431"></a>
+<span class="sourceLineNo">8432</span>   * This method needs to be called before any public call that reads or<a name="line.8432"></a>
+<span class="sourceLineNo">8433</span>   * modifies stores in bulk. It has to be called just before a try.<a name="line.8433"></a>
+<span class="sourceLineNo">8434</span>   * #closeBulkRegionOperation needs to be called in the try's finally block<a name="line.8434"></a>
+<span class="sourceLineNo">8435</span>   * Acquires a writelock and checks if the region is closing or closed.<a name="line.8435"></a>
+<span class="sourceLineNo">8436</span>   * @throws NotServingRegionException when the region is closing or closed<a name="line.8436"></a>
+<span class="sourceLineNo">8437</span>   * @throws RegionTooBusyException if failed to get the lock in time<a name="line.8437"></a>
+<span class="sourceLineNo">8438</span>   * @throws InterruptedIOException if interrupted while waiting for a lock<a name="line.8438"></a>
+<span class="sourceLineNo">8439</span>   */<a name="line.8439"></a>
+<span class="sourceLineNo">8440</span>  private void startBulkRegionOperation(boolean writeLockNeeded)<a name="line.8440"></a>
+<span class="sourceLineNo">8441</span>      throws NotServingRegionException, RegionTooBusyException, InterruptedIOException {<a name="line.8441"></a>
+<span class="sourceLineNo">8442</span>    if (this.closing.get()) {<a name="line.8442"></a>
+<span class="sourceLineNo">8443</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closing");<a name="line.8443"></a>
+<span class="sourceLineNo">8444</span>    }<a name="line.8444"></a>
+<span class="sourceLineNo">8445</span>    if (writeLockNeeded) lock(lock.writeLock());<a name="line.8445"></a>
+<span class="sourceLineNo">8446</span>    else lock(lock.readLock());<a name="line.8446"></a>
+<span class="sourceLineNo">8447</span>    if (this.closed.get()) {<a name="line.8447"></a>
+<span class="sourceLineNo">8448</span>      if (writeLockNeeded) lock.writeLock().unlock();<a name="line.8448"></a>
+<span class="sourceLineNo">8449</span>      else lock.readLock().unlock();<a name="line.8449"></a>
+<span class="sourceLineNo">8450</span>      throw new NotServingRegionException(getRegionInfo().getRegionNameAsString() + " is closed");<a name="line.8450"></a>
+<span class="sourceLineNo">8451</span>    }<a name="line.8451"></a>
+<span class="sourceLineNo">8452</span>  }<a name="line.8452"></a>
+<span class="sourceLineNo">8453</span><a name="line.8453"></a>
+<span class="sourceLineNo">8454</span>  /**<a name="line.8454"></a>
+<span class="sourceLineNo">8455</span>   * Closes the lock. This needs to be called in the finally block corresponding<a name="line.8455"></a>
+<span class="sourceLineNo">8456</span>   * to the try block of #startRegionOperation<a name="line.8456"></a>
+<span class="sourceLineNo">8457</span>   */<a name="line.8457"></a>
+<span class="sourceLineNo">8458</span>  private void closeBulkRegionOperation(){<a name="line.8458"></a>
+<span class="sourceLineNo">8459</span>    if (lock.writeLock().isHeldByCurrentThread()) lock.writeLock().unlock();<a name="line.8459"></a>
+<span class="sourceLineNo">8460</span>    else lock.readLock().unlock();<a name="line.8460"></a>
+<span class="sourceLineNo">8461</span>  }<a name="line.8461"></a>
+<span class="sourceLineNo">8462</span><a name="line.8462"></a>
+<span class="sourceLineNo">8463</span>  /**<a name="line.8463"></a>
+<span class="sourceLineNo">8464</span>   * Update LongAdders for number of puts without wal and the size of possible data loss.<a name="line.8464"></a>
+<span class="sourceLineNo">8465</span>   * These information are exposed by the region server metrics.<a name="line.8465"></a>
+<span class="sourceLineNo">8466</span>   */<a name="line.8466"></a>
+<span class="sourceLineNo">8467</span>  private void recordMutationWithoutWal(final Map&lt;byte [], List&lt;Cell&gt;&gt; familyMap) {<a name="line.8467"></a>
+<span class="sourceLineNo">8468</span>    numMutationsWithoutWAL.increment();<a name="line.8468"></a>
+<span class="sourceLineNo">8469</span>    if (numMutationsWithoutWAL.sum() &lt;= 1) {<a name="line.8469"></a>
+<span class="sourceLineNo">8470</span>      LOG.info("writing data to region " + this +<a name="line.8470"></a>
+<span class="sourceLineNo">8471</span>               " with WAL disabled. Data may be lost in the event of a crash.");<a name="line.8471"></a>
+<span class="sourceLineNo">8472</span>    }<a name="line.8472"></a>
+<span class="sourceLineNo">8473</span><a name="line.8473"></a>
+<span class="sourceLineNo">8474</span>    long mutationSize = 0;<a name="line.8474"></a>
+<span class="sourceLineNo">8475</span>    for (List&lt;Cell&gt; cells: familyMap.values()) {<a name="line.8475"></a>
+<span class="sourceLineNo">8476</span>      // Optimization: 'foreach' loop is not used. See:<a name="line.8476"></a>
+<span class="sourceLineNo">8477</span>      // HBASE-12023 HRegion.applyFamilyMapToMemstore creates too many iterator objects<a name="line.8477"></a>
+<span class="sourceLineNo">8478</span>      assert cells instanceof RandomAccess;<a name="line.8478"></a>
+<span class="sourceLineNo">8479</span>      int listSize = cells.size();<a name="line.8479"></a>
+<span class="sourceLineNo">8480</span>      for (int i=0; i &lt; listSize; i++) {<a name="line.8480"></a>
+<span class="sourceLineNo">8481</span>        Cell cell = cells.get(i);<a name="line.8481"></a>
+<span class="sourceLineNo">8482</span>        mutationSize += KeyValueUtil.length(cell);<a name="line.8482"></a>
+<span class="sourceLineNo">8483</span>      }<a name="line.8483"></a>
+<span class="sourceLineNo">8484</span>    }<a name="line.8484"></a>
+<span class="sourceLineNo">8485</span><a name="line.8485"></a>
+<span class="sourceLineNo">8486</span>    dataInMemoryWithoutWAL.add(mutationSize);<a name="line.8486"></a>
+<span class="sourceLineNo">8487</span>  }<a name="line.8487"></a>
+<span class="sourceLineNo">8488</span><a name="line.8488"></a>
+<span class="sourceLineNo">8489</span>  private void lock(final Lock lock) throws RegionTooBusyException, InterruptedIOException {<a name="line.8489"></a>
+<span class="sourceLineNo">8490</span>    lock(lock, 1);<a name="line.8490"></a>
+<span class="sourceLineNo">8491</span>  }<a name="line.8491"></a>
+<span class="sourceLineNo">8492</span><a name="line.8492"></a>
+<span class="sourceLineNo">8493</span>  /**<a name="line.8493"></a>
+<span class="sourceLineNo">8494</span>   * Try to acquire a lock.  Throw RegionTooBusyException<a name="line.8494"></a>
+<span class="sourceLineNo">8495</span>   * if failed to get the lock in time. Throw InterruptedIOException<a name="line.8495"></a>
+<span class="sourceLineNo">8496</span>   * if interrupted while waiting for the lock.<a name="line.8496"></a>
+<span class="sourceLineNo">8497</span>   */<a name="line.8497"></a>
+<span class="sourceLineNo">8498</span>  private void lock(final Lock lock, final int multiplier)<a name="line.8498"></a>
+<span class="sourceLineNo">8499</span>      throws RegionTooBusyException, InterruptedIOException {<a name="line.8499"></a>
+<span class="sourceLineNo">8500</span>    try {<a name="line.8500"></a>
+<span class="sourceLineNo">8501</span>      final long waitTime = Math.min(maxBusyWaitDuration,<a name="line.8501"></a>
+<span class="sourceLineNo">8502</span>          busyWaitDuration * Math.min(multiplier, maxBusyWaitMultiplier));<a name="line.8502"></a>
+<span class="sourceLineNo">8503</span>      if (!lock.tryLock(waitTime, TimeUnit.MILLISECONDS)) {<a name="line.8503"></a>
+<span class="sourceLineNo">8504</span>        // Don't print millis. Message is used as a key over in<a name="line.8504"></a>
+<span class="sourceLineNo">8505</span>        // RetriesExhaustedWithDetailsException processing.<a name="line.8505"></a>
+<span class="sourceLineNo">8506</span>        throw new RegionTooBusyException("Failed to obtain lock; regionName=" +<a name="line.8506"></a>
+<span class="sourceLineNo">8507</span>            (this.getRegionInfo() == null? "unknown":<a name="line.8507"></a>
+<span class="sourceLineNo">8508</span>                this.getRegionInfo().getRegionNameAsString()) +<a name="line.8508"></a>
+<span class="sourceLineNo">8509</span>            ", server=" + (this.getRegionServerServices() == null? "unknown":<a name="line.8509"></a>
+<span class="sourceLineNo">8510</span>                this.getRegionServerServices().getServerName()));<a name="line.8510"></a>
+<span class="sourceLineNo">8511</span>      }<a name="line.8511"></a>
+<span class="sourceLineNo">8512</span>    } catch (InterruptedException ie) {<a name="line.8512"></a>
+<span class="sourceLineNo">8513</span>      LOG.info("Interrupted while waiting for a lock");<a name="line.8513"></a>
+<span class="sourceLineNo">8514</span>      InterruptedIOException iie = new InterruptedIOException();<a name="line.8514"></a>
+<span class="sourceLineNo">8515</span>      iie.initCause(ie);<a name="line.8515"></a>
+<span class="sourceLineNo">8516</span>      throw iie;<a name="line.8516"></a>
+<span class="sourceLineNo">8517</span>    }<a name="line.8517"></a>
+<span class="sourceLineNo">8518</span>  }<a name="line.8518"></a>
+<span class="sourceLineNo">8519</span><a name="line.8519"></a>
+<span class="sourceLineNo">8520</span>  /**<a name="line.8520"></a>
+<span class="sourceLineNo">8521</span>   * Calls sync with the given transaction ID<a name="line.8521"></a>
+<span class="sourceLineNo">8522</span>   * @param txid should sync up to which transaction<a name="line.8522"></a>
+<span class="sourceLineNo">8523</span>   * @throws IOException If anything goes wrong with DFS<a name="line.8523"></a>
+<span class="sourceLineNo">8524</span>   */<a name="line.8524"></a>
+<span class="sourceLineNo">8525</span>  private void sync(long txid, Durability durability) throws IOException {<a name="line.8525"></a>
+<span class="sourceLineNo">8526</span>    if (this.getRegionInfo().isMetaRegion()) {<a name="line.8526"></a>
+<span class="sourceLineNo">8527</span>      this.wal.sync(txid);<a name="line.8527"></a>
+<span class="sourceLineNo">8528</span>    } else {<a name="line.8528"></a>
+<span class="sourceLineNo">8529</span>      switch(durability) {<a name="line.8529"></a>
+<span class="sourceLineNo">8530</span>      case USE_DEFAULT:<a name="line.8530"></a>
+<span class="sourceLineNo">8531</span>        // do what table defaults to<a name="line.8531"></a>
+<span class="sourceLineNo">8532</span>        if (shouldSyncWAL()) {<a name="line.8532"></a>
+<span class="sourceLineNo">8533</span>          this.wal.sync(txid);<a name="line.8533"></a>
+<span class="sourceLineNo">8534</span>        }<a name="line.8534"></a>
+<span class="sourceLineNo">8535</span>        break;<a name="line.8535"></a>
+<span class="sourceLineNo">8536</span>      case SKIP_WAL:<a name="line.8536"></a>
+<span class="sourceLineNo">8537</span>        // nothing do to<a name="line.8537"></a>
+<span class="sourceLineNo">8538</span>        break;<a name="line.8538"></a>
+<span class="sourceLineNo">8539</span>      case ASYNC_WAL:<a name="line.8539"></a>
+<span class="sourceLineNo">8540</span>        // nothing do to<a name="line.8540"></a>
+<span class="sourceLineNo">8541</span>        break;<a name="line.8541"></a>
+<span class="sourceLineNo">8542</span>      case SYNC_WAL:<a name="line.8542"></a>
+<span class="sourceLineNo">8543</span>          this.wal.sync(txid, false);<a name="line.8543"></a>
+<span class="sourceLineNo">8544</span>          break;<a name="line.8544"></a>
+<span class="sourceLineNo">8545</span>      case FSYNC_WAL:<a name="line.8545"></a>
+<span class="sourceLineNo">8546</span>          this.wal.sync(txid, true);<a name="line.8546"></a>
+<span class="sourceLineNo">8547</span>          break;<a name="line.8547"></a>
+<span class="sourceLineNo">8548</span>      default:<a name="line.8548"></a>
+<span class="sourceLineNo">8549</span>        throw new RuntimeException("Unknown durability " + durability);<a name="line.8549"></a>
+<span class="sourceLineNo">8550</span>      }<a name="line.8550"></a>
+<span class="sourceLineNo">8551</span>    }<a name="line.8551"></a>
+<span class="sourceLineNo">8552</span>  }<a name="line.8552"></a>
+<span class="sourceLineNo">8553</span><a name="line.8553"></a>
+<span class="sourceLineNo">8554</span>  /**<a name="line.8554"></a>
+<span class="sourceLineNo">8555</span>   * Check whether we should sync the wal from the table's durability settings<a name="line.8555"></a>
+<span class="sourceLineNo">8556</span>   */<a name="line.8556"></a>
+<span class="sourceLineNo">8557</span>  private boolean shouldSyncWAL() {<a name="line.8557"></a>
+<span class="sourceLineNo">8558</span>    return regionDurability.ordinal() &gt;  Durability.ASYNC_WAL.ordinal();<a name="line.8558"></a>
+<span class="sourceLineNo">8559</span>  }<a name="line.8559"></a>
+<span class="sourceLineNo">8560</span><a name="line.8560"></a>
+<span class="sourceLineNo">8561</span>  /**<a name="line.8561"></a>
+<span class="sourceLineNo">8562</span>   * A mocked list implementation - discards all updates.<a name="line.8562"></a>
+<span class="sourceLineNo">8563</span>   */<a name="line.8563"></a>
+<span class="sourceLineNo">8564</span>  private static final List&lt;Cell&gt; MOCKED_LIST = new AbstractList&lt;Cell&gt;() {<a name="line.8564"></a>
+<span class="sourceLineNo">8565</span><a name="line.8565"></a>
+<span class="sourceLineNo">8566</span>    @Override<a name="line.8566"></a>
+<span class="sourceLineNo">8567</span>    public void add(int index, Cell element) {<a name="line.8567"></a>
+<span class="sourceLineNo">8568</span>      // do nothing<a name="line.8568"></a>
+<span class="sourceLineNo">8569</span>    }<a name="line.8569"></a>
+<span class="sourceLineNo">8570</span><a name="line.8570"></a>
+<span class="sourceLineNo">8571</span>    @Override<a name="line.8571"></a>
+<span class="sourceLineNo">8572</span>    public boolean addAll(int index, Collection&lt;? extends Cell&gt; c) {<a name="line.8572"></a>
+<span class="sourceLineNo">8573</span>      return false; // this list is never changed as a result of an update<a name="line.8573"></a>
+<span class="sourceLineNo">8574</span>    }<a name="line.8574"></a>
+<span class="sourceLineNo">8575</span><a name="line.8575"></a>
+<span class="sourceLineNo">8576</span>    @Override<a name="line.8576"></a>
+<span class="sourceLineNo">8577</span>    public KeyValue get(int index) {<a name="line.8577"></a>
+<span class="sourceLineNo">8578</span>      throw new UnsupportedOperationException();<a name="line.8578"></a>
+<span class="sourceLineNo">8579</span>    }<a name="line.8579"></a>
+<span class="sourceLineNo">8580</span><a name="line.8580"></a>
+<span class="sourceLineNo">8581</span>    @Override<a name="line.8581"></a>
+<span class="sourceLineNo">8582</span>    public int size() {<a name="line.8582"></a>
+<span class="sourceLineNo">8583</span>      return 0;<a name="line.8583"></a>
+<span class="sourceLineNo">8584</span>    }<a name="line.8584"></a>
+<span class="sourceLineNo">8585</span>  };<a name="line.8585"></a>
+<span class="sourceLineNo">8586</span><a name="line.8586"></a>
+<span class="sourceLineNo">8587</span>  /** @return the latest sequence number that was read from storage when this region was opened */<a name="line.8587"></a>
+<span class="sourceLineNo">8588</span>  public long getOpenSeqNum() {<a name="line.8588"></a>
+<span class="sourceLineNo">8589</span>    return this.openSeqNum;<a name="line.8589"></a>
+<span class="sourceLineNo">8590</span>  }<a name="line.8590"></a>
+<span class="sourceLineNo">8591</span><a name="line.8591"></a>
+<span class="sourceLineNo">8592</span>  @Override<a name="line.8592"></a>
+<span class="sourceLineNo">8593</span>  public Map&lt;byte[], Long&gt; getMaxStoreSeqId() {<a name="line.8593"></a>
+<span class="sourceLineNo">8594</span>    return this.maxSeqIdInStores;<a name="line.8594"></a>
+<span class="sourceLineNo">8595</span>  }<a name="line.8595"></a>
+<span class="sourceLineNo">8596</span><a name="line.8596"></a>
+<span class="sourceLineNo">8597</span>  public long getOldestSeqIdOfStore(byte[] familyName) {<a name="line.8597"></a>
+<span class="sourceLineNo">8598</span>    return wal.getEarliestMemStoreSeqNum(getRegionInfo().getEncodedNameAsBytes(), familyName);<a name="line.8598"></a>
+<span class="sourceLineNo">8599</span>  }<a name="line.8599"></a>
+<span class="sourceLineNo">8600</span><a name="line.8600"></a>
+<span class="sourceLineNo">8601</span>  @Override<a name="line.8601"></a>
+<span class="sourceLineNo">8602</span>  public CompactionState getCompactionState() {<a name="line.8602"></a>
+<span class="sourceLineNo">8603</span>    boolean hasMajor = majorInProgress.get() &gt; 0, hasMinor = minorInProgress.get() &gt; 0;<a name="line.8603"></a>
+<span class="sourceLineNo">8604</span>    return (hasMajor ? (hasMinor ? CompactionState.MAJOR_AND_MINOR : CompactionState.MAJOR)<a name="line.8604"></a>
+<span class="sourceLineNo">8605</span>        : (hasMinor ? CompactionState.MINOR : CompactionState.NONE));<a name="line.8605"></a>
+<span class="sourceLineNo">8606</span>  }<a name="line.8606"></a>
+<span class="sourceLineNo">8607</span><a name="line.8607"></a>
+<span class="sourceLineNo">8608</span>  public void reportCompactionRequestStart(boolean isMajor){<a name="line.8608"></a>
+<span class="sourceLineNo">8609</span>    (isMajor ? majorInProgress : minorInProgress).incrementAndGet();<a name="line.8609"></a>
+<span class="sourceLineNo">8610</span>  }<a name="line.8610"></a>
+<span class="sourceLineNo">8611</span><a name="line.8611"></a>
+<span class="sourceLineNo">8612</span>  public void reportCompactionRequestEnd(boolean isMajor, int numFiles, long filesSizeCompacted) {<a name="line.8612"></a>
+<span class="sourceLineNo">8613</span>    int newValue = (isMajor ? majorInProgress : minorInProgress).decrementAndGet();<a name="line.8613"></a>
+<span class="sourceLineNo">8614</span><a name="line.8614"></a>
+<span class="sourceLineNo">8615</span>    // metrics<a name="line.8615"></a>
+<span class="sourceLineNo">8616</span>    compactionsFinished.increment();<a name="line.8616"></a>
+<span class="sourceLineNo">8617</span>    compactionNumFilesCompacted.add(numFiles);<a name="line.8617"></a>
+<span class="sourceLineNo">8618</span>    compactionNumBytesCompacted.add(filesSizeCompacted);<a name="line.8618"></a>
+<span class="sourceLineNo">8619</span><a name="line.8619"></a>
+<span class="sourceLineNo">8620</span>    assert newValue &gt;= 0;<a name="line.8620"></a>
+<span class="sourceLineNo">8621</span>  }<a name="line.8621"></a>
+<span class="sourceLineNo">8622</span><a name="line.8622"></a>
+<span class="sourceLineNo">8623</span>  public void reportCompactionRequestFailure() {<a name="line.8623"></a>
+<span class="sourceLineNo">8624</span>    compactionsFailed.increment();<a name="line.8624"></a>
+<span class="sourceLineNo">8625</span>  }<a name="line.8625"></a>
+<span class="sourceLineNo">8626</span><a name="line.8626"></a>
+<span class="sourceLineNo">8627</span>  public void incrementCompactionsQueuedCount() {<a name="line.8627"></a>
+<span class="sourceLineNo">8628</span>    compactionsQueued.increment();<a name="line.8628"></a>
+<span class="sourceLineNo">8629</span>  }<a name="line.8629"></a>
+<span class="sourceLineNo">8630</span><a name="line.8630"></a>
+<span class="sourceLineNo">8631</span>  public void decrementCompactionsQueuedCount() {<a name="line.8631"></a>
+<span class="sourceLineNo">8632</span>    compactionsQueued.decrement();<a name="line.8632"></a>
+<span class="sourceLineNo">8633</span>  }<a name="line.8633"></a>
+<span class="sourceLineNo">8634</span><a name="line.8634"></a>
+<span class="sourceLineNo">8635</span>  public void incrementFlushesQueuedCount() {<a name="line.8635"></a>
+<span class="sourceLineNo">8636</span>    flushesQueued.increment();<a name="line.8636"></a>
+<span class="sourceLineNo">8637</span>  }<a name="line.8637"></a>
+<span class="sourceLineNo">8638</span><a name="line.8638"></a>
+<span class="sourceLineNo">8639</span>  @VisibleForTesting<a name="line.8639"></a>
+<span class="sourceLineNo">8640</span>  public long getReadPoint() {<a name="line.8640"></a>
+<span class="sourceLineNo">8641</span>    return getReadPoint(IsolationLevel.READ_COMMITTED);<a name="line.8641"></a>
 <span class="sourceLineNo">8642</span>  }<a name="line.8642"></a>
 <span class="sourceLineNo">8643</span><a name="line.8643"></a>
-<span class="sourceLineNo">8644</span>  public void decrementCompactionsQueuedCount() {<a name="line.8644"></a>
-<span class="sourceLineNo">8645</span>    compactionsQueued.decrement();<a name="line.8645"></a>
-<span class="sourceLineNo">8646</span>  }<a name="line.8646"></a>
-<span class="sourceLineNo">8647</span><a name="line.8647"></a>
-<span class="sourceLineNo">8648</span>  public void incrementFlushesQueuedCount() {<a name="line.8648"></a>
-<span class="sourceLineNo">8649</span>    flushesQueued.increment();<a name="line.8649"></a>
+<span class="sourceLineNo">8644</span>  /**<a name="line.8644"></a>
+<span class="sourceLineNo">8645</span>   * {@inheritDoc}<a name="line.8645"></a>
+<span class="sourceLineNo">8646</span>   */<a name="line.8646"></a>
+<span class="sourceLineNo">8647</span>  @Override<a name="line.8647"></a>
+<span class="sourceLineNo">8648</span>  public void onConfigurationChange(Configuration conf) {<a name="line.8648"></a>
+<span class="sourceLineNo">8649</span>    this.storeHotnessProtector.update(conf);<a name="line.8649"></a>
 <span class="sourceLineNo">8650</span>  }<a name="line.8650"></a>
 <span class="sourceLineNo">8651</span><a name="line.8651"></a>
-<span class="sourceLineNo">8652</span>  @VisibleForTesting<a name="line.8652"></a>
-<span class="sourceLineNo">8653</span>  public long getReadPoint() {<a name="line.8653"></a>
-<span class="sourceLineNo">8654</span>    return getReadPoint(IsolationLevel.READ_COMMITTED);<a name="line.8654"></a>
-<span class="sourceLineNo">8655</span>  }<a name="line.8655"></a>
-<span class="sourceLineNo">8656</span><a name="line.8656"></a>
-<span class="sourceLineNo">8657</span>  /**<a name="line.8657"></a>
-<span class="sourceLineNo">8658</span>   * {@inheritDoc}<a name="line.8658"></a>
-<span class="sourceLineNo">8659</span>   */<a name="line.8659"></a>
-<span class="sourceLineNo">8660</span>  @Override<a name="line.8660"></a>
-<span class="sourceLineNo">8661</span>  public void onConfigurationChange(Configuration conf) {<a name="line.8661"></a>
-<span class="sourceLineNo">8662</span>    this.storeHotnessProtector.update(conf);<a name="line.8662"></a>
-<span class="sourceLineNo">8663</span>  }<a name="line.8663"></a>
-<span class="sourceLineNo">8664</span><a name="line.8664"></a>
-<span class="sourceLineNo">8665</span>  /**<a name="line.8665"></a>
-<span class="sourceLineNo">8666</span>   * {@inheritDoc}<a name="line.8666"></a>
-<span class="sourceLineNo">8667</span>   */<a name="line.8667"></a>
-<span class="sourceLineNo">8668</span>  @Override<a name="line.8668"></a>
-<span class="sourceLineNo">8669</span>  public void registerChildren(ConfigurationManager manager) {<a name="line.8669"></a>
-<span class="sourceLineNo">8670</span>    configurationManager = Optional.of(manager);<a name="line.8670"></a>
-<span class="sourceLineNo">8671</span>