hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [hbase-site] branch asf-site updated: Published site at 66d1258aa3a8c48a6001f5ec9d8eaeb64415873e.
Date Wed, 08 Jan 2020 14:43:52 GMT
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/hbase-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new f3a0b30  Published site at 66d1258aa3a8c48a6001f5ec9d8eaeb64415873e.
f3a0b30 is described below

commit f3a0b30a25c075510ee6f17413666b3843da006c
Author: jenkins <builds@apache.org>
AuthorDate: Wed Jan 8 14:43:35 2020 +0000

    Published site at 66d1258aa3a8c48a6001f5ec9d8eaeb64415873e.
---
 acid-semantics.html                                |    9 +-
 apache_hbase_reference_guide.pdf                   |    4 +-
 book.html                                          |    2 +-
 bulk-loads.html                                    |    9 +-
 checkstyle-aggregate.html                          |  185 +-
 coc.html                                           |    9 +-
 dependencies.html                                  |    9 +-
 dependency-convergence.html                        |    9 +-
 dependency-info.html                               |    9 +-
 dependency-management.html                         |    9 +-
 devapidocs/constant-values.html                    |    4 +-
 .../master/HMaster.MasterStoppedException.html     |    4 +-
 .../master/HMaster.TableDescriptorGetter.html      |    4 +-
 .../org/apache/hadoop/hbase/master/HMaster.html    |  262 +-
 .../src-html/org/apache/hadoop/hbase/Version.html  |    4 +-
 .../master/HMaster.InitializationMonitor.html      | 4385 ++++++++++----------
 .../master/HMaster.MasterStoppedException.html     | 4385 ++++++++++----------
 .../hbase/master/HMaster.RedirectServlet.html      | 4385 ++++++++++----------
 .../master/HMaster.TableDescriptorGetter.html      | 4385 ++++++++++----------
 .../org/apache/hadoop/hbase/master/HMaster.html    | 4385 ++++++++++----------
 downloads.html                                     |    9 +-
 export_control.html                                |    9 +-
 index.html                                         |    9 +-
 issue-tracking.html                                |    9 +-
 mail-lists.html                                    |    9 +-
 metrics.html                                       |    9 +-
 old_news.html                                      |    9 +-
 plugin-management.html                             |    9 +-
 plugins.html                                       |    9 +-
 poweredbyhbase.html                                |    9 +-
 project-info.html                                  |    9 +-
 project-reports.html                               |    9 +-
 project-summary.html                               |    9 +-
 pseudo-distributed.html                            |    9 +-
 replication.html                                   |    9 +-
 resources.html                                     |    9 +-
 source-repository.html                             |    9 +-
 sponsors.html                                      |    9 +-
 supportingprojects.html                            |    9 +-
 team-list.html                                     |    9 +-
 40 files changed, 11419 insertions(+), 11218 deletions(-)

diff --git a/acid-semantics.html b/acid-semantics.html
index 8dddd06..e4ff839 100644
--- a/acid-semantics.html
+++ b/acid-semantics.html
@@ -83,6 +83,13 @@
             <li><a href="metrics.html" target="_blank" title="Metrics">Metrics</a></li>
             <li><a href="book.html#replication" target="_blank" title="Cluster replication">Cluster replication</a></li>
             <li class="dropdown-submenu">
+<a href="" title="1.4 Documentation">1.4 Documentation</a>
+              <ul class="dropdown-menu">
+                  <li><a href="1.4/apidocs/index.html" target="_blank" title="API">API</a></li>
+                  <li><a href="1.4/book.html" target="_blank" title="Ref Guide (single-page)">Ref Guide (single-page)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown-submenu">
 <a href="" title="2.1 Documentation">2.1 Documentation</a>
               <ul class="dropdown-menu">
                   <li><a href="2.1/apidocs/index.html" target="_blank" title="API">API</a></li>
@@ -443,7 +450,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2020
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-07</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-08</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/apache_hbase_reference_guide.pdf b/apache_hbase_reference_guide.pdf
index e68c64f..edaff49 100644
--- a/apache_hbase_reference_guide.pdf
+++ b/apache_hbase_reference_guide.pdf
@@ -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:20200107144117+00'00')
-/CreationDate (D:20200107144117+00'00')
+/ModDate (D:20200108144036+00'00')
+/CreationDate (D:20200108144036+00'00')
 >>
 endobj
 2 0 obj
diff --git a/book.html b/book.html
index b4a4b51..5403fbe 100644
--- a/book.html
+++ b/book.html
@@ -44205,7 +44205,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 2020-01-07 14:30:13 UTC
+Last updated 2020-01-08 14:30:07 UTC
 </div>
 </div>
 </body>
diff --git a/bulk-loads.html b/bulk-loads.html
index 9d15a65..0e0d709 100644
--- a/bulk-loads.html
+++ b/bulk-loads.html
@@ -83,6 +83,13 @@
             <li><a href="metrics.html" target="_blank" title="Metrics">Metrics</a></li>
             <li><a href="book.html#replication" target="_blank" title="Cluster replication">Cluster replication</a></li>
             <li class="dropdown-submenu">
+<a href="" title="1.4 Documentation">1.4 Documentation</a>
+              <ul class="dropdown-menu">
+                  <li><a href="1.4/apidocs/index.html" target="_blank" title="API">API</a></li>
+                  <li><a href="1.4/book.html" target="_blank" title="Ref Guide (single-page)">Ref Guide (single-page)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown-submenu">
 <a href="" title="2.1 Documentation">2.1 Documentation</a>
               <ul class="dropdown-menu">
                   <li><a href="2.1/apidocs/index.html" target="_blank" title="API">API</a></li>
@@ -148,7 +155,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2020
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-07</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-08</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/checkstyle-aggregate.html b/checkstyle-aggregate.html
index 5b9d2f7..ba0cf65 100644
--- a/checkstyle-aggregate.html
+++ b/checkstyle-aggregate.html
@@ -81,6 +81,13 @@
             <li><a href="metrics.html" target="_blank" title="Metrics">Metrics</a></li>
             <li><a href="book.html#replication" target="_blank" title="Cluster replication">Cluster replication</a></li>
             <li class="dropdown-submenu">
+<a href="" title="1.4 Documentation">1.4 Documentation</a>
+              <ul class="dropdown-menu">
+                  <li><a href="1.4/apidocs/index.html" target="_blank" title="API">API</a></li>
+                  <li><a href="1.4/book.html" target="_blank" title="Ref Guide (single-page)">Ref Guide (single-page)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown-submenu">
 <a href="" title="2.1 Documentation">2.1 Documentation</a>
               <ul class="dropdown-menu">
                   <li><a href="2.1/apidocs/index.html" target="_blank" title="API">API</a></li>
@@ -44189,529 +44196,529 @@
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>1743</td></tr>
+<td>1741</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>1764</td></tr>
+<td>1762</td></tr>
 <tr class="b">
 <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>1781</td></tr>
+<td>1779</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'throws' has incorrect indentation level 2, expected level should be 4.</td>
-<td>1998</td></tr>
+<td>1999</td></tr>
 <tr class="b">
 <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>2002</td></tr>
+<td>2003</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2004</td></tr>
+<td>2005</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2005</td></tr>
+<td>2006</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2008</td></tr>
+<td>2009</td></tr>
 <tr class="b">
 <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>2009</td></tr>
+<td>2010</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>2011</td></tr>
+<td>2012</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2013</td></tr>
+<td>2014</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>2014</td></tr>
+<td>2015</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>2015</td></tr>
+<td>2016</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 116).</td>
-<td>2043</td></tr>
+<td>2044</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 105).</td>
-<td>2045</td></tr>
+<td>2046</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>2255</td></tr>
+<td>2256</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2257</td></tr>
+<td>2258</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2259</td></tr>
+<td>2260</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2265</td></tr>
+<td>2266</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2266</td></tr>
+<td>2267</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2268</td></tr>
+<td>2269</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2270</td></tr>
+<td>2271</td></tr>
 <tr class="b">
 <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>2271</td></tr>
+<td>2272</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>2273</td></tr>
+<td>2274</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2275</td></tr>
+<td>2276</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>2276</td></tr>
+<td>2277</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>2277</td></tr>
+<td>2278</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>2290</td></tr>
+<td>2291</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2292</td></tr>
+<td>2293</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2294</td></tr>
+<td>2295</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2295</td></tr>
+<td>2296</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2296</td></tr>
+<td>2297</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2298</td></tr>
+<td>2299</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2300</td></tr>
+<td>2301</td></tr>
 <tr class="b">
 <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>2301</td></tr>
+<td>2302</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>2303</td></tr>
+<td>2304</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2305</td></tr>
+<td>2306</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>2306</td></tr>
+<td>2307</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>2307</td></tr>
+<td>2308</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>2390</td></tr>
+<td>2391</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2392</td></tr>
+<td>2393</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2398</td></tr>
+<td>2399</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>2399</td></tr>
+<td>2400</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' has incorrect indentation level 10, expected level should be one of the following: 12, 14.</td>
-<td>2400</td></tr>
+<td>2401</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' child has incorrect indentation level 16, expected level should be one of the following: 18, 20.</td>
-<td>2407</td></tr>
+<td>2408</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 rcurly' has incorrect indentation level 14, expected level should be one of the following: 16, 18.</td>
-<td>2409</td></tr>
+<td>2410</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 12, expected level should be one of the following: 14, 16.</td>
-<td>2410</td></tr>
+<td>2411</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 rcurly' has incorrect indentation level 10, expected level should be one of the following: 12, 14.</td>
-<td>2411</td></tr>
+<td>2412</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' child has incorrect indentation level 12, expected level should be one of the following: 14, 16.</td>
-<td>2412</td></tr>
+<td>2413</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 rcurly' has incorrect indentation level 10, expected level should be one of the following: 12, 14.</td>
-<td>2413</td></tr>
+<td>2414</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>2414</td></tr>
+<td>2415</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2416</td></tr>
+<td>2417</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2423</td></tr>
+<td>2424</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2424</td></tr>
+<td>2425</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2426</td></tr>
+<td>2427</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2428</td></tr>
+<td>2429</td></tr>
 <tr class="b">
 <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>2429</td></tr>
+<td>2430</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>2431</td></tr>
+<td>2432</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2433</td></tr>
+<td>2434</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>2434</td></tr>
+<td>2435</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>2435</td></tr>
+<td>2436</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>2445</td></tr>
+<td>2446</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2447</td></tr>
+<td>2448</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2449</td></tr>
+<td>2450</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2459</td></tr>
+<td>2460</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2460</td></tr>
+<td>2461</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2462</td></tr>
+<td>2463</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' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2464</td></tr>
+<td>2465</td></tr>
 <tr class="b">
 <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>2465</td></tr>
+<td>2466</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>2467</td></tr>
+<td>2468</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2469</td></tr>
+<td>2470</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>2470</td></tr>
+<td>2471</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>2471</td></tr>
+<td>2472</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>2534</td></tr>
+<td>2535</td></tr>
 <tr class="b">
 <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>2538</td></tr>
+<td>2539</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>2540</td></tr>
+<td>2541</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'method def' child has incorrect indentation level 8, expected level should be one of the following: 10, 12.</td>
-<td>2542</td></tr>
+<td>2543</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>2543</td></tr>
+<td>2544</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>2544</td></tr>
+<td>2545</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>NonEmptyAtclauseDescription</td>
 <td>At-clause should have a non-empty description.</td>
-<td>3027</td></tr>
+<td>3028</td></tr>
 <tr class="b">
 <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>3203</td></tr>
+<td>3204</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>3205</td></tr>
+<td>3206</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'throws' has incorrect indentation level 2, expected level should be 4.</td>
-<td>3317</td></tr>
+<td>3318</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'for' construct must use '{}'s.</td>
-<td>3347</td></tr>
+<td>3348</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>NonEmptyAtclauseDescription</td>
 <td>At-clause should have a non-empty description.</td>
-<td>3354</td></tr>
+<td>3355</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'throws' has incorrect indentation level 2, expected level should be 4.</td>
-<td>3359</td></tr>
+<td>3360</td></tr>
 <tr class="b">
 <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>3388</td></tr>
+<td>3389</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 111).</td>
-<td>3486</td></tr></table></div>
+<td>3487</td></tr></table></div>
 <div class="section">
 <h3 id="org.apache.hadoop.hbase.master.HMasterCommandLine.java">org/apache/hadoop/hbase/master/HMasterCommandLine.java</h3>
 <table border="0" class="table table-striped">
@@ -88082,7 +88089,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2020
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-07</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-08</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/coc.html b/coc.html
index b7a604b..4b8743c 100644
--- a/coc.html
+++ b/coc.html
@@ -83,6 +83,13 @@
             <li><a href="metrics.html" target="_blank" title="Metrics">Metrics</a></li>
             <li><a href="book.html#replication" target="_blank" title="Cluster replication">Cluster replication</a></li>
             <li class="dropdown-submenu">
+<a href="" title="1.4 Documentation">1.4 Documentation</a>
+              <ul class="dropdown-menu">
+                  <li><a href="1.4/apidocs/index.html" target="_blank" title="API">API</a></li>
+                  <li><a href="1.4/book.html" target="_blank" title="Ref Guide (single-page)">Ref Guide (single-page)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown-submenu">
 <a href="" title="2.1 Documentation">2.1 Documentation</a>
               <ul class="dropdown-menu">
                   <li><a href="2.1/apidocs/index.html" target="_blank" title="API">API</a></li>
@@ -217,7 +224,7 @@ email to <a class="externalLink" href="mailto:private@hbase.apache.org">the priv
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2020
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-07</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-08</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/dependencies.html b/dependencies.html
index e4d07be..4082a15 100644
--- a/dependencies.html
+++ b/dependencies.html
@@ -81,6 +81,13 @@
             <li><a href="metrics.html" target="_blank" title="Metrics">Metrics</a></li>
             <li><a href="book.html#replication" target="_blank" title="Cluster replication">Cluster replication</a></li>
             <li class="dropdown-submenu">
+<a href="" title="1.4 Documentation">1.4 Documentation</a>
+              <ul class="dropdown-menu">
+                  <li><a href="1.4/apidocs/index.html" target="_blank" title="API">API</a></li>
+                  <li><a href="1.4/book.html" target="_blank" title="Ref Guide (single-page)">Ref Guide (single-page)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown-submenu">
 <a href="" title="2.1 Documentation">2.1 Documentation</a>
               <ul class="dropdown-menu">
                   <li><a href="2.1/apidocs/index.html" target="_blank" title="API">API</a></li>
@@ -289,7 +296,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2020
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-07</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-08</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/dependency-convergence.html b/dependency-convergence.html
index e7199b4..c7ce40a 100644
--- a/dependency-convergence.html
+++ b/dependency-convergence.html
@@ -81,6 +81,13 @@
             <li><a href="metrics.html" target="_blank" title="Metrics">Metrics</a></li>
             <li><a href="book.html#replication" target="_blank" title="Cluster replication">Cluster replication</a></li>
             <li class="dropdown-submenu">
+<a href="" title="1.4 Documentation">1.4 Documentation</a>
+              <ul class="dropdown-menu">
+                  <li><a href="1.4/apidocs/index.html" target="_blank" title="API">API</a></li>
+                  <li><a href="1.4/book.html" target="_blank" title="Ref Guide (single-page)">Ref Guide (single-page)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown-submenu">
 <a href="" title="2.1 Documentation">2.1 Documentation</a>
               <ul class="dropdown-menu">
                   <li><a href="2.1/apidocs/index.html" target="_blank" title="API">API</a></li>
@@ -534,7 +541,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2020
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-07</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-08</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/dependency-info.html b/dependency-info.html
index c4feee8..4db501e 100644
--- a/dependency-info.html
+++ b/dependency-info.html
@@ -81,6 +81,13 @@
             <li><a href="metrics.html" target="_blank" title="Metrics">Metrics</a></li>
             <li><a href="book.html#replication" target="_blank" title="Cluster replication">Cluster replication</a></li>
             <li class="dropdown-submenu">
+<a href="" title="1.4 Documentation">1.4 Documentation</a>
+              <ul class="dropdown-menu">
+                  <li><a href="1.4/apidocs/index.html" target="_blank" title="API">API</a></li>
+                  <li><a href="1.4/book.html" target="_blank" title="Ref Guide (single-page)">Ref Guide (single-page)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown-submenu">
 <a href="" title="2.1 Documentation">2.1 Documentation</a>
               <ul class="dropdown-menu">
                   <li><a href="2.1/apidocs/index.html" target="_blank" title="API">API</a></li>
@@ -170,7 +177,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2020
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-07</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-08</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/dependency-management.html b/dependency-management.html
index 9387c16..dd466f2 100644
--- a/dependency-management.html
+++ b/dependency-management.html
@@ -81,6 +81,13 @@
             <li><a href="metrics.html" target="_blank" title="Metrics">Metrics</a></li>
             <li><a href="book.html#replication" target="_blank" title="Cluster replication">Cluster replication</a></li>
             <li class="dropdown-submenu">
+<a href="" title="1.4 Documentation">1.4 Documentation</a>
+              <ul class="dropdown-menu">
+                  <li><a href="1.4/apidocs/index.html" target="_blank" title="API">API</a></li>
+                  <li><a href="1.4/book.html" target="_blank" title="Ref Guide (single-page)">Ref Guide (single-page)</a></li>
+              </ul>
+            </li>
+            <li class="dropdown-submenu">
 <a href="" title="2.1 Documentation">2.1 Documentation</a>
               <ul class="dropdown-menu">
                   <li><a href="2.1/apidocs/index.html" target="_blank" title="API">API</a></li>
@@ -898,7 +905,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2020
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-07</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2020-01-08</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/devapidocs/constant-values.html b/devapidocs/constant-values.html
index 861c89e..c3c758a 100644
--- a/devapidocs/constant-values.html
+++ b/devapidocs/constant-values.html
@@ -4102,14 +4102,14 @@
 <!--   -->
 </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 Jan  7 14:37:03 UTC 2020"</code></td>
+<td class="colLast"><code>"Wed Jan  8 14:36:19 UTC 2020"</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#revision">revision</a></code></td>
-<td class="colLast"><code>"1eafba5603bf9de3aba79d5999a9cde91b23d444"</code></td>
+<td class="colLast"><code>"66d1258aa3a8c48a6001f5ec9d8eaeb64415873e"</code></td>
 </tr>
 <tr class="altColor">
 <td class="colFirst"><a name="org.apache.hadoop.hbase.Version.srcChecksum">
diff --git a/devapidocs/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html b/devapidocs/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html
index d85badb..45b5d6a 100644
--- a/devapidocs/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html
+++ b/devapidocs/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html
@@ -136,7 +136,7 @@
 </dl>
 <hr>
 <br>
-<pre>public static class <a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2908">HMaster.MasterStoppedException</a>
+<pre>public static class <a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2909">HMaster.MasterStoppedException</a>
 extends <a href="../../../../../org/apache/hadoop/hbase/DoNotRetryIOException.html" title="class in org.apache.hadoop.hbase">DoNotRetryIOException</a></pre>
 <dl>
 <dt><span class="seeLabel">See Also:</span></dt>
@@ -205,7 +205,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/DoNotRetryIOException.ht
 <ul class="blockListLast">
 <li class="blockList">
 <h4>MasterStoppedException</h4>
-<pre><a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html#line.2909">MasterStoppedException</a>()</pre>
+<pre><a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html#line.2910">MasterStoppedException</a>()</pre>
 </li>
 </ul>
 </li>
diff --git a/devapidocs/org/apache/hadoop/hbase/master/HMaster.TableDescriptorGetter.html b/devapidocs/org/apache/hadoop/hbase/master/HMaster.TableDescriptorGetter.html
index 2e32d9c..cfaf225 100644
--- a/devapidocs/org/apache/hadoop/hbase/master/HMaster.TableDescriptorGetter.html
+++ b/devapidocs/org/apache/hadoop/hbase/master/HMaster.TableDescriptorGetter.html
@@ -105,7 +105,7 @@ var activeTableTab = "activeTableTab";
 </dl>
 <hr>
 <br>
-<pre>protected static interface <a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2334">HMaster.TableDescriptorGetter</a></pre>
+<pre>protected static interface <a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2335">HMaster.TableDescriptorGetter</a></pre>
 <div class="block">Implement to return TableDescriptor after pre-checks</div>
 </li>
 </ul>
@@ -150,7 +150,7 @@ var activeTableTab = "activeTableTab";
 <ul class="blockListLast">
 <li class="blockList">
 <h4>get</h4>
-<pre><a href="../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.TableDescriptorGetter.html#line.2335">get</a>()
+<pre><a href="../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.TableDescriptorGetter.html#line.2336">get</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>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
diff --git a/devapidocs/org/apache/hadoop/hbase/master/HMaster.html b/devapidocs/org/apache/hadoop/hbase/master/HMaster.html
index e01afca..c6c39e2 100644
--- a/devapidocs/org/apache/hadoop/hbase/master/HMaster.html
+++ b/devapidocs/org/apache/hadoop/hbase/master/HMaster.html
@@ -3007,7 +3007,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getMaxRegionsInTransition</h4>
-<pre>private&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1703">getMaxRegionsInTransition</a>()</pre>
+<pre>private&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1701">getMaxRegionsInTransition</a>()</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>Maximum number of regions in transition</dd>
@@ -3020,7 +3020,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>balanceThrottling</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1715">balanceThrottling</a>(long&nbsp;nextBalanceStartTime,
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1713">balanceThrottling</a>(long&nbsp;nextBalanceStartTime,
                                int&nbsp;maxRegionsInTransition,
                                long&nbsp;cutoffTime)</pre>
 <div class="block">It first sleep to the next balance plan start time. Meanwhile, throttling by the max
@@ -3039,7 +3039,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>balance</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1746">balance</a>()
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1744">balance</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>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -3053,7 +3053,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>balance</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1750">balance</a>(boolean&nbsp;force)
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1748">balance</a>(boolean&nbsp;force)
                 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>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -3067,7 +3067,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>executeRegionPlansWithThrottling</h4>
-<pre>public&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/master/RegionPlan.html" title="class in org.apache.hadoop.hbase.master">RegionPlan</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1838">executeRegionPlansWithThrottling</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List [...]
+<pre>public&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/master/RegionPlan.html" title="class in org.apache.hadoop.hbase.master">RegionPlan</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1836">executeRegionPlansWithThrottling</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List [...]
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#executeRegionPlansWithThrottling-java.util.List-">MasterServices</a></code></span></div>
 <div class="block">Execute region plans with throttling</div>
 <dl>
@@ -3086,7 +3086,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getRegionNormalizer</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/normalizer/RegionNormalizer.html" title="interface in org.apache.hadoop.hbase.master.normalizer">RegionNormalizer</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1881">getRegionNormalizer</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/normalizer/RegionNormalizer.html" title="interface in org.apache.hadoop.hbase.master.normalizer">RegionNormalizer</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1882">getRegionNormalizer</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getRegionNormalizer--">getRegionNormalizer</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -3101,7 +3101,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>normalizeRegions</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1892">normalizeRegions</a>()
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1893">normalizeRegions</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">Perform normalization of cluster (invoked by <a href="../../../../../org/apache/hadoop/hbase/master/normalizer/RegionNormalizerChore.html" title="class in org.apache.hadoop.hbase.master.normalizer"><code>RegionNormalizerChore</code></a>).</div>
 <dl>
@@ -3120,7 +3120,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getClientIdAuditPrefix</h4>
-<pre>public&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>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1952">getClientIdAuditPrefix</a>()</pre>
+<pre>public&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>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1953">getClientIdAuditPrefix</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getClientIdAuditPrefix--">getClientIdAuditPrefix</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -3135,7 +3135,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>setCatalogJanitorEnabled</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1963">setCatalogJanitorEnabled</a>(boolean&nbsp;b)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1964">setCatalogJanitorEnabled</a>(boolean&nbsp;b)</pre>
 <div class="block">Switch for the background CatalogJanitor thread.
  Used for testing.  The thread will continue to run.  It will just be a noop
  if disabled.</div>
@@ -3151,7 +3151,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>mergeRegions</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1968">mergeRegions</a>(<a href="../../../../../org/apache/hadoop/hbase/client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a>[]&nbsp;regionsToMerge,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1969">mergeRegions</a>(<a href="../../../../../org/apache/hadoop/hbase/client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a>[]&nbsp;regionsToMerge,
                          boolean&nbsp;forcible,
                          long&nbsp;ng,
                          long&nbsp;nonce)
@@ -3179,7 +3179,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>splitRegion</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1996">splitRegion</a>(<a href="../../../../../org/apache/hadoop/hbase/client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a>&nbsp;regionInfo,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.1997">splitRegion</a>(<a href="../../../../../org/apache/hadoop/hbase/client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a>&nbsp;regionInfo,
                         byte[]&nbsp;splitRow,
                         long&nbsp;nonceGroup,
                         long&nbsp;nonce)
@@ -3207,7 +3207,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>warmUpRegion</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2018">warmUpRegion</a>(<a href="../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&nbsp;server,
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2019">warmUpRegion</a>(<a href="../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&nbsp;server,
                           <a href="../../../../../org/apache/hadoop/hbase/client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a>&nbsp;region)</pre>
 </li>
 </ul>
@@ -3217,7 +3217,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>move</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2031">move</a>(byte[]&nbsp;encodedRegionName,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2032">move</a>(byte[]&nbsp;encodedRegionName,
                  byte[]&nbsp;destServerName)
           throws <a href="../../../../../org/apache/hadoop/hbase/HBaseIOException.html" title="class in org.apache.hadoop.hbase">HBaseIOException</a></pre>
 <dl>
@@ -3232,7 +3232,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>createTable</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2124">createTable</a>(<a href="../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;tableDescriptor,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2125">createTable</a>(<a href="../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;tableDescriptor,
                         byte[][]&nbsp;splitKeys,
                         long&nbsp;nonceGroup,
                         long&nbsp;nonce)
@@ -3257,7 +3257,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>createSystemTable</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2166">createSystemTable</a>(<a href="../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;tableDescriptor)
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2167">createSystemTable</a>(<a href="../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;tableDescriptor)
                        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/master/MasterServices.html#createSystemTable-org.apache.hadoop.hbase.client.TableDescriptor-">MasterServices</a></code></span></div>
 <div class="block">Create a system table using the given table definition.</div>
@@ -3278,7 +3278,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>startActiveMasterManager</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2189">startActiveMasterManager</a>(int&nbsp;infoPort)
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2190">startActiveMasterManager</a>(int&nbsp;infoPort)
                                throws org.apache.zookeeper.KeeperException</pre>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -3292,7 +3292,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>isCatalogTable</h4>
-<pre>private static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2242">isCatalogTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)</pre>
+<pre>private static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2243">isCatalogTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)</pre>
 </li>
 </ul>
 <a name="deleteTable-org.apache.hadoop.hbase.TableName-long-long-">
@@ -3301,7 +3301,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>deleteTable</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2247">deleteTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2248">deleteTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                         long&nbsp;nonceGroup,
                         long&nbsp;nonce)
                  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>
@@ -3323,7 +3323,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>truncateTable</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2281">truncateTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2282">truncateTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                           boolean&nbsp;preserveSplits,
                           long&nbsp;nonceGroup,
                           long&nbsp;nonce)
@@ -3347,7 +3347,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>addColumn</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2311">addColumn</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2312">addColumn</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                       <a href="../../../../../org/apache/hadoop/hbase/client/ColumnFamilyDescriptor.html" title="interface in org.apache.hadoop.hbase.client">ColumnFamilyDescriptor</a>&nbsp;column,
                       long&nbsp;nonceGroup,
                       long&nbsp;nonce)
@@ -3371,7 +3371,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>modifyColumn</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2339">modifyColumn</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2340">modifyColumn</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                          <a href="../../../../../org/apache/hadoop/hbase/client/ColumnFamilyDescriptor.html" title="interface in org.apache.hadoop.hbase.client">ColumnFamilyDescriptor</a>&nbsp;descriptor,
                          long&nbsp;nonceGroup,
                          long&nbsp;nonce)
@@ -3395,7 +3395,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>deleteColumn</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2359">deleteColumn</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2360">deleteColumn</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                          byte[]&nbsp;columnName,
                          long&nbsp;nonceGroup,
                          long&nbsp;nonce)
@@ -3419,7 +3419,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>enableTable</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2384">enableTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2385">enableTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                         long&nbsp;nonceGroup,
                         long&nbsp;nonce)
                  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>
@@ -3441,7 +3441,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>disableTable</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2439">disableTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2440">disableTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                          long&nbsp;nonceGroup,
                          long&nbsp;nonce)
                   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>
@@ -3463,7 +3463,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>modifyTable</h4>
-<pre>private&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2474">modifyTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>private&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2475">modifyTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                          <a href="../../../../../org/apache/hadoop/hbase/master/HMaster.TableDescriptorGetter.html" title="interface in org.apache.hadoop.hbase.master">HMaster.TableDescriptorGetter</a>&nbsp;newDescriptorGetter,
                          long&nbsp;nonceGroup,
                          long&nbsp;nonce,
@@ -3481,7 +3481,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>modifyTable</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2511">modifyTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2512">modifyTable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                         <a href="../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;newDescriptor,
                         long&nbsp;nonceGroup,
                         long&nbsp;nonce)
@@ -3505,7 +3505,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>restoreSnapshot</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2523">restoreSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshotDesc,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2524">restoreSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshotDesc,
                             long&nbsp;nonceGroup,
                             long&nbsp;nonce,
                             boolean&nbsp;restoreAcl)
@@ -3522,7 +3522,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>checkTableExists</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2547">checkTableExists</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)
+<pre>private&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2548">checkTableExists</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)
                        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>,
                               <a href="../../../../../org/apache/hadoop/hbase/TableNotFoundException.html" title="class in org.apache.hadoop.hbase">TableNotFoundException</a></pre>
 <dl>
@@ -3538,7 +3538,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>checkTableModifiable</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2555">checkTableModifiable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2556">checkTableModifiable</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)
                           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>,
                                  <a href="../../../../../org/apache/hadoop/hbase/TableNotFoundException.html" title="class in org.apache.hadoop.hbase">TableNotFoundException</a>,
                                  <a href="../../../../../org/apache/hadoop/hbase/TableNotDisabledException.html" title="class in org.apache.hadoop.hbase">TableNotDisabledException</a></pre>
@@ -3562,7 +3562,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getClusterMetricsWithoutCoprocessor</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics.html" title="interface in org.apache.hadoop.hbase">ClusterMetrics</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2567">getClusterMetricsWithoutCoprocessor</a>()
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics.html" title="interface in org.apache.hadoop.hbase">ClusterMetrics</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2568">getClusterMetricsWithoutCoprocessor</a>()
                                                    throws <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>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -3576,7 +3576,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getClusterMetricsWithoutCoprocessor</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics.html" title="interface in org.apache.hadoop.hbase">ClusterMetrics</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2571">getClusterMetricsWithoutCoprocessor</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics [...]
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics.html" title="interface in org.apache.hadoop.hbase">ClusterMetrics</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2572">getClusterMetricsWithoutCoprocessor</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics [...]
                                                    throws <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>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -3590,7 +3590,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getClusterMetrics</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics.html" title="interface in org.apache.hadoop.hbase">ClusterMetrics</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2657">getClusterMetrics</a>()
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics.html" title="interface in org.apache.hadoop.hbase">ClusterMetrics</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2658">getClusterMetrics</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>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
@@ -3606,7 +3606,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getClusterMetrics</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics.html" title="interface in org.apache.hadoop.hbase">ClusterMetrics</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2661">getClusterMetrics</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics.Option.html" titl [...]
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics.html" title="interface in org.apache.hadoop.hbase">ClusterMetrics</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2662">getClusterMetrics</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/EnumSet.html?is-external=true" title="class or interface in java.util">EnumSet</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/ClusterMetrics.Option.html" titl [...]
                                  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>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -3620,7 +3620,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getBackupMasters</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/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2672">getBackupMasters</a>()
+<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/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2673">getBackupMasters</a>()
                                    throws <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>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -3634,7 +3634,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getLoadedCoprocessors</h4>
-<pre>public static&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>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2725">getLoadedCoprocessors</a>()</pre>
+<pre>public static&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>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2726">getLoadedCoprocessors</a>()</pre>
 <div class="block">The set of loaded coprocessors is stored in a static set. Since it's
  statically allocated, it does not require that HMaster's cpHost be
  initialized prior to accessing it.</div>
@@ -3650,7 +3650,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getMasterStartTime</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2732">getMasterStartTime</a>()</pre>
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2733">getMasterStartTime</a>()</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>timestamp in millis when HMaster was started.</dd>
@@ -3663,7 +3663,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getMasterActiveTime</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2739">getMasterActiveTime</a>()</pre>
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2740">getMasterActiveTime</a>()</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>timestamp in millis when HMaster became the active master.</dd>
@@ -3676,7 +3676,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getMasterFinishedInitializationTime</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2746">getMasterFinishedInitializationTime</a>()</pre>
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2747">getMasterFinishedInitializationTime</a>()</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>timestamp in millis when HMaster finished becoming the active master</dd>
@@ -3689,7 +3689,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getNumWALFiles</h4>
-<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2750">getNumWALFiles</a>()</pre>
+<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2751">getNumWALFiles</a>()</pre>
 </li>
 </ul>
 <a name="getProcedureStore--">
@@ -3698,7 +3698,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getProcedureStore</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/procedure2/store/ProcedureStore.html" title="interface in org.apache.hadoop.hbase.procedure2.store">ProcedureStore</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2754">getProcedureStore</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/procedure2/store/ProcedureStore.html" title="interface in org.apache.hadoop.hbase.procedure2.store">ProcedureStore</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2755">getProcedureStore</a>()</pre>
 </li>
 </ul>
 <a name="getRegionServerInfoPort-org.apache.hadoop.hbase.ServerName-">
@@ -3707,7 +3707,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getRegionServerInfoPort</h4>
-<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2758">getRegionServerInfoPort</a>(<a href="../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&nbsp;sn)</pre>
+<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2759">getRegionServerInfoPort</a>(<a href="../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&nbsp;sn)</pre>
 </li>
 </ul>
 <a name="getRegionServerVersion-org.apache.hadoop.hbase.ServerName-">
@@ -3716,7 +3716,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getRegionServerVersion</h4>
-<pre>public&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>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2765">getRegionServerVersion</a>(<a href="../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&nbsp;sn)</pre>
+<pre>public&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>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2766">getRegionServerVersion</a>(<a href="../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&nbsp;sn)</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getRegionServerVersion-org.apache.hadoop.hbase.ServerName-">getRegionServerVersion</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -3729,7 +3729,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>checkIfShouldMoveSystemRegionAsync</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2772">checkIfShouldMoveSystemRegionAsync</a>()</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2773">checkIfShouldMoveSystemRegionAsync</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#checkIfShouldMoveSystemRegionAsync--">MasterServices</a></code></span></div>
 <div class="block">Called when a new RegionServer is added to the cluster.
  Checks if new server has a newer version than any existing server and will move system tables
@@ -3746,7 +3746,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getMasterCoprocessors</h4>
-<pre>public&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>[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2779">getMasterCoprocessors</a>()</pre>
+<pre>public&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>[]&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2780">getMasterCoprocessors</a>()</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>array of coprocessor SimpleNames.</dd>
@@ -3759,7 +3759,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>abort</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2785">abort</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;reason,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2786">abort</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;reason,
                   <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a>&nbsp;cause)</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/HRegionServer.html#abort-java.lang.String-java.lang.Throwable-">HRegionServer</a></code></span></div>
 <div class="block">Cause the server to exit without closing the regions it is serving, the log
@@ -3782,7 +3782,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getZooKeeper</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/zookeeper/ZKWatcher.html" title="class in org.apache.hadoop.hbase.zookeeper">ZKWatcher</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2810">getZooKeeper</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/zookeeper/ZKWatcher.html" title="class in org.apache.hadoop.hbase.zookeeper">ZKWatcher</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2811">getZooKeeper</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/Server.html#getZooKeeper--">Server</a></code></span></div>
 <div class="block">Gets the ZooKeeper instance for this server.</div>
 <dl>
@@ -3799,7 +3799,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getMasterCoprocessorHost</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/MasterCoprocessorHost.html" title="class in org.apache.hadoop.hbase.master">MasterCoprocessorHost</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2815">getMasterCoprocessorHost</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/MasterCoprocessorHost.html" title="class in org.apache.hadoop.hbase.master">MasterCoprocessorHost</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2816">getMasterCoprocessorHost</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getMasterCoprocessorHost--">getMasterCoprocessorHost</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -3814,7 +3814,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getMasterQuotaManager</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/quotas/MasterQuotaManager.html" title="class in org.apache.hadoop.hbase.quotas">MasterQuotaManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2820">getMasterQuotaManager</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/quotas/MasterQuotaManager.html" title="class in org.apache.hadoop.hbase.quotas">MasterQuotaManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2821">getMasterQuotaManager</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getMasterQuotaManager--">getMasterQuotaManager</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -3829,7 +3829,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getMasterProcedureExecutor</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/procedure2/ProcedureExecutor.html" title="class in org.apache.hadoop.hbase.procedure2">ProcedureExecutor</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/master/procedure/MasterProcedureEnv.html" title="class in org.apache.hadoop.hbase.master.procedure">MasterProcedureEnv</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2825">getMasterProcedureExecutor</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/procedure2/ProcedureExecutor.html" title="class in org.apache.hadoop.hbase.procedure2">ProcedureExecutor</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/master/procedure/MasterProcedureEnv.html" title="class in org.apache.hadoop.hbase.master.procedure">MasterProcedureEnv</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2826">getMasterProcedureExecutor</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getMasterProcedureExecutor--">getMasterProcedureExecutor</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -3844,7 +3844,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getServerName</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2830">getServerName</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2831">getServerName</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/Server.html#getServerName--">getServerName</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/Server.html" title="interface in org.apache.hadoop.hbase">Server</a></code></dd>
@@ -3861,7 +3861,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getAssignmentManager</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/assignment/AssignmentManager.html" title="class in org.apache.hadoop.hbase.master.assignment">AssignmentManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2835">getAssignmentManager</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/assignment/AssignmentManager.html" title="class in org.apache.hadoop.hbase.master.assignment">AssignmentManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2836">getAssignmentManager</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getAssignmentManager--">getAssignmentManager</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -3876,7 +3876,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getCatalogJanitor</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/CatalogJanitor.html" title="class in org.apache.hadoop.hbase.master">CatalogJanitor</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2840">getCatalogJanitor</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/CatalogJanitor.html" title="class in org.apache.hadoop.hbase.master">CatalogJanitor</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2841">getCatalogJanitor</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getCatalogJanitor--">getCatalogJanitor</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -3891,7 +3891,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getRegionServerFatalLogBuffer</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/monitoring/MemoryBoundedLogMessageBuffer.html" title="class in org.apache.hadoop.hbase.monitoring">MemoryBoundedLogMessageBuffer</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2844">getRegionServerFatalLogBuffer</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/monitoring/MemoryBoundedLogMessageBuffer.html" title="class in org.apache.hadoop.hbase.monitoring">MemoryBoundedLogMessageBuffer</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2845">getRegionServerFatalLogBuffer</a>()</pre>
 </li>
 </ul>
 <a name="shutdown--">
@@ -3900,7 +3900,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>shutdown</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2852">shutdown</a>()
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2853">shutdown</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">Shutdown the cluster.
  Master runs a coordinated stop of all RegionServers and then itself.</div>
@@ -3916,7 +3916,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>stopMaster</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2884">stopMaster</a>()
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2885">stopMaster</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>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -3930,7 +3930,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>stop</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2892">stop</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;msg)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2893">stop</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;msg)</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/Stoppable.html#stop-java.lang.String-">Stoppable</a></code></span></div>
 <div class="block">Stop this service.
  Implementers should favor logging errors over throwing RuntimeExceptions.</div>
@@ -3950,7 +3950,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>checkServiceStarted</h4>
-<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2902">checkServiceStarted</a>()
+<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2903">checkServiceStarted</a>()
                             throws <a href="../../../../../org/apache/hadoop/hbase/ipc/ServerNotRunningYetException.html" title="class in org.apache.hadoop.hbase.ipc">ServerNotRunningYetException</a></pre>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -3964,7 +3964,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>checkInitialized</h4>
-<pre>void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2914">checkInitialized</a>()
+<pre>void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2915">checkInitialized</a>()
                throws <a href="../../../../../org/apache/hadoop/hbase/PleaseHoldException.html" title="class in org.apache.hadoop.hbase">PleaseHoldException</a>,
                       <a href="../../../../../org/apache/hadoop/hbase/ipc/ServerNotRunningYetException.html" title="class in org.apache.hadoop.hbase.ipc">ServerNotRunningYetException</a>,
                       <a href="../../../../../org/apache/hadoop/hbase/MasterNotRunningException.html" title="class in org.apache.hadoop.hbase">MasterNotRunningException</a>,
@@ -3984,7 +3984,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>isActiveMaster</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2934">isActiveMaster</a>()</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2935">isActiveMaster</a>()</pre>
 <div class="block">Report whether this master is currently the active master or not.
  If not active master, we are parked on ZK waiting to become active.
 
@@ -4003,7 +4003,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>isInitialized</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2948">isInitialized</a>()</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2949">isInitialized</a>()</pre>
 <div class="block">Report whether this master has completed with its initialization and is
  ready.  If ready, the master is also the active master.  A standby master
  is never ready.
@@ -4023,7 +4023,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>isInMaintenanceMode</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2958">isInMaintenanceMode</a>()</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2959">isInMaintenanceMode</a>()</pre>
 <div class="block">Report whether this master is in maintenance mode.</div>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
@@ -4039,7 +4039,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>setInitialized</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2963">setInitialized</a>(boolean&nbsp;isInitialized)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2964">setInitialized</a>(boolean&nbsp;isInitialized)</pre>
 </li>
 </ul>
 <a name="getInitializedEvent--">
@@ -4048,7 +4048,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getInitializedEvent</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/procedure2/ProcedureEvent.html" title="class in org.apache.hadoop.hbase.procedure2">ProcedureEvent</a>&lt;?&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2968">getInitializedEvent</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/procedure2/ProcedureEvent.html" title="class in org.apache.hadoop.hbase.procedure2">ProcedureEvent</a>&lt;?&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2969">getInitializedEvent</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getInitializedEvent--">getInitializedEvent</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -4063,7 +4063,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getAverageLoad</h4>
-<pre>public&nbsp;double&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2978">getAverageLoad</a>()</pre>
+<pre>public&nbsp;double&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2979">getAverageLoad</a>()</pre>
 <div class="block">Compute the average load across all region servers.
  Currently, this uses a very naive computation - just uses the number of
  regions being served, ignoring stats about number of requests.</div>
@@ -4079,7 +4079,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getSplitPlanCount</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2993">getSplitPlanCount</a>()</pre>
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.2994">getSplitPlanCount</a>()</pre>
 </li>
 </ul>
 <a name="getMergePlanCount--">
@@ -4088,7 +4088,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getMergePlanCount</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3000">getMergePlanCount</a>()</pre>
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3001">getMergePlanCount</a>()</pre>
 </li>
 </ul>
 <a name="registerService-com.google.protobuf.Service-">
@@ -4097,7 +4097,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>registerService</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3005">registerService</a>(com.google.protobuf.Service&nbsp;instance)</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3006">registerService</a>(com.google.protobuf.Service&nbsp;instance)</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/RegionServerServices.html#registerService-com.google.protobuf.Service-">RegionServerServices</a></code></span></div>
 <div class="block">Registers a new protocol buffer <code>Service</code> subclass as a coprocessor endpoint to be
  available for handling</div>
@@ -4121,7 +4121,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>constructMaster</h4>
-<pre>public static&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/HMaster.html" title="class in org.apache.hadoop.hbase.master">HMaster</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3030">constructMaster</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/hadoop/hbase/master/HMaster.html" titl [...]
+<pre>public static&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/HMaster.html" title="class in org.apache.hadoop.hbase.master">HMaster</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3031">constructMaster</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../../org/apache/hadoop/hbase/master/HMaster.html" titl [...]
                                       org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
 <div class="block">Utility for constructing an instance of the passed HMaster class.</div>
 <dl>
@@ -4138,7 +4138,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>main</h4>
-<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3049">main</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;args)</pre>
+<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3050">main</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;args)</pre>
 <dl>
 <dt><span class="seeLabel">See Also:</span></dt>
 <dd><a href="../../../../../org/apache/hadoop/hbase/master/HMasterCommandLine.html" title="class in org.apache.hadoop.hbase.master"><code>HMasterCommandLine</code></a></dd>
@@ -4151,7 +4151,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getHFileCleaner</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/cleaner/HFileCleaner.html" title="class in org.apache.hadoop.hbase.master.cleaner">HFileCleaner</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3055">getHFileCleaner</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/cleaner/HFileCleaner.html" title="class in org.apache.hadoop.hbase.master.cleaner">HFileCleaner</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3056">getHFileCleaner</a>()</pre>
 </li>
 </ul>
 <a name="getLogCleaner--">
@@ -4160,7 +4160,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getLogCleaner</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/cleaner/LogCleaner.html" title="class in org.apache.hadoop.hbase.master.cleaner">LogCleaner</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3059">getLogCleaner</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/cleaner/LogCleaner.html" title="class in org.apache.hadoop.hbase.master.cleaner">LogCleaner</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3060">getLogCleaner</a>()</pre>
 </li>
 </ul>
 <a name="getSnapshotManager--">
@@ -4169,7 +4169,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getSnapshotManager</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3067">getSnapshotManager</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3068">getSnapshotManager</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getSnapshotManager--">getSnapshotManager</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -4184,7 +4184,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getMasterProcedureManagerHost</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/procedure/MasterProcedureManagerHost.html" title="class in org.apache.hadoop.hbase.procedure">MasterProcedureManagerHost</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3075">getMasterProcedureManagerHost</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/procedure/MasterProcedureManagerHost.html" title="class in org.apache.hadoop.hbase.procedure">MasterProcedureManagerHost</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3076">getMasterProcedureManagerHost</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getMasterProcedureManagerHost--">getMasterProcedureManagerHost</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -4199,7 +4199,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getClusterSchema</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/ClusterSchema.html" title="interface in org.apache.hadoop.hbase.master">ClusterSchema</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3080">getClusterSchema</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/ClusterSchema.html" title="interface in org.apache.hadoop.hbase.master">ClusterSchema</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3081">getClusterSchema</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getClusterSchema--">getClusterSchema</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -4214,7 +4214,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>createNamespace</h4>
-<pre>long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3092">createNamespace</a>(<a href="../../../../../org/apache/hadoop/hbase/NamespaceDescriptor.html" title="class in org.apache.hadoop.hbase">NamespaceDescriptor</a>&nbsp;namespaceDescriptor,
+<pre>long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3093">createNamespace</a>(<a href="../../../../../org/apache/hadoop/hbase/NamespaceDescriptor.html" title="class in org.apache.hadoop.hbase">NamespaceDescriptor</a>&nbsp;namespaceDescriptor,
                      long&nbsp;nonceGroup,
                      long&nbsp;nonce)
               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>
@@ -4238,7 +4238,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>modifyNamespace</h4>
-<pre>long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3128">modifyNamespace</a>(<a href="../../../../../org/apache/hadoop/hbase/NamespaceDescriptor.html" title="class in org.apache.hadoop.hbase">NamespaceDescriptor</a>&nbsp;newNsDescriptor,
+<pre>long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3129">modifyNamespace</a>(<a href="../../../../../org/apache/hadoop/hbase/NamespaceDescriptor.html" title="class in org.apache.hadoop.hbase">NamespaceDescriptor</a>&nbsp;newNsDescriptor,
                      long&nbsp;nonceGroup,
                      long&nbsp;nonce)
               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>
@@ -4261,7 +4261,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>deleteNamespace</h4>
-<pre>long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3166">deleteNamespace</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;name,
+<pre>long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3167">deleteNamespace</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;name,
                      long&nbsp;nonceGroup,
                      long&nbsp;nonce)
               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>
@@ -4284,7 +4284,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getNamespace</h4>
-<pre><a href="../../../../../org/apache/hadoop/hbase/NamespaceDescriptor.html" title="class in org.apache.hadoop.hbase">NamespaceDescriptor</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3201">getNamespace</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;name)
+<pre><a href="../../../../../org/apache/hadoop/hbase/NamespaceDescriptor.html" title="class in org.apache.hadoop.hbase">NamespaceDescriptor</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3202">getNamespace</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;name)
                           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">Get a Namespace</div>
 <dl>
@@ -4303,7 +4303,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getNamespaces</h4>
-<pre><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/NamespaceDescriptor.html" title="class in org.apache.hadoop.hbase">NamespaceDescriptor</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3213">getNamespaces</a>()
+<pre><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/NamespaceDescriptor.html" title="class in org.apache.hadoop.hbase">NamespaceDescriptor</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3214">getNamespaces</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">Get all Namespaces</div>
 <dl>
@@ -4320,7 +4320,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>listNamespaces</h4>
-<pre>public&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="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3230">listNamespaces</a>()
+<pre>public&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="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3231">listNamespaces</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">List namespace names</div>
 <dl>
@@ -4337,7 +4337,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>listTableNamesByNamespace</h4>
-<pre>public&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/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3246">listTableNamesByNamespace</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=tru [...]
+<pre>public&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/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3247">listTableNamesByNamespace</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=tru [...]
                                           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/master/MasterServices.html#listTableNamesByNamespace-java.lang.String-">MasterServices</a></code></span></div>
 <div class="block">Get list of table names by namespace</div>
@@ -4359,7 +4359,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>listTableDescriptorsByNamespace</h4>
-<pre>public&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/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3252">listTableDescriptorsByNamespace</a>(<a href="https://docs.oracle.com/javase/8/docs/api/j [...]
+<pre>public&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/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3253">listTableDescriptorsByNamespace</a>(<a href="https://docs.oracle.com/javase/8/docs/api/j [...]
                                                       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/master/MasterServices.html#listTableDescriptorsByNamespace-java.lang.String-">MasterServices</a></code></span></div>
 <div class="block">Get list of table descriptors by namespace</div>
@@ -4381,7 +4381,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>abortProcedure</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3258">abortProcedure</a>(long&nbsp;procId,
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3259">abortProcedure</a>(long&nbsp;procId,
                               boolean&nbsp;mayInterruptIfRunning)
                        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/master/MasterServices.html#abortProcedure-long-boolean-">MasterServices</a></code></span></div>
@@ -4405,7 +4405,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getProcedures</h4>
-<pre>public&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/procedure2/Procedure.html" title="class in org.apache.hadoop.hbase.procedure2">Procedure</a>&lt;?&gt;&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3274">getProcedures</a>()
+<pre>public&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/procedure2/Procedure.html" title="class in org.apache.hadoop.hbase.procedure2">Procedure</a>&lt;?&gt;&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3275">getProcedures</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/master/MasterServices.html#getProcedures--">MasterServices</a></code></span></div>
 <div class="block">Get procedures</div>
@@ -4425,7 +4425,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getLocks</h4>
-<pre>public&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/procedure2/LockedResource.html" title="class in org.apache.hadoop.hbase.procedure2">LockedResource</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3290">getLocks</a>()
+<pre>public&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/procedure2/LockedResource.html" title="class in org.apache.hadoop.hbase.procedure2">LockedResource</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3291">getLocks</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/master/MasterServices.html#getLocks--">MasterServices</a></code></span></div>
 <div class="block">Get locks</div>
@@ -4445,7 +4445,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>listTableDescriptors</h4>
-<pre>public&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/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3315">listTableDescriptors</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/St [...]
+<pre>public&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/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3316">listTableDescriptors</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/St [...]
                                                   <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;regex,
                                                   <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/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&gt;&nbsp;tableNameList,
                                                   boolean&nbsp;includeSysTables)
@@ -4470,7 +4470,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>listTableNames</h4>
-<pre>public&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/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3336">listTableNames</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="c [...]
+<pre>public&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/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3337">listTableNames</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="c [...]
                                       <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;regex,
                                       boolean&nbsp;includeSysTables)
                                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>
@@ -4493,7 +4493,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getTableDescriptors</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/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3356">getTableDescriptors</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Li [...]
+<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/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3357">getTableDescriptors</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Li [...]
                                                   <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;namespace,
                                                   <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;regex,
                                                   <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/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&gt;&nbsp;tableNameList,
@@ -4514,7 +4514,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>filterTablesByRegex</h4>
-<pre>private static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3397">filterTablesByRegex</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&gt;&nbsp;descriptors,
+<pre>private static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3398">filterTablesByRegex</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&gt;&nbsp;descriptors,
                                         <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html?is-external=true" title="class or interface in java.util.regex">Pattern</a>&nbsp;pattern)</pre>
 <div class="block">Removes the table descriptors that don't match the pattern.</div>
 <dl>
@@ -4530,7 +4530,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getLastMajorCompactionTimestamp</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3415">getLastMajorCompactionTimestamp</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;table)
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3416">getLastMajorCompactionTimestamp</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;table)
                                      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>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
@@ -4551,7 +4551,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getLastMajorCompactionTimestampForRegion</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3421">getLastMajorCompactionTimestampForRegion</a>(byte[]&nbsp;regionName)
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3422">getLastMajorCompactionTimestampForRegion</a>(byte[]&nbsp;regionName)
                                               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>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
@@ -4570,7 +4570,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getMobCompactionState</h4>
-<pre>public&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3435">getMobCompactionState</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)</pre>
+<pre>public&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3436">getMobCompactionState</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)</pre>
 <div class="block">Gets the mob file compaction state for a specific table.
  Whether all the mob files are selected is known during the compaction execution, but
  the statistic is done just before compaction starts, it is hard to know the compaction
@@ -4590,7 +4590,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>reportMobCompactionStart</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3443">reportMobCompactionStart</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3444">reportMobCompactionStart</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)
                               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>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -4604,7 +4604,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>reportMobCompactionEnd</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3460">reportMobCompactionEnd</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3461">reportMobCompactionEnd</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)
                             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>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -4618,7 +4618,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>requestMobCompaction</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3485">requestMobCompaction</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3486">requestMobCompaction</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                                  <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/client/ColumnFamilyDescriptor.html" title="interface in org.apache.hadoop.hbase.client">ColumnFamilyDescriptor</a>&gt;&nbsp;columns,
                                  boolean&nbsp;allFiles)
                           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>
@@ -4639,7 +4639,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>isBalancerOn</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3496">isBalancerOn</a>()</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3497">isBalancerOn</a>()</pre>
 <div class="block">Queries the state of the <a href="../../../../../org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.html" title="class in org.apache.hadoop.hbase.zookeeper"><code>LoadBalancerTracker</code></a>. If the balancer is not initialized,
  false is returned.</div>
 <dl>
@@ -4654,7 +4654,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>isNormalizerOn</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3506">isNormalizerOn</a>()</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3507">isNormalizerOn</a>()</pre>
 <div class="block">Queries the state of the <a href="../../../../../org/apache/hadoop/hbase/zookeeper/RegionNormalizerTracker.html" title="class in org.apache.hadoop.hbase.zookeeper"><code>RegionNormalizerTracker</code></a>. If it's not initialized,
  false is returned.</div>
 </li>
@@ -4665,7 +4665,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>isSplitOrMergeEnabled</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3519">isSplitOrMergeEnabled</a>(<a href="../../../../../org/apache/hadoop/hbase/client/MasterSwitchType.html" title="enum in org.apache.hadoop.hbase.client">MasterSwitchType</a>&nbsp;switchType)</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3520">isSplitOrMergeEnabled</a>(<a href="../../../../../org/apache/hadoop/hbase/client/MasterSwitchType.html" title="enum in org.apache.hadoop.hbase.client">MasterSwitchType</a>&nbsp;switchType)</pre>
 <div class="block">Queries the state of the <a href="../../../../../org/apache/hadoop/hbase/master/SplitOrMergeTracker.html" title="class in org.apache.hadoop.hbase.master"><code>SplitOrMergeTracker</code></a>. If it is not initialized,
  false is returned. If switchType is illegal, false will return.</div>
 <dl>
@@ -4684,7 +4684,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getLoadBalancerClassName</h4>
-<pre>public&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>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3530">getLoadBalancerClassName</a>()</pre>
+<pre>public&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>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3531">getLoadBalancerClassName</a>()</pre>
 <div class="block">Fetch the configured <a href="../../../../../org/apache/hadoop/hbase/master/LoadBalancer.html" title="interface in org.apache.hadoop.hbase.master"><code>LoadBalancer</code></a> class name. If none is set, a default is returned.</div>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
@@ -4698,7 +4698,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getRegionNormalizerTracker</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/zookeeper/RegionNormalizerTracker.html" title="class in org.apache.hadoop.hbase.zookeeper">RegionNormalizerTracker</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3538">getRegionNormalizerTracker</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/zookeeper/RegionNormalizerTracker.html" title="class in org.apache.hadoop.hbase.zookeeper">RegionNormalizerTracker</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3539">getRegionNormalizerTracker</a>()</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>RegionNormalizerTracker instance</dd>
@@ -4711,7 +4711,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getSplitOrMergeTracker</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/SplitOrMergeTracker.html" title="class in org.apache.hadoop.hbase.master">SplitOrMergeTracker</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3542">getSplitOrMergeTracker</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/SplitOrMergeTracker.html" title="class in org.apache.hadoop.hbase.master">SplitOrMergeTracker</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3543">getSplitOrMergeTracker</a>()</pre>
 </li>
 </ul>
 <a name="getLoadBalancer--">
@@ -4720,7 +4720,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getLoadBalancer</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/LoadBalancer.html" title="interface in org.apache.hadoop.hbase.master">LoadBalancer</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3547">getLoadBalancer</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/LoadBalancer.html" title="interface in org.apache.hadoop.hbase.master">LoadBalancer</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3548">getLoadBalancer</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getLoadBalancer--">getLoadBalancer</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -4735,7 +4735,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getFavoredNodesManager</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/favored/FavoredNodesManager.html" title="class in org.apache.hadoop.hbase.favored">FavoredNodesManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3552">getFavoredNodesManager</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/favored/FavoredNodesManager.html" title="class in org.apache.hadoop.hbase.favored">FavoredNodesManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3553">getFavoredNodesManager</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getFavoredNodesManager--">getFavoredNodesManager</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -4750,7 +4750,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>executePeerProcedure</h4>
-<pre>private&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3556">executePeerProcedure</a>(<a href="../../../../../org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.html" title="class in org.apache.hadoop.hbase.master.replication">AbstractPeerProcedure</a>&lt;?&gt;&nbsp;procedure)
+<pre>private&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3557">executePeerProcedure</a>(<a href="../../../../../org/apache/hadoop/hbase/master/replication/AbstractPeerProcedure.html" title="class in org.apache.hadoop.hbase.master.replication">AbstractPeerProcedure</a>&lt;?&gt;&nbsp;procedure)
                            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>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -4764,7 +4764,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>addReplicationPeer</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3563">addReplicationPeer</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;peerId,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3564">addReplicationPeer</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;peerId,
                                <a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationPeerConfig.html" title="class in org.apache.hadoop.hbase.replication">ReplicationPeerConfig</a>&nbsp;peerConfig,
                                boolean&nbsp;enabled)
                         throws <a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationException.html" title="class in org.apache.hadoop.hbase.replication">ReplicationException</a>,
@@ -4790,7 +4790,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>removeReplicationPeer</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3571">removeReplicationPeer</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;peerId)
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3572">removeReplicationPeer</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;peerId)
                            throws <a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationException.html" title="class in org.apache.hadoop.hbase.replication">ReplicationException</a>,
                                   <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/master/MasterServices.html#removeReplicationPeer-java.lang.String-">MasterServices</a></code></span></div>
@@ -4812,7 +4812,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>enableReplicationPeer</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3577">enableReplicationPeer</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;peerId)
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3578">enableReplicationPeer</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;peerId)
                            throws <a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationException.html" title="class in org.apache.hadoop.hbase.replication">ReplicationException</a>,
                                   <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/master/MasterServices.html#enableReplicationPeer-java.lang.String-">MasterServices</a></code></span></div>
@@ -4834,7 +4834,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>disableReplicationPeer</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3583">disableReplicationPeer</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;peerId)
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3584">disableReplicationPeer</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;peerId)
                             throws <a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationException.html" title="class in org.apache.hadoop.hbase.replication">ReplicationException</a>,
                                    <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/master/MasterServices.html#disableReplicationPeer-java.lang.String-">MasterServices</a></code></span></div>
@@ -4856,7 +4856,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getReplicationPeerConfig</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationPeerConfig.html" title="class in org.apache.hadoop.hbase.replication">ReplicationPeerConfig</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3589">getReplicationPeerConfig</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;peerId)
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationPeerConfig.html" title="class in org.apache.hadoop.hbase.replication">ReplicationPeerConfig</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3590">getReplicationPeerConfig</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;peerId)
                                                throws <a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationException.html" title="class in org.apache.hadoop.hbase.replication">ReplicationException</a>,
                                                       <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/master/MasterServices.html#getReplicationPeerConfig-java.lang.String-">MasterServices</a></code></span></div>
@@ -4880,7 +4880,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>updateReplicationPeerConfig</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3604">updateReplicationPeerConfig</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;peerId,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3605">updateReplicationPeerConfig</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;peerId,
                                         <a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationPeerConfig.html" title="class in org.apache.hadoop.hbase.replication">ReplicationPeerConfig</a>&nbsp;peerConfig)
                                  throws <a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationException.html" title="class in org.apache.hadoop.hbase.replication">ReplicationException</a>,
                                         <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>
@@ -4904,7 +4904,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>listReplicationPeers</h4>
-<pre>public&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/replication/ReplicationPeerDescription.html" title="class in org.apache.hadoop.hbase.replication">ReplicationPeerDescription</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3612">listReplicationPeers</a>(<a href="https://docs.oracle.com/ja [...]
+<pre>public&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/replication/ReplicationPeerDescription.html" title="class in org.apache.hadoop.hbase.replication">ReplicationPeerDescription</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3613">listReplicationPeers</a>(<a href="https://docs.oracle.com/ja [...]
                                                       throws <a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationException.html" title="class in org.apache.hadoop.hbase.replication">ReplicationException</a>,
                                                              <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/master/MasterServices.html#listReplicationPeers-java.lang.String-">MasterServices</a></code></span></div>
@@ -4928,7 +4928,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>transitReplicationPeerSyncReplicationState</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3628">transitReplicationPeerSyncReplicationState</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;peerId,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3629">transitReplicationPeerSyncReplicationState</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;peerId,
                                                        <a href="../../../../../org/apache/hadoop/hbase/replication/SyncReplicationState.html" title="enum in org.apache.hadoop.hbase.replication">SyncReplicationState</a>&nbsp;state)
                                                 throws <a href="../../../../../org/apache/hadoop/hbase/replication/ReplicationException.html" title="class in org.apache.hadoop.hbase.replication">ReplicationException</a>,
                                                        <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>
@@ -4952,7 +4952,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>decommissionRegionServers</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3642">decommissionRegionServers</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/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&gt;&nbsp;servers,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3643">decommissionRegionServers</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/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&gt;&nbsp;servers,
                                       boolean&nbsp;offload)
                                throws <a href="../../../../../org/apache/hadoop/hbase/HBaseIOException.html" title="class in org.apache.hadoop.hbase">HBaseIOException</a></pre>
 <div class="block">Mark region server(s) as decommissioned (previously called 'draining') to prevent additional
@@ -4971,7 +4971,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>listDecommissionedRegionServers</h4>
-<pre>public&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/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3681">listDecommissionedRegionServers</a>()</pre>
+<pre>public&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/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3682">listDecommissionedRegionServers</a>()</pre>
 <div class="block">List region servers marked as decommissioned (previously called 'draining') to not get regions
  assigned to them.</div>
 <dl>
@@ -4986,7 +4986,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>recommissionRegionServer</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3690">recommissionRegionServer</a>(<a href="../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&nbsp;server,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3691">recommissionRegionServer</a>(<a href="../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&nbsp;server,
                                      <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;byte[]&gt;&nbsp;encodedRegionNames)
                               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">Remove decommission marker (previously called 'draining') from a region server to allow regions
@@ -5005,7 +5005,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getLockManager</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/locking/LockManager.html" title="class in org.apache.hadoop.hbase.master.locking">LockManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3729">getLockManager</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/locking/LockManager.html" title="class in org.apache.hadoop.hbase.master.locking">LockManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3730">getLockManager</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getLockManager--">getLockManager</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></dd>
@@ -5020,7 +5020,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getQuotaObserverChore</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/quotas/QuotaObserverChore.html" title="class in org.apache.hadoop.hbase.quotas">QuotaObserverChore</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3733">getQuotaObserverChore</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/quotas/QuotaObserverChore.html" title="class in org.apache.hadoop.hbase.quotas">QuotaObserverChore</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3734">getQuotaObserverChore</a>()</pre>
 </li>
 </ul>
 <a name="getSpaceQuotaSnapshotNotifier--">
@@ -5029,7 +5029,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getSpaceQuotaSnapshotNotifier</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/quotas/SpaceQuotaSnapshotNotifier.html" title="interface in org.apache.hadoop.hbase.quotas">SpaceQuotaSnapshotNotifier</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3737">getSpaceQuotaSnapshotNotifier</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/quotas/SpaceQuotaSnapshotNotifier.html" title="interface in org.apache.hadoop.hbase.quotas">SpaceQuotaSnapshotNotifier</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3738">getSpaceQuotaSnapshotNotifier</a>()</pre>
 </li>
 </ul>
 <a name="getRemoteProcedure-long-">
@@ -5038,7 +5038,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getRemoteProcedure</h4>
-<pre>private&nbsp;<a href="../../../../../org/apache/hadoop/hbase/procedure2/RemoteProcedureDispatcher.RemoteProcedure.html" title="interface in org.apache.hadoop.hbase.procedure2">RemoteProcedureDispatcher.RemoteProcedure</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/master/procedure/MasterProcedureEnv.html" title="class in org.apache.hadoop.hbase.master.procedure">MasterProcedureEnv</a>,?&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#lin [...]
+<pre>private&nbsp;<a href="../../../../../org/apache/hadoop/hbase/procedure2/RemoteProcedureDispatcher.RemoteProcedure.html" title="interface in org.apache.hadoop.hbase.procedure2">RemoteProcedureDispatcher.RemoteProcedure</a>&lt;<a href="../../../../../org/apache/hadoop/hbase/master/procedure/MasterProcedureEnv.html" title="class in org.apache.hadoop.hbase.master.procedure">MasterProcedureEnv</a>,?&gt;&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#lin [...]
 </li>
 </ul>
 <a name="remoteProcedureCompleted-long-">
@@ -5047,7 +5047,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>remoteProcedureCompleted</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3751">remoteProcedureCompleted</a>(long&nbsp;procId)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3752">remoteProcedureCompleted</a>(long&nbsp;procId)</pre>
 </li>
 </ul>
 <a name="remoteProcedureFailed-long-org.apache.hadoop.hbase.procedure2.RemoteProcedureException-">
@@ -5056,7 +5056,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>remoteProcedureFailed</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3759">remoteProcedureFailed</a>(long&nbsp;procId,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3760">remoteProcedureFailed</a>(long&nbsp;procId,
                                   <a href="../../../../../org/apache/hadoop/hbase/procedure2/RemoteProcedureException.html" title="class in org.apache.hadoop.hbase.procedure2">RemoteProcedureException</a>&nbsp;error)</pre>
 </li>
 </ul>
@@ -5066,7 +5066,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>reopenRegions</h4>
-<pre>long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3778">reopenRegions</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3779">reopenRegions</a>(<a href="../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                    <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;byte[]&gt;&nbsp;regionNames,
                    long&nbsp;nonceGroup,
                    long&nbsp;nonce)
@@ -5092,7 +5092,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getReplicationPeerManager</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.html" title="class in org.apache.hadoop.hbase.master.replication">ReplicationPeerManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3800">getReplicationPeerManager</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.html" title="class in org.apache.hadoop.hbase.master.replication">ReplicationPeerManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3801">getReplicationPeerManager</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getReplicationPeerManager--">MasterServices</a></code></span></div>
 <div class="block">Returns the <a href="../../../../../org/apache/hadoop/hbase/master/replication/ReplicationPeerManager.html" title="class in org.apache.hadoop.hbase.master.replication"><code>ReplicationPeerManager</code></a>.</div>
 <dl>
@@ -5107,7 +5107,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getReplicationLoad</h4>
-<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<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>,<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/hba [...]
+<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<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>,<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/hba [...]
 </li>
 </ul>
 <a name="decorateMasterConfiguration-org.apache.hadoop.conf.Configuration-">
@@ -5116,7 +5116,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>decorateMasterConfiguration</h4>
-<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3834">decorateMasterConfiguration</a>(org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
+<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3835">decorateMasterConfiguration</a>(org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
 <div class="block">This method modifies the master's configuration in order to inject replication-related features</div>
 </li>
 </ul>
@@ -5126,7 +5126,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getSnapshotQuotaObserverChore</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/quotas/SnapshotQuotaObserverChore.html" title="class in org.apache.hadoop.hbase.quotas">SnapshotQuotaObserverChore</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3849">getSnapshotQuotaObserverChore</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/quotas/SnapshotQuotaObserverChore.html" title="class in org.apache.hadoop.hbase.quotas">SnapshotQuotaObserverChore</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3850">getSnapshotQuotaObserverChore</a>()</pre>
 </li>
 </ul>
 <a name="getSyncReplicationReplayWALManager--">
@@ -5135,7 +5135,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getSyncReplicationReplayWALManager</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/replication/SyncReplicationReplayWALManager.html" title="class in org.apache.hadoop.hbase.master.replication">SyncReplicationReplayWALManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3854">getSyncReplicationReplayWALManager</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/replication/SyncReplicationReplayWALManager.html" title="class in org.apache.hadoop.hbase.master.replication">SyncReplicationReplayWALManager</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3855">getSyncReplicationReplayWALManager</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#getSyncReplicationReplayWALManager--">MasterServices</a></code></span></div>
 <div class="block">Returns the <a href="../../../../../org/apache/hadoop/hbase/master/replication/SyncReplicationReplayWALManager.html" title="class in org.apache.hadoop.hbase.master.replication"><code>SyncReplicationReplayWALManager</code></a>.</div>
 <dl>
@@ -5150,7 +5150,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getWalGroupsReplicationStatus</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;<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>,<a href="../../../../../org/apache/hadoop/hbase/replication/regionserver/ReplicationStatus.html" title="class in org.apache.hadoop.hbase.replication.regionserver">ReplicationStatus</a>&gt;&nbsp; [...]
+<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;<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>,<a href="../../../../../org/apache/hadoop/hbase/replication/regionserver/ReplicationStatus.html" title="class in org.apache.hadoop.hbase.replication.regionserver">ReplicationStatus</a>&gt;&nbsp; [...]
 <dl>
 <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/regionserver/HRegionServer.html#getWalGroupsReplicationStatus--">getWalGroupsReplicationStatus</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/HRegionServer.html" title="class in org.apache.hadoop.hbase.regionserver">HRegionServer</a></code></dd>
@@ -5163,7 +5163,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getHbckChore</h4>
-<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/HbckChore.html" title="class in org.apache.hadoop.hbase.master">HbckChore</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3866">getHbckChore</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../org/apache/hadoop/hbase/master/HbckChore.html" title="class in org.apache.hadoop.hbase.master">HbckChore</a>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3867">getHbckChore</a>()</pre>
 </li>
 </ul>
 <a name="getClusterId--">
@@ -5172,7 +5172,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockList">
 <li class="blockList">
 <h4>getClusterId</h4>
-<pre>public&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>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3871">getClusterId</a>()</pre>
+<pre>public&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>&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3872">getClusterId</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
 <dd><code><a href="../../../../../org/apache/hadoop/hbase/regionserver/HRegionServer.html#getClusterId--">getClusterId</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/regionserver/HRegionServer.html" title="class in org.apache.hadoop.hbase.regionserver">HRegionServer</a></code></dd>
@@ -5185,7 +5185,7 @@ implements <a href="../../../../../org/apache/hadoop/hbase/master/MasterServices
 <ul class="blockListLast">
 <li class="blockList">
 <h4>runReplicationBarrierCleaner</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3879">runReplicationBarrierCleaner</a>()</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/master/HMaster.html#line.3880">runReplicationBarrierCleaner</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/hadoop/hbase/master/MasterServices.html#runReplicationBarrierCleaner--">MasterServices</a></code></span></div>
 <div class="block">Run the ReplicationBarrierChore.</div>
 <dl>
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/Version.html b/devapidocs/src-html/org/apache/hadoop/hbase/Version.html
index 2cc7bfd..4e73c95 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/Version.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/Version.html
@@ -18,9 +18,9 @@
 <span class="sourceLineNo">010</span>  justification="Intentional; to be modified in test")<a name="line.10"></a>
 <span class="sourceLineNo">011</span>public class Version {<a name="line.11"></a>
 <span class="sourceLineNo">012</span>  public static final String version = new String("3.0.0-SNAPSHOT");<a name="line.12"></a>
-<span class="sourceLineNo">013</span>  public static final String revision = "1eafba5603bf9de3aba79d5999a9cde91b23d444";<a name="line.13"></a>
+<span class="sourceLineNo">013</span>  public static final String revision = "66d1258aa3a8c48a6001f5ec9d8eaeb64415873e";<a name="line.13"></a>
 <span class="sourceLineNo">014</span>  public static final String user = "jenkins";<a name="line.14"></a>
-<span class="sourceLineNo">015</span>  public static final String date = "Tue Jan  7 14:37:03 UTC 2020";<a name="line.15"></a>
+<span class="sourceLineNo">015</span>  public static final String date = "Wed Jan  8 14:36:19 UTC 2020";<a name="line.15"></a>
 <span class="sourceLineNo">016</span>  public static final String url = "git://jenkins-websites-he-de.apache.org/home/jenkins/jenkins-slave/workspace/hbase_generate_website/hbase";<a name="line.16"></a>
 <span class="sourceLineNo">017</span>  public static final String srcChecksum = "(stdin)=";<a name="line.17"></a>
 <span class="sourceLineNo">018</span>}<a name="line.18"></a>
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html
index 8e8c2bc..63f1c1d 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html
@@ -1696,2201 +1696,2202 @@
 <span class="sourceLineNo">1688</span>   * @return Maximum time we should run balancer for<a name="line.1688"></a>
 <span class="sourceLineNo">1689</span>   */<a name="line.1689"></a>
 <span class="sourceLineNo">1690</span>  private int getMaxBalancingTime() {<a name="line.1690"></a>
-<span class="sourceLineNo">1691</span>    int maxBalancingTime = getConfiguration().getInt(HConstants.HBASE_BALANCER_MAX_BALANCING, -1);<a name="line.1691"></a>
-<span class="sourceLineNo">1692</span>    if (maxBalancingTime == -1) {<a name="line.1692"></a>
-<span class="sourceLineNo">1693</span>      // if max balancing time isn't set, defaulting it to period time<a name="line.1693"></a>
-<span class="sourceLineNo">1694</span>      maxBalancingTime = getConfiguration().getInt(HConstants.HBASE_BALANCER_PERIOD,<a name="line.1694"></a>
-<span class="sourceLineNo">1695</span>        HConstants.DEFAULT_HBASE_BALANCER_PERIOD);<a name="line.1695"></a>
-<span class="sourceLineNo">1696</span>    }<a name="line.1696"></a>
-<span class="sourceLineNo">1697</span>    return maxBalancingTime;<a name="line.1697"></a>
-<span class="sourceLineNo">1698</span>  }<a name="line.1698"></a>
-<span class="sourceLineNo">1699</span><a name="line.1699"></a>
-<span class="sourceLineNo">1700</span>  /**<a name="line.1700"></a>
-<span class="sourceLineNo">1701</span>   * @return Maximum number of regions in transition<a name="line.1701"></a>
-<span class="sourceLineNo">1702</span>   */<a name="line.1702"></a>
-<span class="sourceLineNo">1703</span>  private int getMaxRegionsInTransition() {<a name="line.1703"></a>
-<span class="sourceLineNo">1704</span>    int numRegions = this.assignmentManager.getRegionStates().getRegionAssignments().size();<a name="line.1704"></a>
-<span class="sourceLineNo">1705</span>    return Math.max((int) Math.floor(numRegions * this.maxRitPercent), 1);<a name="line.1705"></a>
-<span class="sourceLineNo">1706</span>  }<a name="line.1706"></a>
-<span class="sourceLineNo">1707</span><a name="line.1707"></a>
-<span class="sourceLineNo">1708</span>  /**<a name="line.1708"></a>
-<span class="sourceLineNo">1709</span>   * It first sleep to the next balance plan start time. Meanwhile, throttling by the max<a name="line.1709"></a>
-<span class="sourceLineNo">1710</span>   * number regions in transition to protect availability.<a name="line.1710"></a>
-<span class="sourceLineNo">1711</span>   * @param nextBalanceStartTime The next balance plan start time<a name="line.1711"></a>
-<span class="sourceLineNo">1712</span>   * @param maxRegionsInTransition max number of regions in transition<a name="line.1712"></a>
-<span class="sourceLineNo">1713</span>   * @param cutoffTime when to exit balancer<a name="line.1713"></a>
-<span class="sourceLineNo">1714</span>   */<a name="line.1714"></a>
-<span class="sourceLineNo">1715</span>  private void balanceThrottling(long nextBalanceStartTime, int maxRegionsInTransition,<a name="line.1715"></a>
-<span class="sourceLineNo">1716</span>      long cutoffTime) {<a name="line.1716"></a>
-<span class="sourceLineNo">1717</span>    boolean interrupted = false;<a name="line.1717"></a>
-<span class="sourceLineNo">1718</span><a name="line.1718"></a>
-<span class="sourceLineNo">1719</span>    // Sleep to next balance plan start time<a name="line.1719"></a>
-<span class="sourceLineNo">1720</span>    // But if there are zero regions in transition, it can skip sleep to speed up.<a name="line.1720"></a>
-<span class="sourceLineNo">1721</span>    while (!interrupted &amp;&amp; System.currentTimeMillis() &lt; nextBalanceStartTime<a name="line.1721"></a>
-<span class="sourceLineNo">1722</span>        &amp;&amp; this.assignmentManager.getRegionStates().hasRegionsInTransition()) {<a name="line.1722"></a>
-<span class="sourceLineNo">1723</span>      try {<a name="line.1723"></a>
-<span class="sourceLineNo">1724</span>        Thread.sleep(100);<a name="line.1724"></a>
-<span class="sourceLineNo">1725</span>      } catch (InterruptedException ie) {<a name="line.1725"></a>
-<span class="sourceLineNo">1726</span>        interrupted = true;<a name="line.1726"></a>
-<span class="sourceLineNo">1727</span>      }<a name="line.1727"></a>
-<span class="sourceLineNo">1728</span>    }<a name="line.1728"></a>
-<span class="sourceLineNo">1729</span><a name="line.1729"></a>
-<span class="sourceLineNo">1730</span>    // Throttling by max number regions in transition<a name="line.1730"></a>
-<span class="sourceLineNo">1731</span>    while (!interrupted<a name="line.1731"></a>
-<span class="sourceLineNo">1732</span>        &amp;&amp; maxRegionsInTransition &gt; 0<a name="line.1732"></a>
-<span class="sourceLineNo">1733</span>        &amp;&amp; this.assignmentManager.getRegionStates().getRegionsInTransitionCount()<a name="line.1733"></a>
-<span class="sourceLineNo">1734</span>        &gt;= maxRegionsInTransition &amp;&amp; System.currentTimeMillis() &lt;= cutoffTime) {<a name="line.1734"></a>
-<span class="sourceLineNo">1735</span>      try {<a name="line.1735"></a>
-<span class="sourceLineNo">1736</span>        // sleep if the number of regions in transition exceeds the limit<a name="line.1736"></a>
-<span class="sourceLineNo">1737</span>        Thread.sleep(100);<a name="line.1737"></a>
-<span class="sourceLineNo">1738</span>      } catch (InterruptedException ie) {<a name="line.1738"></a>
-<span class="sourceLineNo">1739</span>        interrupted = true;<a name="line.1739"></a>
-<span class="sourceLineNo">1740</span>      }<a name="line.1740"></a>
-<span class="sourceLineNo">1741</span>    }<a name="line.1741"></a>
-<span class="sourceLineNo">1742</span><a name="line.1742"></a>
-<span class="sourceLineNo">1743</span>    if (interrupted) Thread.currentThread().interrupt();<a name="line.1743"></a>
-<span class="sourceLineNo">1744</span>  }<a name="line.1744"></a>
-<span class="sourceLineNo">1745</span><a name="line.1745"></a>
-<span class="sourceLineNo">1746</span>  public boolean balance() throws IOException {<a name="line.1746"></a>
-<span class="sourceLineNo">1747</span>    return balance(false);<a name="line.1747"></a>
-<span class="sourceLineNo">1748</span>  }<a name="line.1748"></a>
-<span class="sourceLineNo">1749</span><a name="line.1749"></a>
-<span class="sourceLineNo">1750</span>  public boolean balance(boolean force) throws IOException {<a name="line.1750"></a>
-<span class="sourceLineNo">1751</span>    // if master not initialized, don't run balancer.<a name="line.1751"></a>
-<span class="sourceLineNo">1752</span>    if (!isInitialized()) {<a name="line.1752"></a>
-<span class="sourceLineNo">1753</span>      LOG.debug("Master has not been initialized, don't run balancer.");<a name="line.1753"></a>
-<span class="sourceLineNo">1754</span>      return false;<a name="line.1754"></a>
-<span class="sourceLineNo">1755</span>    }<a name="line.1755"></a>
-<span class="sourceLineNo">1756</span><a name="line.1756"></a>
-<span class="sourceLineNo">1757</span>    if (isInMaintenanceMode()) {<a name="line.1757"></a>
-<span class="sourceLineNo">1758</span>      LOG.info("Master is in maintenanceMode mode, don't run balancer.");<a name="line.1758"></a>
-<span class="sourceLineNo">1759</span>      return false;<a name="line.1759"></a>
-<span class="sourceLineNo">1760</span>    }<a name="line.1760"></a>
-<span class="sourceLineNo">1761</span><a name="line.1761"></a>
-<span class="sourceLineNo">1762</span>    synchronized (this.balancer) {<a name="line.1762"></a>
-<span class="sourceLineNo">1763</span>      // If balance not true, don't run balancer.<a name="line.1763"></a>
-<span class="sourceLineNo">1764</span>      if (!this.loadBalancerTracker.isBalancerOn()) return false;<a name="line.1764"></a>
-<span class="sourceLineNo">1765</span>        // Only allow one balance run at at time.<a name="line.1765"></a>
-<span class="sourceLineNo">1766</span>      if (this.assignmentManager.hasRegionsInTransition()) {<a name="line.1766"></a>
-<span class="sourceLineNo">1767</span>        List&lt;RegionStateNode&gt; regionsInTransition = assignmentManager.getRegionsInTransition();<a name="line.1767"></a>
-<span class="sourceLineNo">1768</span>        // if hbase:meta region is in transition, result of assignment cannot be recorded<a name="line.1768"></a>
-<span class="sourceLineNo">1769</span>        // ignore the force flag in that case<a name="line.1769"></a>
-<span class="sourceLineNo">1770</span>        boolean metaInTransition = assignmentManager.isMetaRegionInTransition();<a name="line.1770"></a>
-<span class="sourceLineNo">1771</span>        String prefix = force &amp;&amp; !metaInTransition ? "R" : "Not r";<a name="line.1771"></a>
-<span class="sourceLineNo">1772</span>        List&lt;RegionStateNode&gt; toPrint = regionsInTransition;<a name="line.1772"></a>
-<span class="sourceLineNo">1773</span>        int max = 5;<a name="line.1773"></a>
-<span class="sourceLineNo">1774</span>        boolean truncated = false;<a name="line.1774"></a>
-<span class="sourceLineNo">1775</span>        if (regionsInTransition.size() &gt; max) {<a name="line.1775"></a>
-<span class="sourceLineNo">1776</span>          toPrint = regionsInTransition.subList(0, max);<a name="line.1776"></a>
-<span class="sourceLineNo">1777</span>          truncated = true;<a name="line.1777"></a>
-<span class="sourceLineNo">1778</span>        }<a name="line.1778"></a>
-<span class="sourceLineNo">1779</span>        LOG.info(prefix + "unning balancer because " + regionsInTransition.size() +<a name="line.1779"></a>
-<span class="sourceLineNo">1780</span>          " region(s) in transition: " + toPrint + (truncated? "(truncated list)": ""));<a name="line.1780"></a>
-<span class="sourceLineNo">1781</span>        if (!force || metaInTransition) return false;<a name="line.1781"></a>
-<span class="sourceLineNo">1782</span>      }<a name="line.1782"></a>
-<span class="sourceLineNo">1783</span>      if (this.serverManager.areDeadServersInProgress()) {<a name="line.1783"></a>
-<span class="sourceLineNo">1784</span>        LOG.info("Not running balancer because processing dead regionserver(s): " +<a name="line.1784"></a>
-<span class="sourceLineNo">1785</span>          this.serverManager.getDeadServers());<a name="line.1785"></a>
-<span class="sourceLineNo">1786</span>        return false;<a name="line.1786"></a>
-<span class="sourceLineNo">1787</span>      }<a name="line.1787"></a>
-<span class="sourceLineNo">1788</span><a name="line.1788"></a>
-<span class="sourceLineNo">1789</span>      if (this.cpHost != null) {<a name="line.1789"></a>
-<span class="sourceLineNo">1790</span>        try {<a name="line.1790"></a>
-<span class="sourceLineNo">1791</span>          if (this.cpHost.preBalance()) {<a name="line.1791"></a>
-<span class="sourceLineNo">1792</span>            LOG.debug("Coprocessor bypassing balancer request");<a name="line.1792"></a>
-<span class="sourceLineNo">1793</span>            return false;<a name="line.1793"></a>
-<span class="sourceLineNo">1794</span>          }<a name="line.1794"></a>
-<span class="sourceLineNo">1795</span>        } catch (IOException ioe) {<a name="line.1795"></a>
-<span class="sourceLineNo">1796</span>          LOG.error("Error invoking master coprocessor preBalance()", ioe);<a name="line.1796"></a>
-<span class="sourceLineNo">1797</span>          return false;<a name="line.1797"></a>
-<span class="sourceLineNo">1798</span>        }<a name="line.1798"></a>
-<span class="sourceLineNo">1799</span>      }<a name="line.1799"></a>
-<span class="sourceLineNo">1800</span><a name="line.1800"></a>
-<span class="sourceLineNo">1801</span>      boolean isByTable = getConfiguration().getBoolean("hbase.master.loadbalance.bytable", false);<a name="line.1801"></a>
-<span class="sourceLineNo">1802</span>      Map&lt;TableName, Map&lt;ServerName, List&lt;RegionInfo&gt;&gt;&gt; assignments =<a name="line.1802"></a>
-<span class="sourceLineNo">1803</span>        this.assignmentManager.getRegionStates()<a name="line.1803"></a>
-<span class="sourceLineNo">1804</span>          .getAssignmentsForBalancer(tableStateManager, this.serverManager.getOnlineServersList(),<a name="line.1804"></a>
-<span class="sourceLineNo">1805</span>            isByTable);<a name="line.1805"></a>
-<span class="sourceLineNo">1806</span>      for (Map&lt;ServerName, List&lt;RegionInfo&gt;&gt; serverMap : assignments.values()) {<a name="line.1806"></a>
-<span class="sourceLineNo">1807</span>        serverMap.keySet().removeAll(this.serverManager.getDrainingServersList());<a name="line.1807"></a>
-<span class="sourceLineNo">1808</span>      }<a name="line.1808"></a>
-<span class="sourceLineNo">1809</span><a name="line.1809"></a>
-<span class="sourceLineNo">1810</span>      //Give the balancer the current cluster state.<a name="line.1810"></a>
-<span class="sourceLineNo">1811</span>      this.balancer.setClusterMetrics(getClusterMetricsWithoutCoprocessor());<a name="line.1811"></a>
-<span class="sourceLineNo">1812</span>      this.balancer.setClusterLoad(assignments);<a name="line.1812"></a>
-<span class="sourceLineNo">1813</span><a name="line.1813"></a>
-<span class="sourceLineNo">1814</span>      List&lt;RegionPlan&gt; plans = new ArrayList&lt;&gt;();<a name="line.1814"></a>
-<span class="sourceLineNo">1815</span>      for (Entry&lt;TableName, Map&lt;ServerName, List&lt;RegionInfo&gt;&gt;&gt; e : assignments.entrySet()) {<a name="line.1815"></a>
-<span class="sourceLineNo">1816</span>        List&lt;RegionPlan&gt; partialPlans = this.balancer.balanceCluster(e.getKey(), e.getValue());<a name="line.1816"></a>
-<span class="sourceLineNo">1817</span>        if (partialPlans != null) {<a name="line.1817"></a>
-<span class="sourceLineNo">1818</span>          plans.addAll(partialPlans);<a name="line.1818"></a>
-<span class="sourceLineNo">1819</span>        }<a name="line.1819"></a>
-<span class="sourceLineNo">1820</span>      }<a name="line.1820"></a>
+<span class="sourceLineNo">1691</span>    // if max balancing time isn't set, defaulting it to period time<a name="line.1691"></a>
+<span class="sourceLineNo">1692</span>    int maxBalancingTime = getConfiguration().getInt(HConstants.HBASE_BALANCER_MAX_BALANCING,<a name="line.1692"></a>
+<span class="sourceLineNo">1693</span>      getConfiguration()<a name="line.1693"></a>
+<span class="sourceLineNo">1694</span>        .getInt(HConstants.HBASE_BALANCER_PERIOD, HConstants.DEFAULT_HBASE_BALANCER_PERIOD));<a name="line.1694"></a>
+<span class="sourceLineNo">1695</span>    return maxBalancingTime;<a name="line.1695"></a>
+<span class="sourceLineNo">1696</span>  }<a name="line.1696"></a>
+<span class="sourceLineNo">1697</span><a name="line.1697"></a>
+<span class="sourceLineNo">1698</span>  /**<a name="line.1698"></a>
+<span class="sourceLineNo">1699</span>   * @return Maximum number of regions in transition<a name="line.1699"></a>
+<span class="sourceLineNo">1700</span>   */<a name="line.1700"></a>
+<span class="sourceLineNo">1701</span>  private int getMaxRegionsInTransition() {<a name="line.1701"></a>
+<span class="sourceLineNo">1702</span>    int numRegions = this.assignmentManager.getRegionStates().getRegionAssignments().size();<a name="line.1702"></a>
+<span class="sourceLineNo">1703</span>    return Math.max((int) Math.floor(numRegions * this.maxRitPercent), 1);<a name="line.1703"></a>
+<span class="sourceLineNo">1704</span>  }<a name="line.1704"></a>
+<span class="sourceLineNo">1705</span><a name="line.1705"></a>
+<span class="sourceLineNo">1706</span>  /**<a name="line.1706"></a>
+<span class="sourceLineNo">1707</span>   * It first sleep to the next balance plan start time. Meanwhile, throttling by the max<a name="line.1707"></a>
+<span class="sourceLineNo">1708</span>   * number regions in transition to protect availability.<a name="line.1708"></a>
+<span class="sourceLineNo">1709</span>   * @param nextBalanceStartTime The next balance plan start time<a name="line.1709"></a>
+<span class="sourceLineNo">1710</span>   * @param maxRegionsInTransition max number of regions in transition<a name="line.1710"></a>
+<span class="sourceLineNo">1711</span>   * @param cutoffTime when to exit balancer<a name="line.1711"></a>
+<span class="sourceLineNo">1712</span>   */<a name="line.1712"></a>
+<span class="sourceLineNo">1713</span>  private void balanceThrottling(long nextBalanceStartTime, int maxRegionsInTransition,<a name="line.1713"></a>
+<span class="sourceLineNo">1714</span>      long cutoffTime) {<a name="line.1714"></a>
+<span class="sourceLineNo">1715</span>    boolean interrupted = false;<a name="line.1715"></a>
+<span class="sourceLineNo">1716</span><a name="line.1716"></a>
+<span class="sourceLineNo">1717</span>    // Sleep to next balance plan start time<a name="line.1717"></a>
+<span class="sourceLineNo">1718</span>    // But if there are zero regions in transition, it can skip sleep to speed up.<a name="line.1718"></a>
+<span class="sourceLineNo">1719</span>    while (!interrupted &amp;&amp; System.currentTimeMillis() &lt; nextBalanceStartTime<a name="line.1719"></a>
+<span class="sourceLineNo">1720</span>        &amp;&amp; this.assignmentManager.getRegionStates().hasRegionsInTransition()) {<a name="line.1720"></a>
+<span class="sourceLineNo">1721</span>      try {<a name="line.1721"></a>
+<span class="sourceLineNo">1722</span>        Thread.sleep(100);<a name="line.1722"></a>
+<span class="sourceLineNo">1723</span>      } catch (InterruptedException ie) {<a name="line.1723"></a>
+<span class="sourceLineNo">1724</span>        interrupted = true;<a name="line.1724"></a>
+<span class="sourceLineNo">1725</span>      }<a name="line.1725"></a>
+<span class="sourceLineNo">1726</span>    }<a name="line.1726"></a>
+<span class="sourceLineNo">1727</span><a name="line.1727"></a>
+<span class="sourceLineNo">1728</span>    // Throttling by max number regions in transition<a name="line.1728"></a>
+<span class="sourceLineNo">1729</span>    while (!interrupted<a name="line.1729"></a>
+<span class="sourceLineNo">1730</span>        &amp;&amp; maxRegionsInTransition &gt; 0<a name="line.1730"></a>
+<span class="sourceLineNo">1731</span>        &amp;&amp; this.assignmentManager.getRegionStates().getRegionsInTransitionCount()<a name="line.1731"></a>
+<span class="sourceLineNo">1732</span>        &gt;= maxRegionsInTransition &amp;&amp; System.currentTimeMillis() &lt;= cutoffTime) {<a name="line.1732"></a>
+<span class="sourceLineNo">1733</span>      try {<a name="line.1733"></a>
+<span class="sourceLineNo">1734</span>        // sleep if the number of regions in transition exceeds the limit<a name="line.1734"></a>
+<span class="sourceLineNo">1735</span>        Thread.sleep(100);<a name="line.1735"></a>
+<span class="sourceLineNo">1736</span>      } catch (InterruptedException ie) {<a name="line.1736"></a>
+<span class="sourceLineNo">1737</span>        interrupted = true;<a name="line.1737"></a>
+<span class="sourceLineNo">1738</span>      }<a name="line.1738"></a>
+<span class="sourceLineNo">1739</span>    }<a name="line.1739"></a>
+<span class="sourceLineNo">1740</span><a name="line.1740"></a>
+<span class="sourceLineNo">1741</span>    if (interrupted) Thread.currentThread().interrupt();<a name="line.1741"></a>
+<span class="sourceLineNo">1742</span>  }<a name="line.1742"></a>
+<span class="sourceLineNo">1743</span><a name="line.1743"></a>
+<span class="sourceLineNo">1744</span>  public boolean balance() throws IOException {<a name="line.1744"></a>
+<span class="sourceLineNo">1745</span>    return balance(false);<a name="line.1745"></a>
+<span class="sourceLineNo">1746</span>  }<a name="line.1746"></a>
+<span class="sourceLineNo">1747</span><a name="line.1747"></a>
+<span class="sourceLineNo">1748</span>  public boolean balance(boolean force) throws IOException {<a name="line.1748"></a>
+<span class="sourceLineNo">1749</span>    // if master not initialized, don't run balancer.<a name="line.1749"></a>
+<span class="sourceLineNo">1750</span>    if (!isInitialized()) {<a name="line.1750"></a>
+<span class="sourceLineNo">1751</span>      LOG.debug("Master has not been initialized, don't run balancer.");<a name="line.1751"></a>
+<span class="sourceLineNo">1752</span>      return false;<a name="line.1752"></a>
+<span class="sourceLineNo">1753</span>    }<a name="line.1753"></a>
+<span class="sourceLineNo">1754</span><a name="line.1754"></a>
+<span class="sourceLineNo">1755</span>    if (isInMaintenanceMode()) {<a name="line.1755"></a>
+<span class="sourceLineNo">1756</span>      LOG.info("Master is in maintenanceMode mode, don't run balancer.");<a name="line.1756"></a>
+<span class="sourceLineNo">1757</span>      return false;<a name="line.1757"></a>
+<span class="sourceLineNo">1758</span>    }<a name="line.1758"></a>
+<span class="sourceLineNo">1759</span><a name="line.1759"></a>
+<span class="sourceLineNo">1760</span>    synchronized (this.balancer) {<a name="line.1760"></a>
+<span class="sourceLineNo">1761</span>      // If balance not true, don't run balancer.<a name="line.1761"></a>
+<span class="sourceLineNo">1762</span>      if (!this.loadBalancerTracker.isBalancerOn()) return false;<a name="line.1762"></a>
+<span class="sourceLineNo">1763</span>        // Only allow one balance run at at time.<a name="line.1763"></a>
+<span class="sourceLineNo">1764</span>      if (this.assignmentManager.hasRegionsInTransition()) {<a name="line.1764"></a>
+<span class="sourceLineNo">1765</span>        List&lt;RegionStateNode&gt; regionsInTransition = assignmentManager.getRegionsInTransition();<a name="line.1765"></a>
+<span class="sourceLineNo">1766</span>        // if hbase:meta region is in transition, result of assignment cannot be recorded<a name="line.1766"></a>
+<span class="sourceLineNo">1767</span>        // ignore the force flag in that case<a name="line.1767"></a>
+<span class="sourceLineNo">1768</span>        boolean metaInTransition = assignmentManager.isMetaRegionInTransition();<a name="line.1768"></a>
+<span class="sourceLineNo">1769</span>        String prefix = force &amp;&amp; !metaInTransition ? "R" : "Not r";<a name="line.1769"></a>
+<span class="sourceLineNo">1770</span>        List&lt;RegionStateNode&gt; toPrint = regionsInTransition;<a name="line.1770"></a>
+<span class="sourceLineNo">1771</span>        int max = 5;<a name="line.1771"></a>
+<span class="sourceLineNo">1772</span>        boolean truncated = false;<a name="line.1772"></a>
+<span class="sourceLineNo">1773</span>        if (regionsInTransition.size() &gt; max) {<a name="line.1773"></a>
+<span class="sourceLineNo">1774</span>          toPrint = regionsInTransition.subList(0, max);<a name="line.1774"></a>
+<span class="sourceLineNo">1775</span>          truncated = true;<a name="line.1775"></a>
+<span class="sourceLineNo">1776</span>        }<a name="line.1776"></a>
+<span class="sourceLineNo">1777</span>        LOG.info(prefix + "unning balancer because " + regionsInTransition.size() +<a name="line.1777"></a>
+<span class="sourceLineNo">1778</span>          " region(s) in transition: " + toPrint + (truncated? "(truncated list)": ""));<a name="line.1778"></a>
+<span class="sourceLineNo">1779</span>        if (!force || metaInTransition) return false;<a name="line.1779"></a>
+<span class="sourceLineNo">1780</span>      }<a name="line.1780"></a>
+<span class="sourceLineNo">1781</span>      if (this.serverManager.areDeadServersInProgress()) {<a name="line.1781"></a>
+<span class="sourceLineNo">1782</span>        LOG.info("Not running balancer because processing dead regionserver(s): " +<a name="line.1782"></a>
+<span class="sourceLineNo">1783</span>          this.serverManager.getDeadServers());<a name="line.1783"></a>
+<span class="sourceLineNo">1784</span>        return false;<a name="line.1784"></a>
+<span class="sourceLineNo">1785</span>      }<a name="line.1785"></a>
+<span class="sourceLineNo">1786</span><a name="line.1786"></a>
+<span class="sourceLineNo">1787</span>      if (this.cpHost != null) {<a name="line.1787"></a>
+<span class="sourceLineNo">1788</span>        try {<a name="line.1788"></a>
+<span class="sourceLineNo">1789</span>          if (this.cpHost.preBalance()) {<a name="line.1789"></a>
+<span class="sourceLineNo">1790</span>            LOG.debug("Coprocessor bypassing balancer request");<a name="line.1790"></a>
+<span class="sourceLineNo">1791</span>            return false;<a name="line.1791"></a>
+<span class="sourceLineNo">1792</span>          }<a name="line.1792"></a>
+<span class="sourceLineNo">1793</span>        } catch (IOException ioe) {<a name="line.1793"></a>
+<span class="sourceLineNo">1794</span>          LOG.error("Error invoking master coprocessor preBalance()", ioe);<a name="line.1794"></a>
+<span class="sourceLineNo">1795</span>          return false;<a name="line.1795"></a>
+<span class="sourceLineNo">1796</span>        }<a name="line.1796"></a>
+<span class="sourceLineNo">1797</span>      }<a name="line.1797"></a>
+<span class="sourceLineNo">1798</span><a name="line.1798"></a>
+<span class="sourceLineNo">1799</span>      boolean isByTable = getConfiguration().getBoolean("hbase.master.loadbalance.bytable", false);<a name="line.1799"></a>
+<span class="sourceLineNo">1800</span>      Map&lt;TableName, Map&lt;ServerName, List&lt;RegionInfo&gt;&gt;&gt; assignments =<a name="line.1800"></a>
+<span class="sourceLineNo">1801</span>        this.assignmentManager.getRegionStates()<a name="line.1801"></a>
+<span class="sourceLineNo">1802</span>          .getAssignmentsForBalancer(tableStateManager, this.serverManager.getOnlineServersList(),<a name="line.1802"></a>
+<span class="sourceLineNo">1803</span>            isByTable);<a name="line.1803"></a>
+<span class="sourceLineNo">1804</span>      for (Map&lt;ServerName, List&lt;RegionInfo&gt;&gt; serverMap : assignments.values()) {<a name="line.1804"></a>
+<span class="sourceLineNo">1805</span>        serverMap.keySet().removeAll(this.serverManager.getDrainingServersList());<a name="line.1805"></a>
+<span class="sourceLineNo">1806</span>      }<a name="line.1806"></a>
+<span class="sourceLineNo">1807</span><a name="line.1807"></a>
+<span class="sourceLineNo">1808</span>      //Give the balancer the current cluster state.<a name="line.1808"></a>
+<span class="sourceLineNo">1809</span>      this.balancer.setClusterMetrics(getClusterMetricsWithoutCoprocessor());<a name="line.1809"></a>
+<span class="sourceLineNo">1810</span>      this.balancer.setClusterLoad(assignments);<a name="line.1810"></a>
+<span class="sourceLineNo">1811</span><a name="line.1811"></a>
+<span class="sourceLineNo">1812</span>      List&lt;RegionPlan&gt; plans = new ArrayList&lt;&gt;();<a name="line.1812"></a>
+<span class="sourceLineNo">1813</span>      for (Entry&lt;TableName, Map&lt;ServerName, List&lt;RegionInfo&gt;&gt;&gt; e : assignments.entrySet()) {<a name="line.1813"></a>
+<span class="sourceLineNo">1814</span>        List&lt;RegionPlan&gt; partialPlans = this.balancer.balanceCluster(e.getKey(), e.getValue());<a name="line.1814"></a>
+<span class="sourceLineNo">1815</span>        if (partialPlans != null) {<a name="line.1815"></a>
+<span class="sourceLineNo">1816</span>          plans.addAll(partialPlans);<a name="line.1816"></a>
+<span class="sourceLineNo">1817</span>        }<a name="line.1817"></a>
+<span class="sourceLineNo">1818</span>      }<a name="line.1818"></a>
+<span class="sourceLineNo">1819</span><a name="line.1819"></a>
+<span class="sourceLineNo">1820</span>      List&lt;RegionPlan&gt; sucRPs = executeRegionPlansWithThrottling(plans);<a name="line.1820"></a>
 <span class="sourceLineNo">1821</span><a name="line.1821"></a>
-<span class="sourceLineNo">1822</span>      List&lt;RegionPlan&gt; sucRPs = executeRegionPlansWithThrottling(plans);<a name="line.1822"></a>
-<span class="sourceLineNo">1823</span><a name="line.1823"></a>
-<span class="sourceLineNo">1824</span>      if (this.cpHost != null) {<a name="line.1824"></a>
-<span class="sourceLineNo">1825</span>        try {<a name="line.1825"></a>
-<span class="sourceLineNo">1826</span>          this.cpHost.postBalance(sucRPs);<a name="line.1826"></a>
-<span class="sourceLineNo">1827</span>        } catch (IOException ioe) {<a name="line.1827"></a>
-<span class="sourceLineNo">1828</span>          // balancing already succeeded so don't change the result<a name="line.1828"></a>
-<span class="sourceLineNo">1829</span>          LOG.error("Error invoking master coprocessor postBalance()", ioe);<a name="line.1829"></a>
-<span class="sourceLineNo">1830</span>        }<a name="line.1830"></a>
-<span class="sourceLineNo">1831</span>      }<a name="line.1831"></a>
-<span class="sourceLineNo">1832</span>    }<a name="line.1832"></a>
-<span class="sourceLineNo">1833</span>    // If LoadBalancer did not generate any plans, it means the cluster is already balanced.<a name="line.1833"></a>
-<span class="sourceLineNo">1834</span>    // Return true indicating a success.<a name="line.1834"></a>
-<span class="sourceLineNo">1835</span>    return true;<a name="line.1835"></a>
-<span class="sourceLineNo">1836</span>  }<a name="line.1836"></a>
-<span class="sourceLineNo">1837</span><a name="line.1837"></a>
-<span class="sourceLineNo">1838</span>  public List&lt;RegionPlan&gt; executeRegionPlansWithThrottling(List&lt;RegionPlan&gt; plans) {<a name="line.1838"></a>
-<span class="sourceLineNo">1839</span>    List&lt;RegionPlan&gt; sucRPs = new ArrayList&lt;&gt;();<a name="line.1839"></a>
-<span class="sourceLineNo">1840</span>    int maxRegionsInTransition = getMaxRegionsInTransition();<a name="line.1840"></a>
-<span class="sourceLineNo">1841</span>    long balanceStartTime = System.currentTimeMillis();<a name="line.1841"></a>
-<span class="sourceLineNo">1842</span>    long cutoffTime = balanceStartTime + this.maxBlancingTime;<a name="line.1842"></a>
-<span class="sourceLineNo">1843</span>    int rpCount = 0;  // number of RegionPlans balanced so far<a name="line.1843"></a>
-<span class="sourceLineNo">1844</span>    if (plans != null &amp;&amp; !plans.isEmpty()) {<a name="line.1844"></a>
-<span class="sourceLineNo">1845</span>      int balanceInterval = this.maxBlancingTime / plans.size();<a name="line.1845"></a>
-<span class="sourceLineNo">1846</span>      LOG.info("Balancer plans size is " + plans.size() + ", the balance interval is "<a name="line.1846"></a>
-<span class="sourceLineNo">1847</span>          + balanceInterval + " ms, and the max number regions in transition is "<a name="line.1847"></a>
-<span class="sourceLineNo">1848</span>          + maxRegionsInTransition);<a name="line.1848"></a>
-<span class="sourceLineNo">1849</span><a name="line.1849"></a>
-<span class="sourceLineNo">1850</span>      for (RegionPlan plan: plans) {<a name="line.1850"></a>
-<span class="sourceLineNo">1851</span>        LOG.info("balance " + plan);<a name="line.1851"></a>
-<span class="sourceLineNo">1852</span>        //TODO: bulk assign<a name="line.1852"></a>
-<span class="sourceLineNo">1853</span>        try {<a name="line.1853"></a>
-<span class="sourceLineNo">1854</span>          this.assignmentManager.moveAsync(plan);<a name="line.1854"></a>
-<span class="sourceLineNo">1855</span>        } catch (HBaseIOException hioe) {<a name="line.1855"></a>
-<span class="sourceLineNo">1856</span>          //should ignore failed plans here, avoiding the whole balance plans be aborted<a name="line.1856"></a>
-<span class="sourceLineNo">1857</span>          //later calls of balance() can fetch up the failed and skipped plans<a name="line.1857"></a>
-<span class="sourceLineNo">1858</span>          LOG.warn("Failed balance plan {}, skipping...", plan, hioe);<a name="line.1858"></a>
-<span class="sourceLineNo">1859</span>        }<a name="line.1859"></a>
-<span class="sourceLineNo">1860</span>        //rpCount records balance plans processed, does not care if a plan succeeds<a name="line.1860"></a>
-<span class="sourceLineNo">1861</span>        rpCount++;<a name="line.1861"></a>
-<span class="sourceLineNo">1862</span><a name="line.1862"></a>
-<span class="sourceLineNo">1863</span>        balanceThrottling(balanceStartTime + rpCount * balanceInterval, maxRegionsInTransition,<a name="line.1863"></a>
-<span class="sourceLineNo">1864</span>            cutoffTime);<a name="line.1864"></a>
+<span class="sourceLineNo">1822</span>      if (this.cpHost != null) {<a name="line.1822"></a>
+<span class="sourceLineNo">1823</span>        try {<a name="line.1823"></a>
+<span class="sourceLineNo">1824</span>          this.cpHost.postBalance(sucRPs);<a name="line.1824"></a>
+<span class="sourceLineNo">1825</span>        } catch (IOException ioe) {<a name="line.1825"></a>
+<span class="sourceLineNo">1826</span>          // balancing already succeeded so don't change the result<a name="line.1826"></a>
+<span class="sourceLineNo">1827</span>          LOG.error("Error invoking master coprocessor postBalance()", ioe);<a name="line.1827"></a>
+<span class="sourceLineNo">1828</span>        }<a name="line.1828"></a>
+<span class="sourceLineNo">1829</span>      }<a name="line.1829"></a>
+<span class="sourceLineNo">1830</span>    }<a name="line.1830"></a>
+<span class="sourceLineNo">1831</span>    // If LoadBalancer did not generate any plans, it means the cluster is already balanced.<a name="line.1831"></a>
+<span class="sourceLineNo">1832</span>    // Return true indicating a success.<a name="line.1832"></a>
+<span class="sourceLineNo">1833</span>    return true;<a name="line.1833"></a>
+<span class="sourceLineNo">1834</span>  }<a name="line.1834"></a>
+<span class="sourceLineNo">1835</span><a name="line.1835"></a>
+<span class="sourceLineNo">1836</span>  public List&lt;RegionPlan&gt; executeRegionPlansWithThrottling(List&lt;RegionPlan&gt; plans) {<a name="line.1836"></a>
+<span class="sourceLineNo">1837</span>    List&lt;RegionPlan&gt; sucRPs = new ArrayList&lt;&gt;();<a name="line.1837"></a>
+<span class="sourceLineNo">1838</span>    int maxRegionsInTransition = getMaxRegionsInTransition();<a name="line.1838"></a>
+<span class="sourceLineNo">1839</span>    long balanceStartTime = System.currentTimeMillis();<a name="line.1839"></a>
+<span class="sourceLineNo">1840</span>    long cutoffTime = balanceStartTime + this.maxBlancingTime;<a name="line.1840"></a>
+<span class="sourceLineNo">1841</span>    int rpCount = 0;  // number of RegionPlans balanced so far<a name="line.1841"></a>
+<span class="sourceLineNo">1842</span>    if (plans != null &amp;&amp; !plans.isEmpty()) {<a name="line.1842"></a>
+<span class="sourceLineNo">1843</span>      int balanceInterval = this.maxBlancingTime / plans.size();<a name="line.1843"></a>
+<span class="sourceLineNo">1844</span>      LOG.info("Balancer plans size is " + plans.size() + ", the balance interval is "<a name="line.1844"></a>
+<span class="sourceLineNo">1845</span>          + balanceInterval + " ms, and the max number regions in transition is "<a name="line.1845"></a>
+<span class="sourceLineNo">1846</span>          + maxRegionsInTransition);<a name="line.1846"></a>
+<span class="sourceLineNo">1847</span><a name="line.1847"></a>
+<span class="sourceLineNo">1848</span>      for (RegionPlan plan: plans) {<a name="line.1848"></a>
+<span class="sourceLineNo">1849</span>        LOG.info("balance " + plan);<a name="line.1849"></a>
+<span class="sourceLineNo">1850</span>        //TODO: bulk assign<a name="line.1850"></a>
+<span class="sourceLineNo">1851</span>        try {<a name="line.1851"></a>
+<span class="sourceLineNo">1852</span>          this.assignmentManager.moveAsync(plan);<a name="line.1852"></a>
+<span class="sourceLineNo">1853</span>        } catch (HBaseIOException hioe) {<a name="line.1853"></a>
+<span class="sourceLineNo">1854</span>          //should ignore failed plans here, avoiding the whole balance plans be aborted<a name="line.1854"></a>
+<span class="sourceLineNo">1855</span>          //later calls of balance() can fetch up the failed and skipped plans<a name="line.1855"></a>
+<span class="sourceLineNo">1856</span>          LOG.warn("Failed balance plan {}, skipping...", plan, hioe);<a name="line.1856"></a>
+<span class="sourceLineNo">1857</span>        }<a name="line.1857"></a>
+<span class="sourceLineNo">1858</span>        //rpCount records balance plans processed, does not care if a plan succeeds<a name="line.1858"></a>
+<span class="sourceLineNo">1859</span>        rpCount++;<a name="line.1859"></a>
+<span class="sourceLineNo">1860</span><a name="line.1860"></a>
+<span class="sourceLineNo">1861</span>        if (this.maxBlancingTime &gt; 0) {<a name="line.1861"></a>
+<span class="sourceLineNo">1862</span>          balanceThrottling(balanceStartTime + rpCount * balanceInterval, maxRegionsInTransition,<a name="line.1862"></a>
+<span class="sourceLineNo">1863</span>            cutoffTime);<a name="line.1863"></a>
+<span class="sourceLineNo">1864</span>        }<a name="line.1864"></a>
 <span class="sourceLineNo">1865</span><a name="line.1865"></a>
 <span class="sourceLineNo">1866</span>        // if performing next balance exceeds cutoff time, exit the loop<a name="line.1866"></a>
-<span class="sourceLineNo">1867</span>        if (rpCount &lt; plans.size() &amp;&amp; System.currentTimeMillis() &gt; cutoffTime) {<a name="line.1867"></a>
-<span class="sourceLineNo">1868</span>          // TODO: After balance, there should not be a cutoff time (keeping it as<a name="line.1868"></a>
-<span class="sourceLineNo">1869</span>          // a security net for now)<a name="line.1869"></a>
-<span class="sourceLineNo">1870</span>          LOG.debug("No more balancing till next balance run; maxBalanceTime="<a name="line.1870"></a>
-<span class="sourceLineNo">1871</span>              + this.maxBlancingTime);<a name="line.1871"></a>
-<span class="sourceLineNo">1872</span>          break;<a name="line.1872"></a>
-<span class="sourceLineNo">1873</span>        }<a name="line.1873"></a>
-<span class="sourceLineNo">1874</span>      }<a name="line.1874"></a>
-<span class="sourceLineNo">1875</span>    }<a name="line.1875"></a>
-<span class="sourceLineNo">1876</span>    return sucRPs;<a name="line.1876"></a>
-<span class="sourceLineNo">1877</span>  }<a name="line.1877"></a>
-<span class="sourceLineNo">1878</span><a name="line.1878"></a>
-<span class="sourceLineNo">1879</span>  @Override<a name="line.1879"></a>
-<span class="sourceLineNo">1880</span>  @VisibleForTesting<a name="line.1880"></a>
-<span class="sourceLineNo">1881</span>  public RegionNormalizer getRegionNormalizer() {<a name="line.1881"></a>
-<span class="sourceLineNo">1882</span>    return this.normalizer;<a name="line.1882"></a>
-<span class="sourceLineNo">1883</span>  }<a name="line.1883"></a>
-<span class="sourceLineNo">1884</span><a name="line.1884"></a>
-<span class="sourceLineNo">1885</span>  /**<a name="line.1885"></a>
-<span class="sourceLineNo">1886</span>   * Perform normalization of cluster (invoked by {@link RegionNormalizerChore}).<a name="line.1886"></a>
-<span class="sourceLineNo">1887</span>   *<a name="line.1887"></a>
-<span class="sourceLineNo">1888</span>   * @return true if normalization step was performed successfully, false otherwise<a name="line.1888"></a>
-<span class="sourceLineNo">1889</span>   *    (specifically, if HMaster hasn't been initialized properly or normalization<a name="line.1889"></a>
-<span class="sourceLineNo">1890</span>   *    is globally disabled)<a name="line.1890"></a>
-<span class="sourceLineNo">1891</span>   */<a name="line.1891"></a>
-<span class="sourceLineNo">1892</span>  public boolean normalizeRegions() throws IOException {<a name="line.1892"></a>
-<span class="sourceLineNo">1893</span>    if (!isInitialized()) {<a name="line.1893"></a>
-<span class="sourceLineNo">1894</span>      LOG.debug("Master has not been initialized, don't run region normalizer.");<a name="line.1894"></a>
-<span class="sourceLineNo">1895</span>      return false;<a name="line.1895"></a>
-<span class="sourceLineNo">1896</span>    }<a name="line.1896"></a>
-<span class="sourceLineNo">1897</span>    if (this.getServerManager().isClusterShutdown()) {<a name="line.1897"></a>
-<span class="sourceLineNo">1898</span>      LOG.info("Cluster is shutting down, don't run region normalizer.");<a name="line.1898"></a>
-<span class="sourceLineNo">1899</span>      return false;<a name="line.1899"></a>
-<span class="sourceLineNo">1900</span>    }<a name="line.1900"></a>
-<span class="sourceLineNo">1901</span>    if (isInMaintenanceMode()) {<a name="line.1901"></a>
-<span class="sourceLineNo">1902</span>      LOG.info("Master is in maintenance mode, don't run region normalizer.");<a name="line.1902"></a>
-<span class="sourceLineNo">1903</span>      return false;<a name="line.1903"></a>
-<span class="sourceLineNo">1904</span>    }<a name="line.1904"></a>
-<span class="sourceLineNo">1905</span>    if (!this.regionNormalizerTracker.isNormalizerOn()) {<a name="line.1905"></a>
-<span class="sourceLineNo">1906</span>      LOG.debug("Region normalization is disabled, don't run region normalizer.");<a name="line.1906"></a>
-<span class="sourceLineNo">1907</span>      return false;<a name="line.1907"></a>
-<span class="sourceLineNo">1908</span>    }<a name="line.1908"></a>
-<span class="sourceLineNo">1909</span><a name="line.1909"></a>
-<span class="sourceLineNo">1910</span>    synchronized (this.normalizer) {<a name="line.1910"></a>
-<span class="sourceLineNo">1911</span>      // Don't run the normalizer concurrently<a name="line.1911"></a>
-<span class="sourceLineNo">1912</span>      List&lt;TableName&gt; allEnabledTables = new ArrayList&lt;&gt;(<a name="line.1912"></a>
-<span class="sourceLineNo">1913</span>        this.tableStateManager.getTablesInStates(TableState.State.ENABLED));<a name="line.1913"></a>
-<span class="sourceLineNo">1914</span><a name="line.1914"></a>
-<span class="sourceLineNo">1915</span>      Collections.shuffle(allEnabledTables);<a name="line.1915"></a>
-<span class="sourceLineNo">1916</span><a name="line.1916"></a>
-<span class="sourceLineNo">1917</span>      for (TableName table : allEnabledTables) {<a name="line.1917"></a>
-<span class="sourceLineNo">1918</span>        if (isInMaintenanceMode()) {<a name="line.1918"></a>
-<span class="sourceLineNo">1919</span>          LOG.debug("Master is in maintenance mode, stop running region normalizer.");<a name="line.1919"></a>
-<span class="sourceLineNo">1920</span>          return false;<a name="line.1920"></a>
-<span class="sourceLineNo">1921</span>        }<a name="line.1921"></a>
-<span class="sourceLineNo">1922</span><a name="line.1922"></a>
-<span class="sourceLineNo">1923</span>        TableDescriptor tblDesc = getTableDescriptors().get(table);<a name="line.1923"></a>
-<span class="sourceLineNo">1924</span>        if (table.isSystemTable() || (tblDesc != null &amp;&amp;<a name="line.1924"></a>
-<span class="sourceLineNo">1925</span>            !tblDesc.isNormalizationEnabled())) {<a name="line.1925"></a>
-<span class="sourceLineNo">1926</span>          LOG.trace("Skipping normalization for {}, as it's either system"<a name="line.1926"></a>
-<span class="sourceLineNo">1927</span>              + " table or doesn't have auto normalization turned on", table);<a name="line.1927"></a>
-<span class="sourceLineNo">1928</span>          continue;<a name="line.1928"></a>
-<span class="sourceLineNo">1929</span>        }<a name="line.1929"></a>
-<span class="sourceLineNo">1930</span>        List&lt;NormalizationPlan&gt; plans = this.normalizer.computePlanForTable(table);<a name="line.1930"></a>
-<span class="sourceLineNo">1931</span>        if (plans != null) {<a name="line.1931"></a>
-<span class="sourceLineNo">1932</span>          for (NormalizationPlan plan : plans) {<a name="line.1932"></a>
-<span class="sourceLineNo">1933</span>            plan.execute(asyncClusterConnection.toConnection().getAdmin());<a name="line.1933"></a>
-<span class="sourceLineNo">1934</span>            if (plan.getType() == PlanType.SPLIT) {<a name="line.1934"></a>
-<span class="sourceLineNo">1935</span>              splitPlanCount++;<a name="line.1935"></a>
-<span class="sourceLineNo">1936</span>            } else if (plan.getType() == PlanType.MERGE) {<a name="line.1936"></a>
-<span class="sourceLineNo">1937</span>              mergePlanCount++;<a name="line.1937"></a>
-<span class="sourceLineNo">1938</span>            }<a name="line.1938"></a>
-<span class="sourceLineNo">1939</span>          }<a name="line.1939"></a>
-<span class="sourceLineNo">1940</span>        }<a name="line.1940"></a>
-<span class="sourceLineNo">1941</span>      }<a name="line.1941"></a>
-<span class="sourceLineNo">1942</span>    }<a name="line.1942"></a>
-<span class="sourceLineNo">1943</span>    // If Region did not generate any plans, it means the cluster is already balanced.<a name="line.1943"></a>
-<span class="sourceLineNo">1944</span>    // Return true indicating a success.<a name="line.1944"></a>
-<span class="sourceLineNo">1945</span>    return true;<a name="line.1945"></a>
-<span class="sourceLineNo">1946</span>  }<a name="line.1946"></a>
-<span class="sourceLineNo">1947</span><a name="line.1947"></a>
-<span class="sourceLineNo">1948</span>  /**<a name="line.1948"></a>
-<span class="sourceLineNo">1949</span>   * @return Client info for use as prefix on an audit log string; who did an action<a name="line.1949"></a>
-<span class="sourceLineNo">1950</span>   */<a name="line.1950"></a>
-<span class="sourceLineNo">1951</span>  @Override<a name="line.1951"></a>
-<span class="sourceLineNo">1952</span>  public String getClientIdAuditPrefix() {<a name="line.1952"></a>
-<span class="sourceLineNo">1953</span>    return "Client=" + RpcServer.getRequestUserName().orElse(null)<a name="line.1953"></a>
-<span class="sourceLineNo">1954</span>        + "/" + RpcServer.getRemoteAddress().orElse(null);<a name="line.1954"></a>
-<span class="sourceLineNo">1955</span>  }<a name="line.1955"></a>
-<span class="sourceLineNo">1956</span><a name="line.1956"></a>
-<span class="sourceLineNo">1957</span>  /**<a name="line.1957"></a>
-<span class="sourceLineNo">1958</span>   * Switch for the background CatalogJanitor thread.<a name="line.1958"></a>
-<span class="sourceLineNo">1959</span>   * Used for testing.  The thread will continue to run.  It will just be a noop<a name="line.1959"></a>
-<span class="sourceLineNo">1960</span>   * if disabled.<a name="line.1960"></a>
-<span class="sourceLineNo">1961</span>   * @param b If false, the catalog janitor won't do anything.<a name="line.1961"></a>
-<span class="sourceLineNo">1962</span>   */<a name="line.1962"></a>
-<span class="sourceLineNo">1963</span>  public void setCatalogJanitorEnabled(final boolean b) {<a name="line.1963"></a>
-<span class="sourceLineNo">1964</span>    this.catalogJanitorChore.setEnabled(b);<a name="line.1964"></a>
-<span class="sourceLineNo">1965</span>  }<a name="line.1965"></a>
-<span class="sourceLineNo">1966</span><a name="line.1966"></a>
-<span class="sourceLineNo">1967</span>  @Override<a name="line.1967"></a>
-<span class="sourceLineNo">1968</span>  public long mergeRegions(<a name="line.1968"></a>
-<span class="sourceLineNo">1969</span>      final RegionInfo[] regionsToMerge,<a name="line.1969"></a>
-<span class="sourceLineNo">1970</span>      final boolean forcible,<a name="line.1970"></a>
-<span class="sourceLineNo">1971</span>      final long ng,<a name="line.1971"></a>
-<span class="sourceLineNo">1972</span>      final long nonce) throws IOException {<a name="line.1972"></a>
-<span class="sourceLineNo">1973</span>    checkInitialized();<a name="line.1973"></a>
-<span class="sourceLineNo">1974</span><a name="line.1974"></a>
-<span class="sourceLineNo">1975</span>    final String mergeRegionsStr = Arrays.stream(regionsToMerge).<a name="line.1975"></a>
-<span class="sourceLineNo">1976</span>      map(r -&gt; RegionInfo.getShortNameToLog(r)).collect(Collectors.joining(", "));<a name="line.1976"></a>
-<span class="sourceLineNo">1977</span>    return MasterProcedureUtil.submitProcedure(new NonceProcedureRunnable(this, ng, nonce) {<a name="line.1977"></a>
-<span class="sourceLineNo">1978</span>      @Override<a name="line.1978"></a>
-<span class="sourceLineNo">1979</span>      protected void run() throws IOException {<a name="line.1979"></a>
-<span class="sourceLineNo">1980</span>        getMaster().getMasterCoprocessorHost().preMergeRegions(regionsToMerge);<a name="line.1980"></a>
-<span class="sourceLineNo">1981</span>        String aid = getClientIdAuditPrefix();<a name="line.1981"></a>
-<span class="sourceLineNo">1982</span>        LOG.info("{} merge regions {}", aid, mergeRegionsStr);<a name="line.1982"></a>
-<span class="sourceLineNo">1983</span>        submitProcedure(new MergeTableRegionsProcedure(procedureExecutor.getEnvironment(),<a name="line.1983"></a>
-<span class="sourceLineNo">1984</span>            regionsToMerge, forcible));<a name="line.1984"></a>
-<span class="sourceLineNo">1985</span>        getMaster().getMasterCoprocessorHost().postMergeRegions(regionsToMerge);<a name="line.1985"></a>
-<span class="sourceLineNo">1986</span>      }<a name="line.1986"></a>
-<span class="sourceLineNo">1987</span><a name="line.1987"></a>
-<span class="sourceLineNo">1988</span>      @Override<a name="line.1988"></a>
-<span class="sourceLineNo">1989</span>      protected String getDescription() {<a name="line.1989"></a>
-<span class="sourceLineNo">1990</span>        return "MergeTableProcedure";<a name="line.1990"></a>
-<span class="sourceLineNo">1991</span>      }<a name="line.1991"></a>
-<span class="sourceLineNo">1992</span>    });<a name="line.1992"></a>
-<span class="sourceLineNo">1993</span>  }<a name="line.1993"></a>
-<span class="sourceLineNo">1994</span><a name="line.1994"></a>
-<span class="sourceLineNo">1995</span>  @Override<a name="line.1995"></a>
-<span class="sourceLineNo">1996</span>  public long splitRegion(final RegionInfo regionInfo, final byte[] splitRow,<a name="line.1996"></a>
-<span class="sourceLineNo">1997</span>      final long nonceGroup, final long nonce)<a name="line.1997"></a>
-<span class="sourceLineNo">1998</span>  throws IOException {<a name="line.1998"></a>
-<span class="sourceLineNo">1999</span>    checkInitialized();<a name="line.1999"></a>
-<span class="sourceLineNo">2000</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2000"></a>
-<span class="sourceLineNo">2001</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2001"></a>
-<span class="sourceLineNo">2002</span>      @Override<a name="line.2002"></a>
-<span class="sourceLineNo">2003</span>      protected void run() throws IOException {<a name="line.2003"></a>
-<span class="sourceLineNo">2004</span>        getMaster().getMasterCoprocessorHost().preSplitRegion(regionInfo.getTable(), splitRow);<a name="line.2004"></a>
-<span class="sourceLineNo">2005</span>        LOG.info(getClientIdAuditPrefix() + " split " + regionInfo.getRegionNameAsString());<a name="line.2005"></a>
-<span class="sourceLineNo">2006</span><a name="line.2006"></a>
-<span class="sourceLineNo">2007</span>        // Execute the operation asynchronously<a name="line.2007"></a>
-<span class="sourceLineNo">2008</span>        submitProcedure(getAssignmentManager().createSplitProcedure(regionInfo, splitRow));<a name="line.2008"></a>
-<span class="sourceLineNo">2009</span>      }<a name="line.2009"></a>
-<span class="sourceLineNo">2010</span><a name="line.2010"></a>
-<span class="sourceLineNo">2011</span>      @Override<a name="line.2011"></a>
-<span class="sourceLineNo">2012</span>      protected String getDescription() {<a name="line.2012"></a>
-<span class="sourceLineNo">2013</span>        return "SplitTableProcedure";<a name="line.2013"></a>
-<span class="sourceLineNo">2014</span>      }<a name="line.2014"></a>
-<span class="sourceLineNo">2015</span>    });<a name="line.2015"></a>
-<span class="sourceLineNo">2016</span>  }<a name="line.2016"></a>
-<span class="sourceLineNo">2017</span><a name="line.2017"></a>
-<span class="sourceLineNo">2018</span>  private void warmUpRegion(ServerName server, RegionInfo region) {<a name="line.2018"></a>
-<span class="sourceLineNo">2019</span>    FutureUtils.addListener(asyncClusterConnection.getRegionServerAdmin(server)<a name="line.2019"></a>
-<span class="sourceLineNo">2020</span>      .warmupRegion(RequestConverter.buildWarmupRegionRequest(region)), (r, e) -&gt; {<a name="line.2020"></a>
-<span class="sourceLineNo">2021</span>        if (e != null) {<a name="line.2021"></a>
-<span class="sourceLineNo">2022</span>          LOG.warn("Failed to warm up region {} on server {}", region, server, e);<a name="line.2022"></a>
-<span class="sourceLineNo">2023</span>        }<a name="line.2023"></a>
-<span class="sourceLineNo">2024</span>      });<a name="line.2024"></a>
-<span class="sourceLineNo">2025</span>  }<a name="line.2025"></a>
-<span class="sourceLineNo">2026</span><a name="line.2026"></a>
-<span class="sourceLineNo">2027</span>  // Public so can be accessed by tests. Blocks until move is done.<a name="line.2027"></a>
-<span class="sourceLineNo">2028</span>  // Replace with an async implementation from which you can get<a name="line.2028"></a>
-<span class="sourceLineNo">2029</span>  // a success/failure result.<a name="line.2029"></a>
-<span class="sourceLineNo">2030</span>  @VisibleForTesting<a name="line.2030"></a>
-<span class="sourceLineNo">2031</span>  public void move(final byte[] encodedRegionName, byte[] destServerName) throws HBaseIOException {<a name="line.2031"></a>
-<span class="sourceLineNo">2032</span>    RegionState regionState = assignmentManager.getRegionStates().<a name="line.2032"></a>
-<span class="sourceLineNo">2033</span>      getRegionState(Bytes.toString(encodedRegionName));<a name="line.2033"></a>
-<span class="sourceLineNo">2034</span><a name="line.2034"></a>
-<span class="sourceLineNo">2035</span>    RegionInfo hri;<a name="line.2035"></a>
-<span class="sourceLineNo">2036</span>    if (regionState != null) {<a name="line.2036"></a>
-<span class="sourceLineNo">2037</span>      hri = regionState.getRegion();<a name="line.2037"></a>
-<span class="sourceLineNo">2038</span>    } else {<a name="line.2038"></a>
-<span class="sourceLineNo">2039</span>      throw new UnknownRegionException(Bytes.toStringBinary(encodedRegionName));<a name="line.2039"></a>
-<span class="sourceLineNo">2040</span>    }<a name="line.2040"></a>
-<span class="sourceLineNo">2041</span><a name="line.2041"></a>
-<span class="sourceLineNo">2042</span>    ServerName dest;<a name="line.2042"></a>
-<span class="sourceLineNo">2043</span>    List&lt;ServerName&gt; exclude = hri.getTable().isSystemTable() ? assignmentManager.getExcludedServersForSystemTable()<a name="line.2043"></a>
-<span class="sourceLineNo">2044</span>        : new ArrayList&lt;&gt;(1);<a name="line.2044"></a>
-<span class="sourceLineNo">2045</span>    if (destServerName != null &amp;&amp; exclude.contains(ServerName.valueOf(Bytes.toString(destServerName)))) {<a name="line.2045"></a>
-<span class="sourceLineNo">2046</span>      LOG.info(<a name="line.2046"></a>
-<span class="sourceLineNo">2047</span>          Bytes.toString(encodedRegionName) + " can not move to " + Bytes.toString(destServerName)<a name="line.2047"></a>
-<span class="sourceLineNo">2048</span>              + " because the server is in exclude list");<a name="line.2048"></a>
-<span class="sourceLineNo">2049</span>      destServerName = null;<a name="line.2049"></a>
-<span class="sourceLineNo">2050</span>    }<a name="line.2050"></a>
-<span class="sourceLineNo">2051</span>    if (destServerName == null || destServerName.length == 0) {<a name="line.2051"></a>
-<span class="sourceLineNo">2052</span>      LOG.info("Passed destination servername is null/empty so " +<a name="line.2052"></a>
-<span class="sourceLineNo">2053</span>        "choosing a server at random");<a name="line.2053"></a>
-<span class="sourceLineNo">2054</span>      exclude.add(regionState.getServerName());<a name="line.2054"></a>
-<span class="sourceLineNo">2055</span>      final List&lt;ServerName&gt; destServers = this.serverManager.createDestinationServersList(exclude);<a name="line.2055"></a>
-<span class="sourceLineNo">2056</span>      dest = balancer.randomAssignment(hri, destServers);<a name="line.2056"></a>
-<span class="sourceLineNo">2057</span>      if (dest == null) {<a name="line.2057"></a>
-<span class="sourceLineNo">2058</span>        LOG.debug("Unable to determine a plan to assign " + hri);<a name="line.2058"></a>
-<span class="sourceLineNo">2059</span>        return;<a name="line.2059"></a>
-<span class="sourceLineNo">2060</span>      }<a name="line.2060"></a>
-<span class="sourceLineNo">2061</span>    } else {<a name="line.2061"></a>
-<span class="sourceLineNo">2062</span>      ServerName candidate = ServerName.valueOf(Bytes.toString(destServerName));<a name="line.2062"></a>
-<span class="sourceLineNo">2063</span>      dest = balancer.randomAssignment(hri, Lists.newArrayList(candidate));<a name="line.2063"></a>
-<span class="sourceLineNo">2064</span>      if (dest == null) {<a name="line.2064"></a>
-<span class="sourceLineNo">2065</span>        LOG.debug("Unable to determine a plan to assign " + hri);<a name="line.2065"></a>
-<span class="sourceLineNo">2066</span>        return;<a name="line.2066"></a>
-<span class="sourceLineNo">2067</span>      }<a name="line.2067"></a>
-<span class="sourceLineNo">2068</span>      // TODO: What is this? I don't get it.<a name="line.2068"></a>
-<span class="sourceLineNo">2069</span>      if (dest.equals(serverName) &amp;&amp; balancer instanceof BaseLoadBalancer<a name="line.2069"></a>
-<span class="sourceLineNo">2070</span>          &amp;&amp; !((BaseLoadBalancer)balancer).shouldBeOnMaster(hri)) {<a name="line.2070"></a>
-<span class="sourceLineNo">2071</span>        // To avoid unnecessary region moving later by balancer. Don't put user<a name="line.2071"></a>
-<span class="sourceLineNo">2072</span>        // regions on master.<a name="line.2072"></a>
-<span class="sourceLineNo">2073</span>        LOG.debug("Skipping move of region " + hri.getRegionNameAsString()<a name="line.2073"></a>
-<span class="sourceLineNo">2074</span>          + " to avoid unnecessary region moving later by load balancer,"<a name="line.2074"></a>
-<span class="sourceLineNo">2075</span>          + " because it should not be on master");<a name="line.2075"></a>
-<span class="sourceLineNo">2076</span>        return;<a name="line.2076"></a>
-<span class="sourceLineNo">2077</span>      }<a name="line.2077"></a>
-<span class="sourceLineNo">2078</span>    }<a name="line.2078"></a>
-<span class="sourceLineNo">2079</span><a name="line.2079"></a>
-<span class="sourceLineNo">2080</span>    if (dest.equals(regionState.getServerName())) {<a name="line.2080"></a>
-<span class="sourceLineNo">2081</span>      LOG.debug("Skipping move of region " + hri.getRegionNameAsString()<a name="line.2081"></a>
-<span class="sourceLineNo">2082</span>        + " because region already assigned to the same server " + dest + ".");<a name="line.2082"></a>
-<span class="sourceLineNo">2083</span>      return;<a name="line.2083"></a>
-<span class="sourceLineNo">2084</span>    }<a name="line.2084"></a>
-<span class="sourceLineNo">2085</span><a name="line.2085"></a>
-<span class="sourceLineNo">2086</span>    // Now we can do the move<a name="line.2086"></a>
-<span class="sourceLineNo">2087</span>    RegionPlan rp = new RegionPlan(hri, regionState.getServerName(), dest);<a name="line.2087"></a>
-<span class="sourceLineNo">2088</span>    assert rp.getDestination() != null: rp.toString() + " " + dest;<a name="line.2088"></a>
-<span class="sourceLineNo">2089</span><a name="line.2089"></a>
-<span class="sourceLineNo">2090</span>    try {<a name="line.2090"></a>
-<span class="sourceLineNo">2091</span>      checkInitialized();<a name="line.2091"></a>
-<span class="sourceLineNo">2092</span>      if (this.cpHost != null) {<a name="line.2092"></a>
-<span class="sourceLineNo">2093</span>        this.cpHost.preMove(hri, rp.getSource(), rp.getDestination());<a name="line.2093"></a>
-<span class="sourceLineNo">2094</span>      }<a name="line.2094"></a>
-<span class="sourceLineNo">2095</span><a name="line.2095"></a>
-<span class="sourceLineNo">2096</span>      TransitRegionStateProcedure proc =<a name="line.2096"></a>
-<span class="sourceLineNo">2097</span>        this.assignmentManager.createMoveRegionProcedure(rp.getRegionInfo(), rp.getDestination());<a name="line.2097"></a>
-<span class="sourceLineNo">2098</span>      // Warmup the region on the destination before initiating the move.<a name="line.2098"></a>
-<span class="sourceLineNo">2099</span>      // A region server could reject the close request because it either does not<a name="line.2099"></a>
-<span class="sourceLineNo">2100</span>      // have the specified region or the region is being split.<a name="line.2100"></a>
-<span class="sourceLineNo">2101</span>      warmUpRegion(rp.getDestination(), hri);<a name="line.2101"></a>
-<span class="sourceLineNo">2102</span><a name="line.2102"></a>
-<span class="sourceLineNo">2103</span>      LOG.info(getClientIdAuditPrefix() + " move " + rp + ", running balancer");<a name="line.2103"></a>
-<span class="sourceLineNo">2104</span>      Future&lt;byte[]&gt; future = ProcedureSyncWait.submitProcedure(this.procedureExecutor, proc);<a name="line.2104"></a>
-<span class="sourceLineNo">2105</span>      try {<a name="line.2105"></a>
-<span class="sourceLineNo">2106</span>        // Is this going to work? Will we throw exception on error?<a name="line.2106"></a>
-<span class="sourceLineNo">2107</span>        // TODO: CompletableFuture rather than this stunted Future.<a name="line.2107"></a>
-<span class="sourceLineNo">2108</span>        future.get();<a name="line.2108"></a>
-<span class="sourceLineNo">2109</span>      } catch (InterruptedException | ExecutionException e) {<a name="line.2109"></a>
-<span class="sourceLineNo">2110</span>        throw new HBaseIOException(e);<a name="line.2110"></a>
-<span class="sourceLineNo">2111</span>      }<a name="line.2111"></a>
-<span class="sourceLineNo">2112</span>      if (this.cpHost != null) {<a name="line.2112"></a>
-<span class="sourceLineNo">2113</span>        this.cpHost.postMove(hri, rp.getSource(), rp.getDestination());<a name="line.2113"></a>
-<span class="sourceLineNo">2114</span>      }<a name="line.2114"></a>
-<span class="sourceLineNo">2115</span>    } catch (IOException ioe) {<a name="line.2115"></a>
-<span class="sourceLineNo">2116</span>      if (ioe instanceof HBaseIOException) {<a name="line.2116"></a>
-<span class="sourceLineNo">2117</span>        throw (HBaseIOException)ioe;<a name="line.2117"></a>
-<span class="sourceLineNo">2118</span>      }<a name="line.2118"></a>
-<span class="sourceLineNo">2119</span>      throw new HBaseIOException(ioe);<a name="line.2119"></a>
-<span class="sourceLineNo">2120</span>    }<a name="line.2120"></a>
-<span class="sourceLineNo">2121</span>  }<a name="line.2121"></a>
-<span class="sourceLineNo">2122</span><a name="line.2122"></a>
-<span class="sourceLineNo">2123</span>  @Override<a name="line.2123"></a>
-<span class="sourceLineNo">2124</span>  public long createTable(final TableDescriptor tableDescriptor, final byte[][] splitKeys,<a name="line.2124"></a>
-<span class="sourceLineNo">2125</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2125"></a>
-<span class="sourceLineNo">2126</span>    checkInitialized();<a name="line.2126"></a>
-<span class="sourceLineNo">2127</span>    TableDescriptor desc = getMasterCoprocessorHost().preCreateTableRegionsInfos(tableDescriptor);<a name="line.2127"></a>
-<span class="sourceLineNo">2128</span>    if (desc == null) {<a name="line.2128"></a>
-<span class="sourceLineNo">2129</span>      throw new IOException("Creation for " + tableDescriptor + " is canceled by CP");<a name="line.2129"></a>
-<span class="sourceLineNo">2130</span>    }<a name="line.2130"></a>
-<span class="sourceLineNo">2131</span>    String namespace = desc.getTableName().getNamespaceAsString();<a name="line.2131"></a>
-<span class="sourceLineNo">2132</span>    this.clusterSchemaService.getNamespace(namespace);<a name="line.2132"></a>
-<span class="sourceLineNo">2133</span><a name="line.2133"></a>
-<span class="sourceLineNo">2134</span>    RegionInfo[] newRegions = ModifyRegionUtils.createRegionInfos(desc, splitKeys);<a name="line.2134"></a>
-<span class="sourceLineNo">2135</span>    TableDescriptorChecker.sanityCheck(conf, desc);<a name="line.2135"></a>
-<span class="sourceLineNo">2136</span><a name="line.2136"></a>
-<span class="sourceLineNo">2137</span>    return MasterProcedureUtil<a name="line.2137"></a>
-<span class="sourceLineNo">2138</span>      .submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2138"></a>
-<span class="sourceLineNo">2139</span>        @Override<a name="line.2139"></a>
-<span class="sourceLineNo">2140</span>        protected void run() throws IOException {<a name="line.2140"></a>
-<span class="sourceLineNo">2141</span>          getMaster().getMasterCoprocessorHost().preCreateTable(desc, newRegions);<a name="line.2141"></a>
-<span class="sourceLineNo">2142</span><a name="line.2142"></a>
-<span class="sourceLineNo">2143</span>          LOG.info(getClientIdAuditPrefix() + " create " + desc);<a name="line.2143"></a>
-<span class="sourceLineNo">2144</span><a name="line.2144"></a>
-<span class="sourceLineNo">2145</span>          // TODO: We can handle/merge duplicate requests, and differentiate the case of<a name="line.2145"></a>
-<span class="sourceLineNo">2146</span>          // TableExistsException by saying if the schema is the same or not.<a name="line.2146"></a>
-<span class="sourceLineNo">2147</span>          //<a name="line.2147"></a>
-<span class="sourceLineNo">2148</span>          // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2148"></a>
-<span class="sourceLineNo">2149</span>          // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2149"></a>
-<span class="sourceLineNo">2150</span>          ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2150"></a>
-<span class="sourceLineNo">2151</span>          submitProcedure(<a name="line.2151"></a>
-<span class="sourceLineNo">2152</span>            new CreateTableProcedure(procedureExecutor.getEnvironment(), desc, newRegions, latch));<a name="line.2152"></a>
-<span class="sourceLineNo">2153</span>          latch.await();<a name="line.2153"></a>
-<span class="sourceLineNo">2154</span><a name="line.2154"></a>
-<span class="sourceLineNo">2155</span>          getMaster().getMasterCoprocessorHost().postCreateTable(desc, newRegions);<a name="line.2155"></a>
-<span class="sourceLineNo">2156</span>        }<a name="line.2156"></a>
-<span class="sourceLineNo">2157</span><a name="line.2157"></a>
-<span class="sourceLineNo">2158</span>        @Override<a name="line.2158"></a>
-<span class="sourceLineNo">2159</span>        protected String getDescription() {<a name="line.2159"></a>
-<span class="sourceLineNo">2160</span>          return "CreateTableProcedure";<a name="line.2160"></a>
-<span class="sourceLineNo">2161</span>        }<a name="line.2161"></a>
-<span class="sourceLineNo">2162</span>      });<a name="line.2162"></a>
-<span class="sourceLineNo">2163</span>  }<a name="line.2163"></a>
-<span class="sourceLineNo">2164</span><a name="line.2164"></a>
-<span class="sourceLineNo">2165</span>  @Override<a name="line.2165"></a>
-<span class="sourceLineNo">2166</span>  public long createSystemTable(final TableDescriptor tableDescriptor) throws IOException {<a name="line.2166"></a>
-<span class="sourceLineNo">2167</span>    if (isStopped()) {<a name="line.2167"></a>
-<span class="sourceLineNo">2168</span>      throw new MasterNotRunningException();<a name="line.2168"></a>
-<span class="sourceLineNo">2169</span>    }<a name="line.2169"></a>
-<span class="sourceLineNo">2170</span><a name="line.2170"></a>
-<span class="sourceLineNo">2171</span>    TableName tableName = tableDescriptor.getTableName();<a name="line.2171"></a>
-<span class="sourceLineNo">2172</span>    if (!(tableName.isSystemTable())) {<a name="line.2172"></a>
-<span class="sourceLineNo">2173</span>      throw new IllegalArgumentException(<a name="line.2173"></a>
-<span class="sourceLineNo">2174</span>        "Only system table creation can use this createSystemTable API");<a name="line.2174"></a>
-<span class="sourceLineNo">2175</span>    }<a name="line.2175"></a>
-<span class="sourceLineNo">2176</span><a name="line.2176"></a>
-<span class="sourceLineNo">2177</span>    RegionInfo[] newRegions = ModifyRegionUtils.createRegionInfos(tableDescriptor, null);<a name="line.2177"></a>
-<span class="sourceLineNo">2178</span><a name="line.2178"></a>
-<span class="sourceLineNo">2179</span>    LOG.info(getClientIdAuditPrefix() + " create " + tableDescriptor);<a name="line.2179"></a>
-<span class="sourceLineNo">2180</span><a name="line.2180"></a>
-<span class="sourceLineNo">2181</span>    // This special create table is called locally to master.  Therefore, no RPC means no need<a name="line.2181"></a>
-<span class="sourceLineNo">2182</span>    // to use nonce to detect duplicated RPC call.<a name="line.2182"></a>
-<span class="sourceLineNo">2183</span>    long procId = this.procedureExecutor.submitProcedure(<a name="line.2183"></a>
-<span class="sourceLineNo">2184</span>      new CreateTableProcedure(procedureExecutor.getEnvironment(), tableDescriptor, newRegions));<a name="line.2184"></a>
-<span class="sourceLineNo">2185</span><a name="line.2185"></a>
-<span class="sourceLineNo">2186</span>    return procId;<a name="line.2186"></a>
-<span class="sourceLineNo">2187</span>  }<a name="line.2187"></a>
-<span class="sourceLineNo">2188</span><a name="line.2188"></a>
-<span class="sourceLineNo">2189</span>  private void startActiveMasterManager(int infoPort) throws KeeperException {<a name="line.2189"></a>
-<span class="sourceLineNo">2190</span>    String backupZNode = ZNodePaths.joinZNode(<a name="line.2190"></a>
-<span class="sourceLineNo">2191</span>      zooKeeper.getZNodePaths().backupMasterAddressesZNode, serverName.toString());<a name="line.2191"></a>
-<span class="sourceLineNo">2192</span>    /*<a name="line.2192"></a>
-<span class="sourceLineNo">2193</span>    * Add a ZNode for ourselves in the backup master directory since we<a name="line.2193"></a>
-<span class="sourceLineNo">2194</span>    * may not become the active master. If so, we want the actual active<a name="line.2194"></a>
-<span class="sourceLineNo">2195</span>    * master to know we are backup masters, so that it won't assign<a name="line.2195"></a>
-<span class="sourceLineNo">2196</span>    * regions to us if so configured.<a name="line.2196"></a>
-<span class="sourceLineNo">2197</span>    *<a name="line.2197"></a>
-<span class="sourceLineNo">2198</span>    * If we become the active master later, ActiveMasterManager will delete<a name="line.2198"></a>
-<span class="sourceLineNo">2199</span>    * this node explicitly.  If we crash before then, ZooKeeper will delete<a name="line.2199"></a>
-<span class="sourceLineNo">2200</span>    * this node for us since it is ephemeral.<a name="line.2200"></a>
-<span class="sourceLineNo">2201</span>    */<a name="line.2201"></a>
-<span class="sourceLineNo">2202</span>    LOG.info("Adding backup master ZNode " + backupZNode);<a name="line.2202"></a>
-<span class="sourceLineNo">2203</span>    if (!MasterAddressTracker.setMasterAddress(zooKeeper, backupZNode, serverName, infoPort)) {<a name="line.2203"></a>
-<span class="sourceLineNo">2204</span>      LOG.warn("Failed create of " + backupZNode + " by " + serverName);<a name="line.2204"></a>
-<span class="sourceLineNo">2205</span>    }<a name="line.2205"></a>
-<span class="sourceLineNo">2206</span>    this.activeMasterManager.setInfoPort(infoPort);<a name="line.2206"></a>
-<span class="sourceLineNo">2207</span>    int timeout = conf.getInt(HConstants.ZK_SESSION_TIMEOUT, HConstants.DEFAULT_ZK_SESSION_TIMEOUT);<a name="line.2207"></a>
-<span class="sourceLineNo">2208</span>    // If we're a backup master, stall until a primary to write this address<a name="line.2208"></a>
-<span class="sourceLineNo">2209</span>    if (conf.getBoolean(HConstants.MASTER_TYPE_BACKUP, HConstants.DEFAULT_MASTER_TYPE_BACKUP)) {<a name="line.2209"></a>
-<span class="sourceLineNo">2210</span>      LOG.debug("HMaster started in backup mode. Stalling until master znode is written.");<a name="line.2210"></a>
-<span class="sourceLineNo">2211</span>      // This will only be a minute or so while the cluster starts up,<a name="line.2211"></a>
-<span class="sourceLineNo">2212</span>      // so don't worry about setting watches on the parent znode<a name="line.2212"></a>
-<span class="sourceLineNo">2213</span>      while (!activeMasterManager.hasActiveMaster()) {<a name="line.2213"></a>
-<span class="sourceLineNo">2214</span>        LOG.debug("Waiting for master address and cluster state znode to be written.");<a name="line.2214"></a>
-<span class="sourceLineNo">2215</span>        Threads.sleep(timeout);<a name="line.2215"></a>
-<span class="sourceLineNo">2216</span>      }<a name="line.2216"></a>
-<span class="sourceLineNo">2217</span>    }<a name="line.2217"></a>
-<span class="sourceLineNo">2218</span>    MonitoredTask status = TaskMonitor.get().createStatus("Master startup");<a name="line.2218"></a>
-<span class="sourceLineNo">2219</span>    status.setDescription("Master startup");<a name="line.2219"></a>
-<span class="sourceLineNo">2220</span>    try {<a name="line.2220"></a>
-<span class="sourceLineNo">2221</span>      if (activeMasterManager.blockUntilBecomingActiveMaster(timeout, status)) {<a name="line.2221"></a>
-<span class="sourceLineNo">2222</span>        finishActiveMasterInitialization(status);<a name="line.2222"></a>
-<span class="sourceLineNo">2223</span>      }<a name="line.2223"></a>
-<span class="sourceLineNo">2224</span>    } catch (Throwable t) {<a name="line.2224"></a>
-<span class="sourceLineNo">2225</span>      status.setStatus("Failed to become active: " + t.getMessage());<a name="line.2225"></a>
-<span class="sourceLineNo">2226</span>      LOG.error(HBaseMarkers.FATAL, "Failed to become active master", t);<a name="line.2226"></a>
-<span class="sourceLineNo">2227</span>      // HBASE-5680: Likely hadoop23 vs hadoop 20.x/1.x incompatibility<a name="line.2227"></a>
-<span class="sourceLineNo">2228</span>      if (t instanceof NoClassDefFoundError &amp;&amp; t.getMessage().<a name="line.2228"></a>
-<span class="sourceLineNo">2229</span>          contains("org/apache/hadoop/hdfs/protocol/HdfsConstants$SafeModeAction")) {<a name="line.2229"></a>
-<span class="sourceLineNo">2230</span>        // improved error message for this special case<a name="line.2230"></a>
-<span class="sourceLineNo">2231</span>        abort("HBase is having a problem with its Hadoop jars.  You may need to recompile " +<a name="line.2231"></a>
-<span class="sourceLineNo">2232</span>          "HBase against Hadoop version " + org.apache.hadoop.util.VersionInfo.getVersion() +<a name="line.2232"></a>
-<span class="sourceLineNo">2233</span>          " or change your hadoop jars to start properly", t);<a name="line.2233"></a>
-<span class="sourceLineNo">2234</span>      } else {<a name="line.2234"></a>
-<span class="sourceLineNo">2235</span>        abort("Unhandled exception. Starting shutdown.", t);<a name="line.2235"></a>
-<span class="sourceLineNo">2236</span>      }<a name="line.2236"></a>
-<span class="sourceLineNo">2237</span>    } finally {<a name="line.2237"></a>
-<span class="sourceLineNo">2238</span>      status.cleanup();<a name="line.2238"></a>
-<span class="sourceLineNo">2239</span>    }<a name="line.2239"></a>
-<span class="sourceLineNo">2240</span>  }<a name="line.2240"></a>
-<span class="sourceLineNo">2241</span><a name="line.2241"></a>
-<span class="sourceLineNo">2242</span>  private static boolean isCatalogTable(final TableName tableName) {<a name="line.2242"></a>
-<span class="sourceLineNo">2243</span>    return tableName.equals(TableName.META_TABLE_NAME);<a name="line.2243"></a>
-<span class="sourceLineNo">2244</span>  }<a name="line.2244"></a>
-<span class="sourceLineNo">2245</span><a name="line.2245"></a>
-<span class="sourceLineNo">2246</span>  @Override<a name="line.2246"></a>
-<span class="sourceLineNo">2247</span>  public long deleteTable(<a name="line.2247"></a>
-<span class="sourceLineNo">2248</span>      final TableName tableName,<a name="line.2248"></a>
-<span class="sourceLineNo">2249</span>      final long nonceGroup,<a name="line.2249"></a>
-<span class="sourceLineNo">2250</span>      final long nonce) throws IOException {<a name="line.2250"></a>
-<span class="sourceLineNo">2251</span>    checkInitialized();<a name="line.2251"></a>
-<span class="sourceLineNo">2252</span><a name="line.2252"></a>
-<span class="sourceLineNo">2253</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2253"></a>
-<span class="sourceLineNo">2254</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2254"></a>
-<span class="sourceLineNo">2255</span>      @Override<a name="line.2255"></a>
-<span class="sourceLineNo">2256</span>      protected void run() throws IOException {<a name="line.2256"></a>
-<span class="sourceLineNo">2257</span>        getMaster().getMasterCoprocessorHost().preDeleteTable(tableName);<a name="line.2257"></a>
-<span class="sourceLineNo">2258</span><a name="line.2258"></a>
-<span class="sourceLineNo">2259</span>        LOG.info(getClientIdAuditPrefix() + " delete " + tableName);<a name="line.2259"></a>
-<span class="sourceLineNo">2260</span><a name="line.2260"></a>
-<span class="sourceLineNo">2261</span>        // TODO: We can handle/merge duplicate request<a name="line.2261"></a>
-<span class="sourceLineNo">2262</span>        //<a name="line.2262"></a>
-<span class="sourceLineNo">2263</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2263"></a>
-<span class="sourceLineNo">2264</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2264"></a>
-<span class="sourceLineNo">2265</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2265"></a>
-<span class="sourceLineNo">2266</span>        submitProcedure(new DeleteTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2266"></a>
-<span class="sourceLineNo">2267</span>            tableName, latch));<a name="line.2267"></a>
-<span class="sourceLineNo">2268</span>        latch.await();<a name="line.2268"></a>
-<span class="sourceLineNo">2269</span><a name="line.2269"></a>
-<span class="sourceLineNo">2270</span>        getMaster().getMasterCoprocessorHost().postDeleteTable(tableName);<a name="line.2270"></a>
-<span class="sourceLineNo">2271</span>      }<a name="line.2271"></a>
-<span class="sourceLineNo">2272</span><a name="line.2272"></a>
-<span class="sourceLineNo">2273</span>      @Override<a name="line.2273"></a>
-<span class="sourceLineNo">2274</span>      protected String getDescription() {<a name="line.2274"></a>
-<span class="sourceLineNo">2275</span>        return "DeleteTableProcedure";<a name="line.2275"></a>
-<span class="sourceLineNo">2276</span>      }<a name="line.2276"></a>
-<span class="sourceLineNo">2277</span>    });<a name="line.2277"></a>
-<span class="sourceLineNo">2278</span>  }<a name="line.2278"></a>
-<span class="sourceLineNo">2279</span><a name="line.2279"></a>
-<span class="sourceLineNo">2280</span>  @Override<a name="line.2280"></a>
-<span class="sourceLineNo">2281</span>  public long truncateTable(<a name="line.2281"></a>
-<span class="sourceLineNo">2282</span>      final TableName tableName,<a name="line.2282"></a>
-<span class="sourceLineNo">2283</span>      final boolean preserveSplits,<a name="line.2283"></a>
-<span class="sourceLineNo">2284</span>      final long nonceGroup,<a name="line.2284"></a>
-<span class="sourceLineNo">2285</span>      final long nonce) throws IOException {<a name="line.2285"></a>
-<span class="sourceLineNo">2286</span>    checkInitialized();<a name="line.2286"></a>
-<span class="sourceLineNo">2287</span><a name="line.2287"></a>
-<span class="sourceLineNo">2288</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2288"></a>
-<span class="sourceLineNo">2289</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2289"></a>
-<span class="sourceLineNo">2290</span>      @Override<a name="line.2290"></a>
-<span class="sourceLineNo">2291</span>      protected void run() throws IOException {<a name="line.2291"></a>
-<span class="sourceLineNo">2292</span>        getMaster().getMasterCoprocessorHost().preTruncateTable(tableName);<a name="line.2292"></a>
-<span class="sourceLineNo">2293</span><a name="line.2293"></a>
-<span class="sourceLineNo">2294</span>        LOG.info(getClientIdAuditPrefix() + " truncate " + tableName);<a name="line.2294"></a>
-<span class="sourceLineNo">2295</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createLatch(2, 0);<a name="line.2295"></a>
-<span class="sourceLineNo">2296</span>        submitProcedure(new TruncateTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2296"></a>
-<span class="sourceLineNo">2297</span>            tableName, preserveSplits, latch));<a name="line.2297"></a>
-<span class="sourceLineNo">2298</span>        latch.await();<a name="line.2298"></a>
-<span class="sourceLineNo">2299</span><a name="line.2299"></a>
-<span class="sourceLineNo">2300</span>        getMaster().getMasterCoprocessorHost().postTruncateTable(tableName);<a name="line.2300"></a>
-<span class="sourceLineNo">2301</span>      }<a name="line.2301"></a>
-<span class="sourceLineNo">2302</span><a name="line.2302"></a>
-<span class="sourceLineNo">2303</span>      @Override<a name="line.2303"></a>
-<span class="sourceLineNo">2304</span>      protected String getDescription() {<a name="line.2304"></a>
-<span class="sourceLineNo">2305</span>        return "TruncateTableProcedure";<a name="line.2305"></a>
-<span class="sourceLineNo">2306</span>      }<a name="line.2306"></a>
-<span class="sourceLineNo">2307</span>    });<a name="line.2307"></a>
-<span class="sourceLineNo">2308</span>  }<a name="line.2308"></a>
-<span class="sourceLineNo">2309</span><a name="line.2309"></a>
-<span class="sourceLineNo">2310</span>  @Override<a name="line.2310"></a>
-<span class="sourceLineNo">2311</span>  public long addColumn(final TableName tableName, final ColumnFamilyDescriptor column,<a name="line.2311"></a>
-<span class="sourceLineNo">2312</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2312"></a>
-<span class="sourceLineNo">2313</span>    checkInitialized();<a name="line.2313"></a>
-<span class="sourceLineNo">2314</span>    checkTableExists(tableName);<a name="line.2314"></a>
-<span class="sourceLineNo">2315</span><a name="line.2315"></a>
-<span class="sourceLineNo">2316</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2316"></a>
-<span class="sourceLineNo">2317</span><a name="line.2317"></a>
-<span class="sourceLineNo">2318</span>      @Override<a name="line.2318"></a>
-<span class="sourceLineNo">2319</span>      public TableDescriptor get() throws IOException {<a name="line.2319"></a>
-<span class="sourceLineNo">2320</span>        TableDescriptor old = getTableDescriptors().get(tableName);<a name="line.2320"></a>
-<span class="sourceLineNo">2321</span>        if (old.hasColumnFamily(column.getName())) {<a name="line.2321"></a>
-<span class="sourceLineNo">2322</span>          throw new InvalidFamilyOperationException("Column family '" + column.getNameAsString()<a name="line.2322"></a>
-<span class="sourceLineNo">2323</span>              + "' in table '" + tableName + "' already exists so cannot be added");<a name="line.2323"></a>
-<span class="sourceLineNo">2324</span>        }<a name="line.2324"></a>
-<span class="sourceLineNo">2325</span><a name="line.2325"></a>
-<span class="sourceLineNo">2326</span>        return TableDescriptorBuilder.newBuilder(old).setColumnFamily(column).build();<a name="line.2326"></a>
-<span class="sourceLineNo">2327</span>      }<a name="line.2327"></a>
-<span class="sourceLineNo">2328</span>    }, nonceGroup, nonce, true);<a name="line.2328"></a>
-<span class="sourceLineNo">2329</span>  }<a name="line.2329"></a>
-<span class="sourceLineNo">2330</span><a name="line.2330"></a>
-<span class="sourceLineNo">2331</span>  /**<a name="line.2331"></a>
-<span class="sourceLineNo">2332</span>   * Implement to return TableDescriptor after pre-checks<a name="line.2332"></a>
-<span class="sourceLineNo">2333</span>   */<a name="line.2333"></a>
-<span class="sourceLineNo">2334</span>  protected interface TableDescriptorGetter {<a name="line.2334"></a>
-<span class="sourceLineNo">2335</span>    TableDescriptor get() throws IOException;<a name="line.2335"></a>
-<span class="sourceLineNo">2336</span>  }<a name="line.2336"></a>
-<span class="sourceLineNo">2337</span><a name="line.2337"></a>
-<span class="sourceLineNo">2338</span>  @Override<a name="line.2338"></a>
-<span class="sourceLineNo">2339</span>  public long modifyColumn(final TableName tableName, final ColumnFamilyDescriptor descriptor,<a name="line.2339"></a>
-<span class="sourceLineNo">2340</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2340"></a>
-<span class="sourceLineNo">2341</span>    checkInitialized();<a name="line.2341"></a>
-<span class="sourceLineNo">2342</span>    checkTableExists(tableName);<a name="line.2342"></a>
-<span class="sourceLineNo">2343</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2343"></a>
-<span class="sourceLineNo">2344</span><a name="line.2344"></a>
-<span class="sourceLineNo">2345</span>      @Override<a name="line.2345"></a>
-<span class="sourceLineNo">2346</span>      public TableDescriptor get() throws IOException {<a name="line.2346"></a>
-<span class="sourceLineNo">2347</span>        TableDescriptor old = getTableDescriptors().get(tableName);<a name="line.2347"></a>
-<span class="sourceLineNo">2348</span>        if (!old.hasColumnFamily(descriptor.getName())) {<a name="line.2348"></a>
-<span class="sourceLineNo">2349</span>          throw new InvalidFamilyOperationException("Family '" + descriptor.getNameAsString()<a name="line.2349"></a>
-<span class="sourceLineNo">2350</span>              + "' does not exist, so it cannot be modified");<a name="line.2350"></a>
-<span class="sourceLineNo">2351</span>        }<a name="line.2351"></a>
-<span class="sourceLineNo">2352</span><a name="line.2352"></a>
-<span class="sourceLineNo">2353</span>        return TableDescriptorBuilder.newBuilder(old).modifyColumnFamily(descriptor).build();<a name="line.2353"></a>
-<span class="sourceLineNo">2354</span>      }<a name="line.2354"></a>
-<span class="sourceLineNo">2355</span>    }, nonceGroup, nonce, true);<a name="line.2355"></a>
-<span class="sourceLineNo">2356</span>  }<a name="line.2356"></a>
-<span class="sourceLineNo">2357</span><a name="line.2357"></a>
-<span class="sourceLineNo">2358</span>  @Override<a name="line.2358"></a>
-<span class="sourceLineNo">2359</span>  public long deleteColumn(final TableName tableName, final byte[] columnName,<a name="line.2359"></a>
-<span class="sourceLineNo">2360</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2360"></a>
-<span class="sourceLineNo">2361</span>    checkInitialized();<a name="line.2361"></a>
-<span class="sourceLineNo">2362</span>    checkTableExists(tableName);<a name="line.2362"></a>
-<span class="sourceLineNo">2363</span><a name="line.2363"></a>
-<span class="sourceLineNo">2364</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2364"></a>
-<span class="sourceLineNo">2365</span><a name="line.2365"></a>
-<span class="sourceLineNo">2366</span>      @Override<a name="line.2366"></a>
-<span class="sourceLineNo">2367</span>      public TableDescriptor get() throws IOException {<a name="line.2367"></a>
-<span class="sourceLineNo">2368</span>        TableDescriptor old = getTableDescriptors().get(tableName);<a name="line.2368"></a>
-<span class="sourceLineNo">2369</span><a name="line.2369"></a>
-<span class="sourceLineNo">2370</span>        if (!old.hasColumnFamily(columnName)) {<a name="line.2370"></a>
-<span class="sourceLineNo">2371</span>          throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName)<a name="line.2371"></a>
-<span class="sourceLineNo">2372</span>              + "' does not exist, so it cannot be deleted");<a name="line.2372"></a>
-<span class="sourceLineNo">2373</span>        }<a name="line.2373"></a>
-<span class="sourceLineNo">2374</span>        if (old.getColumnFamilyCount() == 1) {<a name="line.2374"></a>
-<span class="sourceLineNo">2375</span>          throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName)<a name="line.2375"></a>
-<span class="sourceLineNo">2376</span>              + "' is the only column family in the table, so it cannot be deleted");<a name="line.2376"></a>
-<span class="sourceLineNo">2377</span>        }<a name="line.2377"></a>
-<span class="sourceLineNo">2378</span>        return TableDescriptorBuilder.newBuilder(old).removeColumnFamily(columnName).build();<a name="line.2378"></a>
-<span class="sourceLineNo">2379</span>      }<a name="line.2379"></a>
-<span class="sourceLineNo">2380</span>    }, nonceGroup, nonce, true);<a name="line.2380"></a>
-<span class="sourceLineNo">2381</span>  }<a name="line.2381"></a>
-<span class="sourceLineNo">2382</span><a name="line.2382"></a>
-<span class="sourceLineNo">2383</span>  @Override<a name="line.2383"></a>
-<span class="sourceLineNo">2384</span>  public long enableTable(final TableName tableName, final long nonceGroup, final long nonce)<a name="line.2384"></a>
-<span class="sourceLineNo">2385</span>      throws IOException {<a name="line.2385"></a>
-<span class="sourceLineNo">2386</span>    checkInitialized();<a name="line.2386"></a>
-<span class="sourceLineNo">2387</span><a name="line.2387"></a>
-<span class="sourceLineNo">2388</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2388"></a>
-<span class="sourceLineNo">2389</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2389"></a>
-<span class="sourceLineNo">2390</span>      @Override<a name="line.2390"></a>
-<span class="sourceLineNo">2391</span>      protected void run() throws IOException {<a name="line.2391"></a>
-<span class="sourceLineNo">2392</span>        getMaster().getMasterCoprocessorHost().preEnableTable(tableName);<a name="line.2392"></a>
-<span class="sourceLineNo">2393</span><a name="line.2393"></a>
-<span class="sourceLineNo">2394</span>        // Normally, it would make sense for this authorization check to exist inside<a name="line.2394"></a>
-<span class="sourceLineNo">2395</span>        // AccessController, but because the authorization check is done based on internal state<a name="line.2395"></a>
-<span class="sourceLineNo">2396</span>        // (rather than explicit permissions) we'll do the check here instead of in the<a name="line.2396"></a>
-<span class="sourceLineNo">2397</span>        // coprocessor.<a name="line.2397"></a>
-<span class="sourceLineNo">2398</span>        MasterQuotaManager quotaManager = getMasterQuotaManager();<a name="line.2398"></a>
-<span class="sourceLineNo">2399</span>        if (quotaManager != null) {<a name="line.2399"></a>
-<span class="sourceLineNo">2400</span>          if (quotaManager.isQuotaInitialized()) {<a name="line.2400"></a>
-<span class="sourceLineNo">2401</span>              SpaceQuotaSnapshot currSnapshotOfTable =<a name="line.2401"></a>
-<span class="sourceLineNo">2402</span>                  QuotaTableUtil.getCurrentSnapshotFromQuotaTable(getConnection(), tableName);<a name="line.2402"></a>
-<span class="sourceLineNo">2403</span>              if (currSnapshotOfTable != null) {<a name="line.2403"></a>
-<span class="sourceLineNo">2404</span>                SpaceQuotaStatus quotaStatus = currSnapshotOfTable.getQuotaStatus();<a name="line.2404"></a>
-<span class="sourceLineNo">2405</span>                if (quotaStatus.isInViolation()<a name="line.2405"></a>
-<span class="sourceLineNo">2406</span>                    &amp;&amp; SpaceViolationPolicy.DISABLE == quotaStatus.getPolicy().orElse(null)) {<a name="line.2406"></a>
-<span class="sourceLineNo">2407</span>                throw new AccessDeniedException("Enabling the table '" + tableName<a name="line.2407"></a>
-<span class="sourceLineNo">2408</span>                    + "' is disallowed due to a violated space quota.");<a name="line.2408"></a>
-<span class="sourceLineNo">2409</span>              }<a name="line.2409"></a>
-<span class="sourceLineNo">2410</span>            }<a name="line.2410"></a>
-<span class="sourceLineNo">2411</span>          } else if (LOG.isTraceEnabled()) {<a name="line.2411"></a>
-<span class="sourceLineNo">2412</span>            LOG.trace("Unable to check for space quotas as the MasterQuotaManager is not enabled");<a name="line.2412"></a>
-<span class="sourceLineNo">2413</span>          }<a name="line.2413"></a>
-<span class="sourceLineNo">2414</span>        }<a name="line.2414"></a>
-<span class="sourceLineNo">2415</span><a name="line.2415"></a>
-<span class="sourceLineNo">2416</span>        LOG.info(getClientIdAuditPrefix() + " enable " + tableName);<a name="line.2416"></a>
-<span class="sourceLineNo">2417</span><a name="line.2417"></a>
-<span class="sourceLineNo">2418</span>        // Execute the operation asynchronously - client will check the progress of the operation<a name="line.2418"></a>
-<span class="sourceLineNo">2419</span>        // In case the request is from a &lt;1.1 client before returning,<a name="line.2419"></a>
-<span class="sourceLineNo">2420</span>        // we want to make sure that the table is prepared to be<a name="line.2420"></a>
-<span class="sourceLineNo">2421</span>        // enabled (the table is locked and the table state is set).<a name="line.2421"></a>
-<span class="sourceLineNo">2422</span>        // Note: if the procedure throws exception, we will catch it and rethrow.<a name="line.2422"></a>
-<span class="sourceLineNo">2423</span>        final ProcedurePrepareLatch prepareLatch = ProcedurePrepareLatch.createLatch();<a name="line.2423"></a>
-<span class="sourceLineNo">2424</span>        submitProcedure(new EnableTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2424"></a>
-<span class="sourceLineNo">2425</span>            tableName, prepareLatch));<a name="line.2425"></a>
-<span class="sourceLineNo">2426</span>        prepareLatch.await();<a name="line.2426"></a>
-<span class="sourceLineNo">2427</span><a name="line.2427"></a>
-<span class="sourceLineNo">2428</span>        getMaster().getMasterCoprocessorHost().postEnableTable(tableName);<a name="line.2428"></a>
-<span class="sourceLineNo">2429</span>      }<a name="line.2429"></a>
-<span class="sourceLineNo">2430</span><a name="line.2430"></a>
-<span class="sourceLineNo">2431</span>      @Override<a name="line.2431"></a>
-<span class="sourceLineNo">2432</span>      protected String getDescription() {<a name="line.2432"></a>
-<span class="sourceLineNo">2433</span>        return "EnableTableProcedure";<a name="line.2433"></a>
-<span class="sourceLineNo">2434</span>      }<a name="line.2434"></a>
-<span class="sourceLineNo">2435</span>    });<a name="line.2435"></a>
-<span class="sourceLineNo">2436</span>  }<a name="line.2436"></a>
-<span class="sourceLineNo">2437</span><a name="line.2437"></a>
-<span class="sourceLineNo">2438</span>  @Override<a name="line.2438"></a>
-<span class="sourceLineNo">2439</span>  public long disableTable(final TableName tableName, final long nonceGroup, final long nonce)<a name="line.2439"></a>
-<span class="sourceLineNo">2440</span>      throws IOException {<a name="line.2440"></a>
-<span class="sourceLineNo">2441</span>    checkInitialized();<a name="line.2441"></a>
-<span class="sourceLineNo">2442</span><a name="line.2442"></a>
-<span class="sourceLineNo">2443</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2443"></a>
-<span class="sourceLineNo">2444</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2444"></a>
-<span class="sourceLineNo">2445</span>      @Override<a name="line.2445"></a>
-<span class="sourceLineNo">2446</span>      protected void run() throws IOException {<a name="line.2446"></a>
-<span class="sourceLineNo">2447</span>        getMaster().getMasterCoprocessorHost().preDisableTable(tableName);<a name="line.2447"></a>
-<span class="sourceLineNo">2448</span><a name="line.2448"></a>
-<span class="sourceLineNo">2449</span>        LOG.info(getClientIdAuditPrefix() + " disable " + tableName);<a name="line.2449"></a>
-<span class="sourceLineNo">2450</span><a name="line.2450"></a>
-<span class="sourceLineNo">2451</span>        // Execute the operation asynchronously - client will check the progress of the operation<a name="line.2451"></a>
-<span class="sourceLineNo">2452</span>        // In case the request is from a &lt;1.1 client before returning,<a name="line.2452"></a>
-<span class="sourceLineNo">2453</span>        // we want to make sure that the table is prepared to be<a name="line.2453"></a>
-<span class="sourceLineNo">2454</span>        // enabled (the table is locked and the table state is set).<a name="line.2454"></a>
-<span class="sourceLineNo">2455</span>        // Note: if the procedure throws exception, we will catch it and rethrow.<a name="line.2455"></a>
-<span class="sourceLineNo">2456</span>        //<a name="line.2456"></a>
-<span class="sourceLineNo">2457</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2457"></a>
-<span class="sourceLineNo">2458</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2458"></a>
-<span class="sourceLineNo">2459</span>        final ProcedurePrepareLatch prepareLatch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2459"></a>
-<span class="sourceLineNo">2460</span>        submitProcedure(new DisableTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2460"></a>
-<span class="sourceLineNo">2461</span>            tableName, false, prepareLatch));<a name="line.2461"></a>
-<span class="sourceLineNo">2462</span>        prepareLatch.await();<a name="line.2462"></a>
-<span class="sourceLineNo">2463</span><a name="line.2463"></a>
-<span class="sourceLineNo">2464</span>        getMaster().getMasterCoprocessorHost().postDisableTable(tableName);<a name="line.2464"></a>
-<span class="sourceLineNo">2465</span>      }<a name="line.2465"></a>
-<span class="sourceLineNo">2466</span><a name="line.2466"></a>
-<span class="sourceLineNo">2467</span>      @Override<a name="line.2467"></a>
-<span class="sourceLineNo">2468</span>      protected String getDescription() {<a name="line.2468"></a>
-<span class="sourceLineNo">2469</span>        return "DisableTableProcedure";<a name="line.2469"></a>
-<span class="sourceLineNo">2470</span>      }<a name="line.2470"></a>
-<span class="sourceLineNo">2471</span>    });<a name="line.2471"></a>
-<span class="sourceLineNo">2472</span>  }<a name="line.2472"></a>
-<span class="sourceLineNo">2473</span><a name="line.2473"></a>
-<span class="sourceLineNo">2474</span>  private long modifyTable(final TableName tableName,<a name="line.2474"></a>
-<span class="sourceLineNo">2475</span>      final TableDescriptorGetter newDescriptorGetter, final long nonceGroup, final long nonce,<a name="line.2475"></a>
-<span class="sourceLineNo">2476</span>      final boolean shouldCheckDescriptor) throws IOException {<a name="line.2476"></a>
-<span class="sourceLineNo">2477</span>    return MasterProcedureUtil<a name="line.2477"></a>
-<span class="sourceLineNo">2478</span>        .submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2478"></a>
-<span class="sourceLineNo">2479</span>          @Override<a name="line.2479"></a>
-<span class="sourceLineNo">2480</span>          protected void run() throws IOException {<a name="line.2480"></a>
-<span class="sourceLineNo">2481</span>            TableDescriptor oldDescriptor = getMaster().getTableDescriptors().get(tableName);<a name="line.2481"></a>
-<span class="sourceLineNo">2482</span>            TableDescriptor newDescriptor = getMaster().getMasterCoprocessorHost()<a name="line.2482"></a>
-<span class="sourceLineNo">2483</span>                .preModifyTable(tableName, oldDescriptor, newDescriptorGetter.get());<a name="line.2483"></a>
-<span class="sourceLineNo">2484</span>            TableDescriptorChecker.sanityCheck(conf, newDescriptor);<a name="line.2484"></a>
-<span class="sourceLineNo">2485</span>            LOG.info("{} modify table {} from {} to {}", getClientIdAuditPrefix(), tableName,<a name="line.2485"></a>
-<span class="sourceLineNo">2486</span>                oldDescriptor, newDescriptor);<a name="line.2486"></a>
-<span class="sourceLineNo">2487</span><a name="line.2487"></a>
-<span class="sourceLineNo">2488</span>            // Execute the operation synchronously - wait for the operation completes before<a name="line.2488"></a>
-<span class="sourceLineNo">2489</span>            // continuing.<a name="line.2489"></a>
-<span class="sourceLineNo">2490</span>            //<a name="line.2490"></a>
-<span class="sourceLineNo">2491</span>            // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2491"></a>
-<span class="sourceLineNo">2492</span>            // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2492"></a>
-<span class="sourceLineNo">2493</span>            ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2493"></a>
-<span class="sourceLineNo">2494</span>            submitProcedure(new ModifyTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2494"></a>
-<span class="sourceLineNo">2495</span>                newDescriptor, latch, oldDescriptor, shouldCheckDescriptor));<a name="line.2495"></a>
-<span class="sourceLineNo">2496</span>            latch.await();<a name="line.2496"></a>
-<span class="sourceLineNo">2497</span><a name="line.2497"></a>
-<span class="sourceLineNo">2498</span>            getMaster().getMasterCoprocessorHost().postModifyTable(tableName, oldDescriptor,<a name="line.2498"></a>
-<span class="sourceLineNo">2499</span>              newDescriptor);<a name="line.2499"></a>
-<span class="sourceLineNo">2500</span>          }<a name="line.2500"></a>
-<span class="sourceLineNo">2501</span><a name="line.2501"></a>
-<span class="sourceLineNo">2502</span>          @Override<a name="line.2502"></a>
-<span class="sourceLineNo">2503</span>          protected String getDescription() {<a name="line.2503"></a>
-<span class="sourceLineNo">2504</span>            return "ModifyTableProcedure";<a name="line.2504"></a>
-<span class="sourceLineNo">2505</span>          }<a name="line.2505"></a>
-<span class="sourceLineNo">2506</span>        });<a name="line.2506"></a>
-<span class="sourceLineNo">2507</span><a name="line.2507"></a>
-<span class="sourceLineNo">2508</span>  }<a name="line.2508"></a>
-<span class="sourceLineNo">2509</span><a name="line.2509"></a>
-<span class="sourceLineNo">2510</span>  @Override<a name="line.2510"></a>
-<span class="sourceLineNo">2511</span>  public long modifyTable(final TableName tableName, final TableDescriptor newDescriptor,<a name="line.2511"></a>
-<span class="sourceLineNo">2512</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2512"></a>
-<span class="sourceLineNo">2513</span>    checkInitialized();<a name="line.2513"></a>
-<span class="sourceLineNo">2514</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2514"></a>
-<span class="sourceLineNo">2515</span>      @Override<a name="line.2515"></a>
-<span class="sourceLineNo">2516</span>      public TableDescriptor get() throws IOException {<a name="line.2516"></a>
-<span class="sourceLineNo">2517</span>        return newDescriptor;<a name="line.2517"></a>
-<span class="sourceLineNo">2518</span>      }<a name="line.2518"></a>
-<span class="sourceLineNo">2519</span>    }, nonceGroup, nonce, false);<a name="line.2519"></a>
-<span class="sourceLineNo">2520</span><a name="line.2520"></a>
-<span class="sourceLineNo">2521</span>  }<a name="line.2521"></a>
-<span class="sourceLineNo">2522</span><a name="line.2522"></a>
-<span class="sourceLineNo">2523</span>  public long restoreSnapshot(final SnapshotDescription snapshotDesc,<a name="line.2523"></a>
-<span class="sourceLineNo">2524</span>      final long nonceGroup, final long nonce, final boolean restoreAcl) throws IOException {<a name="line.2524"></a>
-<span class="sourceLineNo">2525</span>    checkInitialized();<a name="line.2525"></a>
-<span class="sourceLineNo">2526</span>    getSnapshotManager().checkSnapshotSupport();<a name="line.2526"></a>
-<span class="sourceLineNo">2527</span><a name="line.2527"></a>
-<span class="sourceLineNo">2528</span>    // Ensure namespace exists. Will throw exception if non-known NS.<a name="line.2528"></a>
-<span class="sourceLineNo">2529</span>    final TableName dstTable = TableName.valueOf(snapshotDesc.getTable());<a name="line.2529"></a>
-<span class="sourceLineNo">2530</span>    getClusterSchema().getNamespace(dstTable.getNamespaceAsString());<a name="line.2530"></a>
-<span class="sourceLineNo">2531</span><a name="line.2531"></a>
-<span class="sourceLineNo">2532</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2532"></a>
-<span class="sourceLineNo">2533</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2533"></a>
-<span class="sourceLineNo">2534</span>      @Override<a name="line.2534"></a>
-<span class="sourceLineNo">2535</span>      protected void run() throws IOException {<a name="line.2535"></a>
-<span class="sourceLineNo">2536</span>          setProcId(<a name="line.2536"></a>
-<span class="sourceLineNo">2537</span>            getSnapshotManager().restoreOrCloneSnapshot(snapshotDesc, getNonceKey(), restoreAcl));<a name="line.2537"></a>
-<span class="sourceLineNo">2538</span>      }<a name="line.2538"></a>
-<span class="sourceLineNo">2539</span><a name="line.2539"></a>
-<span class="sourceLineNo">2540</span>      @Override<a name="line.2540"></a>
-<span class="sourceLineNo">2541</span>      protected String getDescription() {<a name="line.2541"></a>
-<span class="sourceLineNo">2542</span>        return "RestoreSnapshotProcedure";<a name="line.2542"></a>
-<span class="sourceLineNo">2543</span>      }<a name="line.2543"></a>
-<span class="sourceLineNo">2544</span>    });<a name="line.2544"></a>
-<span class="sourceLineNo">2545</span>  }<a name="line.2545"></a>
-<span class="sourceLineNo">2546</span><a name="line.2546"></a>
-<span class="sourceLineNo">2547</span>  private void checkTableExists(final TableName tableName)<a name="line.2547"></a>
-<span class="sourceLineNo">2548</span>      throws IOException, TableNotFoundException {<a name="line.2548"></a>
-<span class="sourceLineNo">2549</span>    if (!MetaTableAccessor.tableExists(getConnection(), tableName)) {<a name="line.2549"></a>
-<span class="sourceLineNo">2550</span>      throw new TableNotFoundException(tableName);<a name="line.2550"></a>
-<span class="sourceLineNo">2551</span>    }<a name="line.2551"></a>
-<span class="sourceLineNo">2552</span>  }<a name="line.2552"></a>
-<span class="sourceLineNo">2553</span><a name="line.2553"></a>
-<span class="sourceLineNo">2554</span>  @Override<a name="line.2554"></a>
-<span class="sourceLineNo">2555</span>  public void checkTableModifiable(final TableName tableName)<a name="line.2555"></a>
-<span class="sourceLineNo">2556</span>      throws IOException, TableNotFoundException, TableNotDisabledException {<a name="line.2556"></a>
-<span class="sourceLineNo">2557</span>    if (isCatalogTable(tableName)) {<a name="line.2557"></a>
-<span class="sourceLineNo">2558</span>      throw new IOException("Can't modify catalog tables");<a name="line.2558"></a>
-<span class="sourceLineNo">2559</span>    }<a name="line.2559"></a>
-<span class="sourceLineNo">2560</span>    checkTableExists(tableName);<a name="line.2560"></a>
-<span class="sourceLineNo">2561</span>    TableState ts = getTableStateManager().getTableState(tableName);<a name="line.2561"></a>
-<span class="sourceLineNo">2562</span>    if (!ts.isDisabled()) {<a name="line.2562"></a>
-<span class="sourceLineNo">2563</span>      throw new TableNotDisabledException("Not DISABLED; " + ts);<a name="line.2563"></a>
-<span class="sourceLineNo">2564</span>    }<a name="line.2564"></a>
-<span class="sourceLineNo">2565</span>  }<a name="line.2565"></a>
-<span class="sourceLineNo">2566</span><a name="line.2566"></a>
-<span class="sourceLineNo">2567</span>  public ClusterMetrics getClusterMetricsWithoutCoprocessor() throws InterruptedIOException {<a name="line.2567"></a>
-<span class="sourceLineNo">2568</span>    return getClusterMetricsWithoutCoprocessor(EnumSet.allOf(Option.class));<a name="line.2568"></a>
-<span class="sourceLineNo">2569</span>  }<a name="line.2569"></a>
-<span class="sourceLineNo">2570</span><a name="line.2570"></a>
-<span class="sourceLineNo">2571</span>  public ClusterMetrics getClusterMetricsWithoutCoprocessor(EnumSet&lt;Option&gt; options)<a name="line.2571"></a>
-<span class="sourceLineNo">2572</span>      throws InterruptedIOException {<a name="line.2572"></a>
-<span class="sourceLineNo">2573</span>    ClusterMetricsBuilder builder = ClusterMetricsBuilder.newBuilder();<a name="line.2573"></a>
-<span class="sourceLineNo">2574</span>    // given that hbase1 can't submit the request with Option,<a name="line.2574"></a>
-<span class="sourceLineNo">2575</span>    // we return all information to client if the list of Option is empty.<a name="line.2575"></a>
-<span class="sourceLineNo">2576</span>    if (options.isEmpty()) {<a name="line.2576"></a>
-<span class="sourceLineNo">2577</span>      options = EnumSet.allOf(Option.class);<a name="line.2577"></a>
-<span class="sourceLineNo">2578</span>    }<a name="line.2578"></a>
-<span class="sourceLineNo">2579</span><a name="line.2579"></a>
-<span class="sourceLineNo">2580</span>    for (Option opt : options) {<a name="line.2580"></a>
-<span class="sourceLineNo">2581</span>      switch (opt) {<a name="line.2581"></a>
-<span class="sourceLineNo">2582</span>        case HBASE_VERSION: builder.setHBaseVersion(VersionInfo.getVersion()); break;<a name="line.2582"></a>
-<span class="sourceLineNo">2583</span>        case CLUSTER_ID: builder.setClusterId(getClusterId()); break;<a name="line.2583"></a>
-<span class="sourceLineNo">2584</span>        case MASTER: builder.setMasterName(getServerName()); break;<a name="line.2584"></a>
-<span class="sourceLineNo">2585</span>        case BACKUP_MASTERS: builder.setBackerMasterNames(getBackupMasters()); break;<a name="line.2585"></a>
-<span class="sourceLineNo">2586</span>        case LIVE_SERVERS: {<a name="line.2586"></a>
-<span class="sourceLineNo">2587</span>          if (serverManager != null) {<a name="line.2587"></a>
-<span class="sourceLineNo">2588</span>            builder.setLiveServerMetrics(serverManager.getOnlineServers().entrySet().stream()<a name="line.2588"></a>
-<span class="sourceLineNo">2589</span>              .collect(Collectors.toMap(e -&gt; e.getKey(), e -&gt; e.getValue())));<a name="line.2589"></a>
-<span class="sourceLineNo">2590</span>          }<a name="line.2590"></a>
-<span class="sourceLineNo">2591</span>          break;<a name="line.2591"></a>
-<span class="sourceLineNo">2592</span>        }<a name="line.2592"></a>
-<span class="sourceLineNo">2593</span>        case DEAD_SERVERS: {<a name="line.2593"></a>
-<span class="sourceLineNo">2594</span>          if (serverManager != null) {<a name="line.2594"></a>
-<span class="sourceLineNo">2595</span>            builder.setDeadServerNames(new ArrayList&lt;&gt;(<a name="line.2595"></a>
-<span class="sourceLineNo">2596</span>              serverManager.getDeadServers().copyServerNames()));<a name="line.2596"></a>
-<span class="sourceLineNo">2597</span>          }<a name="line.2597"></a>
-<span class="sourceLineNo">2598</span>          break;<a name="line.2598"></a>
-<span class="sourceLineNo">2599</span>        }<a name="line.2599"></a>
-<span class="sourceLineNo">2600</span>        case MASTER_COPROCESSORS: {<a name="line.2600"></a>
-<span class="sourceLineNo">2601</span>          if (cpHost != null) {<a name="line.2601"></a>
-<span class="sourceLineNo">2602</span>            builder.setMasterCoprocessorNames(Arrays.asList(getMasterCoprocessors()));<a name="line.2602"></a>
-<span class="sourceLineNo">2603</span>          }<a name="line.2603"></a>
-<span class="sourceLineNo">2604</span>          break;<a name="line.2604"></a>
-<span class="sourceLineNo">2605</span>        }<a name="line.2605"></a>
-<span class="sourceLineNo">2606</span>        case REGIONS_IN_TRANSITION: {<a name="line.2606"></a>
-<span class="sourceLineNo">2607</span>          if (assignmentManager != null) {<a name="line.2607"></a>
-<span class="sourceLineNo">2608</span>            builder.setRegionsInTransition(assignmentManager.getRegionStates()<a name="line.2608"></a>
-<span class="sourceLineNo">2609</span>                .getRegionsStateInTransition());<a name="line.2609"></a>
-<span class="sourceLineNo">2610</span>          }<a name="line.2610"></a>
-<span class="sourceLineNo">2611</span>          break;<a name="line.2611"></a>
-<span class="sourceLineNo">2612</span>        }<a name="line.2612"></a>
-<span class="sourceLineNo">2613</span>        case BALANCER_ON: {<a name="line.2613"></a>
-<span class="sourceLineNo">2614</span>          if (loadBalancerTracker != null) {<a name="line.2614"></a>
-<span class="sourceLineNo">2615</span>            builder.setBalancerOn(loadBalancerTracker.isBalancerOn());<a name="line.2615"></a>
-<span class="sourceLineNo">2616</span>          }<a name="line.2616"></a>
-<span class="sourceLineNo">2617</span>          break;<a name="line.2617"></a>
-<span class="sourceLineNo">2618</span>        }<a name="line.2618"></a>
-<span class="sourceLineNo">2619</span>        case MASTER_INFO_PORT: {<a name="line.2619"></a>
-<span class="sourceLineNo">2620</span>          if (infoServer != null) {<a name="line.2620"></a>
-<span class="sourceLineNo">2621</span>            builder.setMasterInfoPort(infoServer.getPort());<a name="line.2621"></a>
-<span class="sourceLineNo">2622</span>          }<a name="line.2622"></a>
-<span class="sourceLineNo">2623</span>          break;<a name="line.2623"></a>
-<span class="sourceLineNo">2624</span>        }<a name="line.2624"></a>
-<span class="sourceLineNo">2625</span>        case SERVERS_NAME: {<a name="line.2625"></a>
-<span class="sourceLineNo">2626</span>          if (serverManager != null) {<a name="line.2626"></a>
-<span class="sourceLineNo">2627</span>            builder.setServerNames(serverManager.getOnlineServersList());<a name="line.2627"></a>
-<span class="sourceLineNo">2628</span>          }<a name="line.2628"></a>
-<span class="sourceLineNo">2629</span>          break;<a name="line.2629"></a>
-<span class="sourceLineNo">2630</span>        }<a name="line.2630"></a>
-<span class="sourceLineNo">2631</span>        case TABLE_TO_REGIONS_COUNT: {<a name="line.2631"></a>
-<span class="sourceLineNo">2632</span>          if (isActiveMaster() &amp;&amp; isInitialized() &amp;&amp; assignmentManager != null) {<a name="line.2632"></a>
-<span class="sourceLineNo">2633</span>            try {<a name="line.2633"></a>
-<span class="sourceLineNo">2634</span>              Map&lt;TableName, RegionStatesCount&gt; tableRegionStatesCountMap = new HashMap&lt;&gt;();<a name="line.2634"></a>
-<span class="sourceLineNo">2635</span>              Map&lt;String, TableDescriptor&gt; tableDescriptorMap = getTableDescriptors().getAll();<a name="line.2635"></a>
-<span class="sourceLineNo">2636</span>              for (TableDescriptor tableDescriptor : tableDescriptorMap.values()) {<a name="line.2636"></a>
-<span class="sourceLineNo">2637</span>                TableName tableName = tableDescriptor.getTableName();<a name="line.2637"></a>
-<span class="sourceLineNo">2638</span>                RegionStatesCount regionStatesCount = assignmentManager<a name="line.2638"></a>
-<span class="sourceLineNo">2639</span>                  .getRegionStatesCount(tableName);<a name="line.2639"></a>
-<span class="sourceLineNo">2640</span>                tableRegionStatesCountMap.put(tableName, regionStatesCount);<a name="line.2640"></a>
-<span class="sourceLineNo">2641</span>              }<a name="line.2641"></a>
-<span class="sourceLineNo">2642</span>              builder.setTableRegionStatesCount(tableRegionStatesCountMap);<a name="line.2642"></a>
-<span class="sourceLineNo">2643</span>            } catch (IOException e) {<a name="line.2643"></a>
-<span class="sourceLineNo">2644</span>              LOG.error("Error while populating TABLE_TO_REGIONS_COUNT for Cluster Metrics..", e);<a name="line.2644"></a>
-<span class="sourceLineNo">2645</span>            }<a name="line.2645"></a>
-<span class="sourceLineNo">2646</span>          }<a name="line.2646"></a>
-<span class="sourceLineNo">2647</span>          break;<a name="line.2647"></a>
-<span class="sourceLineNo">2648</span>        }<a name="line.2648"></a>
-<span class="sourceLineNo">2649</span>      }<a name="line.2649"></a>
-<span class="sourceLineNo">2650</span>    }<a name="line.2650"></a>
-<span class="sourceLineNo">2651</span>    return builder.build();<a name="line.2651"></a>
-<span class="sourceLineNo">2652</span>  }<a name="line.2652"></a>
-<span class="sourceLineNo">2653</span><a name="line.2653"></a>
-<span class="sourceLineNo">2654</span>  /**<a name="line.2654"></a>
-<span class="sourceLineNo">2655</span>   * @return cluster status<a name="line.2655"></a>
-<span class="sourceLineNo">2656</span>   */<a name="line.2656"></a>
-<span class="sourceLineNo">2657</span>  public ClusterMetrics getClusterMetrics() throws IOException {<a name="line.2657"></a>
-<span class="sourceLineNo">2658</span>    return getClusterMetrics(EnumSet.allOf(Option.class));<a name="line.2658"></a>
-<span class="sourceLineNo">2659</span>  }<a name="line.2659"></a>
-<span class="sourceLineNo">2660</span><a name="line.2660"></a>
-<span class="sourceLineNo">2661</span>  public ClusterMetrics getClusterMetrics(EnumSet&lt;Option&gt; options) throws IOException {<a name="line.2661"></a>
-<span class="sourceLineNo">2662</span>    if (cpHost != null) {<a name="line.2662"></a>
-<span class="sourceLineNo">2663</span>      cpHost.preGetClusterMetrics();<a name="line.2663"></a>
-<span class="sourceLineNo">2664</span>    }<a name="line.2664"></a>
-<span class="sourceLineNo">2665</span>    ClusterMetrics status = getClusterMetricsWithoutCoprocessor(options);<a name="line.2665"></a>
-<span class="sourceLineNo">2666</span>    if (cpHost != null) {<a name="line.2666"></a>
-<span class="sourceLineNo">2667</span>      cpHost.postGetClusterMetrics(status);<a name="line.2667"></a>
-<span class="sourceLineNo">2668</span>    }<a name="line.2668"></a>
-<span class="sourceLineNo">2669</span>    return status;<a name="line.2669"></a>
-<span class="sourceLineNo">2670</span>  }<a name="line.2670"></a>
-<span class="sourceLineNo">2671</span><a name="line.2671"></a>
-<span class="sourceLineNo">2672</span>  private List&lt;ServerName&gt; getBackupMasters() throws InterruptedIOException {<a name="line.2672"></a>
-<span class="sourceLineNo">2673</span>    // Build Set of backup masters from ZK nodes<a name="line.2673"></a>
-<span class="sourceLineNo">2674</span>    List&lt;String&gt; backupMasterStrings;<a name="line.2674"></a>
-<span class="sourceLineNo">2675</span>    try {<a name="line.2675"></a>
-<span class="sourceLineNo">2676</span>      backupMasterStrings = ZKUtil.listChildrenNoWatch(this.zooKeeper,<a name="line.2676"></a>
-<span class="sourceLineNo">2677</span>        this.zooKeeper.getZNodePaths().backupMasterAddressesZNode);<a name="line.2677"></a>
-<span class="sourceLineNo">2678</span>    } catch (KeeperException e) {<a name="line.2678"></a>
-<span class="sourceLineNo">2679</span>      LOG.warn(this.zooKeeper.prefix("Unable to list backup servers"), e);<a name="line.2679"></a>
-<span class="sourceLineNo">2680</span>      backupMasterStrings = null;<a name="line.2680"></a>
-<span class="sourceLineNo">2681</span>    }<a name="line.2681"></a>
-<span class="sourceLineNo">2682</span><a name="line.2682"></a>
-<span class="sourceLineNo">2683</span>    List&lt;ServerName&gt; backupMasters = Collections.emptyList();<a name="line.2683"></a>
-<span class="sourceLineNo">2684</span>    if (backupMasterStrings != null &amp;&amp; !backupMasterStrings.isEmpty()) {<a name="line.2684"></a>
-<span class="sourceLineNo">2685</span>      backupMasters = new ArrayList&lt;&gt;(backupMasterStrings.size());<a name="line.2685"></a>
-<span class="sourceLineNo">2686</span>      for (String s: backupMasterStrings) {<a name="line.2686"></a>
-<span class="sourceLineNo">2687</span>        try {<a name="line.2687"></a>
-<span class="sourceLineNo">2688</span>          byte [] bytes;<a name="line.2688"></a>
-<span class="sourceLineNo">2689</span>          try {<a name="line.2689"></a>
-<span class="sourceLineNo">2690</span>            bytes = ZKUtil.getData(this.zooKeeper, ZNodePaths.joinZNode(<a name="line.2690"></a>
-<span class="sourceLineNo">2691</span>                this.zooKeeper.getZNodePaths().backupMasterAddressesZNode, s));<a name="line.2691"></a>
-<span class="sourceLineNo">2692</span>          } catch (InterruptedException e) {<a name="line.2692"></a>
-<span class="sourceLineNo">2693</span>            throw new InterruptedIOException();<a name="line.2693"></a>
-<span class="sourceLineNo">2694</span>          }<a name="line.2694"></a>
-<span class="sourceLineNo">2695</span>          if (bytes != null) {<a name="line.2695"></a>
-<span class="sourceLineNo">2696</span>            ServerName sn;<a name="line.2696"></a>
-<span class="sourceLineNo">2697</span>            try {<a name="line.2697"></a>
-<span class="sourceLineNo">2698</span>              sn = ProtobufUtil.parseServerNameFrom(bytes);<a name="line.2698"></a>
-<span class="sourceLineNo">2699</span>            } catch (DeserializationException e) {<a name="line.2699"></a>
-<span class="sourceLineNo">2700</span>              LOG.warn("Failed parse, skipping registering backup server", e);<a name="line.2700"></a>
-<span class="sourceLineNo">2701</span>              continue;<a name="line.2701"></a>
-<span class="sourceLineNo">2702</span>            }<a name="line.2702"></a>
-<span class="sourceLineNo">2703</span>            backupMasters.add(sn);<a name="line.2703"></a>
-<span class="sourceLineNo">2704</span>          }<a name="line.2704"></a>
-<span class="sourceLineNo">2705</span>        } catch (KeeperException e) {<a name="line.2705"></a>
-<span class="sourceLineNo">2706</span>          LOG.warn(this.zooKeeper.prefix("Unable to get information about " +<a name="line.2706"></a>
-<span class="sourceLineNo">2707</span>                   "backup servers"), e);<a name="line.2707"></a>
-<span class="sourceLineNo">2708</span>        }<a name="line.2708"></a>
-<span class="sourceLineNo">2709</span>      }<a name="line.2709"></a>
-<span class="sourceLineNo">2710</span>      Collections.sort(backupMasters, new Comparator&lt;ServerName&gt;() {<a name="line.2710"></a>
-<span class="sourceLineNo">2711</span>        @Override<a name="line.2711"></a>
-<span class="sourceLineNo">2712</span>        public int compare(ServerName s1, ServerName s2) {<a name="line.2712"></a>
-<span class="sourceLineNo">2713</span>          return s1.getServerName().compareTo(s2.getServerName());<a name="line.2713"></a>
-<span class="sourceLineNo">2714</span>        }});<a name="line.2714"></a>
-<span class="sourceLineNo">2715</span>    }<a name="line.2715"></a>
-<span class="sourceLineNo">2716</span>    return backupMasters;<a name="line.2716"></a>
-<span class="sourceLineNo">2717</span>  }<a name="line.2717"></a>
-<span class="sourceLineNo">2718</span><a name="line.2718"></a>
-<span class="sourceLineNo">2719</span>  /**<a name="line.2719"></a>
-<span class="sourceLineNo">2720</span>   * The set of loaded coprocessors is stored in a static set. Since it's<a name="line.2720"></a>
-<span class="sourceLineNo">2721</span>   * statically allocated, it does not require that HMaster's cpHost be<a name="line.2721"></a>
-<span class="sourceLineNo">2722</span>   * initialized prior to accessing it.<a name="line.2722"></a>
-<span class="sourceLineNo">2723</span>   * @return a String representation of the set of names of the loaded coprocessors.<a name="line.2723"></a>
-<span class="sourceLineNo">2724</span>   */<a name="line.2724"></a>
-<span class="sourceLineNo">2725</span>  public static String getLoadedCoprocessors() {<a name="line.2725"></a>
-<span class="sourceLineNo">2726</span>    return CoprocessorHost.getLoadedCoprocessors().toString();<a name="line.2726"></a>
-<span class="sourceLineNo">2727</span>  }<a name="line.2727"></a>
-<span class="sourceLineNo">2728</span><a name="line.2728"></a>
-<span class="sourceLineNo">2729</span>  /**<a name="line.2729"></a>
-<span class="sourceLineNo">2730</span>   * @return timestamp in millis when HMaster was started.<a name="line.2730"></a>
-<span class="sourceLineNo">2731</span>   */<a name="line.2731"></a>
-<span class="sourceLineNo">2732</span>  public long getMasterStartTime() {<a name="line.2732"></a>
-<span class="sourceLineNo">2733</span>    return startcode;<a name="line.2733"></a>
-<span class="sourceLineNo">2734</span>  }<a name="line.2734"></a>
-<span class="sourceLineNo">2735</span><a name="line.2735"></a>
-<span class="sourceLineNo">2736</span>  /**<a name="line.2736"></a>
-<span class="sourceLineNo">2737</span>   * @return timestamp in millis when HMaster became the active master.<a name="line.2737"></a>
-<span class="sourceLineNo">2738</span>   */<a name="line.2738"></a>
-<span class="sourceLineNo">2739</span>  public long getMasterActiveTime() {<a name="line.2739"></a>
-<span class="sourceLineNo">2740</span>    return masterActiveTime;<a name="line.2740"></a>
-<span class="sourceLineNo">2741</span>  }<a name="line.2741"></a>
-<span class="sourceLineNo">2742</span><a name="line.2742"></a>
-<span class="sourceLineNo">2743</span>  /**<a name="line.2743"></a>
-<span class="sourceLineNo">2744</span>   * @return timestamp in millis when HMaster finished becoming the active master<a name="line.2744"></a>
-<span class="sourceLineNo">2745</span>   */<a name="line.2745"></a>
-<span class="sourceLineNo">2746</span>  public long getMasterFinishedInitializationTime() {<a name="line.2746"></a>
-<span class="sourceLineNo">2747</span>    return masterFinishedInitializationTime;<a name="line.2747"></a>
-<span class="sourceLineNo">2748</span>  }<a name="line.2748"></a>
-<span class="sourceLineNo">2749</span><a name="line.2749"></a>
-<span class="sourceLineNo">2750</span>  public int getNumWALFiles() {<a name="line.2750"></a>
-<span class="sourceLineNo">2751</span>    return 0;<a name="line.2751"></a>
-<span class="sourceLineNo">2752</span>  }<a name="line.2752"></a>
-<span class="sourceLineNo">2753</span><a name="line.2753"></a>
-<span class="sourceLineNo">2754</span>  public ProcedureStore getProcedureStore() {<a name="line.2754"></a>
-<span class="sourceLineNo">2755</span>    return procedureStore;<a name="line.2755"></a>
-<span class="sourceLineNo">2756</span>  }<a name="line.2756"></a>
-<span class="sourceLineNo">2757</span><a name="line.2757"></a>
-<span class="sourceLineNo">2758</span>  public int getRegionServerInfoPort(final ServerName sn) {<a name="line.2758"></a>
-<span class="sourceLineNo">2759</span>    int port = this.serverManager.getInfoPort(sn);<a name="line.2759"></a>
-<span class="sourceLineNo">2760</span>    return port == 0 ? conf.getInt(HConstants.REGIONSERVER_INFO_PORT,<a name="line.2760"></a>
-<span class="sourceLineNo">2761</span>      HConstants.DEFAULT_REGIONSERVER_INFOPORT) : port;<a name="line.2761"></a>
-<span class="sourceLineNo">2762</span>  }<a name="line.2762"></a>
-<span class="sourceLineNo">2763</span><a name="line.2763"></a>
-<span class="sourceLineNo">2764</span>  @Override<a name="line.2764"></a>
-<span class="sourceLineNo">2765</span>  public String getRegionServerVersion(ServerName sn) {<a name="line.2765"></a>
-<span class="sourceLineNo">2766</span>    // Will return "0.0.0" if the server is not online to prevent move system region to unknown<a name="line.2766"></a>
-<span class="sourceLineNo">2767</span>    // version RS.<a name="line.2767"></a>
-<span class="sourceLineNo">2768</span>    return this.serverManager.getVersion(sn);<a name="line.2768"></a>
-<span class="sourceLineNo">2769</span>  }<a name="line.2769"></a>
-<span class="sourceLineNo">2770</span><a name="line.2770"></a>
-<span class="sourceLineNo">2771</span>  @Override<a name="line.2771"></a>
-<span class="sourceLineNo">2772</span>  public void checkIfShouldMoveSystemRegionAsync() {<a name="line.2772"></a>
-<span class="sourceLineNo">2773</span>    assignmentManager.checkIfShouldMoveSystemRegionAsync();<a name="line.2773"></a>
-<span class="sourceLineNo">2774</span>  }<a name="line.2774"></a>
-<span class="sourceLineNo">2775</span><a name="line.2775"></a>
-<span class="sourceLineNo">2776</span>  /**<a name="line.2776"></a>
-<span class="sourceLineNo">2777</span>   * @return array of coprocessor SimpleNames.<a name="line.2777"></a>
-<span class="sourceLineNo">2778</span>   */<a name="line.2778"></a>
-<span class="sourceLineNo">2779</span>  public String[] getMasterCoprocessors() {<a name="line.2779"></a>
-<span class="sourceLineNo">2780</span>    Set&lt;String&gt; masterCoprocessors = getMasterCoprocessorHost().getCoprocessors();<a name="line.2780"></a>
-<span class="sourceLineNo">2781</span>    return masterCoprocessors.toArray(new String[masterCoprocessors.size()]);<a name="line.2781"></a>
-<span class="sourceLineNo">2782</span>  }<a name="line.2782"></a>
-<span class="sourceLineNo">2783</span><a name="line.2783"></a>
-<span class="sourceLineNo">2784</span>  @Override<a name="line.2784"></a>
-<span class="sourceLineNo">2785</span>  public void abort(String reason, Throwable cause) {<a name="line.2785"></a>
-<span class="sourceLineNo">2786</span>    if (isAborted() || isStopped()) {<a name="line.2786"></a>
-<span class="sourceLineNo">2787</span>      return;<a name="line.2787"></a>
-<span class="sourceLineNo">2788</span>    }<a name="line.2788"></a>
-<span class="sourceLineNo">2789</span>    setAbortRequested();<a name="line.2789"></a>
-<span class="sourceLineNo">2790</span>    if (cpHost != null) {<a name="line.2790"></a>
-<span class="sourceLineNo">2791</span>      // HBASE-4014: dump a list of loaded coprocessors.<a name="line.2791"></a>
-<span class="sourceLineNo">2792</span>      LOG.error(HBaseMarkers.FATAL, "Master server abort: loaded coprocessors are: " +<a name="line.2792"></a>
-<span class="sourceLineNo">2793</span>          getLoadedCoprocessors());<a name="line.2793"></a>
-<span class="sourceLineNo">2794</span>    }<a name="line.2794"></a>
-<span class="sourceLineNo">2795</span>    String msg = "***** ABORTING master " + this + ": " + reason + " *****";<a name="line.2795"></a>
-<span class="sourceLineNo">2796</span>    if (cause != null) {<a name="line.2796"></a>
-<span class="sourceLineNo">2797</span>      LOG.error(HBaseMarkers.FATAL, msg, cause);<a name="line.2797"></a>
-<span class="sourceLineNo">2798</span>    } else {<a name="line.2798"></a>
-<span class="sourceLineNo">2799</span>      LOG.error(HBaseMarkers.FATAL, msg);<a name="line.2799"></a>
-<span class="sourceLineNo">2800</span>    }<a name="line.2800"></a>
-<span class="sourceLineNo">2801</span><a name="line.2801"></a>
-<span class="sourceLineNo">2802</span>    try {<a name="line.2802"></a>
-<span class="sourceLineNo">2803</span>      stopMaster();<a name="line.2803"></a>
-<span class="sourceLineNo">2804</span>    } catch (IOException e) {<a name="line.2804"></a>
-<span class="sourceLineNo">2805</span>      LOG.error("Exception occurred while stopping master", e);<a name="line.2805"></a>
-<span class="sourceLineNo">2806</span>    }<a name="line.2806"></a>
-<span class="sourceLineNo">2807</span>  }<a name="line.2807"></a>
-<span class="sourceLineNo">2808</span><a name="line.2808"></a>
-<span class="sourceLineNo">2809</span>  @Override<a name="line.2809"></a>
-<span class="sourceLineNo">2810</span>  public ZKWatcher getZooKeeper() {<a name="line.2810"></a>
-<span class="sourceLineNo">2811</span>    return zooKeeper;<a name="line.2811"></a>
-<span class="sourceLineNo">2812</span>  }<a name="line.2812"></a>
-<span class="sourceLineNo">2813</span><a name="line.2813"></a>
-<span class="sourceLineNo">2814</span>  @Override<a name="line.2814"></a>
-<span class="sourceLineNo">2815</span>  public MasterCoprocessorHost getMasterCoprocessorHost() {<a name="line.2815"></a>
-<span class="sourceLineNo">2816</span>    return cpHost;<a name="line.2816"></a>
-<span class="sourceLineNo">2817</span>  }<a name="line.2817"></a>
-<span class="sourceLineNo">2818</span><a name="line.2818"></a>
-<span class="sourceLineNo">2819</span>  @Override<a name="line.2819"></a>
-<span class="sourceLineNo">2820</span>  public MasterQuotaManager getMasterQuotaManager() {<a name="line.2820"></a>
-<span class="sourceLineNo">2821</span>    return quotaManager;<a name="line.2821"></a>
-<span class="sourceLineNo">2822</span>  }<a name="line.2822"></a>
-<span class="sourceLineNo">2823</span><a name="line.2823"></a>
-<span class="sourceLineNo">2824</span>  @Override<a name="line.2824"></a>
-<span class="sourceLineNo">2825</span>  public ProcedureExecutor&lt;MasterProcedureEnv&gt; getMasterProcedureExecutor() {<a name="line.2825"></a>
-<span class="sourceLineNo">2826</span>    return procedureExecutor;<a name="line.2826"></a>
-<span class="sourceLineNo">2827</span>  }<a name="line.2827"></a>
-<span class="sourceLineNo">2828</span><a name="line.2828"></a>
-<span class="sourceLineNo">2829</span>  @Override<a name="line.2829"></a>
-<span class="sourceLineNo">2830</span>  public ServerName getServerName() {<a name="line.2830"></a>
-<span class="sourceLineNo">2831</span>    return this.serverName;<a name="line.2831"></a>
-<span class="sourceLineNo">2832</span>  }<a name="line.2832"></a>
-<span class="sourceLineNo">2833</span><a name="line.2833"></a>
-<span class="sourceLineNo">2834</span>  @Override<a name="line.2834"></a>
-<span class="sourceLineNo">2835</span>  public AssignmentManager getAssignmentManager() {<a name="line.2835"></a>
-<span class="sourceLineNo">2836</span>    return this.assignmentManager;<a name="line.2836"></a>
-<span class="sourceLineNo">2837</span>  }<a name="line.2837"></a>
-<span class="sourceLineNo">2838</span><a name="line.2838"></a>
-<span class="sourceLineNo">2839</span>  @Override<a name="line.2839"></a>
-<span class="sourceLineNo">2840</span>  public CatalogJanitor getCatalogJanitor() {<a name="line.2840"></a>
-<span class="sourceLineNo">2841</span>    return this.catalogJanitorChore;<a name="line.2841"></a>
-<span class="sourceLineNo">2842</span>  }<a name="line.2842"></a>
-<span class="sourceLineNo">2843</span><a name="line.2843"></a>
-<span class="sourceLineNo">2844</span>  public MemoryBoundedLogMessageBuffer getRegionServerFatalLogBuffer() {<a name="line.2844"></a>
-<span class="sourceLineNo">2845</span>    return rsFatals;<a name="line.2845"></a>
-<span class="sourceLineNo">2846</span>  }<a name="line.2846"></a>
-<span class="sourceLineNo">2847</span><a name="line.2847"></a>
-<span class="sourceLineNo">2848</span>  /**<a name="line.2848"></a>
-<span class="sourceLineNo">2849</span>   * Shutdown the cluster.<a name="line.2849"></a>
-<span class="sourceLineNo">2850</span>   * Master runs a coordinated stop of all RegionServers and then itself.<a name="line.2850"></a>
-<span class="sourceLineNo">2851</span>   */<a name="line.2851"></a>
-<span class="sourceLineNo">2852</span>  public void shutdown() throws IOException {<a name="line.2852"></a>
-<span class="sourceLineNo">2853</span>    if (cpHost != null) {<a name="line.2853"></a>
-<span class="sourceLineNo">2854</span>      cpHost.preShutdown();<a name="line.2854"></a>
-<span class="sourceLineNo">2855</span>    }<a name="line.2855"></a>
-<span class="sourceLineNo">2856</span>    // Tell the servermanager cluster shutdown has been called. This makes it so when Master is<a name="line.2856"></a>
-<span class="sourceLineNo">2857</span>    // last running server, it'll stop itself. Next, we broadcast the cluster shutdown by setting<a name="line.2857"></a>
-<span class="sourceLineNo">2858</span>    // the cluster status as down. RegionServers will notice this change in state and will start<a name="line.2858"></a>
-<span class="sourceLineNo">2859</span>    // shutting themselves down. When last has exited, Master can go down.<a name="line.2859"></a>
-<span class="sourceLineNo">2860</span>    if (this.serverManager != null) {<a name="line.2860"></a>
-<span class="sourceLineNo">2861</span>      this.serverManager.shutdownCluster();<a name="line.2861"></a>
-<span class="sourceLineNo">2862</span>    }<a name="line.2862"></a>
-<span class="sourceLineNo">2863</span>    if (this.clusterStatusTracker != null) {<a name="line.2863"></a>
-<span class="sourceLineNo">2864</span>      try {<a name="line.2864"></a>
-<span class="sourceLineNo">2865</span>        this.clusterStatusTracker.setClusterDown();<a name="line.2865"></a>
-<span class="sourceLineNo">2866</span>      } catch (KeeperException e) {<a name="line.2866"></a>
-<span class="sourceLineNo">2867</span>        LOG.error("ZooKeeper exception trying to set cluster as down in ZK", e);<a name="line.2867"></a>
-<span class="sourceLineNo">2868</span>      }<a name="line.2868"></a>
-<span class="sourceLineNo">2869</span>    }<a name="line.2869"></a>
-<span class="sourceLineNo">2870</span>    // Stop the procedure executor. Will stop any ongoing assign, unassign, server crash etc.,<a name="line.2870"></a>
-<span class="sourceLineNo">2871</span>    // processing so we can go down.<a name="line.2871"></a>
-<span class="sourceLineNo">2872</span>    if (this.procedureExecutor != null) {<a name="line.2872"></a>
-<span class="sourceLineNo">2873</span>      this.procedureExecutor.stop();<a name="line.2873"></a>
-<span class="sourceLineNo">2874</span>    }<a name="line.2874"></a>
-<span class="sourceLineNo">2875</span>    // Shutdown our cluster connection. This will kill any hosted RPCs that might be going on;<a name="line.2875"></a>
-<span class="sourceLineNo">2876</span>    // this is what we want especially if the Master is in startup phase doing call outs to<a name="line.2876"></a>
-<span class="sourceLineNo">2877</span>    // hbase:meta, etc. when cluster is down. Without ths connection close, we'd have to wait on<a name="line.2877"></a>
-<span class="sourceLineNo">2878</span>    // the rpc to timeout.<a name="line.2878"></a>
-<span class="sourceLineNo">2879</span>    if (this.asyncClusterConnection != null) {<a name="line.2879"></a>
-<span class="sourceLineNo">2880</span>      this.asyncClusterConnection.close();<a name="line.2880"></a>
-<span class="sourceLineNo">2881</span>    }<a name="line.2881"></a>
-<span class="sourceLineNo">2882</span>  }<a name="line.2882"></a>
-<span class="sourceLineNo">2883</span><a name="line.2883"></a>
-<span class="sourceLineNo">2884</span>  public void stopMaster() throws IOException {<a name="line.2884"></a>
-<span class="sourceLineNo">2885</span>    if (cpHost != null) {<a name="line.2885"></a>
-<span class="sourceLineNo">2886</span>      cpHost.preStopMaster();<a name="line.2886"></a>
-<span class="sourceLineNo">2887</span>    }<a name="line.2887"></a>
-<span class="sourceLineNo">2888</span>    stop("Stopped by " + Thread.currentThread().getName());<a name="line.2888"></a>
-<span class="sourceLineNo">2889</span>  }<a name="line.2889"></a>
-<span class="sourceLineNo">2890</span><a name="line.2890"></a>
-<span class="sourceLineNo">2891</span>  @Override<a name="line.2891"></a>
-<span class="sourceLineNo">2892</span>  public void stop(String msg) {<a name="line.2892"></a>
-<span class="sourceLineNo">2893</span>    if (!isStopped()) {<a name="line.2893"></a>
-<span class="sourceLineNo">2894</span>      super.stop(msg);<a name="line.2894"></a>
-<span class="sourceLineNo">2895</span>      if (this.activeMasterManager != null) {<a name="line.2895"></a>
-<span class="sourceLineNo">2896</span>        this.activeMasterManager.stop();<a name="line.2896"></a>
-<span class="sourceLineNo">2897</span>      }<a name="line.2897"></a>
-<span class="sourceLineNo">2898</span>    }<a name="line.2898"></a>
-<span class="sourceLineNo">2899</span>  }<a name="line.2899"></a>
-<span class="sourceLineNo">2900</span><a name="line.2900"></a>
-<span class="sourceLineNo">2901</span>  @VisibleForTesting<a name="line.2901"></a>
-<span class="sourceLineNo">2902</span>  protected void checkServiceStarted() throws ServerNotRunningYetException {<a name="line.2902"></a>
-<span class="sourceLineNo">2903</span>    if (!serviceStarted) {<a name="line.2903"></a>
-<span class="sourceLineNo">2904</span>      throw new ServerNotRunningYetException("Server is not running yet");<a name="line.2904"></a>
-<span class="sourceLineNo">2905</span>    }<a name="line.2905"></a>
-<span class="sourceLineNo">2906</span>  }<a name="line.2906"></a>
-<span class="sourceLineNo">2907</span><a name="line.2907"></a>
-<span class="sourceLineNo">2908</span>  public static class MasterStoppedException extends DoNotRetryIOException {<a name="line.2908"></a>
-<span class="sourceLineNo">2909</span>    MasterStoppedException() {<a name="line.2909"></a>
-<span class="sourceLineNo">2910</span>      super();<a name="line.2910"></a>
-<span class="sourceLineNo">2911</span>    }<a name="line.2911"></a>
-<span class="sourceLineNo">2912</span>  }<a name="line.2912"></a>
-<span class="sourceLineNo">2913</span><a name="line.2913"></a>
-<span class="sourceLineNo">2914</span>  void checkInitialized() throws PleaseHoldException, ServerNotRunningYetException,<a name="line.2914"></a>
-<span class="sourceLineNo">2915</span>      MasterNotRunningException, MasterStoppedException {<a name="line.2915"></a>
-<span class="sourceLineNo">2916</span>    checkServiceStarted();<a name="line.2916"></a>
-<span class="sourceLineNo">2917</span>    if (!isInitialized()) {<a name="line.2917"></a>
-<span class="sourceLineNo">2918</span>      throw new PleaseHoldException("Master is initializing");<a name="line.2918"></a>
-<span class="sourceLineNo">2919</span>    }<a name="line.2919"></a>
-<span class="sourceLineNo">2920</span>    if (isStopped()) {<a name="line.2920"></a>
-<span class="sourceLineNo">2921</span>      throw new MasterStoppedException();<a name="line.2921"></a>
-<span class="sourceLineNo">2922</span>    }<a name="line.2922"></a>
-<span class="sourceLineNo">2923</span>  }<a name="line.2923"></a>
-<span class="sourceLineNo">2924</span><a name="line.2924"></a>
-<span class="sourceLineNo">2925</span>  /**<a name="line.2925"></a>
-<span class="sourceLineNo">2926</span>   * Report whether this master is currently the active master or not.<a name="line.2926"></a>
-<span class="sourceLineNo">2927</span>   * If not active master, we are parked on ZK waiting to become active.<a name="line.2927"></a>
-<span class="sourceLineNo">2928</span>   *<a name="line.2928"></a>
-<span class="sourceLineNo">2929</span>   * This method is used for testing.<a name="line.2929"></a>
-<span class="sourceLineNo">2930</span>   *<a name="line.2930"></a>
-<span class="sourceLineNo">2931</span>   * @return true if active master, false if not.<a name="line.2931"></a>
-<span class="sourceLineNo">2932</span>   */<a name="line.2932"></a>
-<span class="sourceLineNo">2933</span>  @Override<a name="line.2933"></a>
-<span class="sourceLineNo">2934</span>  public boolean isActiveMaster() {<a name="line.2934"></a>
-<span class="sourceLineNo">2935</span>    return activeMaster;<a name="line.2935"></a>
-<span class="sourceLineNo">2936</span>  }<a name="line.2936"></a>
-<span class="sourceLineNo">2937</span><a name="line.2937"></a>
-<span class="sourceLineNo">2938</span>  /**<a name="line.2938"></a>
-<span class="sourceLineNo">2939</span>   * Report whether this master has completed with its initialization and is<a name="line.2939"></a>
-<span class="sourceLineNo">2940</span>   * ready.  If ready, the master is also the active master.  A standby master<a name="line.2940"></a>
-<span class="sourceLineNo">2941</span>   * is never ready.<a name="line.2941"></a>
-<span class="sourceLineNo">2942</span>   *<a name="line.2942"></a>
-<span class="sourceLineNo">2943</span>   * This method is used for testing.<a name="line.2943"></a>
-<span class="sourceLineNo">2944</span>   *<a name="line.2944"></a>
-<span class="sourceLineNo">2945</span>   * @return true if master is ready to go, false if not.<a name="line.2945"></a>
-<span class="sourceLineNo">2946</span>   */<a name="line.2946"></a>
-<span class="sourceLineNo">2947</span>  @Override<a name="line.2947"></a>
-<span class="sourceLineNo">2948</span>  public boolean isInitialized() {<a name="line.2948"></a>
-<span class="sourceLineNo">2949</span>    return initialized.isReady();<a name="line.2949"></a>
-<span class="sourceLineNo">2950</span>  }<a name="line.2950"></a>
-<span class="sourceLineNo">2951</span><a name="line.2951"></a>
-<span class="sourceLineNo">2952</span>  /**<a name="line.2952"></a>
-<span class="sourceLineNo">2953</span>   * Report whether this master is in maintenance mode.<a name="line.2953"></a>
-<span class="sourceLineNo">2954</span>   *<a name="line.2954"></a>
-<span class="sourceLineNo">2955</span>   * @return true if master is in maintenanceMode<a name="line.2955"></a>
-<span class="sourceLineNo">2956</span>   */<a name="line.2956"></a>
-<span class="sourceLineNo">2957</span>  @Override<a name="line.2957"></a>
-<span class="sourceLineNo">2958</span>  public boolean isInMaintenanceMode() {<a name="line.2958"></a>
-<span class="sourceLineNo">2959</span>    return maintenanceMode;<a name="line.2959"></a>
-<span class="sourceLineNo">2960</span>  }<a name="line.2960"></a>
-<span class="sourceLineNo">2961</span><a name="line.2961"></a>
-<span class="sourceLineNo">2962</span>  @VisibleForTesting<a name="line.2962"></a>
-<span class="sourceLineNo">2963</span>  public void setInitialized(boolean isInitialized) {<a name="line.2963"></a>
-<span class="sourceLineNo">2964</span>    procedureExecutor.getEnvironment().setEventReady(initialized, isInitialized);<a name="line.2964"></a>
-<span class="sourceLineNo">2965</span>  }<a name="line.2965"></a>
-<span class="sourceLineNo">2966</span><a name="line.2966"></a>
-<span class="sourceLineNo">2967</span>  @Override<a name="line.2967"></a>
-<span class="sourceLineNo">2968</span>  public ProcedureEvent&lt;?&gt; getInitializedEvent() {<a name="line.2968"></a>
-<span class="sourceLineNo">2969</span>    return initialized;<a name="line.2969"></a>
-<span class="sourceLineNo">2970</span>  }<a name="line.2970"></a>
-<span class="sourceLineNo">2971</span><a name="line.2971"></a>
-<span class="sourceLineNo">2972</span>  /**<a name="line.2972"></a>
-<span class="sourceLineNo">2973</span>   * Compute the average load across all region servers.<a name="line.2973"></a>
-<span class="sourceLineNo">2974</span>   * Currently, this uses a very naive computation - just uses the number of<a name="line.2974"></a>
-<span class="sourceLineNo">2975</span>   * regions being served, ignoring stats about number of requests.<a name="line.2975"></a>
-<span class="sourceLineNo">2976</span>   * @return the average load<a name="line.2976"></a>
-<span class="sourceLineNo">2977</span>   */<a name="line.2977"></a>
-<span class="sourceLineNo">2978</span>  public double getAverageLoad() {<a name="line.2978"></a>
-<span class="sourceLineNo">2979</span>    if (this.assignmentManager == null) {<a name="line.2979"></a>
-<span class="sourceLineNo">2980</span>      return 0;<a name="line.2980"></a>
-<span class="sourceLineNo">2981</span>    }<a name="line.2981"></a>
-<span class="sourceLineNo">2982</span><a name="line.2982"></a>
-<span class="sourceLineNo">2983</span>    RegionStates regionStates = this.assignmentManager.getRegionStates();<a name="line.2983"></a>
-<span class="sourceLineNo">2984</span>    if (regionStates == null) {<a name="line.2984"></a>
-<span class="sourceLineNo">2985</span>      return 0;<a name="line.2985"></a>
-<span class="sourceLineNo">2986</span>    }<a name="line.2986"></a>
-<span class="sourceLineNo">2987</span>    return regionStates.getAverageLoad();<a name="line.2987"></a>
-<span class="sourceLineNo">2988</span>  }<a name="line.2988"></a>
-<span class="sourceLineNo">2989</span><a name="line.2989"></a>
-<span class="sourceLineNo">2990</span>  /*<a name="line.2990"></a>
-<span class="sourceLineNo">2991</span>   * @return the count of region split plans executed<a name="line.2991"></a>
-<span class="sourceLineNo">2992</span>   */<a name="line.2992"></a>
-<span class="sourceLineNo">2993</span>  public long getSplitPlanCount() {<a name="line.2993"></a>
-<span class="sourceLineNo">2994</span>    return splitPlanCount;<a name="line.2994"></a>
-<span class="sourceLineNo">2995</span>  }<a name="line.2995"></a>
-<span class="sourceLineNo">2996</span><a name="line.2996"></a>
-<span class="sourceLineNo">2997</span>  /*<a name="line.2997"></a>
-<span class="sourceLineNo">2998</span>   * @return the count of region merge plans executed<a name="line.2998"></a>
-<span class="sourceLineNo">2999</span>   */<a name="line.2999"></a>
-<span class="sourceLineNo">3000</span>  public long getMergePlanCount() {<a name="line.3000"></a>
-<span class="sourceLineNo">3001</span>    return mergePlanCount;<a name="line.3001"></a>
-<span class="sourceLineNo">3002</span>  }<a name="line.3002"></a>
-<span class="sourceLineNo">3003</span><a name="line.3003"></a>
-<span class="sourceLineNo">3004</span>  @Override<a name="line.3004"></a>
-<span class="sourceLineNo">3005</span>  public boolean registerService(Service instance) {<a name="line.3005"></a>
-<span class="sourceLineNo">3006</span>    /*<a name="line.3006"></a>
-<span class="sourceLineNo">3007</span>     * No stacking of instances is allowed for a single service name<a name="line.3007"></a>
-<span class="sourceLineNo">3008</span>     */<a name="line.3008"></a>
-<span class="sourceLineNo">3009</span>    Descriptors.ServiceDescriptor serviceDesc = instance.getDescriptorForType();<a name="line.3009"></a>
-<span class="sourceLineNo">3010</span>    String serviceName = CoprocessorRpcUtils.getServiceName(serviceDesc);<a name="line.3010"></a>
-<span class="sourceLineNo">3011</span>    if (coprocessorServiceHandlers.containsKey(serviceName)) {<a name="line.3011"></a>
-<span class="sourceLineNo">3012</span>      LOG.error("Coprocessor service "+serviceName+<a name="line.3012"></a>
-<span class="sourceLineNo">3013</span>          " already registered, rejecting request from "+instance<a name="line.3013"></a>
-<span class="sourceLineNo">3014</span>      );<a name="line.3014"></a>
-<span class="sourceLineNo">3015</span>      return false;<a name="line.3015"></a>
-<span class="sourceLineNo">3016</span>    }<a name="line.3016"></a>
-<span class="sourceLineNo">3017</span><a name="line.3017"></a>
-<span class="sourceLineNo">3018</span>    coprocessorServiceHandlers.put(serviceName, instance);<a name="line.3018"></a>
-<span class="sourceLineNo">3019</span>    if (LOG.isDebugEnabled()) {<a name="line.3019"></a>
-<span class="sourceLineNo">3020</span>      LOG.debug("Registered master coprocessor service: service="+serviceName);<a name="line.3020"></a>
-<span class="sourceLineNo">3021</span>    }<a name="line.3021"></a>
-<span class="sourceLineNo">3022</span>    return true;<a name="line.3022"></a>
-<span class="sourceLineNo">3023</span>  }<a name="line.3023"></a>
-<span class="sourceLineNo">3024</span><a name="line.3024"></a>
-<span class="sourceLineNo">3025</span>  /**<a name="line.3025"></a>
-<span class="sourceLineNo">3026</span>   * Utility for constructing an instance of the passed HMaster class.<a name="line.3026"></a>
-<span class="sourceLineNo">3027</span>   * @param masterClass<a name="line.3027"></a>
-<span class="sourceLineNo">3028</span>   * @return HMaster instance.<a name="line.3028"></a>
-<span class="sourceLineNo">3029</span>   */<a name="line.3029"></a>
-<span class="sourceLineNo">3030</span>  public static HMaster constructMaster(Class&lt;? extends HMaster&gt; masterClass,<a name="line.3030"></a>
-<span class="sourceLineNo">3031</span>      final Configuration conf)  {<a name="line.3031"></a>
-<span class="sourceLineNo">3032</span>    try {<a name="line.3032"></a>
-<span class="sourceLineNo">3033</span>      Constructor&lt;? extends HMaster&gt; c = masterClass.getConstructor(Configuration.class);<a name="line.3033"></a>
-<span class="sourceLineNo">3034</span>      return c.newInstance(conf);<a name="line.3034"></a>
-<span class="sourceLineNo">3035</span>    } catch(Exception e) {<a name="line.3035"></a>
-<span class="sourceLineNo">3036</span>      Throwable error = e;<a name="line.3036"></a>
-<span class="sourceLineNo">3037</span>      if (e instanceof InvocationTargetException &amp;&amp;<a name="line.3037"></a>
-<span class="sourceLineNo">3038</span>          ((InvocationTargetException)e).getTargetException() != null) {<a name="line.3038"></a>
-<span class="sourceLineNo">3039</span>        error = ((InvocationTargetException)e).getTargetException();<a name="line.3039"></a>
-<span class="sourceLineNo">3040</span>      }<a name="line.3040"></a>
-<span class="sourceLineNo">3041</span>      throw new RuntimeException("Failed construction of Master: " + masterClass.toString() + ". "<a name="line.3041"></a>
-<span class="sourceLineNo">3042</span>        , error);<a name="line.3042"></a>
-<span class="sourceLineNo">3043</span>    }<a name="line.3043"></a>
-<span class="sourceLineNo">3044</span>  }<a name="line.3044"></a>
-<span class="sourceLineNo">3045</span><a name="line.3045"></a>
-<span class="sourceLineNo">3046</span>  /**<a name="line.3046"></a>
-<span class="sourceLineNo">3047</span>   * @see org.apache.hadoop.hbase.master.HMasterCommandLine<a name="line.3047"></a>
-<span class="sourceLineNo">3048</span>   */<a name="line.3048"></a>
-<span class="sourceLineNo">3049</span>  public static void main(String [] args) {<a name="line.3049"></a>
-<span class="sourceLineNo">3050</span>    LOG.info("STARTING service " + HMaster.class.getSimpleName());<a name="line.3050"></a>
-<span class="sourceLineNo">3051</span>    VersionInfo.logVersion();<a name="line.3051"></a>
-<span class="sourceLineNo">3052</span>    new HMasterCommandLine(HMaster.class).doMain(args);<a name="line.3052"></a>
-<span class="sourceLineNo">3053</span>  }<a name="line.3053"></a>
-<span class="sourceLineNo">3054</span><a name="line.3054"></a>
-<span class="sourceLineNo">3055</span>  public HFileCleaner getHFileCleaner() {<a name="line.3055"></a>
-<span class="sourceLineNo">3056</span>    return this.hfileCleaner;<a name="line.3056"></a>
-<span class="sourceLineNo">3057</span>  }<a name="line.3057"></a>
-<span class="sourceLineNo">3058</span><a name="line.3058"></a>
-<span class="sourceLineNo">3059</span>  public LogCleaner getLogCleaner() {<a name="line.3059"></a>
-<span class="sourceLineNo">3060</span>    return this.logCleaner;<a name="line.3060"></a>
-<span class="sourceLineNo">3061</span>  }<a name="line.3061"></a>
-<span class="sourceLineNo">3062</span><a name="line.3062"></a>
-<span class="sourceLineNo">3063</span>  /**<a name="line.3063"></a>
-<span class="sourceLineNo">3064</span>   * @return the underlying snapshot manager<a name="line.3064"></a>
-<span class="sourceLineNo">3065</span>   */<a name="line.3065"></a>
-<span class="sourceLineNo">3066</span>  @Override<a name="line.3066"></a>
-<span class="sourceLineNo">3067</span>  public SnapshotManager getSnapshotManager() {<a name="line.3067"></a>
-<span class="sourceLineNo">3068</span>    return this.snapshotManager;<a name="line.3068"></a>
-<span class="sourceLineNo">3069</span>  }<a name="line.3069"></a>
-<span class="sourceLineNo">3070</span><a name="line.3070"></a>
-<span class="sourceLineNo">3071</span>  /**<a name="line.3071"></a>
-<span class="sourceLineNo">3072</span>   * @return the underlying MasterProcedureManagerHost<a name="line.3072"></a>
-<span class="sourceLineNo">3073</span>   */<a name="line.3073"></a>
-<span class="sourceLineNo">3074</span>  @Override<a name="line.3074"></a>
-<span class="sourceLineNo">3075</span>  public MasterProcedureManagerHost getMasterProcedureManagerHost() {<a name="line.3075"></a>
-<span class="sourceLineNo">3076</span>    return mpmHost;<a name="line.3076"></a>
-<span class="sourceLineNo">3077</span>  }<a name="line.3077"></a>
-<span class="sourceLineNo">3078</span><a name="line.3078"></a>
-<span class="sourceLineNo">3079</span>  @Override<a name="line.3079"></a>
-<span class="sourceLineNo">3080</span>  public ClusterSchema getClusterSchema() {<a name="line.3080"></a>
-<span class="sourceLineNo">3081</span>    return this.clusterSchemaService;<a name="line.3081"></a>
-<span class="sourceLineNo">3082</span>  }<a name="line.3082"></a>
-<span class="sourceLineNo">3083</span><a name="line.3083"></a>
-<span class="sourceLineNo">3084</span>  /**<a name="line.3084"></a>
-<span class="sourceLineNo">3085</span>   * Create a new Namespace.<a name="line.3085"></a>
-<span class="sourceLineNo">3086</span>   * @param namespaceDescriptor descriptor for new Namespace<a name="line.3086"></a>
-<span class="sourceLineNo">3087</span>   * @param nonceGroup Identifier for the source of the request, a client or process.<a name="line.3087"></a>
-<span class="sourceLineNo">3088</span>   * @param nonce A unique identifier for this operation from the client or process identified by<a name="line.3088"></a>
-<span class="sourceLineNo">3089</span>   * &lt;code&gt;nonceGroup&lt;/code&gt; (the source must ensure each operation gets a unique id).<a name="line.3089"></a>
-<span class="sourceLineNo">3090</span>   * @return procedure id<a name="line.3090"></a>
-<span class="sourceLineNo">3091</span>   */<a name="line.3091"></a>
-<span class="sourceLineNo">3092</span>  long createNamespace(final NamespaceDescriptor namespaceDescriptor, final long nonceGroup,<a name="line.3092"></a>
-<span class="sourceLineNo">3093</span>      final long nonce) throws IOException {<a name="line.3093"></a>
-<span class="sourceLineNo">3094</span>    checkInitialized();<a name="line.3094"></a>
-<span class="sourceLineNo">3095</span><a name="line.3095"></a>
-<span class="sourceLineNo">3096</span>    TableName.isLegalNamespaceName(Bytes.toBytes(namespaceDescriptor.getName()));<a name="line.3096"></a>
-<span class="sourceLineNo">3097</span><a name="line.3097"></a>
-<span class="sourceLineNo">3098</span>    return MasterProcedureUtil.submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this,<a name="line.3098"></a>
-<span class="sourceLineNo">3099</span>          nonceGroup, nonce) {<a name="line.3099"></a>
-<span class="sourceLineNo">3100</span>      @Override<a name="line.3100"></a>
-<span class="sourceLineNo">3101</span>      protected void run() throws IOException {<a name="line.3101"></a>
-<span class="sourceLineNo">3102</span>        getMaster().getMasterCoprocessorHost().preCreateNamespace(namespaceDescriptor);<a name="line.3102"></a>
-<span class="sourceLineNo">3103</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.3103"></a>
-<span class="sourceLineNo">3104</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.3104"></a>
-<span class="sourceLineNo">3105</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.3105"></a>
-<span class="sourceLineNo">3106</span>        LOG.info(getClientIdAuditPrefix() + " creating " + namespaceDescriptor);<a name="line.3106"></a>
-<span class="sourceLineNo">3107</span>        // Execute the operation synchronously - wait for the operation to complete before<a name="line.3107"></a>
-<span class="sourceLineNo">3108</span>        // continuing.<a name="line.3108"></a>
-<span class="sourceLineNo">3109</span>        setProcId(getClusterSchema().createNamespace(namespaceDescriptor, getNonceKey(), latch));<a name="line.3109"></a>
-<span class="sourceLineNo">3110</span>        latch.await();<a name="line.3110"></a>
-<span class="sourceLineNo">3111</span>        getMaster().getMasterCoprocessorHost().postCreateNamespace(namespaceDescriptor);<a name="line.3111"></a>
-<span class="sourceLineNo">3112</span>      }<a name="line.3112"></a>
-<span class="sourceLineNo">3113</span><a name="line.3113"></a>
-<span class="sourceLineNo">3114</span>      @Override<a name="line.3114"></a>
-<span class="sourceLineNo">3115</span>      protected String getDescription() {<a name="line.3115"></a>
-<span class="sourceLineNo">3116</span>        return "CreateNamespaceProcedure";<a name="line.3116"></a>
-<span class="sourceLineNo">3117</span>      }<a name="line.3117"></a>
-<span class="sourceLineNo">3118</span>    });<a name="line.3118"></a>
-<span class="sourceLineNo">3119</span>  }<a name="line.3119"></a>
-<span class="sourceLineNo">3120</span><a name="line.3120"></a>
-<span class="sourceLineNo">3121</span>  /**<a name="line.3121"></a>
-<span class="sourceLineNo">3122</span>   * Modify an existing Namespace.<a name="line.3122"></a>
-<span class="sourceLineNo">3123</span>   * @param nonceGroup Identifier for the source of the request, a client or process.<a name="line.3123"></a>
-<span class="sourceLineNo">3124</span>   * @param nonce A unique identifier for this operation from the client or process identified by<a name="line.3124"></a>
-<span class="sourceLineNo">3125</span>   * &lt;code&gt;nonceGroup&lt;/code&gt; (the source must ensure each operation gets a unique id).<a name="line.3125"></a>
-<span class="sourceLineNo">3126</span>   * @return procedure id<a name="line.3126"></a>
-<span class="sourceLineNo">3127</span>   */<a name="line.3127"></a>
-<span class="sourceLineNo">3128</span>  long modifyNamespace(final NamespaceDescriptor newNsDescriptor, final long nonceGroup,<a name="line.3128"></a>
-<span class="sourceLineNo">3129</span>      final long nonce) throws IOException {<a name="line.3129"></a>
-<span class="sourceLineNo">3130</span>    checkInitialized();<a name="line.3130"></a>
-<span class="sourceLineNo">3131</span><a name="line.3131"></a>
-<span class="sourceLineNo">3132</span>    TableName.isLegalNamespaceName(Bytes.toBytes(newNsDescriptor.getName()));<a name="line.3132"></a>
-<span class="sourceLineNo">3133</span><a name="line.3133"></a>
-<span class="sourceLineNo">3134</span>    return MasterProcedureUtil.submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this,<a name="line.3134"></a>
-<span class="sourceLineNo">3135</span>          nonceGroup, nonce) {<a name="line.3135"></a>
-<span class="sourceLineNo">3136</span>      @Override<a name="line.3136"></a>
-<span class="sourceLineNo">3137</span>      protected void run() throws IOException {<a name="line.3137"></a>
-<span class="sourceLineNo">3138</span>        NamespaceDescriptor oldNsDescriptor = getNamespace(newNsDescriptor.getName());<a name="line.3138"></a>
-<span class="sourceLineNo">3139</span>        getMaster().getMasterCoprocessorHost().preModifyNamespace(oldNsDescriptor, newNsDescriptor);<a name="line.3139"></a>
-<span class="sourceLineNo">3140</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.3140"></a>
-<span class="sourceLineNo">3141</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.3141"></a>
-<span class="sourceLineNo">3142</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.3142"></a>
-<span class="sourceLineNo">3143</span>        LOG.info(getClientIdAuditPrefix() + " modify " + newNsDescriptor);<a name="line.3143"></a>
-<span class="sourceLineNo">3144</span>        // Execute the operation synchronously - wait for the operation to complete before<a name="line.3144"></a>
-<span class="sourceLineNo">3145</span>        // continuing.<a name="line.3145"></a>
-<span class="sourceLineNo">3146</span>        setProcId(getClusterSchema().modifyNamespace(newNsDescriptor, getNonceKey(), latch));<a name="line.3146"></a>
-<span class="sourceLineNo">3147</span>        latch.await();<a name="line.3147"></a>
-<span class="sourceLineNo">3148</span>        getMaster().getMasterCoprocessorHost().postModifyNamespace(oldNsDescriptor,<a name="line.3148"></a>
-<span class="sourceLineNo">3149</span>          newNsDescriptor);<a name="line.3149"></a>
-<span class="sourceLineNo">3150</span>      }<a name="line.3150"></a>
-<span class="sourceLineNo">3151</span><a name="line.3151"></a>
-<span class="sourceLineNo">3152</span>      @Override<a name="line.3152"></a>
-<span class="sourceLineNo">3153</span>      protected String getDescription() {<a name="line.3153"></a>
-<span class="sourceLineNo">3154</span>        return "ModifyNamespaceProcedure";<a name="line.3154"></a>
-<span class="sourceLineNo">3155</span>      }<a name="line.3155"></a>
-<span class="sourceLineNo">3156</span>    });<a name="line.3156"></a>
-<span class="sourceLineNo">3157</span>  }<a name="line.3157"></a>
-<span class="sourceLineNo">3158</span><a name="line.3158"></a>
-<span class="sourceLineNo">3159</span>  /**<a name="line.3159"></a>
-<span class="sourceLineNo">3160</span>   * Delete an existing Namespace. Only empty Namespaces (no tables) can be removed.<a name="line.3160"></a>
-<span class="sourceLineNo">3161</span>   * @param nonceGroup Identifier for the source of the request, a client or process.<a name="line.3161"></a>
-<span class="sourceLineNo">3162</span>   * @param nonce A unique identifier for this operation from the client or process identified by<a name="line.3162"></a>
-<span class="sourceLineNo">3163</span>   * &lt;code&gt;nonceGroup&lt;/code&gt; (the source must ensure each operation gets a unique id).<a name="line.3163"></a>
-<span class="sourceLineNo">3164</span>   * @return procedure id<a name="line.3164"></a>
-<span class="sourceLineNo">3165</span>   */<a name="line.3165"></a>
-<span class="sourceLineNo">3166</span>  long deleteNamespace(final String name, final long nonceGroup, final long nonce)<a name="line.3166"></a>
-<span class="sourceLineNo">3167</span>      throws IOException {<a name="line.3167"></a>
-<span class="sourceLineNo">3168</span>    checkInitialized();<a name="line.3168"></a>
-<span class="sourceLineNo">3169</span><a name="line.3169"></a>
-<span class="sourceLineNo">3170</span>    return MasterProcedureUtil.submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this,<a name="line.3170"></a>
-<span class="sourceLineNo">3171</span>          nonceGroup, nonce) {<a name="line.3171"></a>
-<span class="sourceLineNo">3172</span>      @Override<a name="line.3172"></a>
-<span class="sourceLineNo">3173</span>      protected void run() throws IOException {<a name="line.3173"></a>
-<span class="sourceLineNo">3174</span>        getMaster().getMasterCoprocessorHost().preDeleteNamespace(name);<a name="line.3174"></a>
-<span class="sourceLineNo">3175</span>        LOG.info(getClientIdAuditPrefix() + " delete " + name);<a name="line.3175"></a>
-<span class="sourceLineNo">3176</span>        // Execute the operation synchronously - wait for the operation to complete before<a name="line.3176"></a>
-<span class="sourceLineNo">3177</span>        // continuing.<a name="line.3177"></a>
-<span class="sourceLineNo">3178</span>        //<a name="line.3178"></a>
-<span class="sourceLineNo">3179</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.3179"></a>
-<span class="sourceLineNo">3180</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.3180"></a>
-<span class="sourceLineNo">3181</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.3181"></a>
-<span class="sourceLineNo">3182</span>        setProcId(submitProcedure(<a name="line.3182"></a>
-<span class="sourceLineNo">3183</span>              new DeleteNamespaceProcedure(procedureExecutor.getEnvironment(), name, latch)));<a name="line.3183"></a>
-<span class="sourceLineNo">3184</span>        latch.await();<a name="line.3184"></a>
-<span class="sourceLineNo">3185</span>        // Will not be invoked in the face of Exception thrown by the Procedure's execution<a name="line.3185"></a>
-<span class="sourceLineNo">3186</span>        getMaster().getMasterCoprocessorHost().postDeleteNamespace(name);<a name="line.3186"></a>
-<span class="sourceLineNo">3187</span>      }<a name="line.3187"></a>
-<span class="sourceLineNo">3188</span><a name="line.3188"></a>
-<span class="sourceLineNo">3189</span>      @Override<a name="line.3189"></a>
-<span class="sourceLineNo">3190</span>      protected String getDescription() {<a name="line.3190"></a>
-<span class="sourceLineNo">3191</span>        return "DeleteNamespaceProcedure";<a name="line.3191"></a>
-<span class="sourceLineNo">3192</span>      }<a name="line.3192"></a>
-<span class="sourceLineNo">3193</span>    });<a name="line.3193"></a>
-<span class="sourceLineNo">3194</span>  }<a name="line.3194"></a>
-<span class="sourceLineNo">3195</span><a name="line.3195"></a>
-<span class="sourceLineNo">3196</span>  /**<a name="line.3196"></a>
-<span class="sourceLineNo">3197</span>   * Get a Namespace<a name="line.3197"></a>
-<span class="sourceLineNo">3198</span>   * @param name Name of the Namespace<a name="line.3198"></a>
-<span class="sourceLineNo">3199</span>   * @return Namespace descriptor for &lt;code&gt;name&lt;/code&gt;<a name="line.3199"></a>
-<span class="sourceLineNo">3200</span>   */<a name="line.3200"></a>
-<span class="sourceLineNo">3201</span>  NamespaceDescriptor getNamespace(String name) throws IOException {<a name="line.3201"></a>
-<span class="sourceLineNo">3202</span>    checkInitialized();<a name="line.3202"></a>
-<span class="sourceLineNo">3203</span>    if (this.cpHost != null) this.cpHost.preGetNamespaceDescriptor(name);<a name="line.3203"></a>
-<span class="sourceLineNo">3204</span>    NamespaceDescriptor nsd = this.clusterSchemaService.getNamespace(name);<a name="line.3204"></a>
-<span class="sourceLineNo">3205</span>    if (this.cpHost != null) this.cpHost.postGetNamespaceDescriptor(nsd);<a name="line.3205"></a>
-<span class="sourceLineNo">3206</span>    return nsd;<a name="line.3206"></a>
-<span class="sourceLineNo">3207</span>  }<a name="line.3207"></a>
-<span class="sourceLineNo">3208</span><a name="line.3208"></a>
-<span class="sourceLineNo">3209</span>  /**<a name="line.3209"></a>
-<span class="sourceLineNo">3210</span>   * Get all Namespaces<a name="line.3210"></a>
-<span class="sourceLineNo">3211</span>   * @return All Namespace descriptors<a name="line.3211"></a>
-<span class="sourceLineNo">3212</span>   */<a name="line.3212"></a>
-<span class="sourceLineNo">3213</span>  List&lt;NamespaceDescriptor&gt; getNamespaces() throws IOException {<a name="line.3213"></a>
-<span class="sourceLineNo">3214</span>    checkInitialized();<a name="line.3214"></a>
-<span class="sourceLineNo">3215</span>    final List&lt;NamespaceDescriptor&gt; nsds = new ArrayList&lt;&gt;();<a name="line.3215"></a>
-<span class="sourceLineNo">3216</span>    if (cpHost != null) {<a name="line.3216"></a>
-<span class="sourceLineNo">3217</span>      cpHost.preListNamespaceDescriptors(nsds);<a name="line.3217"></a>
-<span class="sourceLineNo">3218</span>    }<a name="line.3218"></a>
-<span class="sourceLineNo">3219</span>    nsds.addAll(this.clusterSchemaService.getNamespaces());<a name="line.3219"></a>
-<span class="sourceLineNo">3220</span>    if (this.cpHost != null) {<a name="line.3220"></a>
-<span class="sourceLineNo">3221</span>      this.cpHost.postListNamespaceDescriptors(nsds);<a name="line.3221"></a>
-<span class="sourceLineNo">3222</span>    }<a name="line.3222"></a>
-<span class="sourceLineNo">3223</span>    return nsds;<a name="line.3223"></a>
-<span class="sourceLineNo">3224</span>  }<a name="line.3224"></a>
-<span class="sourceLineNo">3225</span><a name="line.3225"></a>
-<span class="sourceLineNo">3226</span>  /**<a name="line.3226"></a>
-<span class="sourceLineNo">3227</span>   * List namespace names<a name="line.3227"></a>
-<span class="sourceLineNo">3228</span>   * @return All namespace names<a name="line.3228"></a>
-<span class="sourceLineNo">3229</span>   */<a name="line.3229"></a>
-<span class="sourceLineNo">3230</span>  public List&lt;String&gt; listNamespaces() throws IOException {<a name="line.3230"></a>
-<span class="sourceLineNo">3231</span>    checkInitialized();<a name="line.3231"></a>
-<span class="sourceLineNo">3232</span>    List&lt;String&gt; namespaces = new ArrayList&lt;&gt;();<a name="line.3232"></a>
-<span class="sourceLineNo">3233</span>    if (cpHost != null) {<a name="line.3233"></a>
-<span class="sourceLineNo">3234</span>      cpHost.preListNamespaces(namespaces);<a name="line.3234"></a>
-<span class="sourceLineNo">3235</span>    }<a name="line.3235"></a>
-<span class="sourceLineNo">3236</span>    for (NamespaceDescriptor namespace : clusterSchemaService.getNamespaces()) {<a name="line.3236"></a>
-<span class="sourceLineNo">3237</span>      namespaces.add(namespace.getName());<a name="line.3237"></a>
-<span class="sourceLineNo">3238</span>    }<a name="line.3238"></a>
-<span class="sourceLineNo">3239</span>    if (cpHost != null) {<a name="line.3239"></a>
-<span class="sourceLineNo">3240</span>      cpHost.postListNamespaces(namespaces);<a name="line.3240"></a>
-<span class="sourceLineNo">3241</span>    }<a name="line.3241"></a>
-<span class="sourceLineNo">3242</span>    return namespaces;<a name="line.3242"></a>
-<span class="sourceLineNo">3243</span>  }<a name="line.3243"></a>
-<span class="sourceLineNo">3244</span><a name="line.3244"></a>
-<span class="sourceLineNo">3245</span>  @Override<a name="line.3245"></a>
-<span class="sourceLineNo">3246</span>  public List&lt;TableName&gt; listTableNamesByNamespace(String name) throws IOException {<a name="line.3246"></a>
-<span class="sourceLineNo">3247</span>    checkInitialized();<a name="line.3247"></a>
-<span class="sourceLineNo">3248</span>    return listTableNames(name, null, true);<a name="line.3248"></a>
-<span class="sourceLineNo">3249</span>  }<a name="line.3249"></a>
-<span class="sourceLineNo">3250</span><a name="line.3250"></a>
-<span class="sourceLineNo">3251</span>  @Override<a name="line.3251"></a>
-<span class="sourceLineNo">3252</span>  public List&lt;TableDescriptor&gt; listTableDescriptorsByNamespace(String name) throws IOException {<a name="line.3252"></a>
-<span class="sourceLineNo">3253</span>    checkInitialized();<a name="line.3253"></a>
-<span class="sourceLineNo">3254</span>    return listTableDescriptors(name, null, null, true);<a name="line.3254"></a>
-<span class="sourceLineNo">3255</span>  }<a name="line.3255"></a>
-<span class="sourceLineNo">3256</span><a name="line.3256"></a>
-<span class="sourceLineNo">3257</span>  @Override<a name="line.3257"></a>
-<span class="sourceLineNo">3258</span>  public boolean abortProcedure(final long procId, final boolean mayInterruptIfRunning)<a name="line.3258"></a>
-<span class="sourceLineNo">3259</span>      throws IOException {<a name="line.3259"></a>
-<span class="sourceLineNo">3260</span>    if (cpHost != null) {<a name="line.3260"></a>
-<span class="sourceLineNo">3261</span>      cpHost.preAbortProcedure(this.procedureExecutor, procId);<a name="line.3261"></a>
-<span class="sourceLineNo">3262</span>    }<a name="line.3262"></a>
-<span class="sourceLineNo">3263</span><a name="line.3263"></a>
-<span class="sourceLineNo">3264</span>    final boolean result = this.procedureExecutor.abort(procId, mayInterruptIfRunning);<a name="line.3264"></a>
-<span class="sourceLineNo">3265</span><a name="line.3265"></a>
-<span class="sourceLineNo">3266</span>    if (cpHost != null) {<a name="line.3266"></a>
-<span class="sourceLineNo">3267</span>      cpHost.postAbortProcedure();<a name="line.3267"></a>
-<span class="sourceLineNo">3268</span>    }<a name="line.3268"></a>
-<span class="sourceLineNo">3269</span><a name="line.3269"></a>
-<span class="sourceLineNo">3270</span>    return result;<a name="line.3270"></a>
-<span class="sourceLineNo">3271</span>  }<a name="line.3271"></a>
-<span class="sourceLineNo">3272</span><a name="line.3272"></a>
-<span class="sourceLineNo">3273</span>  @Override<a name="line.3273"></a>
-<span class="sourceLineNo">3274</span>  public List&lt;Procedure&lt;?&gt;&gt; getProcedures() throws IOException {<a name="line.3274"></a>
-<span class="sourceLineNo">3275</span>    if (cpHost != null) {<a name="line.3275"></a>
-<span class="sourceLineNo">3276</span>      cpHost.preGetProcedures();<a name="line.3276"></a>
-<span class="sourceLineNo">3277</span>    }<a name="line.3277"></a>
-<span class="sourceLineNo">3278</span><a name="line.3278"></a>
-<span class="sourceLineNo">3279</span>    @SuppressWarnings({ "unchecked", "rawtypes" })<a name="line.3279"></a>
-<span class="sourceLineNo">3280</span>    List&lt;Procedure&lt;?&gt;&gt; procList = (List) this.procedureExecutor.getProcedures();<a name="line.3280"></a>
-<span class="sourceLineNo">3281</span><a name="line.3281"></a>
-<span class="sourceLineNo">3282</span>    if (cpHost != null) {<a name="line.3282"></a>
-<span class="sourceLineNo">3283</span>      cpHost.postGetProcedures(procList);<a name="line.3283"></a>
-<span class="sourceLineNo">3284</span>    }<a name="line.3284"></a>
-<span class="sourceLineNo">3285</span><a name="line.3285"></a>
-<span class="sourceLineNo">3286</span>    return procList;<a name="line.3286"></a>
-<span class="sourceLineNo">3287</span>  }<a name="line.3287"></a>
-<span class="sourceLineNo">3288</span><a name="line.3288"></a>
-<span class="sourceLineNo">3289</span>  @Override<a name="line.3289"></a>
-<span class="sourceLineNo">3290</span>  public List&lt;LockedResource&gt; getLocks() throws IOException {<a name="line.3290"></a>
-<span class="sourceLineNo">3291</span>    if (cpHost != null) {<a name="line.3291"></a>
-<span class="sourceLineNo">3292</span>      cpHost.preGetLocks();<a name="line.3292"></a>
-<span class="sourceLineNo">3293</span>    }<a name="line.3293"></a>
-<span class="sourceLineNo">3294</span><a name="line.3294"></a>
-<span class="sourceLineNo">3295</span>    MasterProcedureScheduler procedureScheduler =<a name="line.3295"></a>
-<span class="sourceLineNo">3296</span>      procedureExecutor.getEnvironment().getProcedureScheduler();<a name="line.3296"></a>
-<span class="sourceLineNo">3297</span><a name="line.3297"></a>
-<span class="sourceLineNo">3298</span>    final List&lt;LockedResource&gt; lockedResources = procedureScheduler.getLocks();<a name="line.3298"></a>
-<span class="sourceLineNo">3299</span><a name="line.3299"></a>
-<span class="sourceLineNo">3300</span>    if (cpHost != null) {<a name="line.3300"></a>
-<span class="sourceLineNo">3301</span>      cpHost.postGetLocks(lockedResources);<a name="line.3301"></a>
-<span class="sourceLineNo">3302</span>    }<a name="line.3302"></a>
-<span class="sourceLineNo">3303</span><a name="line.3303"></a>
-<span class="sourceLineNo">3304</span>    return lockedResources;<a name="line.3304"></a>
-<span class="sourceLineNo">3305</span>  }<a name="line.3305"></a>
-<span class="sourceLineNo">3306</span><a name="line.3306"></a>
-<span class="sourceLineNo">3307</span>  /**<a name="line.3307"></a>
-<span class="sourceLineNo">3308</span>   * Returns the list of table descriptors that match the specified request<a name="line.3308"></a>
-<span class="sourceLineNo">3309</span>   * @param namespace the namespace to query, or null if querying for all<a name="line.3309"></a>
-<span class="sourceLineNo">3310</span>   * @param regex The regular expression to match against, or null if querying for all<a name="line.3310"></a>
-<span class="sourceLineNo">3311</span>   * @param tableNameList the list of table names, or null if querying for all<a name="line.3311"></a>
-<span class="sourceLineNo">3312</span>   * @param includeSysTables False to match only against userspace tables<a name="line.3312"></a>
-<span class="sourceLineNo">3313</span>   * @return the list of table descriptors<a name="line.3313"></a>
-<span class="sourceLineNo">3314</span>   */<a name="line.3314"></a>
-<span class="sourceLineNo">3315</span>  public List&lt;TableDescriptor&gt; listTableDescriptors(final String namespace, final String regex,<a name="line.3315"></a>
-<span class="sourceLineNo">3316</span>      final List&lt;TableName&gt; tableNameList, final boolean includeSysTables)<a name="line.3316"></a>
-<span class="sourceLineNo">3317</span>  throws IOException {<a name="line.3317"></a>
-<span class="sourceLineNo">3318</span>    List&lt;TableDescriptor&gt; htds = new ArrayList&lt;&gt;();<a name="line.3318"></a>
-<span class="sourceLineNo">3319</span>    if (cpHost != null) {<a name="line.3319"></a>
-<span class="sourceLineNo">3320</span>      cpHost.preGetTableDescriptors(tableNameList, htds, regex);<a name="line.3320"></a>
-<span class="sourceLineNo">3321</span>    }<a name="line.3321"></a>
-<span class="sourceLineNo">3322</span>    htds = getTableDescriptors(htds, namespace, regex, tableNameList, includeSysTables);<a name="line.3322"></a>
-<span class="sourceLineNo">3323</span>    if (cpHost != null) {<a name="line.3323"></a>
-<span class="sourceLineNo">3324</span>      cpHost.postGetTableDescriptors(tableNameList, htds, regex);<a name="line.3324"></a>
-<span class="sourceLineNo">3325</span>    }<a name="line.3325"></a>
-<span class="sourceLineNo">3326</span>    return htds;<a name="line.3326"></a>
-<span class="sourceLineNo">3327</span>  }<a name="line.3327"></a>
-<span class="sourceLineNo">3328</span><a name="line.3328"></a>
-<span class="sourceLineNo">3329</span>  /**<a name="line.3329"></a>
-<span class="sourceLineNo">3330</span>   * Returns the list of table names that match the specified request<a name="line.3330"></a>
-<span class="sourceLineNo">3331</span>   * @param regex The regular expression to match against, or null if querying for all<a name="line.3331"></a>
-<span class="sourceLineNo">3332</span>   * @param namespace the namespace to query, or null if querying for all<a name="line.3332"></a>
-<span class="sourceLineNo">3333</span>   * @param includeSysTables False to match only against userspace tables<a name="line.3333"></a>
-<span class="sourceLineNo">3334</span>   * @return the list of table names<a name="line.3334"></a>
-<span class="sourceLineNo">3335</span>   */<a name="line.3335"></a>
-<span class="sourceLineNo">3336</span>  public List&lt;TableName&gt; listTableNames(final String namespace, final String regex,<a name="line.3336"></a>
-<span class="sourceLineNo">3337</span>      final boolean includeSysTables) throws IOException {<a name="line.3337"></a>
-<span class="sourceLineNo">3338</span>    List&lt;TableDescriptor&gt; htds = new ArrayList&lt;&gt;();<a name="line.3338"></a>
-<span class="sourceLineNo">3339</span>    if (cpHost != null) {<a name="line.3339"></a>
-<span class="sourceLineNo">3340</span>      cpHost.preGetTableNames(htds, regex);<a name="line.3340"></a>
-<span class="sourceLineNo">3341</span>    }<a name="line.3341"></a>
-<span class="sourceLineNo">3342</span>    htds = getTableDescriptors(htds, namespace, regex, null, includeSysTables);<a name="line.3342"></a>
-<span class="sourceLineNo">3343</span>    if (cpHost != null) {<a name="line.3343"></a>
-<span class="sourceLineNo">3344</span>      cpHost.postGetTableNames(htds, regex);<a name="line.3344"></a>
-<span class="sourceLineNo">3345</span>    }<a name="line.3345"></a>
-<span class="sourceLineNo">3346</span>    List&lt;TableName&gt; result = new ArrayList&lt;&gt;(htds.size());<a name="line.3346"></a>
-<span class="sourceLineNo">3347</span>    for (TableDescriptor htd: htds) result.add(htd.getTableName());<a name="line.3347"></a>
-<span class="sourceLineNo">3348</span>    return result;<a name="line.3348"></a>
-<span class="sourceLineNo">3349</span>  }<a name="line.3349"></a>
-<span class="sourceLineNo">3350</span><a name="line.3350"></a>
-<span class="sourceLineNo">3351</span>  /**<a name="line.3351"></a>
-<span class="sourceLineNo">3352</span>   * @return list of table table descriptors after filtering by regex and whether to include system<a name="line.3352"></a>
-<span class="sourceLineNo">3353</span>   *    tables, etc.<a name="line.3353"></a>
-<span class="sourceLineNo">3354</span>   * @throws IOException<a name="line.3354"></a>
-<span class="sourceLineNo">3355</span>   */<a name="line.3355"></a>
-<span class="sourceLineNo">3356</span>  private List&lt;TableDescriptor&gt; getTableDescriptors(final List&lt;TableDescriptor&gt; htds,<a name="line.3356"></a>
-<span class="sourceLineNo">3357</span>      final String namespace, final String regex, final List&lt;TableName&gt; tableNameList,<a name="line.3357"></a>
-<span class="sourceLineNo">3358</span>      final boolean includeSysTables)<a name="line.3358"></a>
-<span class="sourceLineNo">3359</span>  throws IOException {<a name="line.3359"></a>
-<span class="sourceLineNo">3360</span>    if (tableNameList == null || tableNameList.isEmpty()) {<a name="line.3360"></a>
-<span class="sourceLineNo">3361</span>      // request for all TableDescriptors<a name="line.3361"></a>
-<span class="sourceLineNo">3362</span>      Collection&lt;TableDescriptor&gt; allHtds;<a name="line.3362"></a>
-<span class="sourceLineNo">3363</span>      if (namespace != null &amp;&amp; namespace.length() &gt; 0) {<a name="line.3363"></a>
-<span class="sourceLineNo">3364</span>        // Do a check on the namespace existence. Will fail if does not exist.<a name="line.3364"></a>
-<span class="sourceLineNo">3365</span>        this.clusterSchemaService.getNamespace(namespace);<a name="line.3365"></a>
-<span class="sourceLineNo">3366</span>        allHtds = tableDescriptors.getByNamespace(namespace).values();<a name="line.3366"></a>
-<span class="sourceLineNo">3367</span>      } else {<a name="line.3367"></a>
-<span class="sourceLineNo">3368</span>        allHtds = tableDescriptors.getAll().values();<a name="line.3368"></a>
-<span class="sourceLineNo">3369</span>      }<a name="line.3369"></a>
-<span class="sourceLineNo">3370</span>      for (TableDescriptor desc: allHtds) {<a name="line.3370"></a>
-<span class="sourceLineNo">3371</span>        if (tableStateManager.isTablePresent(desc.getTableName())<a name="line.3371"></a>
-<span class="sourceLineNo">3372</span>            &amp;&amp; (includeSysTables || !desc.getTableName().isSystemTable())) {<a name="line.3372"></a>
-<span class="sourceLineNo">3373</span>          htds.add(desc);<a name="line.3373"></a>
-<span class="sourceLineNo">3374</span>        }<a name="line.3374"></a>
-<span class="sourceLineNo">3375</span>      }<a name="line.3375"></a>
-<span class="sourceLineNo">3376</span>    } else {<a name="line.3376"></a>
-<span class="sourceLineNo">3377</span>      for (TableName s: tableNameList) {<a name="line.3377"></a>
-<span class="sourceLineNo">3378</span>        if (tableStateManager.isTablePresent(s)) {<a name="line.3378"></a>
-<span class="sourceLineNo">3379</span>          TableDescriptor desc = tableDescriptors.get(s);<a name="line.3379"></a>
-<span class="sourceLineNo">3380</span>          if (desc != null) {<a name="line.3380"></a>
-<span class="sourceLineNo">3381</span>            htds.add(desc);<a name="line.3381"></a>
-<span class="sourceLineNo">3382</span>          }<a name="line.3382"></a>
-<span class="sourceLineNo">3383</span>        }<a name="line.3383"></a>
-<span class="sourceLineNo">3384</span>      }<a name="line.3384"></a>
-<span class="sourceLineNo">3385</span>    }<a name="line.3385"></a>
-<span class="sourceLineNo">3386</span><a name="line.3386"></a>
-<span class="sourceLineNo">3387</span>    // Retains only those matched by regular expression.<a name="line.3387"></a>
-<span class="sourceLineNo">3388</span>    if (regex != null) filterTablesByRegex(htds, Pattern.compile(regex));<a name="line.3388"></a>
-<span class="sourceLineNo">3389</span>    return htds;<a name="line.3389"></a>
-<span class="sourceLineNo">3390</span>  }<a name="line.3390"></a>
-<span class="sourceLineNo">3391</span><a name="line.3391"></a>
-<span class="sourceLineNo">3392</span>  /**<a name="line.3392"></a>
-<span class="sourceLineNo">3393</span>   * Removes the table descriptors that don't match the pattern.<a name="line.3393"></a>
-<span class="sourceLineNo">3394</span>   * @param descriptors list of table descriptors to filter<a name="line.3394"></a>
-<span class="sourceLineNo">3395</span>   * @param pattern the regex to use<a name="line.3395"></a>
-<span class="sourceLineNo">3396</span>   */<a name="line.3396"></a>
-<span class="sourceLineNo">3397</span>  private static void filterTablesByRegex(final Collection&lt;TableDescriptor&gt; descriptors,<a name="line.3397"></a>
-<span class="sourceLineNo">3398</span>      final Pattern pattern) {<a name="line.3398"></a>
-<span class="sourceLineNo">3399</span>    final String defaultNS = NamespaceDescriptor.DEFAULT_NAMESPACE_NAME_STR;<a name="line.3399"></a>
-<span class="sourceLineNo">3400</span>    Iterator&lt;TableDescriptor&gt; itr = descriptors.iterator();<a name="line.3400"></a>
-<span class="sourceLineNo">3401</span>    while (itr.hasNext()) {<a name="line.3401"></a>
-<span class="sourceLineNo">3402</span>      TableDescriptor htd = itr.next();<a name="line.3402"></a>
-<span class="sourceLineNo">3403</span>      String tableName = htd.getTableName().getNameAsString();<a name="line.3403"></a>
-<span class="sourceLineNo">3404</span>      boolean matched = pattern.matcher(tableName).matches();<a name="line.3404"></a>
-<span class="sourceLineNo">3405</span>      if (!matched &amp;&amp; htd.getTableName().getNamespaceAsString().equals(defaultNS)) {<a name="line.3405"></a>
-<span class="sourceLineNo">3406</span>        matched = pattern.matcher(defaultNS + TableName.NAMESPACE_DELIM + tableName).matches();<a name="line.3406"></a>
-<span class="sourceLineNo">3407</span>      }<a name="line.3407"></a>
-<span class="sourceLineNo">3408</span>      if (!matched) {<a name="line.3408"></a>
-<span class="sourceLineNo">3409</span>        itr.remove();<a name="line.3409"></a>
-<span class="sourceLineNo">3410</span>      }<a name="line.3410"></a>
-<span class="sourceLineNo">3411</span>    }<a name="line.3411"></a>
-<span class="sourceLineNo">3412</span>  }<a name="line.3412"></a>
-<span class="sourceLineNo">3413</span><a name="line.3413"></a>
-<span class="sourceLineNo">3414</span>  @Override<a name="line.3414"></a>
-<span class="sourceLineNo">3415</span>  public long getLastMajorCompactionTimestamp(TableName table) throws IOException {<a name="line.3415"></a>
-<span class="sourceLineNo">3416</span>    return getClusterMetrics(EnumSet.of(Option.LIVE_SERVERS))<a name="line.3416"></a>
-<span class="sourceLineNo">3417</span>        .getLastMajorCompactionTimestamp(table);<a name="line.3417"></a>
-<span class="sourceLineNo">3418</span>  }<a name="line.3418"></a>
-<span class="sourceLineNo">3419</span><a name="line.3419"></a>
-<span class="sourceLineNo">3420</span>  @Override<a name="line.3420"></a>
-<span class="sourceLineNo">3421</span>  public long getLastMajorCompactionTimestampForRegion(byte[] regionName) throws IOException {<a name="line.3421"></a>
-<span class="sourceLineNo">3422</span>    return getClusterMetrics(EnumSet.of(Option.LIVE_SERVERS))<a name="line.3422"></a>
-<span class="sourceLineNo">3423</span>        .getLastMajorCompactionTimestamp(regionName);<a name="line.3423"></a>
-<span class="sourceLineNo">3424</span>  }<a name="line.3424"></a>
-<span class="sourceLineNo">3425</span><a name="line.3425"></a>
-<span class="sourceLineNo">3426</span>  /**<a name="line.3426"></a>
-<span class="sourceLineNo">3427</span>   * Gets the mob file compaction state for a specific table.<a name="line.3427"></a>
-<span class="sourceLineNo">3428</span>   * Whether all the mob files are selected is known during the compaction execution, but<a name="line.3428"></a>
-<span class="sourceLineNo">3429</span>   * the statistic is done just before compaction starts, it is hard to know the compaction<a name="line.3429"></a>
-<span class="sourceLineNo">3430</span>   * type at that time, so the rough statistics are chosen for the mob file compaction. Only two<a name="line.3430"></a>
-<span class="sourceLineNo">3431</span>   * compaction states are available, CompactionState.MAJOR_AND_MINOR and CompactionState.NONE.<a name="line.3431"></a>
-<span class="sourceLineNo">3432</span>   * @param tableName The current table name.<a name="line.3432"></a>
-<span class="sourceLineNo">3433</span>   * @return If a given table is in mob file compaction now.<a name="line.3433"></a>
-<span class="sourceLineNo">3434</span>   */<a name="line.3434"></a>
-<span class="sourceLineNo">3435</span>  public CompactionState getMobCompactionState(TableName tableName) {<a name="line.3435"></a>
-<span class="sourceLineNo">3436</span>    AtomicInteger compactionsCount = mobCompactionStates.get(tableName);<a name="line.3436"></a>
-<span class="sourceLineNo">3437</span>    if (compactionsCount != null &amp;&amp; compactionsCount.get() != 0) {<a name="line.3437"></a>
-<span class="sourceLineNo">3438</span>      return CompactionState.MAJOR_AND_MINOR;<a name="line.3438"></a>
-<span class="sourceLineNo">3439</span>    }<a name="line.3439"></a>
-<span class="sourceLineNo">3440</span>    return CompactionState.NONE;<a name="line.3440"></a>
-<span class="sourceLineNo">3441</span>  }<a name="line.3441"></a>
-<span class="sourceLineNo">3442</span><a name="line.3442"></a>
-<span class="sourceLineNo">3443</span>  public void reportMobCompactionStart(TableName tableName) throws IOException {<a name="line.3443"></a>
-<span class="sourceLineNo">3444</span>    IdLock.Entry lockEntry = null;<a name="line.3444"></a>
-<span class="sourceLineNo">3445</span>    try {<a name="line.3445"></a>
-<span class="sourceLineNo">3446</span>      lockEntry = mobCompactionLock.getLockEntry(tableName.hashCode());<a name="line.3446"></a>
-<span class="sourceLineNo">3447</span>      AtomicInteger compactionsCount = mobCompactionStates.get(tableName);<a name="line.3447"></a>
-<span class="sourceLineNo">3448</span>      if (compactionsCount == null) {<a name="line.3448"></a>
-<span class="sourceLineNo">3449</span>        compactionsCount = new AtomicInteger(0);<a name="line.3449"></a>
-<span class="sourceLineNo">3450</span>        mobCompactionStates.put(tableName, compactionsCount);<a name="line.3450"></a>
-<span class="sourceLineNo">3451</span>      }<a name="line.3451"></a>
-<span class="sourceLineNo">3452</span>      compactionsCount.incrementAndGet();<a name="line.3452"></a>
-<span class="sourceLineNo">3453</span>    } finally {<a name="line.3453"></a>
-<span class="sourceLineNo">3454</span>      if (lockEntry != null) {<a name="line.3454"></a>
-<span class="sourceLineNo">3455</span>        mobCompactionLock.releaseLockEntry(lockEntry);<a name="line.3455"></a>
-<span class="sourceLineNo">3456</span>      }<a name="line.3456"></a>
-<span class="sourceLineNo">3457</span>    }<a name="line.3457"></a>
-<span class="sourceLineNo">3458</span>  }<a name="line.3458"></a>
-<span class="sourceLineNo">3459</span><a name="line.3459"></a>
-<span class="sourceLineNo">3460</span>  public void reportMobCompactionEnd(TableName tableName) throws IOException {<a name="line.3460"></a>
-<span class="sourceLineNo">3461</span>    IdLock.Entry lockEntry = null;<a name="line.3461"></a>
-<span class="sourceLineNo">3462</span>    try {<a name="line.3462"></a>
-<span class="sourceLineNo">3463</span>      lockEntry = mobCompactionLock.getLockEntry(tableName.hashCode());<a name="line.3463"></a>
-<span class="sourceLineNo">3464</span>      AtomicInteger compactionsCount = mobCompactionStates.get(tableName);<a name="line.3464"></a>
-<span class="sourceLineNo">3465</span>      if (compactionsCount != null) {<a name="line.3465"></a>
-<span class="sourceLineNo">3466</span>        int count = compactionsCount.decrementAndGet();<a name="line.3466"></a>
-<span class="sourceLineNo">3467</span>        // remove the entry if the count is 0.<a name="line.3467"></a>
-<span class="sourceLineNo">3468</span>        if (count == 0) {<a name="line.3468"></a>
-<span class="sourceLineNo">3469</span>          mobCompactionStates.remove(tableName);<a name="line.3469"></a>
-<span class="sourceLineNo">3470</span>        }<a name="line.3470"></a>
-<span class="sourceLineNo">3471</span>      }<a name="line.3471"></a>
-<span class="sourceLineNo">3472</span>    } finally {<a name="line.3472"></a>
-<span class="sourceLineNo">3473</span>      if (lockEntry != null) {<a name="line.3473"></a>
-<span class="sourceLineNo">3474</span>        mobCompactionLock.releaseLockEntry(lockEntry);<a name="line.3474"></a>
-<span class="sourceLineNo">3475</span>      }<a name="line.3475"></a>
-<span class="sourceLineNo">3476</span>    }<a name="line.3476"></a>
-<span class="sourceLineNo">3477</span>  }<a name="line.3477"></a>
-<span class="sourceLineNo">3478</span><a name="line.3478"></a>
-<span class="sourceLineNo">3479</span>  /**<a name="line.3479"></a>
-<span class="sourceLineNo">3480</span>   * Requests mob compaction.<a name="line.3480"></a>
-<span class="sourceLineNo">3481</span>   * @param tableName The table the compact.<a name="line.3481"></a>
-<span class="sourceLineNo">3482</span>   * @param columns The compacted columns.<a name="line.3482"></a>
-<span class="sourceLineNo">3483</span>   * @param allFiles Whether add all mob files into the compaction.<a name="line.3483"></a>
-<span class="sourceLineNo">3484</span>   */<a name="line.3484"></a>
-<span class="sourceLineNo">3485</span>  public void requestMobCompaction(TableName tableName,<a name="line.3485"></a>
-<span class="sourceLineNo">3486</span>                                   List&lt;ColumnFamilyDescriptor&gt; columns, boolean allFiles) throws IOException {<a name="line.3486"></a>
-<span class="sourceLineNo">3487</span>    mobCompactThread.requestMobCompaction(conf, getFileSystem(), tableName, columns, allFiles);<a name="line.3487"></a>
-<span class="sourceLineNo">3488</span>  }<a name="line.3488"></a>
-<span class="sourceLineNo">3489</span><a name="line.3489"></a>
-<span class="sourceLineNo">3490</span>  /**<a name="line.3490"></a>
-<span class="sourceLineNo">3491</span>   * Queries the state of the {@link LoadBalancerTracker}. If the balancer is not initialized,<a name="line.3491"></a>
-<span class="sourceLineNo">3492</span>   * false is returned.<a name="line.3492"></a>
-<span class="sourceLineNo">3493</span>   *<a name="line.3493"></a>
-<span class="sourceLineNo">3494</span>   * @return The state of the load balancer, or false if the load balancer isn't defined.<a name="line.3494"></a>
-<span class="sourceLineNo">3495</span>   */<a name="line.3495"></a>
-<span class="sourceLineNo">3496</span>  public boolean isBalancerOn() {<a name="line.3496"></a>
-<span class="sourceLineNo">3497</span>    return !isInMaintenanceMode()<a name="line.3497"></a>
-<span class="sourceLineNo">3498</span>        &amp;&amp; loadBalancerTracker != null<a name="line.3498"></a>
-<span class="sourceLineNo">3499</span>        &amp;&amp; loadBalancerTracker.isBalancerOn();<a name="line.3499"></a>
-<span class="sourceLineNo">3500</span>  }<a name="line.3500"></a>
-<span class="sourceLineNo">3501</span><a name="line.3501"></a>
-<span class="sourceLineNo">3502</span>  /**<a name="line.3502"></a>
-<span class="sourceLineNo">3503</span>   * Queries the state of the {@link RegionNormalizerTracker}. If it's not initialized,<a name="line.3503"></a>
-<span class="sourceLineNo">3504</span>   * false is returned.<a name="line.3504"></a>
-<span class="sourceLineNo">3505</span>   */<a name="line.3505"></a>
-<span class="sourceLineNo">3506</span>  public boolean isNormalizerOn() {<a name="line.3506"></a>
-<span class="sourceLineNo">3507</span>    return !isInMaintenanceMode()<a name="line.3507"></a>
-<span class="sourceLineNo">3508</span>        &amp;&amp; regionNormalizerTracker != null<a name="line.3508"></a>
-<span class="sourceLineNo">3509</span>        &amp;&amp; regionNormalizerTracker.isNormalizerOn();<a name="line.3509"></a>
-<span class="sourceLineNo">3510</span>  }<a name="line.3510"></a>
-<span class="sourceLineNo">3511</span><a name="line.3511"></a>
-<span class="sourceLineNo">3512</span>  /**<a name="line.3512"></a>
-<span class="sourceLineNo">3513</span>   * Queries the state of the {@link SplitOrMergeTracker}. If it is not initialized,<a name="line.3513"></a>
-<span class="sourceLineNo">3514</span>   * false is returned. If switchType is illegal, false will return.<a name="line.3514"></a>
-<span class="sourceLineNo">3515</span>   * @param switchType see {@link org.apache.hadoop.hbase.client.MasterSwitchType}<a name="line.3515"></a>
-<span class="sourceLineNo">3516</span>   * @return The state of the switch<a name="line.3516"></a>
-<span class="sourceLineNo">3517</span>   */<a name="line.3517"></a>
-<span class="sourceLineNo">3518</span>  @Override<a name="line.3518"></a>
-<span class="sourceLineNo">3519</span>  public boolean isSplitOrMergeEnabled(MasterSwitchType switchType) {<a name="line.3519"></a>
-<span class="sourceLineNo">3520</span>    return !isInMaintenanceMode()<a name="line.3520"></a>
-<span class="sourceLineNo">3521</span>        &amp;&amp; splitOrMergeTracker != null<a name="line.3521"></a>
-<span class="sourceLineNo">3522</span>        &amp;&amp; splitOrMergeTracker.isSplitOrMergeEnabled(switchType);<a name="line.3522"></a>
-<span class="sourceLineNo">3523</span>  }<a name="line.3523"></a>
-<span class="sourceLineNo">3524</span><a name="line.3524"></a>
-<span class="sourceLineNo">3525</span>  /**<a name="line.3525"></a>
-<span class="sourceLineNo">3526</span>   * Fetch the configured {@link LoadBalancer} class name. If none is set, a default is returned.<a name="line.3526"></a>
-<span class="sourceLineNo">3527</span>   *<a name="line.3527"></a>
-<span class="sourceLineNo">3528</span>   * @return The name of the {@link LoadBalancer} in use.<a name="line.3528"></a>
-<span class="sourceLineNo">3529</span>   */<a name="line.3529"></a>
-<span class="sourceLineNo">3530</span>  public String getLoadBalancerClassName() {<a name="line.3530"></a>
-<span class="sourceLineNo">3531</span>    return conf.get(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, LoadBalancerFactory<a name="line.3531"></a>
-<span class="sourceLineNo">3532</span>        .getDefaultLoadBalancerClass().getName());<a name="line.3532"></a>
-<span class="sourceLineNo">3533</span>  }<a name="line.3533"></a>
-<span class="sourceLineNo">3534</span><a name="line.3534"></a>
-<span class="sourceLineNo">3535</span>  /**<a name="line.3535"></a>
-<span class="sourceLineNo">3536</span>   * @return RegionNormalizerTracker instance<a name="line.3536"></a>
-<span class="sourceLineNo">3537</span>   */<a name="line.3537"></a>
-<span class="sourceLineNo">3538</span>  public RegionNormalizerTracker getRegionNormalizerTracker() {<a name="line.3538"></a>
-<span class="sourceLineNo">3539</span>    return regionNormalizerTracker;<a name="line.3539"></a>
-<span class="sourceLineNo">3540</span>  }<a name="line.3540"></a>
-<span class="sourceLineNo">3541</span><a name="line.3541"></a>
-<span class="sourceLineNo">3542</span>  public SplitOrMergeTracker getSplitOrMergeTracker() {<a name="line.3542"></a>
-<span class="sourceLineNo">3543</span>    return splitOrMergeTracker;<a name="line.3543"></a>
-<span class="sourceLineNo">3544</span>  }<a name="line.3544"></a>
-<span class="sourceLineNo">3545</span><a name="line.3545"></a>
-<span class="sourceLineNo">3546</span>  @Override<a name="line.3546"></a>
-<span class="sourceLineNo">3547</span>  public LoadBalancer getLoadBalancer() {<a name="line.3547"></a>
-<span class="sourceLineNo">3548</span>    return balancer;<a name="line.3548"></a>
-<span class="sourceLineNo">3549</span>  }<a name="line.3549"></a>
-<span class="sourceLineNo">3550</span><a name="line.3550"></a>
-<span class="sourceLineNo">3551</span>  @Override<a name="line.3551"></a>
-<span class="sourceLineNo">3552</span>  public FavoredNodesManager getFavoredNodesManager() {<a name="line.3552"></a>
-<span class="sourceLineNo">3553</span>    return favoredNodesManager;<a name="line.3553"></a>
-<span class="sourceLineNo">3554</span>  }<a name="line.3554"></a>
-<span class="sourceLineNo">3555</span><a name="line.3555"></a>
-<span class="sourceLineNo">3556</span>  private long executePeerProcedure(AbstractPeerProcedure&lt;?&gt; procedure) throws IOException {<a name="line.3556"></a>
-<span class="sourceLineNo">3557</span>    long procId = procedureExecutor.submitProcedure(procedure);<a name="line.3557"></a>
-<span class="sourceLineNo">3558</span>    procedure.getLatch().await();<a name="line.3558"></a>
-<span class="sourceLineNo">3559</span>    return procId;<a name="line.3559"></a>
-<span class="sourceLineNo">3560</span>  }<a name="line.3560"></a>
-<span class="sourceLineNo">3561</span><a name="line.3561"></a>
-<span class="sourceLineNo">3562</span>  @Override<a name="line.3562"></a>
-<span class="sourceLineNo">3563</span>  public long addReplicationPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled)<a name="line.3563"></a>
-<span class="sourceLineNo">3564</span>      throws ReplicationException, IOException {<a name="line.3564"></a>
-<span class="sourceLineNo">3565</span>    LOG.info(getClientIdAuditPrefix() + " creating replication peer, id=" + peerId + ", config=" +<a name="line.3565"></a>
-<span class="sourceLineNo">3566</span>      peerConfig + ", state=" + (enabled ? "ENABLED" : "DISABLED"));<a name="line.3566"></a>
-<span class="sourceLineNo">3567</span>    return executePeerProcedure(new AddPeerProcedure(peerId, peerConfig, enabled));<a name="line.3567"></a>
-<span class="sourceLineNo">3568</span>  }<a name="line.3568"></a>
-<span class="sourceLineNo">3569</span><a name="line.3569"></a>
-<span class="sourceLineNo">3570</span>  @Override<a name="line.3570"></a>
-<span class="sourceLineNo">3571</span>  public long removeReplicationPeer(String peerId) throws ReplicationException, IOException {<a name="line.3571"></a>
-<span class="sourceLineNo">3572</span>    LOG.info(getClientIdAuditPrefix() + " removing replication peer, id=" + peerId);<a name="line.3572"></a>
-<span class="sourceLineNo">3573</span>    return executePeerProcedure(new RemovePeerProcedure(peerId));<a name="line.3573"></a>
-<span class="sourceLineNo">3574</span>  }<a name="line.3574"></a>
-<span class="sourceLineNo">3575</span><a name="line.3575"></a>
-<span class="sourceLineNo">3576</span>  @Override<a name="line.3576"></a>
-<span class="sourceLineNo">3577</span>  public long enableReplicationPeer(String peerId) throws ReplicationException, IOException {<a name="line.3577"></a>
-<span class="sourceLineNo">3578</span>    LOG.info(getClientIdAuditPrefix() + " enable replication peer, id=" + peerId);<a name="line.3578"></a>
-<span class="sourceLineNo">3579</span>    return executePeerProcedure(new EnablePeerProcedure(peerId));<a name="line.3579"></a>
-<span class="sourceLineNo">3580</span>  }<a name="line.3580"></a>
-<span class="sourceLineNo">3581</span><a name="line.3581"></a>
-<span class="sourceLineNo">3582</span>  @Override<a name="line.3582"></a>
-<span class="sourceLineNo">3583</span>  public long disableReplicationPeer(String peerId) throws ReplicationException, IOException {<a name="line.3583"></a>
-<span class="sourceLineNo">3584</span>    LOG.info(getClientIdAuditPrefix() + " disable replication peer, id=" + peerId);<a name="line.3584"></a>
-<span class="sourceLineNo">3585</span>    return executePeerProcedure(new DisablePeerProcedure(peerId));<a name="line.3585"></a>
-<span class="sourceLineNo">3586</span>  }<a name="line.3586"></a>
-<span class="sourceLineNo">3587</span><a name="line.3587"></a>
-<span class="sourceLineNo">3588</span>  @Override<a name="line.3588"></a>
-<span class="sourceLineNo">3589</span>  public ReplicationPeerConfig getReplicationPeerConfig(String peerId)<a name="line.3589"></a>
-<span class="sourceLineNo">3590</span>      throws ReplicationException, IOException {<a name="line.3590"></a>
-<span class="sourceLineNo">3591</span>    if (cpHost != null) {<a name="line.3591"></a>
-<span class="sourceLineNo">3592</span>      cpHost.preGetReplicationPeerConfig(peerId);<a name="line.3592"></a>
-<span class="sourceLineNo">3593</span>    }<a name="line.3593"></a>
-<span class="sourceLineNo">3594</span>    LOG.info(getClientIdAuditPrefix() + " get replication peer config, id=" + peerId);<a name="line.3594"></a>
-<span class="sourceLineNo">3595</span>    ReplicationPeerConfig peerConfig = this.replicationPeerManager.getPeerConfig(peerId)<a name="line.3595"></a>
-<span class="sourceLineNo">3596</span>        .orElseThrow(() -&gt; new ReplicationPeerNotFoundException(peerId));<a name="line.3596"></a>
-<span class="sourceLineNo">3597</span>    if (cpHost != null) {<a name="line.3597"></a>
-<span class="sourceLineNo">3598</span>      cpHost.postGetReplicationPeerConfig(peerId);<a name="line.3598"></a>
-<span class="sourceLineNo">3599</span>    }<a name="line.3599"></a>
-<span class="sourceLineNo">3600</span>    return peerConfig;<a name="line.3600"></a>
-<span class="sourceLineNo">3601</span>  }<a name="line.3601"></a>
-<span class="sourceLineNo">3602</span><a name="line.3602"></a>
-<span class="sourceLineNo">3603</span>  @Override<a name="line.3603"></a>
-<span class="sourceLineNo">3604</span>  public long updateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig)<a name="line.3604"></a>
-<span class="sourceLineNo">3605</span>      throws ReplicationException, IOException {<a name="line.3605"></a>
-<span class="sourceLineNo">3606</span>    LOG.info(getClientIdAuditPrefix() + " update replication peer config, id=" + peerId +<a name="line.3606"></a>
-<span class="sourceLineNo">3607</span>      ", config=" + peerConfig);<a name="line.3607"></a>
-<span class="sourceLineNo">3608</span>    return executePeerProcedure(new UpdatePeerConfigProcedure(peerId, peerConfig));<a name="line.3608"></a>
-<span class="sourceLineNo">3609</span>  }<a name="line.3609"></a>
-<span class="sourceLineNo">3610</span><a name="line.3610"></a>
-<span class="sourceLineNo">3611</span>  @Override<a name="line.3611"></a>
-<span class="sourceLineNo">3612</span>  public List&lt;ReplicationPeerDescription&gt; listReplicationPeers(String regex)<a name="line.3612"></a>
-<span class="sourceLineNo">3613</span>      throws ReplicationException, IOException {<a name="line.3613"></a>
-<span class="sourceLineNo">3614</span>    if (cpHost != null) {<a name="line.3614"></a>
-<span class="sourceLineNo">3615</span>      cpHost.preListReplicationPeers(regex);<a name="line.3615"></a>
-<span class="sourceLineNo">3616</span>    }<a name="line.3616"></a>
-<span class="sourceLineNo">3617</span>    LOG.debug("{} list replication peers, regex={}", getClientIdAuditPrefix(), regex);<a name="line.3617"></a>
-<span class="sourceLineNo">3618</span>    Pattern pattern = regex == null ? null : Pattern.compile(regex);<a name="line.3618"></a>
-<span class="sourceLineNo">3619</span>    List&lt;ReplicationPeerDescription&gt; peers =<a name="line.3619"></a>
-<span class="sourceLineNo">3620</span>      this.replicationPeerManager.listPeers(pattern);<a name="line.3620"></a>
-<span class="sourceLineNo">3621</span>    if (cpHost != null) {<a name="line.3621"></a>
-<span class="sourceLineNo">3622</span>      cpHost.postListReplicationPeers(regex);<a name="line.3622"></a>
-<span class="sourceLineNo">3623</span>    }<a name="line.3623"></a>
-<span class="sourceLineNo">3624</span>    return peers;<a name="line.3624"></a>
-<span class="sourceLineNo">3625</span>  }<a name="line.3625"></a>
-<span class="sourceLineNo">3626</span><a name="line.3626"></a>
-<span class="sourceLineNo">3627</span>  @Override<a name="line.3627"></a>
-<span class="sourceLineNo">3628</span>  public long transitReplicationPeerSyncReplicationState(String peerId, SyncReplicationState state)<a name="line.3628"></a>
-<span class="sourceLineNo">3629</span>    throws ReplicationException, IOException {<a name="line.3629"></a>
-<span class="sourceLineNo">3630</span>    LOG.info(<a name="line.3630"></a>
-<span class="sourceLineNo">3631</span>      getClientIdAuditPrefix() +<a name="line.3631"></a>
-<span class="sourceLineNo">3632</span>        " transit current cluster state to {} in a synchronous replication peer id={}",<a name="line.3632"></a>
-<span class="sourceLineNo">3633</span>      state, peerId);<a name="line.3633"></a>
-<span class="sourceLineNo">3634</span>    return executePeerProcedure(new TransitPeerSyncReplicationStateProcedure(peerId, state));<a name="line.3634"></a>
-<span class="sourceLineNo">3635</span>  }<a name="line.3635"></a>
-<span class="sourceLineNo">3636</span><a name="line.3636"></a>
-<span class="sourceLineNo">3637</span>  /**<a name="line.3637"></a>
-<span class="sourceLineNo">3638</span>   * Mark region server(s) as decommissioned (previously called 'draining') to prevent additional<a name="line.3638"></a>
-<span class="sourceLineNo">3639</span>   * regions from getting assigned to them. Also unload the regions on the servers asynchronously.0<a name="line.3639"></a>
-<span class="sourceLineNo">3640</span>   * @param servers Region servers to decommission.<a name="line.3640"></a>
-<span class="sourceLineNo">3641</span>   */<a name="line.3641"></a>
-<span class="sourceLineNo">3642</span>  public void decommissionRegionServers(final List&lt;ServerName&gt; servers, final boolean offload)<a name="line.3642"></a>
-<span class="sourceLineNo">3643</span>      throws HBaseIOException {<a name="line.3643"></a>
-<span class="sourceLineNo">3644</span>    List&lt;ServerName&gt; serversAdded = new ArrayList&lt;&gt;(servers.size());<a name="line.3644"></a>
-<span class="sourceLineNo">3645</span>    // Place the decommission marker first.<a name="line.3645"></a>
-<span class="sourceLineNo">3646</span>    String parentZnode = getZooKeeper().getZNodePaths().drainingZNode;<a name="line.3646"></a>
-<span class="sourceLineNo">3647</span>    for (ServerName server : servers) {<a name="line.3647"></a>
-<span class="sourceLineNo">3648</span>      try {<a name="line.3648"></a>
-<span class="sourceLineNo">3649</span>        String node = ZNodePaths.joinZNode(parentZnode, server.getServerName());<a name="line.3649"></a>
-<span class="sourceLineNo">3650</span>        ZKUtil.createAndFailSilent(getZooKeeper(), node);<a name="line.3650"></a>
-<span class="sourceLineNo">3651</span>      } catch (KeeperException ke) {<a name="line.3651"></a>
-<span class="sourceLineNo">3652</span>        throw new HBaseIOException(<a name="line.3652"></a>
-<span class="sourceLineNo">3653</span>          this.zooKeeper.prefix("Unable to decommission '" + server.getServerName() + "'."), ke);<a name="line.3653"></a>
-<span class="sourceLineNo">3654</span>      }<a name="line.3654"></a>
-<span class="sourceLineNo">3655</span>      if (this.serverManager.addServerToDrainList(server)) {<a name="line.3655"></a>
-<span class="sourceLineNo">3656</span>        serversAdded.add(server);<a name="line.3656"></a>
-<span class="sourceLineNo">3657</span>      }<a name="line.3657"></a>
-<span class="sourceLineNo">3658</span>    }<a name="line.3658"></a>
-<span class="sourceLineNo">3659</span>    // Move the regions off the decommissioned servers.<a name="line.3659"></a>
-<span class="sourceLineNo">3660</span>    if (offload) {<a name="line.3660"></a>
-<span class="sourceLineNo">3661</span>      final List&lt;ServerName&gt; destServers = this.serverManager.createDestinationServersList();<a name="line.3661"></a>
-<span class="sourceLineNo">3662</span>      for (ServerName server : serversAdded) {<a name="line.3662"></a>
-<span class="sourceLineNo">3663</span>        final List&lt;RegionInfo&gt; regionsOnServer = this.assignmentManager.getRegionsOnServer(server);<a name="line.3663"></a>
-<span class="sourceLineNo">3664</span>        for (RegionInfo hri : regionsOnServer) {<a name="line.3664"></a>
-<span class="sourceLineNo">3665</span>          ServerName dest = balancer.randomAssignment(hri, destServers);<a name="line.3665"></a>
-<span class="sourceLineNo">3666</span>          if (dest == null) {<a name="line.3666"></a>
-<span class="sourceLineNo">3667</span>            throw new HBaseIOException("Unable to determine a plan to move " + hri);<a name="line.3667"></a>
-<span class="sourceLineNo">3668</span>          }<a name="line.3668"></a>
-<span class="sourceLineNo">3669</span>          RegionPlan rp = new RegionPlan(hri, server, dest);<a name="line.3669"></a>
-<span class="sourceLineNo">3670</span>          this.assignmentManager.moveAsync(rp);<a name="line.3670"></a>
-<span class="sourceLineNo">3671</span>        }<a name="line.3671"></a>
-<span class="sourceLineNo">3672</span>      }<a name="line.3672"></a>
-<span class="sourceLineNo">3673</span>    }<a name="line.3673"></a>
-<span class="sourceLineNo">3674</span>  }<a name="line.3674"></a>
-<span class="sourceLineNo">3675</span><a name="line.3675"></a>
-<span class="sourceLineNo">3676</span>  /**<a name="line.3676"></a>
-<span class="sourceLineNo">3677</span>   * List region servers marked as decommissioned (previously called 'draining') to not get regions<a name="line.3677"></a>
-<span class="sourceLineNo">3678</span>   * assigned to them.<a name="line.3678"></a>
-<span class="sourceLineNo">3679</span>   * @return List of decommissioned servers.<a name="line.3679"></a>
-<span class="sourceLineNo">3680</span>   */<a name="line.3680"></a>
-<span class="sourceLineNo">3681</span>  public List&lt;ServerName&gt; listDecommissionedRegionServers() {<a name="line.3681"></a>
-<span class="sourceLineNo">3682</span>    return this.serverManager.getDrainingServersList();<a name="line.3682"></a>
-<span class="sourceLineNo">3683</span>  }<a name="line.3683"></a>
-<span class="sourceLineNo">3684</span><a name="line.3684"></a>
-<span class="sourceLineNo">3685</span>  /**<a name="line.3685"></a>
-<span class="sourceLineNo">3686</span>   * Remove decommission marker (previously called 'draining') from a region server to allow regions<a name="line.3686"></a>
-<span class="sourceLineNo">3687</span>   * assignments. Load regions onto the server asynchronously if a list of regions is given<a name="line.3687"></a>
-<span class="sourceLineNo">3688</span>   * @param server Region server to remove decommission marker from.<a name="line.3688"></a>
-<span class="sourceLineNo">3689</span>   */<a name="line.3689"></a>
-<span class="sourceLineNo">3690</span>  public void recommissionRegionServer(final ServerName server,<a name="line.3690"></a>
-<span class="sourceLineNo">3691</span>      final List&lt;byte[]&gt; encodedRegionNames) throws IOException {<a name="line.3691"></a>
-<span class="sourceLineNo">3692</span>    // Remove the server from decommissioned (draining) server list.<a name="line.3692"></a>
-<span class="sourceLineNo">3693</span>    String parentZnode = getZooKeeper().getZNodePaths().drainingZNode;<a name="line.3693"></a>
-<span class="sourceLineNo">3694</span>    String node = ZNodePaths.joinZNode(parentZnode, server.getServerName());<a name="line.3694"></a>
-<span class="sourceLineNo">3695</span>    try {<a name="line.3695"></a>
-<span class="sourceLineNo">3696</span>      ZKUtil.deleteNodeFailSilent(getZooKeeper(), node);<a name="line.3696"></a>
-<span class="sourceLineNo">3697</span>    } catch (KeeperException ke) {<a name="line.3697"></a>
-<span class="sourceLineNo">3698</span>      throw new HBaseIOException(<a name="line.3698"></a>
-<span class="sourceLineNo">3699</span>        this.zooKeeper.prefix("Unable to recommission '" + server.getServerName() + "'."), ke);<a name="line.3699"></a>
-<span class="sourceLineNo">3700</span>    }<a name="line.3700"></a>
-<span class="sourceLineNo">3701</span>    this.serverManager.removeServerFromDrainList(server);<a name="line.3701"></a>
-<span class="sourceLineNo">3702</span><a name="line.3702"></a>
-<span class="sourceLineNo">3703</span>    // Load the regions onto the server if we are given a list of regions.<a name="line.3703"></a>
-<span class="sourceLineNo">3704</span>    if (encodedRegionNames == null || encodedRegionNames.isEmpty()) {<a name="line.3704"></a>
-<span class="sourceLineNo">3705</span>      return;<a name="line.3705"></a>
-<span class="sourceLineNo">3706</span>    }<a name="line.3706"></a>
-<span class="sourceLineNo">3707</span>    if (!this.serverManager.isServerOnline(server)) {<a name="line.3707"></a>
-<span class="sourceLineNo">3708</span>      return;<a name="line.3708"></a>
-<span class="sourceLineNo">3709</span>    }<a name="line.3709"></a>
-<span class="sourceLineNo">3710</span>    for (byte[] encodedRegionName : encodedRegionNames) {<a name="line.3710"></a>
-<span class="sourceLineNo">3711</span>      RegionState regionState =<a name="line.3711"></a>
-<span class="sourceLineNo">3712</span>        assignmentManager.getRegionStates().getRegionState(Bytes.toString(encodedRegionName));<a name="line.3712"></a>
-<span class="sourceLineNo">3713</span>      if (regionState == null) {<a name="line.3713"></a>
-<span class="sourceLineNo">3714</span>        LOG.warn("Unknown region " + Bytes.toStringBinary(encodedRegionName));<a name="line.3714"></a>
-<span class="sourceLineNo">3715</span>        continue;<a name="line.3715"></a>
-<span class="sourceLineNo">3716</span>      }<a name="line.3716"></a>
-<span class="sourceLineNo">3717</span>      RegionInfo hri = regionState.getRegion();<a name="line.3717"></a>
-<span class="sourceLineNo">3718</span>      if (server.equals(regionState.getServerName())) {<a name="line.3718"></a>
-<span class="sourceLineNo">3719</span>        LOG.info("Skipping move of region " + hri.getRegionNameAsString() +<a name="line.3719"></a>
-<span class="sourceLineNo">3720</span>          " because region already assigned to the same server " + server + ".");<a name="line.3720"></a>
-<span class="sourceLineNo">3721</span>        continue;<a name="line.3721"></a>
-<span class="sourceLineNo">3722</span>      }<a name="line.3722"></a>
-<span class="sourceLineNo">3723</span>      RegionPlan rp = new RegionPlan(hri, regionState.getServerName(), server);<a name="line.3723"></a>
-<span class="sourceLineNo">3724</span>      this.assignmentManager.moveAsync(rp);<a name="line.3724"></a>
-<span class="sourceLineNo">3725</span>    }<a name="line.3725"></a>
-<span class="sourceLineNo">3726</span>  }<a name="line.3726"></a>
-<span class="sourceLineNo">3727</span><a name="line.3727"></a>
-<span class="sourceLineNo">3728</span>  @Override<a name="line.3728"></a>
-<span class="sourceLineNo">3729</span>  public LockManager getLockManager() {<a name="line.3729"></a>
-<span class="sourceLineNo">3730</span>    return lockManager;<a name="line.3730"></a>
-<span class="sourceLineNo">3731</span>  }<a name="line.3731"></a>
-<span class="sourceLineNo">3732</span><a name="line.3732"></a>
-<span class="sourceLineNo">3733</span>  public QuotaObserverChore getQuotaObserverChore() {<a name="line.3733"></a>
-<span class="sourceLineNo">3734</span>    return this.quotaObserverChore;<a name="line.3734"></a>
-<span class="sourceLineNo">3735</span>  }<a name="line.3735"></a>
-<span class="sourceLineNo">3736</span><a name="line.3736"></a>
-<span class="sourceLineNo">3737</span>  public SpaceQuotaSnapshotNotifier getSpaceQuotaSnapshotNotifier() {<a name="line.3737"></a>
-<span class="sourceLineNo">3738</span>    return this.spaceQuotaSnapshotNotifier;<a name="line.3738"></a>
-<span class="sourceLineNo">3739</span>  }<a name="line.3739"></a>
-<span class="sourceLineNo">3740</span><a name="line.3740"></a>
-<span class="sourceLineNo">3741</span>  @SuppressWarnings("unchecked")<a name="line.3741"></a>
-<span class="sourceLineNo">3742</span>  private RemoteProcedure&lt;MasterProcedureEnv, ?&gt; getRemoteProcedure(long procId) {<a name="line.3742"></a>
-<span class="sourceLineNo">3743</span>    Procedure&lt;?&gt; procedure = procedureExecutor.getProcedure(procId);<a name="line.3743"></a>
-<span class="sourceLineNo">3744</span>    if (procedure == null) {<a name="line.3744"></a>
-<span class="sourceLineNo">3745</span>      return null;<a name="line.3745"></a>
-<span class="sourceLineNo">3746</span>    }<a name="line.3746"></a>
-<span class="sourceLineNo">3747</span>    assert procedure instanceof RemoteProcedure;<a name="line.3747"></a>
-<span class="sourceLineNo">3748</span>    return (RemoteProcedure&lt;MasterProcedureEnv, ?&gt;) procedure;<a name="line.3748"></a>
-<span class="sourceLineNo">3749</span>  }<a name="line.3749"></a>
-<span class="sourceLineNo">3750</span><a name="line.3750"></a>
-<span class="sourceLineNo">3751</span>  public void remoteProcedureCompleted(long procId) {<a name="line.3751"></a>
-<span class="sourceLineNo">3752</span>    LOG.debug("Remote procedure done, pid={}", procId);<a name="line.3752"></a>
-<span class="sourceLineNo">3753</span>    RemoteProcedure&lt;MasterProcedureEnv, ?&gt; procedure = getRemoteProcedure(procId);<a name="line.3753"></a>
-<span class="sourceLineNo">3754</span>    if (procedure != null) {<a name="line.3754"></a>
-<span class="sourceLineNo">3755</span>      procedure.remoteOperationCompleted(procedureExecutor.getEnvironment());<a name="line.3755"></a>
-<span class="sourceLineNo">3756</span>    }<a name="line.3756"></a>
-<span class="sourceLineNo">3757</span>  }<a name="line.3757"></a>
-<span class="sourceLineNo">3758</span><a name="line.3758"></a>
-<span class="sourceLineNo">3759</span>  public void remoteProcedureFailed(long procId, RemoteProcedureException error) {<a name="line.3759"></a>
-<span class="sourceLineNo">3760</span>    LOG.debug("Remote procedure failed, pid={}", procId, error);<a name="line.3760"></a>
-<span class="sourceLineNo">3761</span>    RemoteProcedure&lt;MasterProcedureEnv, ?&gt; procedure = getRemoteProcedure(procId);<a name="line.3761"></a>
-<span class="sourceLineNo">3762</span>    if (procedure != null) {<a name="line.3762"></a>
-<span class="sourceLineNo">3763</span>      procedure.remoteOperationFailed(procedureExecutor.getEnvironment(), error);<a name="line.3763"></a>
-<span class="sourceLineNo">3764</span>    }<a name="line.3764"></a>
-<span class="sourceLineNo">3765</span>  }<a name="line.3765"></a>
-<span class="sourceLineNo">3766</span><a name="line.3766"></a>
-<span class="sourceLineNo">3767</span>  /**<a name="line.3767"></a>
-<span class="sourceLineNo">3768</span>   * Reopen regions provided in the argument<a name="line.3768"></a>
-<span class="sourceLineNo">3769</span>   *<a name="line.3769"></a>
-<span class="sourceLineNo">3770</span>   * @param tableName The current table name<a name="line.3770"></a>
-<span class="sourceLineNo">3771</span>   * @param regionNames The region names of the regions to reopen<a name="line.3771"></a>
-<span class="sourceLineNo">3772</span>   * @param nonceGroup Identifier for the source of the request, a client or process<a name="line.3772"></a>
-<span class="sourceLineNo">3773</span>   * @param nonce A unique identifier for this operation from the client or process identified by<a name="line.3773"></a>
-<span class="sourceLineNo">3774</span>   *   &lt;code&gt;nonceGroup&lt;/code&gt; (the source must ensure each operation gets a unique id).<a name="line.3774"></a>
-<span class="sourceLineNo">3775</span>   * @return procedure Id<a name="line.3775"></a>
-<span class="sourceLineNo">3776</span>   * @throws IOException if reopening region fails while running procedure<a name="line.3776"></a>
-<span class="sourceLineNo">3777</span>   */<a name="line.3777"></a>
-<span class="sourceLineNo">3778</span>  long reopenRegions(final TableName tableName, final List&lt;byte[]&gt; regionNames,<a name="line.3778"></a>
-<span class="sourceLineNo">3779</span>      final long nonceGroup, final long nonce)<a name="line.3779"></a>
-<span class="sourceLineNo">3780</span>      throws IOException {<a name="line.3780"></a>
-<span class="sourceLineNo">3781</span><a name="line.3781"></a>
-<span class="sourceLineNo">3782</span>    return MasterProcedureUtil<a name="line.3782"></a>
-<span class="sourceLineNo">3783</span>      .submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.3783"></a>
-<span class="sourceLineNo">3784</span><a name="line.3784"></a>
-<span class="sourceLineNo">3785</span>        @Override<a name="line.3785"></a>
-<span class="sourceLineNo">3786</span>        protected void run() throws IOException {<a name="line.3786"></a>
-<span class="sourceLineNo">3787</span>          submitProcedure(new ReopenTableRegionsProcedure(tableName, regionNames));<a name="line.3787"></a>
-<span class="sourceLineNo">3788</span>        }<a name="line.3788"></a>
-<span class="sourceLineNo">3789</span><a name="line.3789"></a>
-<span class="sourceLineNo">3790</span>        @Override<a name="line.3790"></a>
-<span class="sourceLineNo">3791</span>        protected String getDescription() {<a name="line.3791"></a>
-<span class="sourceLineNo">3792</span>          return "ReopenTableRegionsProcedure";<a name="line.3792"></a>
-<span class="sourceLineNo">3793</span>        }<a name="line.3793"></a>
-<span class="sourceLineNo">3794</span><a name="line.3794"></a>
-<span class="sourceLineNo">3795</span>      });<a name="line.3795"></a>
-<span class="sourceLineNo">3796</span><a name="line.3796"></a>
-<span class="sourceLineNo">3797</span>  }<a name="line.3797"></a>
-<span class="sourceLineNo">3798</span><a name="line.3798"></a>
-<span class="sourceLineNo">3799</span>  @Override<a name="line.3799"></a>
-<span class="sourceLineNo">3800</span>  public ReplicationPeerManager getReplicationPeerManager() {<a name="line.3800"></a>
-<span class="sourceLineNo">3801</span>    return replicationPeerManager;<a name="line.3801"></a>
-<span class="sourceLineNo">3802</span>  }<a name="line.3802"></a>
-<span class="sourceLineNo">3803</span><a name="line.3803"></a>
-<span class="sourceLineNo">3804</span>  public HashMap&lt;String, List&lt;Pair&lt;ServerName, ReplicationLoadSource&gt;&gt;&gt;<a name="line.3804"></a>
-<span class="sourceLineNo">3805</span>      getReplicationLoad(ServerName[] serverNames) {<a name="line.3805"></a>
-<span class="sourceLineNo">3806</span>    List&lt;ReplicationPeerDescription&gt; peerList = this.getReplicationPeerManager().listPeers(null);<a name="line.3806"></a>
-<span class="sourceLineNo">3807</span>    if (peerList == null) {<a name="line.3807"></a>
-<span class="sourceLineNo">3808</span>      return null;<a name="line.3808"></a>
-<span class="sourceLineNo">3809</span>    }<a name="line.3809"></a>
-<span class="sourceLineNo">3810</span>    HashMap&lt;String, List&lt;Pair&lt;ServerName, ReplicationLoadSource&gt;&gt;&gt; replicationLoadSourceMap =<a name="line.3810"></a>
-<span class="sourceLineNo">3811</span>        new HashMap&lt;&gt;(peerList.size());<a name="line.3811"></a>
-<span class="sourceLineNo">3812</span>    peerList.stream()<a name="line.3812"></a>
-<span class="sourceLineNo">3813</span>        .forEach(peer -&gt; replicationLoadSourceMap.put(peer.getPeerId(), new ArrayList&lt;&gt;()));<a name="line.3813"></a>
-<span class="sourceLineNo">3814</span>    for (ServerName serverName : serverNames) {<a name="line.3814"></a>
-<span class="sourceLineNo">3815</span>      List&lt;ReplicationLoadSource&gt; replicationLoadSources =<a name="line.3815"></a>
-<span class="sourceLineNo">3816</span>          getServerManager().getLoad(serverName).getReplicationLoadSourceList();<a name="line.3816"></a>
-<span class="sourceLineNo">3817</span>      for (ReplicationLoadSource replicationLoadSource : replicationLoadSources) {<a name="line.3817"></a>
-<span class="sourceLineNo">3818</span>        replicationLoadSourceMap.get(replicationLoadSource.getPeerID())<a name="line.3818"></a>
-<span class="sourceLineNo">3819</span>            .add(new Pair&lt;&gt;(serverName, replicationLoadSource));<a name="line.3819"></a>
-<span class="sourceLineNo">3820</span>      }<a name="line.3820"></a>
-<span class="sourceLineNo">3821</span>    }<a name="line.3821"></a>
-<span class="sourceLineNo">3822</span>    for (List&lt;Pair&lt;ServerName, ReplicationLoadSource&gt;&gt; loads : replicationLoadSourceMap.values()) {<a name="line.3822"></a>
-<span class="sourceLineNo">3823</span>      if (loads.size() &gt; 0) {<a name="line.3823"></a>
-<span class="sourceLineNo">3824</span>        loads.sort(Comparator.comparingLong(load -&gt; (-1) * load.getSecond().getReplicationLag()));<a name="line.3824"></a>
-<span class="sourceLineNo">3825</span>      }<a name="line.3825"></a>
-<span class="sourceLineNo">3826</span>    }<a name="line.3826"></a>
-<span class="sourceLineNo">3827</span>    return replicationLoadSourceMap;<a name="line.3827"></a>
-<span class="sourceLineNo">3828</span>  }<a name="line.3828"></a>
-<span class="sourceLineNo">3829</span><a name="line.3829"></a>
-<span class="sourceLineNo">3830</span>  /**<a name="line.3830"></a>
-<span class="sourceLineNo">3831</span>   * This method modifies the master's configuration in order to inject replication-related features<a name="line.3831"></a>
-<span class="sourceLineNo">3832</span>   */<a name="line.3832"></a>
-<span class="sourceLineNo">3833</span>  @VisibleForTesting<a name="line.3833"></a>
-<span class="sourceLineNo">3834</span>  public static void decorateMasterConfiguration(Configuration conf) {<a name="line.3834"></a>
-<span class="sourceLineNo">3835</span>    String plugins = conf.get(HBASE_MASTER_LOGCLEANER_PLUGINS);<a name="line.3835"></a>
-<span class="sourceLineNo">3836</span>    String cleanerClass = ReplicationLogCleaner.class.getCanonicalName();<a name="line.3836"></a>
-<span class="sourceLineNo">3837</span>    if (!plugins.contains(cleanerClass)) {<a name="line.3837"></a>
-<span class="sourceLineNo">3838</span>      conf.set(HBASE_MASTER_LOGCLEANER_PLUGINS, plugins + "," + cleanerClass);<a name="line.3838"></a>
-<span class="sourceLineNo">3839</span>    }<a name="line.3839"></a>
-<span class="sourceLineNo">3840</span>    if (ReplicationUtils.isReplicationForBulkLoadDataEnabled(conf)) {<a name="line.3840"></a>
-<span class="sourceLineNo">3841</span>      plugins = conf.get(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS);<a name="line.3841"></a>
-<span class="sourceLineNo">3842</span>      cleanerClass = ReplicationHFileCleaner.class.getCanonicalName();<a name="line.3842"></a>
-<span class="sourceLineNo">3843</span>      if (!plugins.contains(cleanerClass)) {<a name="line.3843"></a>
-<span class="sourceLineNo">3844</span>        conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS, plugins + "," + cleanerClass);<a name="line.3844"></a>
-<span class="sourceLineNo">3845</span>      }<a name="line.3845"></a>
-<span class="sourceLineNo">3846</span>    }<a name="line.3846"></a>
-<span class="sourceLineNo">3847</span>  }<a name="line.3847"></a>
-<span class="sourceLineNo">3848</span><a name="line.3848"></a>
-<span class="sourceLineNo">3849</span>  public SnapshotQuotaObserverChore getSnapshotQuotaObserverChore() {<a name="line.3849"></a>
-<span class="sourceLineNo">3850</span>    return this.snapshotQuotaChore;<a name="line.3850"></a>
-<span class="sourceLineNo">3851</span>  }<a name="line.3851"></a>
-<span class="sourceLineNo">3852</span><a name="line.3852"></a>
-<span class="sourceLineNo">3853</span>  @Override<a name="line.3853"></a>
-<span class="sourceLineNo">3854</span>  public SyncReplicationReplayWALManager getSyncReplicationReplayWALManager() {<a name="line.3854"></a>
-<span class="sourceLineNo">3855</span>    return this.syncReplicationReplayWALManager;<a name="line.3855"></a>
-<span class="sourceLineNo">3856</span>  }<a name="line.3856"></a>
-<span class="sourceLineNo">3857</span><a name="line.3857"></a>
-<span class="sourceLineNo">3858</span>  @Override<a name="line.3858"></a>
-<span class="sourceLineNo">3859</span>  public Map&lt;String, ReplicationStatus&gt; getWalGroupsReplicationStatus() {<a name="line.3859"></a>
-<span class="sourceLineNo">3860</span>    if (!this.isOnline() || !LoadBalancer.isMasterCanHostUserRegions(conf)) {<a name="line.3860"></a>
-<span class="sourceLineNo">3861</span>      return new HashMap&lt;&gt;();<a name="line.3861"></a>
-<span class="sourceLineNo">3862</span>    }<a name="line.3862"></a>
-<span class="sourceLineNo">3863</span>    return super.getWalGroupsReplicationStatus();<a name="line.3863"></a>
-<span class="sourceLineNo">3864</span>  }<a name="line.3864"></a>
-<span class="sourceLineNo">3865</span><a name="line.3865"></a>
-<span class="sourceLineNo">3866</span>  public HbckChore getHbckChore() {<a name="line.3866"></a>
-<span class="sourceLineNo">3867</span>    return this.hbckChore;<a name="line.3867"></a>
-<span class="sourceLineNo">3868</span>  }<a name="line.3868"></a>
-<span class="sourceLineNo">3869</span><a name="line.3869"></a>
-<span class="sourceLineNo">3870</span>  @Override<a name="line.3870"></a>
-<span class="sourceLineNo">3871</span>  public String getClusterId() {<a name="line.3871"></a>
-<span class="sourceLineNo">3872</span>    if (activeMaster) {<a name="line.3872"></a>
-<span class="sourceLineNo">3873</span>      return super.getClusterId();<a name="line.3873"></a>
-<span class="sourceLineNo">3874</span>    }<a name="line.3874"></a>
-<span class="sourceLineNo">3875</span>    return cachedClusterId.getFromCacheOrFetch();<a name="line.3875"></a>
-<span class="sourceLineNo">3876</span>  }<a name="line.3876"></a>
-<span class="sourceLineNo">3877</span><a name="line.3877"></a>
-<span class="sourceLineNo">3878</span>  @Override<a name="line.3878"></a>
-<span class="sourceLineNo">3879</span>  public void runReplicationBarrierCleaner() {<a name="line.3879"></a>
-<span class="sourceLineNo">3880</span>    ReplicationBarrierCleaner rbc = this.replicationBarrierCleaner;<a name="line.3880"></a>
-<span class="sourceLineNo">3881</span>    if (rbc != null) {<a name="line.3881"></a>
-<span class="sourceLineNo">3882</span>      rbc.chore();<a name="line.3882"></a>
-<span class="sourceLineNo">3883</span>    }<a name="line.3883"></a>
-<span class="sourceLineNo">3884</span>  }<a name="line.3884"></a>
-<span class="sourceLineNo">3885</span>}<a name="line.3885"></a>
+<span class="sourceLineNo">1867</span>        if (this.maxBlancingTime &gt; 0 &amp;&amp; rpCount &lt; plans.size()<a name="line.1867"></a>
+<span class="sourceLineNo">1868</span>          &amp;&amp; System.currentTimeMillis() &gt; cutoffTime) {<a name="line.1868"></a>
+<span class="sourceLineNo">1869</span>          // TODO: After balance, there should not be a cutoff time (keeping it as<a name="line.1869"></a>
+<span class="sourceLineNo">1870</span>          // a security net for now)<a name="line.1870"></a>
+<span class="sourceLineNo">1871</span>          LOG.debug("No more balancing till next balance run; maxBalanceTime="<a name="line.1871"></a>
+<span class="sourceLineNo">1872</span>              + this.maxBlancingTime);<a name="line.1872"></a>
+<span class="sourceLineNo">1873</span>          break;<a name="line.1873"></a>
+<span class="sourceLineNo">1874</span>        }<a name="line.1874"></a>
+<span class="sourceLineNo">1875</span>      }<a name="line.1875"></a>
+<span class="sourceLineNo">1876</span>    }<a name="line.1876"></a>
+<span class="sourceLineNo">1877</span>    return sucRPs;<a name="line.1877"></a>
+<span class="sourceLineNo">1878</span>  }<a name="line.1878"></a>
+<span class="sourceLineNo">1879</span><a name="line.1879"></a>
+<span class="sourceLineNo">1880</span>  @Override<a name="line.1880"></a>
+<span class="sourceLineNo">1881</span>  @VisibleForTesting<a name="line.1881"></a>
+<span class="sourceLineNo">1882</span>  public RegionNormalizer getRegionNormalizer() {<a name="line.1882"></a>
+<span class="sourceLineNo">1883</span>    return this.normalizer;<a name="line.1883"></a>
+<span class="sourceLineNo">1884</span>  }<a name="line.1884"></a>
+<span class="sourceLineNo">1885</span><a name="line.1885"></a>
+<span class="sourceLineNo">1886</span>  /**<a name="line.1886"></a>
+<span class="sourceLineNo">1887</span>   * Perform normalization of cluster (invoked by {@link RegionNormalizerChore}).<a name="line.1887"></a>
+<span class="sourceLineNo">1888</span>   *<a name="line.1888"></a>
+<span class="sourceLineNo">1889</span>   * @return true if normalization step was performed successfully, false otherwise<a name="line.1889"></a>
+<span class="sourceLineNo">1890</span>   *    (specifically, if HMaster hasn't been initialized properly or normalization<a name="line.1890"></a>
+<span class="sourceLineNo">1891</span>   *    is globally disabled)<a name="line.1891"></a>
+<span class="sourceLineNo">1892</span>   */<a name="line.1892"></a>
+<span class="sourceLineNo">1893</span>  public boolean normalizeRegions() throws IOException {<a name="line.1893"></a>
+<span class="sourceLineNo">1894</span>    if (!isInitialized()) {<a name="line.1894"></a>
+<span class="sourceLineNo">1895</span>      LOG.debug("Master has not been initialized, don't run region normalizer.");<a name="line.1895"></a>
+<span class="sourceLineNo">1896</span>      return false;<a name="line.1896"></a>
+<span class="sourceLineNo">1897</span>    }<a name="line.1897"></a>
+<span class="sourceLineNo">1898</span>    if (this.getServerManager().isClusterShutdown()) {<a name="line.1898"></a>
+<span class="sourceLineNo">1899</span>      LOG.info("Cluster is shutting down, don't run region normalizer.");<a name="line.1899"></a>
+<span class="sourceLineNo">1900</span>      return false;<a name="line.1900"></a>
+<span class="sourceLineNo">1901</span>    }<a name="line.1901"></a>
+<span class="sourceLineNo">1902</span>    if (isInMaintenanceMode()) {<a name="line.1902"></a>
+<span class="sourceLineNo">1903</span>      LOG.info("Master is in maintenance mode, don't run region normalizer.");<a name="line.1903"></a>
+<span class="sourceLineNo">1904</span>      return false;<a name="line.1904"></a>
+<span class="sourceLineNo">1905</span>    }<a name="line.1905"></a>
+<span class="sourceLineNo">1906</span>    if (!this.regionNormalizerTracker.isNormalizerOn()) {<a name="line.1906"></a>
+<span class="sourceLineNo">1907</span>      LOG.debug("Region normalization is disabled, don't run region normalizer.");<a name="line.1907"></a>
+<span class="sourceLineNo">1908</span>      return false;<a name="line.1908"></a>
+<span class="sourceLineNo">1909</span>    }<a name="line.1909"></a>
+<span class="sourceLineNo">1910</span><a name="line.1910"></a>
+<span class="sourceLineNo">1911</span>    synchronized (this.normalizer) {<a name="line.1911"></a>
+<span class="sourceLineNo">1912</span>      // Don't run the normalizer concurrently<a name="line.1912"></a>
+<span class="sourceLineNo">1913</span>      List&lt;TableName&gt; allEnabledTables = new ArrayList&lt;&gt;(<a name="line.1913"></a>
+<span class="sourceLineNo">1914</span>        this.tableStateManager.getTablesInStates(TableState.State.ENABLED));<a name="line.1914"></a>
+<span class="sourceLineNo">1915</span><a name="line.1915"></a>
+<span class="sourceLineNo">1916</span>      Collections.shuffle(allEnabledTables);<a name="line.1916"></a>
+<span class="sourceLineNo">1917</span><a name="line.1917"></a>
+<span class="sourceLineNo">1918</span>      for (TableName table : allEnabledTables) {<a name="line.1918"></a>
+<span class="sourceLineNo">1919</span>        if (isInMaintenanceMode()) {<a name="line.1919"></a>
+<span class="sourceLineNo">1920</span>          LOG.debug("Master is in maintenance mode, stop running region normalizer.");<a name="line.1920"></a>
+<span class="sourceLineNo">1921</span>          return false;<a name="line.1921"></a>
+<span class="sourceLineNo">1922</span>        }<a name="line.1922"></a>
+<span class="sourceLineNo">1923</span><a name="line.1923"></a>
+<span class="sourceLineNo">1924</span>        TableDescriptor tblDesc = getTableDescriptors().get(table);<a name="line.1924"></a>
+<span class="sourceLineNo">1925</span>        if (table.isSystemTable() || (tblDesc != null &amp;&amp;<a name="line.1925"></a>
+<span class="sourceLineNo">1926</span>            !tblDesc.isNormalizationEnabled())) {<a name="line.1926"></a>
+<span class="sourceLineNo">1927</span>          LOG.trace("Skipping normalization for {}, as it's either system"<a name="line.1927"></a>
+<span class="sourceLineNo">1928</span>              + " table or doesn't have auto normalization turned on", table);<a name="line.1928"></a>
+<span class="sourceLineNo">1929</span>          continue;<a name="line.1929"></a>
+<span class="sourceLineNo">1930</span>        }<a name="line.1930"></a>
+<span class="sourceLineNo">1931</span>        List&lt;NormalizationPlan&gt; plans = this.normalizer.computePlanForTable(table);<a name="line.1931"></a>
+<span class="sourceLineNo">1932</span>        if (plans != null) {<a name="line.1932"></a>
+<span class="sourceLineNo">1933</span>          for (NormalizationPlan plan : plans) {<a name="line.1933"></a>
+<span class="sourceLineNo">1934</span>            plan.execute(asyncClusterConnection.toConnection().getAdmin());<a name="line.1934"></a>
+<span class="sourceLineNo">1935</span>            if (plan.getType() == PlanType.SPLIT) {<a name="line.1935"></a>
+<span class="sourceLineNo">1936</span>              splitPlanCount++;<a name="line.1936"></a>
+<span class="sourceLineNo">1937</span>            } else if (plan.getType() == PlanType.MERGE) {<a name="line.1937"></a>
+<span class="sourceLineNo">1938</span>              mergePlanCount++;<a name="line.1938"></a>
+<span class="sourceLineNo">1939</span>            }<a name="line.1939"></a>
+<span class="sourceLineNo">1940</span>          }<a name="line.1940"></a>
+<span class="sourceLineNo">1941</span>        }<a name="line.1941"></a>
+<span class="sourceLineNo">1942</span>      }<a name="line.1942"></a>
+<span class="sourceLineNo">1943</span>    }<a name="line.1943"></a>
+<span class="sourceLineNo">1944</span>    // If Region did not generate any plans, it means the cluster is already balanced.<a name="line.1944"></a>
+<span class="sourceLineNo">1945</span>    // Return true indicating a success.<a name="line.1945"></a>
+<span class="sourceLineNo">1946</span>    return true;<a name="line.1946"></a>
+<span class="sourceLineNo">1947</span>  }<a name="line.1947"></a>
+<span class="sourceLineNo">1948</span><a name="line.1948"></a>
+<span class="sourceLineNo">1949</span>  /**<a name="line.1949"></a>
+<span class="sourceLineNo">1950</span>   * @return Client info for use as prefix on an audit log string; who did an action<a name="line.1950"></a>
+<span class="sourceLineNo">1951</span>   */<a name="line.1951"></a>
+<span class="sourceLineNo">1952</span>  @Override<a name="line.1952"></a>
+<span class="sourceLineNo">1953</span>  public String getClientIdAuditPrefix() {<a name="line.1953"></a>
+<span class="sourceLineNo">1954</span>    return "Client=" + RpcServer.getRequestUserName().orElse(null)<a name="line.1954"></a>
+<span class="sourceLineNo">1955</span>        + "/" + RpcServer.getRemoteAddress().orElse(null);<a name="line.1955"></a>
+<span class="sourceLineNo">1956</span>  }<a name="line.1956"></a>
+<span class="sourceLineNo">1957</span><a name="line.1957"></a>
+<span class="sourceLineNo">1958</span>  /**<a name="line.1958"></a>
+<span class="sourceLineNo">1959</span>   * Switch for the background CatalogJanitor thread.<a name="line.1959"></a>
+<span class="sourceLineNo">1960</span>   * Used for testing.  The thread will continue to run.  It will just be a noop<a name="line.1960"></a>
+<span class="sourceLineNo">1961</span>   * if disabled.<a name="line.1961"></a>
+<span class="sourceLineNo">1962</span>   * @param b If false, the catalog janitor won't do anything.<a name="line.1962"></a>
+<span class="sourceLineNo">1963</span>   */<a name="line.1963"></a>
+<span class="sourceLineNo">1964</span>  public void setCatalogJanitorEnabled(final boolean b) {<a name="line.1964"></a>
+<span class="sourceLineNo">1965</span>    this.catalogJanitorChore.setEnabled(b);<a name="line.1965"></a>
+<span class="sourceLineNo">1966</span>  }<a name="line.1966"></a>
+<span class="sourceLineNo">1967</span><a name="line.1967"></a>
+<span class="sourceLineNo">1968</span>  @Override<a name="line.1968"></a>
+<span class="sourceLineNo">1969</span>  public long mergeRegions(<a name="line.1969"></a>
+<span class="sourceLineNo">1970</span>      final RegionInfo[] regionsToMerge,<a name="line.1970"></a>
+<span class="sourceLineNo">1971</span>      final boolean forcible,<a name="line.1971"></a>
+<span class="sourceLineNo">1972</span>      final long ng,<a name="line.1972"></a>
+<span class="sourceLineNo">1973</span>      final long nonce) throws IOException {<a name="line.1973"></a>
+<span class="sourceLineNo">1974</span>    checkInitialized();<a name="line.1974"></a>
+<span class="sourceLineNo">1975</span><a name="line.1975"></a>
+<span class="sourceLineNo">1976</span>    final String mergeRegionsStr = Arrays.stream(regionsToMerge).<a name="line.1976"></a>
+<span class="sourceLineNo">1977</span>      map(r -&gt; RegionInfo.getShortNameToLog(r)).collect(Collectors.joining(", "));<a name="line.1977"></a>
+<span class="sourceLineNo">1978</span>    return MasterProcedureUtil.submitProcedure(new NonceProcedureRunnable(this, ng, nonce) {<a name="line.1978"></a>
+<span class="sourceLineNo">1979</span>      @Override<a name="line.1979"></a>
+<span class="sourceLineNo">1980</span>      protected void run() throws IOException {<a name="line.1980"></a>
+<span class="sourceLineNo">1981</span>        getMaster().getMasterCoprocessorHost().preMergeRegions(regionsToMerge);<a name="line.1981"></a>
+<span class="sourceLineNo">1982</span>        String aid = getClientIdAuditPrefix();<a name="line.1982"></a>
+<span class="sourceLineNo">1983</span>        LOG.info("{} merge regions {}", aid, mergeRegionsStr);<a name="line.1983"></a>
+<span class="sourceLineNo">1984</span>        submitProcedure(new MergeTableRegionsProcedure(procedureExecutor.getEnvironment(),<a name="line.1984"></a>
+<span class="sourceLineNo">1985</span>            regionsToMerge, forcible));<a name="line.1985"></a>
+<span class="sourceLineNo">1986</span>        getMaster().getMasterCoprocessorHost().postMergeRegions(regionsToMerge);<a name="line.1986"></a>
+<span class="sourceLineNo">1987</span>      }<a name="line.1987"></a>
+<span class="sourceLineNo">1988</span><a name="line.1988"></a>
+<span class="sourceLineNo">1989</span>      @Override<a name="line.1989"></a>
+<span class="sourceLineNo">1990</span>      protected String getDescription() {<a name="line.1990"></a>
+<span class="sourceLineNo">1991</span>        return "MergeTableProcedure";<a name="line.1991"></a>
+<span class="sourceLineNo">1992</span>      }<a name="line.1992"></a>
+<span class="sourceLineNo">1993</span>    });<a name="line.1993"></a>
+<span class="sourceLineNo">1994</span>  }<a name="line.1994"></a>
+<span class="sourceLineNo">1995</span><a name="line.1995"></a>
+<span class="sourceLineNo">1996</span>  @Override<a name="line.1996"></a>
+<span class="sourceLineNo">1997</span>  public long splitRegion(final RegionInfo regionInfo, final byte[] splitRow,<a name="line.1997"></a>
+<span class="sourceLineNo">1998</span>      final long nonceGroup, final long nonce)<a name="line.1998"></a>
+<span class="sourceLineNo">1999</span>  throws IOException {<a name="line.1999"></a>
+<span class="sourceLineNo">2000</span>    checkInitialized();<a name="line.2000"></a>
+<span class="sourceLineNo">2001</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2001"></a>
+<span class="sourceLineNo">2002</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2002"></a>
+<span class="sourceLineNo">2003</span>      @Override<a name="line.2003"></a>
+<span class="sourceLineNo">2004</span>      protected void run() throws IOException {<a name="line.2004"></a>
+<span class="sourceLineNo">2005</span>        getMaster().getMasterCoprocessorHost().preSplitRegion(regionInfo.getTable(), splitRow);<a name="line.2005"></a>
+<span class="sourceLineNo">2006</span>        LOG.info(getClientIdAuditPrefix() + " split " + regionInfo.getRegionNameAsString());<a name="line.2006"></a>
+<span class="sourceLineNo">2007</span><a name="line.2007"></a>
+<span class="sourceLineNo">2008</span>        // Execute the operation asynchronously<a name="line.2008"></a>
+<span class="sourceLineNo">2009</span>        submitProcedure(getAssignmentManager().createSplitProcedure(regionInfo, splitRow));<a name="line.2009"></a>
+<span class="sourceLineNo">2010</span>      }<a name="line.2010"></a>
+<span class="sourceLineNo">2011</span><a name="line.2011"></a>
+<span class="sourceLineNo">2012</span>      @Override<a name="line.2012"></a>
+<span class="sourceLineNo">2013</span>      protected String getDescription() {<a name="line.2013"></a>
+<span class="sourceLineNo">2014</span>        return "SplitTableProcedure";<a name="line.2014"></a>
+<span class="sourceLineNo">2015</span>      }<a name="line.2015"></a>
+<span class="sourceLineNo">2016</span>    });<a name="line.2016"></a>
+<span class="sourceLineNo">2017</span>  }<a name="line.2017"></a>
+<span class="sourceLineNo">2018</span><a name="line.2018"></a>
+<span class="sourceLineNo">2019</span>  private void warmUpRegion(ServerName server, RegionInfo region) {<a name="line.2019"></a>
+<span class="sourceLineNo">2020</span>    FutureUtils.addListener(asyncClusterConnection.getRegionServerAdmin(server)<a name="line.2020"></a>
+<span class="sourceLineNo">2021</span>      .warmupRegion(RequestConverter.buildWarmupRegionRequest(region)), (r, e) -&gt; {<a name="line.2021"></a>
+<span class="sourceLineNo">2022</span>        if (e != null) {<a name="line.2022"></a>
+<span class="sourceLineNo">2023</span>          LOG.warn("Failed to warm up region {} on server {}", region, server, e);<a name="line.2023"></a>
+<span class="sourceLineNo">2024</span>        }<a name="line.2024"></a>
+<span class="sourceLineNo">2025</span>      });<a name="line.2025"></a>
+<span class="sourceLineNo">2026</span>  }<a name="line.2026"></a>
+<span class="sourceLineNo">2027</span><a name="line.2027"></a>
+<span class="sourceLineNo">2028</span>  // Public so can be accessed by tests. Blocks until move is done.<a name="line.2028"></a>
+<span class="sourceLineNo">2029</span>  // Replace with an async implementation from which you can get<a name="line.2029"></a>
+<span class="sourceLineNo">2030</span>  // a success/failure result.<a name="line.2030"></a>
+<span class="sourceLineNo">2031</span>  @VisibleForTesting<a name="line.2031"></a>
+<span class="sourceLineNo">2032</span>  public void move(final byte[] encodedRegionName, byte[] destServerName) throws HBaseIOException {<a name="line.2032"></a>
+<span class="sourceLineNo">2033</span>    RegionState regionState = assignmentManager.getRegionStates().<a name="line.2033"></a>
+<span class="sourceLineNo">2034</span>      getRegionState(Bytes.toString(encodedRegionName));<a name="line.2034"></a>
+<span class="sourceLineNo">2035</span><a name="line.2035"></a>
+<span class="sourceLineNo">2036</span>    RegionInfo hri;<a name="line.2036"></a>
+<span class="sourceLineNo">2037</span>    if (regionState != null) {<a name="line.2037"></a>
+<span class="sourceLineNo">2038</span>      hri = regionState.getRegion();<a name="line.2038"></a>
+<span class="sourceLineNo">2039</span>    } else {<a name="line.2039"></a>
+<span class="sourceLineNo">2040</span>      throw new UnknownRegionException(Bytes.toStringBinary(encodedRegionName));<a name="line.2040"></a>
+<span class="sourceLineNo">2041</span>    }<a name="line.2041"></a>
+<span class="sourceLineNo">2042</span><a name="line.2042"></a>
+<span class="sourceLineNo">2043</span>    ServerName dest;<a name="line.2043"></a>
+<span class="sourceLineNo">2044</span>    List&lt;ServerName&gt; exclude = hri.getTable().isSystemTable() ? assignmentManager.getExcludedServersForSystemTable()<a name="line.2044"></a>
+<span class="sourceLineNo">2045</span>        : new ArrayList&lt;&gt;(1);<a name="line.2045"></a>
+<span class="sourceLineNo">2046</span>    if (destServerName != null &amp;&amp; exclude.contains(ServerName.valueOf(Bytes.toString(destServerName)))) {<a name="line.2046"></a>
+<span class="sourceLineNo">2047</span>      LOG.info(<a name="line.2047"></a>
+<span class="sourceLineNo">2048</span>          Bytes.toString(encodedRegionName) + " can not move to " + Bytes.toString(destServerName)<a name="line.2048"></a>
+<span class="sourceLineNo">2049</span>              + " because the server is in exclude list");<a name="line.2049"></a>
+<span class="sourceLineNo">2050</span>      destServerName = null;<a name="line.2050"></a>
+<span class="sourceLineNo">2051</span>    }<a name="line.2051"></a>
+<span class="sourceLineNo">2052</span>    if (destServerName == null || destServerName.length == 0) {<a name="line.2052"></a>
+<span class="sourceLineNo">2053</span>      LOG.info("Passed destination servername is null/empty so " +<a name="line.2053"></a>
+<span class="sourceLineNo">2054</span>        "choosing a server at random");<a name="line.2054"></a>
+<span class="sourceLineNo">2055</span>      exclude.add(regionState.getServerName());<a name="line.2055"></a>
+<span class="sourceLineNo">2056</span>      final List&lt;ServerName&gt; destServers = this.serverManager.createDestinationServersList(exclude);<a name="line.2056"></a>
+<span class="sourceLineNo">2057</span>      dest = balancer.randomAssignment(hri, destServers);<a name="line.2057"></a>
+<span class="sourceLineNo">2058</span>      if (dest == null) {<a name="line.2058"></a>
+<span class="sourceLineNo">2059</span>        LOG.debug("Unable to determine a plan to assign " + hri);<a name="line.2059"></a>
+<span class="sourceLineNo">2060</span>        return;<a name="line.2060"></a>
+<span class="sourceLineNo">2061</span>      }<a name="line.2061"></a>
+<span class="sourceLineNo">2062</span>    } else {<a name="line.2062"></a>
+<span class="sourceLineNo">2063</span>      ServerName candidate = ServerName.valueOf(Bytes.toString(destServerName));<a name="line.2063"></a>
+<span class="sourceLineNo">2064</span>      dest = balancer.randomAssignment(hri, Lists.newArrayList(candidate));<a name="line.2064"></a>
+<span class="sourceLineNo">2065</span>      if (dest == null) {<a name="line.2065"></a>
+<span class="sourceLineNo">2066</span>        LOG.debug("Unable to determine a plan to assign " + hri);<a name="line.2066"></a>
+<span class="sourceLineNo">2067</span>        return;<a name="line.2067"></a>
+<span class="sourceLineNo">2068</span>      }<a name="line.2068"></a>
+<span class="sourceLineNo">2069</span>      // TODO: What is this? I don't get it.<a name="line.2069"></a>
+<span class="sourceLineNo">2070</span>      if (dest.equals(serverName) &amp;&amp; balancer instanceof BaseLoadBalancer<a name="line.2070"></a>
+<span class="sourceLineNo">2071</span>          &amp;&amp; !((BaseLoadBalancer)balancer).shouldBeOnMaster(hri)) {<a name="line.2071"></a>
+<span class="sourceLineNo">2072</span>        // To avoid unnecessary region moving later by balancer. Don't put user<a name="line.2072"></a>
+<span class="sourceLineNo">2073</span>        // regions on master.<a name="line.2073"></a>
+<span class="sourceLineNo">2074</span>        LOG.debug("Skipping move of region " + hri.getRegionNameAsString()<a name="line.2074"></a>
+<span class="sourceLineNo">2075</span>          + " to avoid unnecessary region moving later by load balancer,"<a name="line.2075"></a>
+<span class="sourceLineNo">2076</span>          + " because it should not be on master");<a name="line.2076"></a>
+<span class="sourceLineNo">2077</span>        return;<a name="line.2077"></a>
+<span class="sourceLineNo">2078</span>      }<a name="line.2078"></a>
+<span class="sourceLineNo">2079</span>    }<a name="line.2079"></a>
+<span class="sourceLineNo">2080</span><a name="line.2080"></a>
+<span class="sourceLineNo">2081</span>    if (dest.equals(regionState.getServerName())) {<a name="line.2081"></a>
+<span class="sourceLineNo">2082</span>      LOG.debug("Skipping move of region " + hri.getRegionNameAsString()<a name="line.2082"></a>
+<span class="sourceLineNo">2083</span>        + " because region already assigned to the same server " + dest + ".");<a name="line.2083"></a>
+<span class="sourceLineNo">2084</span>      return;<a name="line.2084"></a>
+<span class="sourceLineNo">2085</span>    }<a name="line.2085"></a>
+<span class="sourceLineNo">2086</span><a name="line.2086"></a>
+<span class="sourceLineNo">2087</span>    // Now we can do the move<a name="line.2087"></a>
+<span class="sourceLineNo">2088</span>    RegionPlan rp = new RegionPlan(hri, regionState.getServerName(), dest);<a name="line.2088"></a>
+<span class="sourceLineNo">2089</span>    assert rp.getDestination() != null: rp.toString() + " " + dest;<a name="line.2089"></a>
+<span class="sourceLineNo">2090</span><a name="line.2090"></a>
+<span class="sourceLineNo">2091</span>    try {<a name="line.2091"></a>
+<span class="sourceLineNo">2092</span>      checkInitialized();<a name="line.2092"></a>
+<span class="sourceLineNo">2093</span>      if (this.cpHost != null) {<a name="line.2093"></a>
+<span class="sourceLineNo">2094</span>        this.cpHost.preMove(hri, rp.getSource(), rp.getDestination());<a name="line.2094"></a>
+<span class="sourceLineNo">2095</span>      }<a name="line.2095"></a>
+<span class="sourceLineNo">2096</span><a name="line.2096"></a>
+<span class="sourceLineNo">2097</span>      TransitRegionStateProcedure proc =<a name="line.2097"></a>
+<span class="sourceLineNo">2098</span>        this.assignmentManager.createMoveRegionProcedure(rp.getRegionInfo(), rp.getDestination());<a name="line.2098"></a>
+<span class="sourceLineNo">2099</span>      // Warmup the region on the destination before initiating the move.<a name="line.2099"></a>
+<span class="sourceLineNo">2100</span>      // A region server could reject the close request because it either does not<a name="line.2100"></a>
+<span class="sourceLineNo">2101</span>      // have the specified region or the region is being split.<a name="line.2101"></a>
+<span class="sourceLineNo">2102</span>      warmUpRegion(rp.getDestination(), hri);<a name="line.2102"></a>
+<span class="sourceLineNo">2103</span><a name="line.2103"></a>
+<span class="sourceLineNo">2104</span>      LOG.info(getClientIdAuditPrefix() + " move " + rp + ", running balancer");<a name="line.2104"></a>
+<span class="sourceLineNo">2105</span>      Future&lt;byte[]&gt; future = ProcedureSyncWait.submitProcedure(this.procedureExecutor, proc);<a name="line.2105"></a>
+<span class="sourceLineNo">2106</span>      try {<a name="line.2106"></a>
+<span class="sourceLineNo">2107</span>        // Is this going to work? Will we throw exception on error?<a name="line.2107"></a>
+<span class="sourceLineNo">2108</span>        // TODO: CompletableFuture rather than this stunted Future.<a name="line.2108"></a>
+<span class="sourceLineNo">2109</span>        future.get();<a name="line.2109"></a>
+<span class="sourceLineNo">2110</span>      } catch (InterruptedException | ExecutionException e) {<a name="line.2110"></a>
+<span class="sourceLineNo">2111</span>        throw new HBaseIOException(e);<a name="line.2111"></a>
+<span class="sourceLineNo">2112</span>      }<a name="line.2112"></a>
+<span class="sourceLineNo">2113</span>      if (this.cpHost != null) {<a name="line.2113"></a>
+<span class="sourceLineNo">2114</span>        this.cpHost.postMove(hri, rp.getSource(), rp.getDestination());<a name="line.2114"></a>
+<span class="sourceLineNo">2115</span>      }<a name="line.2115"></a>
+<span class="sourceLineNo">2116</span>    } catch (IOException ioe) {<a name="line.2116"></a>
+<span class="sourceLineNo">2117</span>      if (ioe instanceof HBaseIOException) {<a name="line.2117"></a>
+<span class="sourceLineNo">2118</span>        throw (HBaseIOException)ioe;<a name="line.2118"></a>
+<span class="sourceLineNo">2119</span>      }<a name="line.2119"></a>
+<span class="sourceLineNo">2120</span>      throw new HBaseIOException(ioe);<a name="line.2120"></a>
+<span class="sourceLineNo">2121</span>    }<a name="line.2121"></a>
+<span class="sourceLineNo">2122</span>  }<a name="line.2122"></a>
+<span class="sourceLineNo">2123</span><a name="line.2123"></a>
+<span class="sourceLineNo">2124</span>  @Override<a name="line.2124"></a>
+<span class="sourceLineNo">2125</span>  public long createTable(final TableDescriptor tableDescriptor, final byte[][] splitKeys,<a name="line.2125"></a>
+<span class="sourceLineNo">2126</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2126"></a>
+<span class="sourceLineNo">2127</span>    checkInitialized();<a name="line.2127"></a>
+<span class="sourceLineNo">2128</span>    TableDescriptor desc = getMasterCoprocessorHost().preCreateTableRegionsInfos(tableDescriptor);<a name="line.2128"></a>
+<span class="sourceLineNo">2129</span>    if (desc == null) {<a name="line.2129"></a>
+<span class="sourceLineNo">2130</span>      throw new IOException("Creation for " + tableDescriptor + " is canceled by CP");<a name="line.2130"></a>
+<span class="sourceLineNo">2131</span>    }<a name="line.2131"></a>
+<span class="sourceLineNo">2132</span>    String namespace = desc.getTableName().getNamespaceAsString();<a name="line.2132"></a>
+<span class="sourceLineNo">2133</span>    this.clusterSchemaService.getNamespace(namespace);<a name="line.2133"></a>
+<span class="sourceLineNo">2134</span><a name="line.2134"></a>
+<span class="sourceLineNo">2135</span>    RegionInfo[] newRegions = ModifyRegionUtils.createRegionInfos(desc, splitKeys);<a name="line.2135"></a>
+<span class="sourceLineNo">2136</span>    TableDescriptorChecker.sanityCheck(conf, desc);<a name="line.2136"></a>
+<span class="sourceLineNo">2137</span><a name="line.2137"></a>
+<span class="sourceLineNo">2138</span>    return MasterProcedureUtil<a name="line.2138"></a>
+<span class="sourceLineNo">2139</span>      .submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2139"></a>
+<span class="sourceLineNo">2140</span>        @Override<a name="line.2140"></a>
+<span class="sourceLineNo">2141</span>        protected void run() throws IOException {<a name="line.2141"></a>
+<span class="sourceLineNo">2142</span>          getMaster().getMasterCoprocessorHost().preCreateTable(desc, newRegions);<a name="line.2142"></a>
+<span class="sourceLineNo">2143</span><a name="line.2143"></a>
+<span class="sourceLineNo">2144</span>          LOG.info(getClientIdAuditPrefix() + " create " + desc);<a name="line.2144"></a>
+<span class="sourceLineNo">2145</span><a name="line.2145"></a>
+<span class="sourceLineNo">2146</span>          // TODO: We can handle/merge duplicate requests, and differentiate the case of<a name="line.2146"></a>
+<span class="sourceLineNo">2147</span>          // TableExistsException by saying if the schema is the same or not.<a name="line.2147"></a>
+<span class="sourceLineNo">2148</span>          //<a name="line.2148"></a>
+<span class="sourceLineNo">2149</span>          // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2149"></a>
+<span class="sourceLineNo">2150</span>          // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2150"></a>
+<span class="sourceLineNo">2151</span>          ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2151"></a>
+<span class="sourceLineNo">2152</span>          submitProcedure(<a name="line.2152"></a>
+<span class="sourceLineNo">2153</span>            new CreateTableProcedure(procedureExecutor.getEnvironment(), desc, newRegions, latch));<a name="line.2153"></a>
+<span class="sourceLineNo">2154</span>          latch.await();<a name="line.2154"></a>
+<span class="sourceLineNo">2155</span><a name="line.2155"></a>
+<span class="sourceLineNo">2156</span>          getMaster().getMasterCoprocessorHost().postCreateTable(desc, newRegions);<a name="line.2156"></a>
+<span class="sourceLineNo">2157</span>        }<a name="line.2157"></a>
+<span class="sourceLineNo">2158</span><a name="line.2158"></a>
+<span class="sourceLineNo">2159</span>        @Override<a name="line.2159"></a>
+<span class="sourceLineNo">2160</span>        protected String getDescription() {<a name="line.2160"></a>
+<span class="sourceLineNo">2161</span>          return "CreateTableProcedure";<a name="line.2161"></a>
+<span class="sourceLineNo">2162</span>        }<a name="line.2162"></a>
+<span class="sourceLineNo">2163</span>      });<a name="line.2163"></a>
+<span class="sourceLineNo">2164</span>  }<a name="line.2164"></a>
+<span class="sourceLineNo">2165</span><a name="line.2165"></a>
+<span class="sourceLineNo">2166</span>  @Override<a name="line.2166"></a>
+<span class="sourceLineNo">2167</span>  public long createSystemTable(final TableDescriptor tableDescriptor) throws IOException {<a name="line.2167"></a>
+<span class="sourceLineNo">2168</span>    if (isStopped()) {<a name="line.2168"></a>
+<span class="sourceLineNo">2169</span>      throw new MasterNotRunningException();<a name="line.2169"></a>
+<span class="sourceLineNo">2170</span>    }<a name="line.2170"></a>
+<span class="sourceLineNo">2171</span><a name="line.2171"></a>
+<span class="sourceLineNo">2172</span>    TableName tableName = tableDescriptor.getTableName();<a name="line.2172"></a>
+<span class="sourceLineNo">2173</span>    if (!(tableName.isSystemTable())) {<a name="line.2173"></a>
+<span class="sourceLineNo">2174</span>      throw new IllegalArgumentException(<a name="line.2174"></a>
+<span class="sourceLineNo">2175</span>        "Only system table creation can use this createSystemTable API");<a name="line.2175"></a>
+<span class="sourceLineNo">2176</span>    }<a name="line.2176"></a>
+<span class="sourceLineNo">2177</span><a name="line.2177"></a>
+<span class="sourceLineNo">2178</span>    RegionInfo[] newRegions = ModifyRegionUtils.createRegionInfos(tableDescriptor, null);<a name="line.2178"></a>
+<span class="sourceLineNo">2179</span><a name="line.2179"></a>
+<span class="sourceLineNo">2180</span>    LOG.info(getClientIdAuditPrefix() + " create " + tableDescriptor);<a name="line.2180"></a>
+<span class="sourceLineNo">2181</span><a name="line.2181"></a>
+<span class="sourceLineNo">2182</span>    // This special create table is called locally to master.  Therefore, no RPC means no need<a name="line.2182"></a>
+<span class="sourceLineNo">2183</span>    // to use nonce to detect duplicated RPC call.<a name="line.2183"></a>
+<span class="sourceLineNo">2184</span>    long procId = this.procedureExecutor.submitProcedure(<a name="line.2184"></a>
+<span class="sourceLineNo">2185</span>      new CreateTableProcedure(procedureExecutor.getEnvironment(), tableDescriptor, newRegions));<a name="line.2185"></a>
+<span class="sourceLineNo">2186</span><a name="line.2186"></a>
+<span class="sourceLineNo">2187</span>    return procId;<a name="line.2187"></a>
+<span class="sourceLineNo">2188</span>  }<a name="line.2188"></a>
+<span class="sourceLineNo">2189</span><a name="line.2189"></a>
+<span class="sourceLineNo">2190</span>  private void startActiveMasterManager(int infoPort) throws KeeperException {<a name="line.2190"></a>
+<span class="sourceLineNo">2191</span>    String backupZNode = ZNodePaths.joinZNode(<a name="line.2191"></a>
+<span class="sourceLineNo">2192</span>      zooKeeper.getZNodePaths().backupMasterAddressesZNode, serverName.toString());<a name="line.2192"></a>
+<span class="sourceLineNo">2193</span>    /*<a name="line.2193"></a>
+<span class="sourceLineNo">2194</span>    * Add a ZNode for ourselves in the backup master directory since we<a name="line.2194"></a>
+<span class="sourceLineNo">2195</span>    * may not become the active master. If so, we want the actual active<a name="line.2195"></a>
+<span class="sourceLineNo">2196</span>    * master to know we are backup masters, so that it won't assign<a name="line.2196"></a>
+<span class="sourceLineNo">2197</span>    * regions to us if so configured.<a name="line.2197"></a>
+<span class="sourceLineNo">2198</span>    *<a name="line.2198"></a>
+<span class="sourceLineNo">2199</span>    * If we become the active master later, ActiveMasterManager will delete<a name="line.2199"></a>
+<span class="sourceLineNo">2200</span>    * this node explicitly.  If we crash before then, ZooKeeper will delete<a name="line.2200"></a>
+<span class="sourceLineNo">2201</span>    * this node for us since it is ephemeral.<a name="line.2201"></a>
+<span class="sourceLineNo">2202</span>    */<a name="line.2202"></a>
+<span class="sourceLineNo">2203</span>    LOG.info("Adding backup master ZNode " + backupZNode);<a name="line.2203"></a>
+<span class="sourceLineNo">2204</span>    if (!MasterAddressTracker.setMasterAddress(zooKeeper, backupZNode, serverName, infoPort)) {<a name="line.2204"></a>
+<span class="sourceLineNo">2205</span>      LOG.warn("Failed create of " + backupZNode + " by " + serverName);<a name="line.2205"></a>
+<span class="sourceLineNo">2206</span>    }<a name="line.2206"></a>
+<span class="sourceLineNo">2207</span>    this.activeMasterManager.setInfoPort(infoPort);<a name="line.2207"></a>
+<span class="sourceLineNo">2208</span>    int timeout = conf.getInt(HConstants.ZK_SESSION_TIMEOUT, HConstants.DEFAULT_ZK_SESSION_TIMEOUT);<a name="line.2208"></a>
+<span class="sourceLineNo">2209</span>    // If we're a backup master, stall until a primary to write this address<a name="line.2209"></a>
+<span class="sourceLineNo">2210</span>    if (conf.getBoolean(HConstants.MASTER_TYPE_BACKUP, HConstants.DEFAULT_MASTER_TYPE_BACKUP)) {<a name="line.2210"></a>
+<span class="sourceLineNo">2211</span>      LOG.debug("HMaster started in backup mode. Stalling until master znode is written.");<a name="line.2211"></a>
+<span class="sourceLineNo">2212</span>      // This will only be a minute or so while the cluster starts up,<a name="line.2212"></a>
+<span class="sourceLineNo">2213</span>      // so don't worry about setting watches on the parent znode<a name="line.2213"></a>
+<span class="sourceLineNo">2214</span>      while (!activeMasterManager.hasActiveMaster()) {<a name="line.2214"></a>
+<span class="sourceLineNo">2215</span>        LOG.debug("Waiting for master address and cluster state znode to be written.");<a name="line.2215"></a>
+<span class="sourceLineNo">2216</span>        Threads.sleep(timeout);<a name="line.2216"></a>
+<span class="sourceLineNo">2217</span>      }<a name="line.2217"></a>
+<span class="sourceLineNo">2218</span>    }<a name="line.2218"></a>
+<span class="sourceLineNo">2219</span>    MonitoredTask status = TaskMonitor.get().createStatus("Master startup");<a name="line.2219"></a>
+<span class="sourceLineNo">2220</span>    status.setDescription("Master startup");<a name="line.2220"></a>
+<span class="sourceLineNo">2221</span>    try {<a name="line.2221"></a>
+<span class="sourceLineNo">2222</span>      if (activeMasterManager.blockUntilBecomingActiveMaster(timeout, status)) {<a name="line.2222"></a>
+<span class="sourceLineNo">2223</span>        finishActiveMasterInitialization(status);<a name="line.2223"></a>
+<span class="sourceLineNo">2224</span>      }<a name="line.2224"></a>
+<span class="sourceLineNo">2225</span>    } catch (Throwable t) {<a name="line.2225"></a>
+<span class="sourceLineNo">2226</span>      status.setStatus("Failed to become active: " + t.getMessage());<a name="line.2226"></a>
+<span class="sourceLineNo">2227</span>      LOG.error(HBaseMarkers.FATAL, "Failed to become active master", t);<a name="line.2227"></a>
+<span class="sourceLineNo">2228</span>      // HBASE-5680: Likely hadoop23 vs hadoop 20.x/1.x incompatibility<a name="line.2228"></a>
+<span class="sourceLineNo">2229</span>      if (t instanceof NoClassDefFoundError &amp;&amp; t.getMessage().<a name="line.2229"></a>
+<span class="sourceLineNo">2230</span>          contains("org/apache/hadoop/hdfs/protocol/HdfsConstants$SafeModeAction")) {<a name="line.2230"></a>
+<span class="sourceLineNo">2231</span>        // improved error message for this special case<a name="line.2231"></a>
+<span class="sourceLineNo">2232</span>        abort("HBase is having a problem with its Hadoop jars.  You may need to recompile " +<a name="line.2232"></a>
+<span class="sourceLineNo">2233</span>          "HBase against Hadoop version " + org.apache.hadoop.util.VersionInfo.getVersion() +<a name="line.2233"></a>
+<span class="sourceLineNo">2234</span>          " or change your hadoop jars to start properly", t);<a name="line.2234"></a>
+<span class="sourceLineNo">2235</span>      } else {<a name="line.2235"></a>
+<span class="sourceLineNo">2236</span>        abort("Unhandled exception. Starting shutdown.", t);<a name="line.2236"></a>
+<span class="sourceLineNo">2237</span>      }<a name="line.2237"></a>
+<span class="sourceLineNo">2238</span>    } finally {<a name="line.2238"></a>
+<span class="sourceLineNo">2239</span>      status.cleanup();<a name="line.2239"></a>
+<span class="sourceLineNo">2240</span>    }<a name="line.2240"></a>
+<span class="sourceLineNo">2241</span>  }<a name="line.2241"></a>
+<span class="sourceLineNo">2242</span><a name="line.2242"></a>
+<span class="sourceLineNo">2243</span>  private static boolean isCatalogTable(final TableName tableName) {<a name="line.2243"></a>
+<span class="sourceLineNo">2244</span>    return tableName.equals(TableName.META_TABLE_NAME);<a name="line.2244"></a>
+<span class="sourceLineNo">2245</span>  }<a name="line.2245"></a>
+<span class="sourceLineNo">2246</span><a name="line.2246"></a>
+<span class="sourceLineNo">2247</span>  @Override<a name="line.2247"></a>
+<span class="sourceLineNo">2248</span>  public long deleteTable(<a name="line.2248"></a>
+<span class="sourceLineNo">2249</span>      final TableName tableName,<a name="line.2249"></a>
+<span class="sourceLineNo">2250</span>      final long nonceGroup,<a name="line.2250"></a>
+<span class="sourceLineNo">2251</span>      final long nonce) throws IOException {<a name="line.2251"></a>
+<span class="sourceLineNo">2252</span>    checkInitialized();<a name="line.2252"></a>
+<span class="sourceLineNo">2253</span><a name="line.2253"></a>
+<span class="sourceLineNo">2254</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2254"></a>
+<span class="sourceLineNo">2255</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2255"></a>
+<span class="sourceLineNo">2256</span>      @Override<a name="line.2256"></a>
+<span class="sourceLineNo">2257</span>      protected void run() throws IOException {<a name="line.2257"></a>
+<span class="sourceLineNo">2258</span>        getMaster().getMasterCoprocessorHost().preDeleteTable(tableName);<a name="line.2258"></a>
+<span class="sourceLineNo">2259</span><a name="line.2259"></a>
+<span class="sourceLineNo">2260</span>        LOG.info(getClientIdAuditPrefix() + " delete " + tableName);<a name="line.2260"></a>
+<span class="sourceLineNo">2261</span><a name="line.2261"></a>
+<span class="sourceLineNo">2262</span>        // TODO: We can handle/merge duplicate request<a name="line.2262"></a>
+<span class="sourceLineNo">2263</span>        //<a name="line.2263"></a>
+<span class="sourceLineNo">2264</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2264"></a>
+<span class="sourceLineNo">2265</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2265"></a>
+<span class="sourceLineNo">2266</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2266"></a>
+<span class="sourceLineNo">2267</span>        submitProcedure(new DeleteTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2267"></a>
+<span class="sourceLineNo">2268</span>            tableName, latch));<a name="line.2268"></a>
+<span class="sourceLineNo">2269</span>        latch.await();<a name="line.2269"></a>
+<span class="sourceLineNo">2270</span><a name="line.2270"></a>
+<span class="sourceLineNo">2271</span>        getMaster().getMasterCoprocessorHost().postDeleteTable(tableName);<a name="line.2271"></a>
+<span class="sourceLineNo">2272</span>      }<a name="line.2272"></a>
+<span class="sourceLineNo">2273</span><a name="line.2273"></a>
+<span class="sourceLineNo">2274</span>      @Override<a name="line.2274"></a>
+<span class="sourceLineNo">2275</span>      protected String getDescription() {<a name="line.2275"></a>
+<span class="sourceLineNo">2276</span>        return "DeleteTableProcedure";<a name="line.2276"></a>
+<span class="sourceLineNo">2277</span>      }<a name="line.2277"></a>
+<span class="sourceLineNo">2278</span>    });<a name="line.2278"></a>
+<span class="sourceLineNo">2279</span>  }<a name="line.2279"></a>
+<span class="sourceLineNo">2280</span><a name="line.2280"></a>
+<span class="sourceLineNo">2281</span>  @Override<a name="line.2281"></a>
+<span class="sourceLineNo">2282</span>  public long truncateTable(<a name="line.2282"></a>
+<span class="sourceLineNo">2283</span>      final TableName tableName,<a name="line.2283"></a>
+<span class="sourceLineNo">2284</span>      final boolean preserveSplits,<a name="line.2284"></a>
+<span class="sourceLineNo">2285</span>      final long nonceGroup,<a name="line.2285"></a>
+<span class="sourceLineNo">2286</span>      final long nonce) throws IOException {<a name="line.2286"></a>
+<span class="sourceLineNo">2287</span>    checkInitialized();<a name="line.2287"></a>
+<span class="sourceLineNo">2288</span><a name="line.2288"></a>
+<span class="sourceLineNo">2289</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2289"></a>
+<span class="sourceLineNo">2290</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2290"></a>
+<span class="sourceLineNo">2291</span>      @Override<a name="line.2291"></a>
+<span class="sourceLineNo">2292</span>      protected void run() throws IOException {<a name="line.2292"></a>
+<span class="sourceLineNo">2293</span>        getMaster().getMasterCoprocessorHost().preTruncateTable(tableName);<a name="line.2293"></a>
+<span class="sourceLineNo">2294</span><a name="line.2294"></a>
+<span class="sourceLineNo">2295</span>        LOG.info(getClientIdAuditPrefix() + " truncate " + tableName);<a name="line.2295"></a>
+<span class="sourceLineNo">2296</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createLatch(2, 0);<a name="line.2296"></a>
+<span class="sourceLineNo">2297</span>        submitProcedure(new TruncateTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2297"></a>
+<span class="sourceLineNo">2298</span>            tableName, preserveSplits, latch));<a name="line.2298"></a>
+<span class="sourceLineNo">2299</span>        latch.await();<a name="line.2299"></a>
+<span class="sourceLineNo">2300</span><a name="line.2300"></a>
+<span class="sourceLineNo">2301</span>        getMaster().getMasterCoprocessorHost().postTruncateTable(tableName);<a name="line.2301"></a>
+<span class="sourceLineNo">2302</span>      }<a name="line.2302"></a>
+<span class="sourceLineNo">2303</span><a name="line.2303"></a>
+<span class="sourceLineNo">2304</span>      @Override<a name="line.2304"></a>
+<span class="sourceLineNo">2305</span>      protected String getDescription() {<a name="line.2305"></a>
+<span class="sourceLineNo">2306</span>        return "TruncateTableProcedure";<a name="line.2306"></a>
+<span class="sourceLineNo">2307</span>      }<a name="line.2307"></a>
+<span class="sourceLineNo">2308</span>    });<a name="line.2308"></a>
+<span class="sourceLineNo">2309</span>  }<a name="line.2309"></a>
+<span class="sourceLineNo">2310</span><a name="line.2310"></a>
+<span class="sourceLineNo">2311</span>  @Override<a name="line.2311"></a>
+<span class="sourceLineNo">2312</span>  public long addColumn(final TableName tableName, final ColumnFamilyDescriptor column,<a name="line.2312"></a>
+<span class="sourceLineNo">2313</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2313"></a>
+<span class="sourceLineNo">2314</span>    checkInitialized();<a name="line.2314"></a>
+<span class="sourceLineNo">2315</span>    checkTableExists(tableName);<a name="line.2315"></a>
+<span class="sourceLineNo">2316</span><a name="line.2316"></a>
+<span class="sourceLineNo">2317</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2317"></a>
+<span class="sourceLineNo">2318</span><a name="line.2318"></a>
+<span class="sourceLineNo">2319</span>      @Override<a name="line.2319"></a>
+<span class="sourceLineNo">2320</span>      public TableDescriptor get() throws IOException {<a name="line.2320"></a>
+<span class="sourceLineNo">2321</span>        TableDescriptor old = getTableDescriptors().get(tableName);<a name="line.2321"></a>
+<span class="sourceLineNo">2322</span>        if (old.hasColumnFamily(column.getName())) {<a name="line.2322"></a>
+<span class="sourceLineNo">2323</span>          throw new InvalidFamilyOperationException("Column family '" + column.getNameAsString()<a name="line.2323"></a>
+<span class="sourceLineNo">2324</span>              + "' in table '" + tableName + "' already exists so cannot be added");<a name="line.2324"></a>
+<span class="sourceLineNo">2325</span>        }<a name="line.2325"></a>
+<span class="sourceLineNo">2326</span><a name="line.2326"></a>
+<span class="sourceLineNo">2327</span>        return TableDescriptorBuilder.newBuilder(old).setColumnFamily(column).build();<a name="line.2327"></a>
+<span class="sourceLineNo">2328</span>      }<a name="line.2328"></a>
+<span class="sourceLineNo">2329</span>    }, nonceGroup, nonce, true);<a name="line.2329"></a>
+<span class="sourceLineNo">2330</span>  }<a name="line.2330"></a>
+<span class="sourceLineNo">2331</span><a name="line.2331"></a>
+<span class="sourceLineNo">2332</span>  /**<a name="line.2332"></a>
+<span class="sourceLineNo">2333</span>   * Implement to return TableDescriptor after pre-checks<a name="line.2333"></a>
+<span class="sourceLineNo">2334</span>   */<a name="line.2334"></a>
+<span class="sourceLineNo">2335</span>  protected interface TableDescriptorGetter {<a name="line.2335"></a>
+<span class="sourceLineNo">2336</span>    TableDescriptor get() throws IOException;<a name="line.2336"></a>
+<span class="sourceLineNo">2337</span>  }<a name="line.2337"></a>
+<span class="sourceLineNo">2338</span><a name="line.2338"></a>
+<span class="sourceLineNo">2339</span>  @Override<a name="line.2339"></a>
+<span class="sourceLineNo">2340</span>  public long modifyColumn(final TableName tableName, final ColumnFamilyDescriptor descriptor,<a name="line.2340"></a>
+<span class="sourceLineNo">2341</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2341"></a>
+<span class="sourceLineNo">2342</span>    checkInitialized();<a name="line.2342"></a>
+<span class="sourceLineNo">2343</span>    checkTableExists(tableName);<a name="line.2343"></a>
+<span class="sourceLineNo">2344</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2344"></a>
+<span class="sourceLineNo">2345</span><a name="line.2345"></a>
+<span class="sourceLineNo">2346</span>      @Override<a name="line.2346"></a>
+<span class="sourceLineNo">2347</span>      public TableDescriptor get() throws IOException {<a name="line.2347"></a>
+<span class="sourceLineNo">2348</span>        TableDescriptor old = getTableDescriptors().get(tableName);<a name="line.2348"></a>
+<span class="sourceLineNo">2349</span>        if (!old.hasColumnFamily(descriptor.getName())) {<a name="line.2349"></a>
+<span class="sourceLineNo">2350</span>          throw new InvalidFamilyOperationException("Family '" + descriptor.getNameAsString()<a name="line.2350"></a>
+<span class="sourceLineNo">2351</span>              + "' does not exist, so it cannot be modified");<a name="line.2351"></a>
+<span class="sourceLineNo">2352</span>        }<a name="line.2352"></a>
+<span class="sourceLineNo">2353</span><a name="line.2353"></a>
+<span class="sourceLineNo">2354</span>        return TableDescriptorBuilder.newBuilder(old).modifyColumnFamily(descriptor).build();<a name="line.2354"></a>
+<span class="sourceLineNo">2355</span>      }<a name="line.2355"></a>
+<span class="sourceLineNo">2356</span>    }, nonceGroup, nonce, true);<a name="line.2356"></a>
+<span class="sourceLineNo">2357</span>  }<a name="line.2357"></a>
+<span class="sourceLineNo">2358</span><a name="line.2358"></a>
+<span class="sourceLineNo">2359</span>  @Override<a name="line.2359"></a>
+<span class="sourceLineNo">2360</span>  public long deleteColumn(final TableName tableName, final byte[] columnName,<a name="line.2360"></a>
+<span class="sourceLineNo">2361</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2361"></a>
+<span class="sourceLineNo">2362</span>    checkInitialized();<a name="line.2362"></a>
+<span class="sourceLineNo">2363</span>    checkTableExists(tableName);<a name="line.2363"></a>
+<span class="sourceLineNo">2364</span><a name="line.2364"></a>
+<span class="sourceLineNo">2365</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2365"></a>
+<span class="sourceLineNo">2366</span><a name="line.2366"></a>
+<span class="sourceLineNo">2367</span>      @Override<a name="line.2367"></a>
+<span class="sourceLineNo">2368</span>      public TableDescriptor get() throws IOException {<a name="line.2368"></a>
+<span class="sourceLineNo">2369</span>        TableDescriptor old = getTableDescriptors().get(tableName);<a name="line.2369"></a>
+<span class="sourceLineNo">2370</span><a name="line.2370"></a>
+<span class="sourceLineNo">2371</span>        if (!old.hasColumnFamily(columnName)) {<a name="line.2371"></a>
+<span class="sourceLineNo">2372</span>          throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName)<a name="line.2372"></a>
+<span class="sourceLineNo">2373</span>              + "' does not exist, so it cannot be deleted");<a name="line.2373"></a>
+<span class="sourceLineNo">2374</span>        }<a name="line.2374"></a>
+<span class="sourceLineNo">2375</span>        if (old.getColumnFamilyCount() == 1) {<a name="line.2375"></a>
+<span class="sourceLineNo">2376</span>          throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName)<a name="line.2376"></a>
+<span class="sourceLineNo">2377</span>              + "' is the only column family in the table, so it cannot be deleted");<a name="line.2377"></a>
+<span class="sourceLineNo">2378</span>        }<a name="line.2378"></a>
+<span class="sourceLineNo">2379</span>        return TableDescriptorBuilder.newBuilder(old).removeColumnFamily(columnName).build();<a name="line.2379"></a>
+<span class="sourceLineNo">2380</span>      }<a name="line.2380"></a>
+<span class="sourceLineNo">2381</span>    }, nonceGroup, nonce, true);<a name="line.2381"></a>
+<span class="sourceLineNo">2382</span>  }<a name="line.2382"></a>
+<span class="sourceLineNo">2383</span><a name="line.2383"></a>
+<span class="sourceLineNo">2384</span>  @Override<a name="line.2384"></a>
+<span class="sourceLineNo">2385</span>  public long enableTable(final TableName tableName, final long nonceGroup, final long nonce)<a name="line.2385"></a>
+<span class="sourceLineNo">2386</span>      throws IOException {<a name="line.2386"></a>
+<span class="sourceLineNo">2387</span>    checkInitialized();<a name="line.2387"></a>
+<span class="sourceLineNo">2388</span><a name="line.2388"></a>
+<span class="sourceLineNo">2389</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2389"></a>
+<span class="sourceLineNo">2390</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2390"></a>
+<span class="sourceLineNo">2391</span>      @Override<a name="line.2391"></a>
+<span class="sourceLineNo">2392</span>      protected void run() throws IOException {<a name="line.2392"></a>
+<span class="sourceLineNo">2393</span>        getMaster().getMasterCoprocessorHost().preEnableTable(tableName);<a name="line.2393"></a>
+<span class="sourceLineNo">2394</span><a name="line.2394"></a>
+<span class="sourceLineNo">2395</span>        // Normally, it would make sense for this authorization check to exist inside<a name="line.2395"></a>
+<span class="sourceLineNo">2396</span>        // AccessController, but because the authorization check is done based on internal state<a name="line.2396"></a>
+<span class="sourceLineNo">2397</span>        // (rather than explicit permissions) we'll do the check here instead of in the<a name="line.2397"></a>
+<span class="sourceLineNo">2398</span>        // coprocessor.<a name="line.2398"></a>
+<span class="sourceLineNo">2399</span>        MasterQuotaManager quotaManager = getMasterQuotaManager();<a name="line.2399"></a>
+<span class="sourceLineNo">2400</span>        if (quotaManager != null) {<a name="line.2400"></a>
+<span class="sourceLineNo">2401</span>          if (quotaManager.isQuotaInitialized()) {<a name="line.2401"></a>
+<span class="sourceLineNo">2402</span>              SpaceQuotaSnapshot currSnapshotOfTable =<a name="line.2402"></a>
+<span class="sourceLineNo">2403</span>                  QuotaTableUtil.getCurrentSnapshotFromQuotaTable(getConnection(), tableName);<a name="line.2403"></a>
+<span class="sourceLineNo">2404</span>              if (currSnapshotOfTable != null) {<a name="line.2404"></a>
+<span class="sourceLineNo">2405</span>                SpaceQuotaStatus quotaStatus = currSnapshotOfTable.getQuotaStatus();<a name="line.2405"></a>
+<span class="sourceLineNo">2406</span>                if (quotaStatus.isInViolation()<a name="line.2406"></a>
+<span class="sourceLineNo">2407</span>                    &amp;&amp; SpaceViolationPolicy.DISABLE == quotaStatus.getPolicy().orElse(null)) {<a name="line.2407"></a>
+<span class="sourceLineNo">2408</span>                throw new AccessDeniedException("Enabling the table '" + tableName<a name="line.2408"></a>
+<span class="sourceLineNo">2409</span>                    + "' is disallowed due to a violated space quota.");<a name="line.2409"></a>
+<span class="sourceLineNo">2410</span>              }<a name="line.2410"></a>
+<span class="sourceLineNo">2411</span>            }<a name="line.2411"></a>
+<span class="sourceLineNo">2412</span>          } else if (LOG.isTraceEnabled()) {<a name="line.2412"></a>
+<span class="sourceLineNo">2413</span>            LOG.trace("Unable to check for space quotas as the MasterQuotaManager is not enabled");<a name="line.2413"></a>
+<span class="sourceLineNo">2414</span>          }<a name="line.2414"></a>
+<span class="sourceLineNo">2415</span>        }<a name="line.2415"></a>
+<span class="sourceLineNo">2416</span><a name="line.2416"></a>
+<span class="sourceLineNo">2417</span>        LOG.info(getClientIdAuditPrefix() + " enable " + tableName);<a name="line.2417"></a>
+<span class="sourceLineNo">2418</span><a name="line.2418"></a>
+<span class="sourceLineNo">2419</span>        // Execute the operation asynchronously - client will check the progress of the operation<a name="line.2419"></a>
+<span class="sourceLineNo">2420</span>        // In case the request is from a &lt;1.1 client before returning,<a name="line.2420"></a>
+<span class="sourceLineNo">2421</span>        // we want to make sure that the table is prepared to be<a name="line.2421"></a>
+<span class="sourceLineNo">2422</span>        // enabled (the table is locked and the table state is set).<a name="line.2422"></a>
+<span class="sourceLineNo">2423</span>        // Note: if the procedure throws exception, we will catch it and rethrow.<a name="line.2423"></a>
+<span class="sourceLineNo">2424</span>        final ProcedurePrepareLatch prepareLatch = ProcedurePrepareLatch.createLatch();<a name="line.2424"></a>
+<span class="sourceLineNo">2425</span>        submitProcedure(new EnableTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2425"></a>
+<span class="sourceLineNo">2426</span>            tableName, prepareLatch));<a name="line.2426"></a>
+<span class="sourceLineNo">2427</span>        prepareLatch.await();<a name="line.2427"></a>
+<span class="sourceLineNo">2428</span><a name="line.2428"></a>
+<span class="sourceLineNo">2429</span>        getMaster().getMasterCoprocessorHost().postEnableTable(tableName);<a name="line.2429"></a>
+<span class="sourceLineNo">2430</span>      }<a name="line.2430"></a>
+<span class="sourceLineNo">2431</span><a name="line.2431"></a>
+<span class="sourceLineNo">2432</span>      @Override<a name="line.2432"></a>
+<span class="sourceLineNo">2433</span>      protected String getDescription() {<a name="line.2433"></a>
+<span class="sourceLineNo">2434</span>        return "EnableTableProcedure";<a name="line.2434"></a>
+<span class="sourceLineNo">2435</span>      }<a name="line.2435"></a>
+<span class="sourceLineNo">2436</span>    });<a name="line.2436"></a>
+<span class="sourceLineNo">2437</span>  }<a name="line.2437"></a>
+<span class="sourceLineNo">2438</span><a name="line.2438"></a>
+<span class="sourceLineNo">2439</span>  @Override<a name="line.2439"></a>
+<span class="sourceLineNo">2440</span>  public long disableTable(final TableName tableName, final long nonceGroup, final long nonce)<a name="line.2440"></a>
+<span class="sourceLineNo">2441</span>      throws IOException {<a name="line.2441"></a>
+<span class="sourceLineNo">2442</span>    checkInitialized();<a name="line.2442"></a>
+<span class="sourceLineNo">2443</span><a name="line.2443"></a>
+<span class="sourceLineNo">2444</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2444"></a>
+<span class="sourceLineNo">2445</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2445"></a>
+<span class="sourceLineNo">2446</span>      @Override<a name="line.2446"></a>
+<span class="sourceLineNo">2447</span>      protected void run() throws IOException {<a name="line.2447"></a>
+<span class="sourceLineNo">2448</span>        getMaster().getMasterCoprocessorHost().preDisableTable(tableName);<a name="line.2448"></a>
+<span class="sourceLineNo">2449</span><a name="line.2449"></a>
+<span class="sourceLineNo">2450</span>        LOG.info(getClientIdAuditPrefix() + " disable " + tableName);<a name="line.2450"></a>
+<span class="sourceLineNo">2451</span><a name="line.2451"></a>
+<span class="sourceLineNo">2452</span>        // Execute the operation asynchronously - client will check the progress of the operation<a name="line.2452"></a>
+<span class="sourceLineNo">2453</span>        // In case the request is from a &lt;1.1 client before returning,<a name="line.2453"></a>
+<span class="sourceLineNo">2454</span>        // we want to make sure that the table is prepared to be<a name="line.2454"></a>
+<span class="sourceLineNo">2455</span>        // enabled (the table is locked and the table state is set).<a name="line.2455"></a>
+<span class="sourceLineNo">2456</span>        // Note: if the procedure throws exception, we will catch it and rethrow.<a name="line.2456"></a>
+<span class="sourceLineNo">2457</span>        //<a name="line.2457"></a>
+<span class="sourceLineNo">2458</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2458"></a>
+<span class="sourceLineNo">2459</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2459"></a>
+<span class="sourceLineNo">2460</span>        final ProcedurePrepareLatch prepareLatch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2460"></a>
+<span class="sourceLineNo">2461</span>        submitProcedure(new DisableTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2461"></a>
+<span class="sourceLineNo">2462</span>            tableName, false, prepareLatch));<a name="line.2462"></a>
+<span class="sourceLineNo">2463</span>        prepareLatch.await();<a name="line.2463"></a>
+<span class="sourceLineNo">2464</span><a name="line.2464"></a>
+<span class="sourceLineNo">2465</span>        getMaster().getMasterCoprocessorHost().postDisableTable(tableName);<a name="line.2465"></a>
+<span class="sourceLineNo">2466</span>      }<a name="line.2466"></a>
+<span class="sourceLineNo">2467</span><a name="line.2467"></a>
+<span class="sourceLineNo">2468</span>      @Override<a name="line.2468"></a>
+<span class="sourceLineNo">2469</span>      protected String getDescription() {<a name="line.2469"></a>
+<span class="sourceLineNo">2470</span>        return "DisableTableProcedure";<a name="line.2470"></a>
+<span class="sourceLineNo">2471</span>      }<a name="line.2471"></a>
+<span class="sourceLineNo">2472</span>    });<a name="line.2472"></a>
+<span class="sourceLineNo">2473</span>  }<a name="line.2473"></a>
+<span class="sourceLineNo">2474</span><a name="line.2474"></a>
+<span class="sourceLineNo">2475</span>  private long modifyTable(final TableName tableName,<a name="line.2475"></a>
+<span class="sourceLineNo">2476</span>      final TableDescriptorGetter newDescriptorGetter, final long nonceGroup, final long nonce,<a name="line.2476"></a>
+<span class="sourceLineNo">2477</span>      final boolean shouldCheckDescriptor) throws IOException {<a name="line.2477"></a>
+<span class="sourceLineNo">2478</span>    return MasterProcedureUtil<a name="line.2478"></a>
+<span class="sourceLineNo">2479</span>        .submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2479"></a>
+<span class="sourceLineNo">2480</span>          @Override<a name="line.2480"></a>
+<span class="sourceLineNo">2481</span>          protected void run() throws IOException {<a name="line.2481"></a>
+<span class="sourceLineNo">2482</span>            TableDescriptor oldDescriptor = getMaster().getTableDescriptors().get(tableName);<a name="line.2482"></a>
+<span class="sourceLineNo">2483</span>            TableDescriptor newDescriptor = getMaster().getMasterCoprocessorHost()<a name="line.2483"></a>
+<span class="sourceLineNo">2484</span>                .preModifyTable(tableName, oldDescriptor, newDescriptorGetter.get());<a name="line.2484"></a>
+<span class="sourceLineNo">2485</span>            TableDescriptorChecker.sanityCheck(conf, newDescriptor);<a name="line.2485"></a>
+<span class="sourceLineNo">2486</span>            LOG.info("{} modify table {} from {} to {}", getClientIdAuditPrefix(), tableName,<a name="line.2486"></a>
+<span class="sourceLineNo">2487</span>                oldDescriptor, newDescriptor);<a name="line.2487"></a>
+<span class="sourceLineNo">2488</span><a name="line.2488"></a>
+<span class="sourceLineNo">2489</span>            // Execute the operation synchronously - wait for the operation completes before<a name="line.2489"></a>
+<span class="sourceLineNo">2490</span>            // continuing.<a name="line.2490"></a>
+<span class="sourceLineNo">2491</span>            //<a name="line.2491"></a>
+<span class="sourceLineNo">2492</span>            // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2492"></a>
+<span class="sourceLineNo">2493</span>            // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2493"></a>
+<span class="sourceLineNo">2494</span>            ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2494"></a>
+<span class="sourceLineNo">2495</span>            submitProcedure(new ModifyTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2495"></a>
+<span class="sourceLineNo">2496</span>                newDescriptor, latch, oldDescriptor, shouldCheckDescriptor));<a name="line.2496"></a>
+<span class="sourceLineNo">2497</span>            latch.await();<a name="line.2497"></a>
+<span class="sourceLineNo">2498</span><a name="line.2498"></a>
+<span class="sourceLineNo">2499</span>            getMaster().getMasterCoprocessorHost().postModifyTable(tableName, oldDescriptor,<a name="line.2499"></a>
+<span class="sourceLineNo">2500</span>              newDescriptor);<a name="line.2500"></a>
+<span class="sourceLineNo">2501</span>          }<a name="line.2501"></a>
+<span class="sourceLineNo">2502</span><a name="line.2502"></a>
+<span class="sourceLineNo">2503</span>          @Override<a name="line.2503"></a>
+<span class="sourceLineNo">2504</span>          protected String getDescription() {<a name="line.2504"></a>
+<span class="sourceLineNo">2505</span>            return "ModifyTableProcedure";<a name="line.2505"></a>
+<span class="sourceLineNo">2506</span>          }<a name="line.2506"></a>
+<span class="sourceLineNo">2507</span>        });<a name="line.2507"></a>
+<span class="sourceLineNo">2508</span><a name="line.2508"></a>
+<span class="sourceLineNo">2509</span>  }<a name="line.2509"></a>
+<span class="sourceLineNo">2510</span><a name="line.2510"></a>
+<span class="sourceLineNo">2511</span>  @Override<a name="line.2511"></a>
+<span class="sourceLineNo">2512</span>  public long modifyTable(final TableName tableName, final TableDescriptor newDescriptor,<a name="line.2512"></a>
+<span class="sourceLineNo">2513</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2513"></a>
+<span class="sourceLineNo">2514</span>    checkInitialized();<a name="line.2514"></a>
+<span class="sourceLineNo">2515</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2515"></a>
+<span class="sourceLineNo">2516</span>      @Override<a name="line.2516"></a>
+<span class="sourceLineNo">2517</span>      public TableDescriptor get() throws IOException {<a name="line.2517"></a>
+<span class="sourceLineNo">2518</span>        return newDescriptor;<a name="line.2518"></a>
+<span class="sourceLineNo">2519</span>      }<a name="line.2519"></a>
+<span class="sourceLineNo">2520</span>    }, nonceGroup, nonce, false);<a name="line.2520"></a>
+<span class="sourceLineNo">2521</span><a name="line.2521"></a>
+<span class="sourceLineNo">2522</span>  }<a name="line.2522"></a>
+<span class="sourceLineNo">2523</span><a name="line.2523"></a>
+<span class="sourceLineNo">2524</span>  public long restoreSnapshot(final SnapshotDescription snapshotDesc,<a name="line.2524"></a>
+<span class="sourceLineNo">2525</span>      final long nonceGroup, final long nonce, final boolean restoreAcl) throws IOException {<a name="line.2525"></a>
+<span class="sourceLineNo">2526</span>    checkInitialized();<a name="line.2526"></a>
+<span class="sourceLineNo">2527</span>    getSnapshotManager().checkSnapshotSupport();<a name="line.2527"></a>
+<span class="sourceLineNo">2528</span><a name="line.2528"></a>
+<span class="sourceLineNo">2529</span>    // Ensure namespace exists. Will throw exception if non-known NS.<a name="line.2529"></a>
+<span class="sourceLineNo">2530</span>    final TableName dstTable = TableName.valueOf(snapshotDesc.getTable());<a name="line.2530"></a>
+<span class="sourceLineNo">2531</span>    getClusterSchema().getNamespace(dstTable.getNamespaceAsString());<a name="line.2531"></a>
+<span class="sourceLineNo">2532</span><a name="line.2532"></a>
+<span class="sourceLineNo">2533</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2533"></a>
+<span class="sourceLineNo">2534</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2534"></a>
+<span class="sourceLineNo">2535</span>      @Override<a name="line.2535"></a>
+<span class="sourceLineNo">2536</span>      protected void run() throws IOException {<a name="line.2536"></a>
+<span class="sourceLineNo">2537</span>          setProcId(<a name="line.2537"></a>
+<span class="sourceLineNo">2538</span>            getSnapshotManager().restoreOrCloneSnapshot(snapshotDesc, getNonceKey(), restoreAcl));<a name="line.2538"></a>
+<span class="sourceLineNo">2539</span>      }<a name="line.2539"></a>
+<span class="sourceLineNo">2540</span><a name="line.2540"></a>
+<span class="sourceLineNo">2541</span>      @Override<a name="line.2541"></a>
+<span class="sourceLineNo">2542</span>      protected String getDescription() {<a name="line.2542"></a>
+<span class="sourceLineNo">2543</span>        return "RestoreSnapshotProcedure";<a name="line.2543"></a>
+<span class="sourceLineNo">2544</span>      }<a name="line.2544"></a>
+<span class="sourceLineNo">2545</span>    });<a name="line.2545"></a>
+<span class="sourceLineNo">2546</span>  }<a name="line.2546"></a>
+<span class="sourceLineNo">2547</span><a name="line.2547"></a>
+<span class="sourceLineNo">2548</span>  private void checkTableExists(final TableName tableName)<a name="line.2548"></a>
+<span class="sourceLineNo">2549</span>      throws IOException, TableNotFoundException {<a name="line.2549"></a>
+<span class="sourceLineNo">2550</span>    if (!MetaTableAccessor.tableExists(getConnection(), tableName)) {<a name="line.2550"></a>
+<span class="sourceLineNo">2551</span>      throw new TableNotFoundException(tableName);<a name="line.2551"></a>
+<span class="sourceLineNo">2552</span>    }<a name="line.2552"></a>
+<span class="sourceLineNo">2553</span>  }<a name="line.2553"></a>
+<span class="sourceLineNo">2554</span><a name="line.2554"></a>
+<span class="sourceLineNo">2555</span>  @Override<a name="line.2555"></a>
+<span class="sourceLineNo">2556</span>  public void checkTableModifiable(final TableName tableName)<a name="line.2556"></a>
+<span class="sourceLineNo">2557</span>      throws IOException, TableNotFoundException, TableNotDisabledException {<a name="line.2557"></a>
+<span class="sourceLineNo">2558</span>    if (isCatalogTable(tableName)) {<a name="line.2558"></a>
+<span class="sourceLineNo">2559</span>      throw new IOException("Can't modify catalog tables");<a name="line.2559"></a>
+<span class="sourceLineNo">2560</span>    }<a name="line.2560"></a>
+<span class="sourceLineNo">2561</span>    checkTableExists(tableName);<a name="line.2561"></a>
+<span class="sourceLineNo">2562</span>    TableState ts = getTableStateManager().getTableState(tableName);<a name="line.2562"></a>
+<span class="sourceLineNo">2563</span>    if (!ts.isDisabled()) {<a name="line.2563"></a>
+<span class="sourceLineNo">2564</span>      throw new TableNotDisabledException("Not DISABLED; " + ts);<a name="line.2564"></a>
+<span class="sourceLineNo">2565</span>    }<a name="line.2565"></a>
+<span class="sourceLineNo">2566</span>  }<a name="line.2566"></a>
+<span class="sourceLineNo">2567</span><a name="line.2567"></a>
+<span class="sourceLineNo">2568</span>  public ClusterMetrics getClusterMetricsWithoutCoprocessor() throws InterruptedIOException {<a name="line.2568"></a>
+<span class="sourceLineNo">2569</span>    return getClusterMetricsWithoutCoprocessor(EnumSet.allOf(Option.class));<a name="line.2569"></a>
+<span class="sourceLineNo">2570</span>  }<a name="line.2570"></a>
+<span class="sourceLineNo">2571</span><a name="line.2571"></a>
+<span class="sourceLineNo">2572</span>  public ClusterMetrics getClusterMetricsWithoutCoprocessor(EnumSet&lt;Option&gt; options)<a name="line.2572"></a>
+<span class="sourceLineNo">2573</span>      throws InterruptedIOException {<a name="line.2573"></a>
+<span class="sourceLineNo">2574</span>    ClusterMetricsBuilder builder = ClusterMetricsBuilder.newBuilder();<a name="line.2574"></a>
+<span class="sourceLineNo">2575</span>    // given that hbase1 can't submit the request with Option,<a name="line.2575"></a>
+<span class="sourceLineNo">2576</span>    // we return all information to client if the list of Option is empty.<a name="line.2576"></a>
+<span class="sourceLineNo">2577</span>    if (options.isEmpty()) {<a name="line.2577"></a>
+<span class="sourceLineNo">2578</span>      options = EnumSet.allOf(Option.class);<a name="line.2578"></a>
+<span class="sourceLineNo">2579</span>    }<a name="line.2579"></a>
+<span class="sourceLineNo">2580</span><a name="line.2580"></a>
+<span class="sourceLineNo">2581</span>    for (Option opt : options) {<a name="line.2581"></a>
+<span class="sourceLineNo">2582</span>      switch (opt) {<a name="line.2582"></a>
+<span class="sourceLineNo">2583</span>        case HBASE_VERSION: builder.setHBaseVersion(VersionInfo.getVersion()); break;<a name="line.2583"></a>
+<span class="sourceLineNo">2584</span>        case CLUSTER_ID: builder.setClusterId(getClusterId()); break;<a name="line.2584"></a>
+<span class="sourceLineNo">2585</span>        case MASTER: builder.setMasterName(getServerName()); break;<a name="line.2585"></a>
+<span class="sourceLineNo">2586</span>        case BACKUP_MASTERS: builder.setBackerMasterNames(getBackupMasters()); break;<a name="line.2586"></a>
+<span class="sourceLineNo">2587</span>        case LIVE_SERVERS: {<a name="line.2587"></a>
+<span class="sourceLineNo">2588</span>          if (serverManager != null) {<a name="line.2588"></a>
+<span class="sourceLineNo">2589</span>            builder.setLiveServerMetrics(serverManager.getOnlineServers().entrySet().stream()<a name="line.2589"></a>
+<span class="sourceLineNo">2590</span>              .collect(Collectors.toMap(e -&gt; e.getKey(), e -&gt; e.getValue())));<a name="line.2590"></a>
+<span class="sourceLineNo">2591</span>          }<a name="line.2591"></a>
+<span class="sourceLineNo">2592</span>          break;<a name="line.2592"></a>
+<span class="sourceLineNo">2593</span>        }<a name="line.2593"></a>
+<span class="sourceLineNo">2594</span>        case DEAD_SERVERS: {<a name="line.2594"></a>
+<span class="sourceLineNo">2595</span>          if (serverManager != null) {<a name="line.2595"></a>
+<span class="sourceLineNo">2596</span>            builder.setDeadServerNames(new ArrayList&lt;&gt;(<a name="line.2596"></a>
+<span class="sourceLineNo">2597</span>              serverManager.getDeadServers().copyServerNames()));<a name="line.2597"></a>
+<span class="sourceLineNo">2598</span>          }<a name="line.2598"></a>
+<span class="sourceLineNo">2599</span>          break;<a name="line.2599"></a>
+<span class="sourceLineNo">2600</span>        }<a name="line.2600"></a>
+<span class="sourceLineNo">2601</span>        case MASTER_COPROCESSORS: {<a name="line.2601"></a>
+<span class="sourceLineNo">2602</span>          if (cpHost != null) {<a name="line.2602"></a>
+<span class="sourceLineNo">2603</span>            builder.setMasterCoprocessorNames(Arrays.asList(getMasterCoprocessors()));<a name="line.2603"></a>
+<span class="sourceLineNo">2604</span>          }<a name="line.2604"></a>
+<span class="sourceLineNo">2605</span>          break;<a name="line.2605"></a>
+<span class="sourceLineNo">2606</span>        }<a name="line.2606"></a>
+<span class="sourceLineNo">2607</span>        case REGIONS_IN_TRANSITION: {<a name="line.2607"></a>
+<span class="sourceLineNo">2608</span>          if (assignmentManager != null) {<a name="line.2608"></a>
+<span class="sourceLineNo">2609</span>            builder.setRegionsInTransition(assignmentManager.getRegionStates()<a name="line.2609"></a>
+<span class="sourceLineNo">2610</span>                .getRegionsStateInTransition());<a name="line.2610"></a>
+<span class="sourceLineNo">2611</span>          }<a name="line.2611"></a>
+<span class="sourceLineNo">2612</span>          break;<a name="line.2612"></a>
+<span class="sourceLineNo">2613</span>        }<a name="line.2613"></a>
+<span class="sourceLineNo">2614</span>        case BALANCER_ON: {<a name="line.2614"></a>
+<span class="sourceLineNo">2615</span>          if (loadBalancerTracker != null) {<a name="line.2615"></a>
+<span class="sourceLineNo">2616</span>            builder.setBalancerOn(loadBalancerTracker.isBalancerOn());<a name="line.2616"></a>
+<span class="sourceLineNo">2617</span>          }<a name="line.2617"></a>
+<span class="sourceLineNo">2618</span>          break;<a name="line.2618"></a>
+<span class="sourceLineNo">2619</span>        }<a name="line.2619"></a>
+<span class="sourceLineNo">2620</span>        case MASTER_INFO_PORT: {<a name="line.2620"></a>
+<span class="sourceLineNo">2621</span>          if (infoServer != null) {<a name="line.2621"></a>
+<span class="sourceLineNo">2622</span>            builder.setMasterInfoPort(infoServer.getPort());<a name="line.2622"></a>
+<span class="sourceLineNo">2623</span>          }<a name="line.2623"></a>
+<span class="sourceLineNo">2624</span>          break;<a name="line.2624"></a>
+<span class="sourceLineNo">2625</span>        }<a name="line.2625"></a>
+<span class="sourceLineNo">2626</span>        case SERVERS_NAME: {<a name="line.2626"></a>
+<span class="sourceLineNo">2627</span>          if (serverManager != null) {<a name="line.2627"></a>
+<span class="sourceLineNo">2628</span>            builder.setServerNames(serverManager.getOnlineServersList());<a name="line.2628"></a>
+<span class="sourceLineNo">2629</span>          }<a name="line.2629"></a>
+<span class="sourceLineNo">2630</span>          break;<a name="line.2630"></a>
+<span class="sourceLineNo">2631</span>        }<a name="line.2631"></a>
+<span class="sourceLineNo">2632</span>        case TABLE_TO_REGIONS_COUNT: {<a name="line.2632"></a>
+<span class="sourceLineNo">2633</span>          if (isActiveMaster() &amp;&amp; isInitialized() &amp;&amp; assignmentManager != null) {<a name="line.2633"></a>
+<span class="sourceLineNo">2634</span>            try {<a name="line.2634"></a>
+<span class="sourceLineNo">2635</span>              Map&lt;TableName, RegionStatesCount&gt; tableRegionStatesCountMap = new HashMap&lt;&gt;();<a name="line.2635"></a>
+<span class="sourceLineNo">2636</span>              Map&lt;String, TableDescriptor&gt; tableDescriptorMap = getTableDescriptors().getAll();<a name="line.2636"></a>
+<span class="sourceLineNo">2637</span>              for (TableDescriptor tableDescriptor : tableDescriptorMap.values()) {<a name="line.2637"></a>
+<span class="sourceLineNo">2638</span>                TableName tableName = tableDescriptor.getTableName();<a name="line.2638"></a>
+<span class="sourceLineNo">2639</span>                RegionStatesCount regionStatesCount = assignmentManager<a name="line.2639"></a>
+<span class="sourceLineNo">2640</span>                  .getRegionStatesCount(tableName);<a name="line.2640"></a>
+<span class="sourceLineNo">2641</span>                tableRegionStatesCountMap.put(tableName, regionStatesCount);<a name="line.2641"></a>
+<span class="sourceLineNo">2642</span>              }<a name="line.2642"></a>
+<span class="sourceLineNo">2643</span>              builder.setTableRegionStatesCount(tableRegionStatesCountMap);<a name="line.2643"></a>
+<span class="sourceLineNo">2644</span>            } catch (IOException e) {<a name="line.2644"></a>
+<span class="sourceLineNo">2645</span>              LOG.error("Error while populating TABLE_TO_REGIONS_COUNT for Cluster Metrics..", e);<a name="line.2645"></a>
+<span class="sourceLineNo">2646</span>            }<a name="line.2646"></a>
+<span class="sourceLineNo">2647</span>          }<a name="line.2647"></a>
+<span class="sourceLineNo">2648</span>          break;<a name="line.2648"></a>
+<span class="sourceLineNo">2649</span>        }<a name="line.2649"></a>
+<span class="sourceLineNo">2650</span>      }<a name="line.2650"></a>
+<span class="sourceLineNo">2651</span>    }<a name="line.2651"></a>
+<span class="sourceLineNo">2652</span>    return builder.build();<a name="line.2652"></a>
+<span class="sourceLineNo">2653</span>  }<a name="line.2653"></a>
+<span class="sourceLineNo">2654</span><a name="line.2654"></a>
+<span class="sourceLineNo">2655</span>  /**<a name="line.2655"></a>
+<span class="sourceLineNo">2656</span>   * @return cluster status<a name="line.2656"></a>
+<span class="sourceLineNo">2657</span>   */<a name="line.2657"></a>
+<span class="sourceLineNo">2658</span>  public ClusterMetrics getClusterMetrics() throws IOException {<a name="line.2658"></a>
+<span class="sourceLineNo">2659</span>    return getClusterMetrics(EnumSet.allOf(Option.class));<a name="line.2659"></a>
+<span class="sourceLineNo">2660</span>  }<a name="line.2660"></a>
+<span class="sourceLineNo">2661</span><a name="line.2661"></a>
+<span class="sourceLineNo">2662</span>  public ClusterMetrics getClusterMetrics(EnumSet&lt;Option&gt; options) throws IOException {<a name="line.2662"></a>
+<span class="sourceLineNo">2663</span>    if (cpHost != null) {<a name="line.2663"></a>
+<span class="sourceLineNo">2664</span>      cpHost.preGetClusterMetrics();<a name="line.2664"></a>
+<span class="sourceLineNo">2665</span>    }<a name="line.2665"></a>
+<span class="sourceLineNo">2666</span>    ClusterMetrics status = getClusterMetricsWithoutCoprocessor(options);<a name="line.2666"></a>
+<span class="sourceLineNo">2667</span>    if (cpHost != null) {<a name="line.2667"></a>
+<span class="sourceLineNo">2668</span>      cpHost.postGetClusterMetrics(status);<a name="line.2668"></a>
+<span class="sourceLineNo">2669</span>    }<a name="line.2669"></a>
+<span class="sourceLineNo">2670</span>    return status;<a name="line.2670"></a>
+<span class="sourceLineNo">2671</span>  }<a name="line.2671"></a>
+<span class="sourceLineNo">2672</span><a name="line.2672"></a>
+<span class="sourceLineNo">2673</span>  private List&lt;ServerName&gt; getBackupMasters() throws InterruptedIOException {<a name="line.2673"></a>
+<span class="sourceLineNo">2674</span>    // Build Set of backup masters from ZK nodes<a name="line.2674"></a>
+<span class="sourceLineNo">2675</span>    List&lt;String&gt; backupMasterStrings;<a name="line.2675"></a>
+<span class="sourceLineNo">2676</span>    try {<a name="line.2676"></a>
+<span class="sourceLineNo">2677</span>      backupMasterStrings = ZKUtil.listChildrenNoWatch(this.zooKeeper,<a name="line.2677"></a>
+<span class="sourceLineNo">2678</span>        this.zooKeeper.getZNodePaths().backupMasterAddressesZNode);<a name="line.2678"></a>
+<span class="sourceLineNo">2679</span>    } catch (KeeperException e) {<a name="line.2679"></a>
+<span class="sourceLineNo">2680</span>      LOG.warn(this.zooKeeper.prefix("Unable to list backup servers"), e);<a name="line.2680"></a>
+<span class="sourceLineNo">2681</span>      backupMasterStrings = null;<a name="line.2681"></a>
+<span class="sourceLineNo">2682</span>    }<a name="line.2682"></a>
+<span class="sourceLineNo">2683</span><a name="line.2683"></a>
+<span class="sourceLineNo">2684</span>    List&lt;ServerName&gt; backupMasters = Collections.emptyList();<a name="line.2684"></a>
+<span class="sourceLineNo">2685</span>    if (backupMasterStrings != null &amp;&amp; !backupMasterStrings.isEmpty()) {<a name="line.2685"></a>
+<span class="sourceLineNo">2686</span>      backupMasters = new ArrayList&lt;&gt;(backupMasterStrings.size());<a name="line.2686"></a>
+<span class="sourceLineNo">2687</span>      for (String s: backupMasterStrings) {<a name="line.2687"></a>
+<span class="sourceLineNo">2688</span>        try {<a name="line.2688"></a>
+<span class="sourceLineNo">2689</span>          byte [] bytes;<a name="line.2689"></a>
+<span class="sourceLineNo">2690</span>          try {<a name="line.2690"></a>
+<span class="sourceLineNo">2691</span>            bytes = ZKUtil.getData(this.zooKeeper, ZNodePaths.joinZNode(<a name="line.2691"></a>
+<span class="sourceLineNo">2692</span>                this.zooKeeper.getZNodePaths().backupMasterAddressesZNode, s));<a name="line.2692"></a>
+<span class="sourceLineNo">2693</span>          } catch (InterruptedException e) {<a name="line.2693"></a>
+<span class="sourceLineNo">2694</span>            throw new InterruptedIOException();<a name="line.2694"></a>
+<span class="sourceLineNo">2695</span>          }<a name="line.2695"></a>
+<span class="sourceLineNo">2696</span>          if (bytes != null) {<a name="line.2696"></a>
+<span class="sourceLineNo">2697</span>            ServerName sn;<a name="line.2697"></a>
+<span class="sourceLineNo">2698</span>            try {<a name="line.2698"></a>
+<span class="sourceLineNo">2699</span>              sn = ProtobufUtil.parseServerNameFrom(bytes);<a name="line.2699"></a>
+<span class="sourceLineNo">2700</span>            } catch (DeserializationException e) {<a name="line.2700"></a>
+<span class="sourceLineNo">2701</span>              LOG.warn("Failed parse, skipping registering backup server", e);<a name="line.2701"></a>
+<span class="sourceLineNo">2702</span>              continue;<a name="line.2702"></a>
+<span class="sourceLineNo">2703</span>            }<a name="line.2703"></a>
+<span class="sourceLineNo">2704</span>            backupMasters.add(sn);<a name="line.2704"></a>
+<span class="sourceLineNo">2705</span>          }<a name="line.2705"></a>
+<span class="sourceLineNo">2706</span>        } catch (KeeperException e) {<a name="line.2706"></a>
+<span class="sourceLineNo">2707</span>          LOG.warn(this.zooKeeper.prefix("Unable to get information about " +<a name="line.2707"></a>
+<span class="sourceLineNo">2708</span>                   "backup servers"), e);<a name="line.2708"></a>
+<span class="sourceLineNo">2709</span>        }<a name="line.2709"></a>
+<span class="sourceLineNo">2710</span>      }<a name="line.2710"></a>
+<span class="sourceLineNo">2711</span>      Collections.sort(backupMasters, new Comparator&lt;ServerName&gt;() {<a name="line.2711"></a>
+<span class="sourceLineNo">2712</span>        @Override<a name="line.2712"></a>
+<span class="sourceLineNo">2713</span>        public int compare(ServerName s1, ServerName s2) {<a name="line.2713"></a>
+<span class="sourceLineNo">2714</span>          return s1.getServerName().compareTo(s2.getServerName());<a name="line.2714"></a>
+<span class="sourceLineNo">2715</span>        }});<a name="line.2715"></a>
+<span class="sourceLineNo">2716</span>    }<a name="line.2716"></a>
+<span class="sourceLineNo">2717</span>    return backupMasters;<a name="line.2717"></a>
+<span class="sourceLineNo">2718</span>  }<a name="line.2718"></a>
+<span class="sourceLineNo">2719</span><a name="line.2719"></a>
+<span class="sourceLineNo">2720</span>  /**<a name="line.2720"></a>
+<span class="sourceLineNo">2721</span>   * The set of loaded coprocessors is stored in a static set. Since it's<a name="line.2721"></a>
+<span class="sourceLineNo">2722</span>   * statically allocated, it does not require that HMaster's cpHost be<a name="line.2722"></a>
+<span class="sourceLineNo">2723</span>   * initialized prior to accessing it.<a name="line.2723"></a>
+<span class="sourceLineNo">2724</span>   * @return a String representation of the set of names of the loaded coprocessors.<a name="line.2724"></a>
+<span class="sourceLineNo">2725</span>   */<a name="line.2725"></a>
+<span class="sourceLineNo">2726</span>  public static String getLoadedCoprocessors() {<a name="line.2726"></a>
+<span class="sourceLineNo">2727</span>    return CoprocessorHost.getLoadedCoprocessors().toString();<a name="line.2727"></a>
+<span class="sourceLineNo">2728</span>  }<a name="line.2728"></a>
+<span class="sourceLineNo">2729</span><a name="line.2729"></a>
+<span class="sourceLineNo">2730</span>  /**<a name="line.2730"></a>
+<span class="sourceLineNo">2731</span>   * @return timestamp in millis when HMaster was started.<a name="line.2731"></a>
+<span class="sourceLineNo">2732</span>   */<a name="line.2732"></a>
+<span class="sourceLineNo">2733</span>  public long getMasterStartTime() {<a name="line.2733"></a>
+<span class="sourceLineNo">2734</span>    return startcode;<a name="line.2734"></a>
+<span class="sourceLineNo">2735</span>  }<a name="line.2735"></a>
+<span class="sourceLineNo">2736</span><a name="line.2736"></a>
+<span class="sourceLineNo">2737</span>  /**<a name="line.2737"></a>
+<span class="sourceLineNo">2738</span>   * @return timestamp in millis when HMaster became the active master.<a name="line.2738"></a>
+<span class="sourceLineNo">2739</span>   */<a name="line.2739"></a>
+<span class="sourceLineNo">2740</span>  public long getMasterActiveTime() {<a name="line.2740"></a>
+<span class="sourceLineNo">2741</span>    return masterActiveTime;<a name="line.2741"></a>
+<span class="sourceLineNo">2742</span>  }<a name="line.2742"></a>
+<span class="sourceLineNo">2743</span><a name="line.2743"></a>
+<span class="sourceLineNo">2744</span>  /**<a name="line.2744"></a>
+<span class="sourceLineNo">2745</span>   * @return timestamp in millis when HMaster finished becoming the active master<a name="line.2745"></a>
+<span class="sourceLineNo">2746</span>   */<a name="line.2746"></a>
+<span class="sourceLineNo">2747</span>  public long getMasterFinishedInitializationTime() {<a name="line.2747"></a>
+<span class="sourceLineNo">2748</span>    return masterFinishedInitializationTime;<a name="line.2748"></a>
+<span class="sourceLineNo">2749</span>  }<a name="line.2749"></a>
+<span class="sourceLineNo">2750</span><a name="line.2750"></a>
+<span class="sourceLineNo">2751</span>  public int getNumWALFiles() {<a name="line.2751"></a>
+<span class="sourceLineNo">2752</span>    return 0;<a name="line.2752"></a>
+<span class="sourceLineNo">2753</span>  }<a name="line.2753"></a>
+<span class="sourceLineNo">2754</span><a name="line.2754"></a>
+<span class="sourceLineNo">2755</span>  public ProcedureStore getProcedureStore() {<a name="line.2755"></a>
+<span class="sourceLineNo">2756</span>    return procedureStore;<a name="line.2756"></a>
+<span class="sourceLineNo">2757</span>  }<a name="line.2757"></a>
+<span class="sourceLineNo">2758</span><a name="line.2758"></a>
+<span class="sourceLineNo">2759</span>  public int getRegionServerInfoPort(final ServerName sn) {<a name="line.2759"></a>
+<span class="sourceLineNo">2760</span>    int port = this.serverManager.getInfoPort(sn);<a name="line.2760"></a>
+<span class="sourceLineNo">2761</span>    return port == 0 ? conf.getInt(HConstants.REGIONSERVER_INFO_PORT,<a name="line.2761"></a>
+<span class="sourceLineNo">2762</span>      HConstants.DEFAULT_REGIONSERVER_INFOPORT) : port;<a name="line.2762"></a>
+<span class="sourceLineNo">2763</span>  }<a name="line.2763"></a>
+<span class="sourceLineNo">2764</span><a name="line.2764"></a>
+<span class="sourceLineNo">2765</span>  @Override<a name="line.2765"></a>
+<span class="sourceLineNo">2766</span>  public String getRegionServerVersion(ServerName sn) {<a name="line.2766"></a>
+<span class="sourceLineNo">2767</span>    // Will return "0.0.0" if the server is not online to prevent move system region to unknown<a name="line.2767"></a>
+<span class="sourceLineNo">2768</span>    // version RS.<a name="line.2768"></a>
+<span class="sourceLineNo">2769</span>    return this.serverManager.getVersion(sn);<a name="line.2769"></a>
+<span class="sourceLineNo">2770</span>  }<a name="line.2770"></a>
+<span class="sourceLineNo">2771</span><a name="line.2771"></a>
+<span class="sourceLineNo">2772</span>  @Override<a name="line.2772"></a>
+<span class="sourceLineNo">2773</span>  public void checkIfShouldMoveSystemRegionAsync() {<a name="line.2773"></a>
+<span class="sourceLineNo">2774</span>    assignmentManager.checkIfShouldMoveSystemRegionAsync();<a name="line.2774"></a>
+<span class="sourceLineNo">2775</span>  }<a name="line.2775"></a>
+<span class="sourceLineNo">2776</span><a name="line.2776"></a>
+<span class="sourceLineNo">2777</span>  /**<a name="line.2777"></a>
+<span class="sourceLineNo">2778</span>   * @return array of coprocessor SimpleNames.<a name="line.2778"></a>
+<span class="sourceLineNo">2779</span>   */<a name="line.2779"></a>
+<span class="sourceLineNo">2780</span>  public String[] getMasterCoprocessors() {<a name="line.2780"></a>
+<span class="sourceLineNo">2781</span>    Set&lt;String&gt; masterCoprocessors = getMasterCoprocessorHost().getCoprocessors();<a name="line.2781"></a>
+<span class="sourceLineNo">2782</span>    return masterCoprocessors.toArray(new String[masterCoprocessors.size()]);<a name="line.2782"></a>
+<span class="sourceLineNo">2783</span>  }<a name="line.2783"></a>
+<span class="sourceLineNo">2784</span><a name="line.2784"></a>
+<span class="sourceLineNo">2785</span>  @Override<a name="line.2785"></a>
+<span class="sourceLineNo">2786</span>  public void abort(String reason, Throwable cause) {<a name="line.2786"></a>
+<span class="sourceLineNo">2787</span>    if (isAborted() || isStopped()) {<a name="line.2787"></a>
+<span class="sourceLineNo">2788</span>      return;<a name="line.2788"></a>
+<span class="sourceLineNo">2789</span>    }<a name="line.2789"></a>
+<span class="sourceLineNo">2790</span>    setAbortRequested();<a name="line.2790"></a>
+<span class="sourceLineNo">2791</span>    if (cpHost != null) {<a name="line.2791"></a>
+<span class="sourceLineNo">2792</span>      // HBASE-4014: dump a list of loaded coprocessors.<a name="line.2792"></a>
+<span class="sourceLineNo">2793</span>      LOG.error(HBaseMarkers.FATAL, "Master server abort: loaded coprocessors are: " +<a name="line.2793"></a>
+<span class="sourceLineNo">2794</span>          getLoadedCoprocessors());<a name="line.2794"></a>
+<span class="sourceLineNo">2795</span>    }<a name="line.2795"></a>
+<span class="sourceLineNo">2796</span>    String msg = "***** ABORTING master " + this + ": " + reason + " *****";<a name="line.2796"></a>
+<span class="sourceLineNo">2797</span>    if (cause != null) {<a name="line.2797"></a>
+<span class="sourceLineNo">2798</span>      LOG.error(HBaseMarkers.FATAL, msg, cause);<a name="line.2798"></a>
+<span class="sourceLineNo">2799</span>    } else {<a name="line.2799"></a>
+<span class="sourceLineNo">2800</span>      LOG.error(HBaseMarkers.FATAL, msg);<a name="line.2800"></a>
+<span class="sourceLineNo">2801</span>    }<a name="line.2801"></a>
+<span class="sourceLineNo">2802</span><a name="line.2802"></a>
+<span class="sourceLineNo">2803</span>    try {<a name="line.2803"></a>
+<span class="sourceLineNo">2804</span>      stopMaster();<a name="line.2804"></a>
+<span class="sourceLineNo">2805</span>    } catch (IOException e) {<a name="line.2805"></a>
+<span class="sourceLineNo">2806</span>      LOG.error("Exception occurred while stopping master", e);<a name="line.2806"></a>
+<span class="sourceLineNo">2807</span>    }<a name="line.2807"></a>
+<span class="sourceLineNo">2808</span>  }<a name="line.2808"></a>
+<span class="sourceLineNo">2809</span><a name="line.2809"></a>
+<span class="sourceLineNo">2810</span>  @Override<a name="line.2810"></a>
+<span class="sourceLineNo">2811</span>  public ZKWatcher getZooKeeper() {<a name="line.2811"></a>
+<span class="sourceLineNo">2812</span>    return zooKeeper;<a name="line.2812"></a>
+<span class="sourceLineNo">2813</span>  }<a name="line.2813"></a>
+<span class="sourceLineNo">2814</span><a name="line.2814"></a>
+<span class="sourceLineNo">2815</span>  @Override<a name="line.2815"></a>
+<span class="sourceLineNo">2816</span>  public MasterCoprocessorHost getMasterCoprocessorHost() {<a name="line.2816"></a>
+<span class="sourceLineNo">2817</span>    return cpHost;<a name="line.2817"></a>
+<span class="sourceLineNo">2818</span>  }<a name="line.2818"></a>
+<span class="sourceLineNo">2819</span><a name="line.2819"></a>
+<span class="sourceLineNo">2820</span>  @Override<a name="line.2820"></a>
+<span class="sourceLineNo">2821</span>  public MasterQuotaManager getMasterQuotaManager() {<a name="line.2821"></a>
+<span class="sourceLineNo">2822</span>    return quotaManager;<a name="line.2822"></a>
+<span class="sourceLineNo">2823</span>  }<a name="line.2823"></a>
+<span class="sourceLineNo">2824</span><a name="line.2824"></a>
+<span class="sourceLineNo">2825</span>  @Override<a name="line.2825"></a>
+<span class="sourceLineNo">2826</span>  public ProcedureExecutor&lt;MasterProcedureEnv&gt; getMasterProcedureExecutor() {<a name="line.2826"></a>
+<span class="sourceLineNo">2827</span>    return procedureExecutor;<a name="line.2827"></a>
+<span class="sourceLineNo">2828</span>  }<a name="line.2828"></a>
+<span class="sourceLineNo">2829</span><a name="line.2829"></a>
+<span class="sourceLineNo">2830</span>  @Override<a name="line.2830"></a>
+<span class="sourceLineNo">2831</span>  public ServerName getServerName() {<a name="line.2831"></a>
+<span class="sourceLineNo">2832</span>    return this.serverName;<a name="line.2832"></a>
+<span class="sourceLineNo">2833</span>  }<a name="line.2833"></a>
+<span class="sourceLineNo">2834</span><a name="line.2834"></a>
+<span class="sourceLineNo">2835</span>  @Override<a name="line.2835"></a>
+<span class="sourceLineNo">2836</span>  public AssignmentManager getAssignmentManager() {<a name="line.2836"></a>
+<span class="sourceLineNo">2837</span>    return this.assignmentManager;<a name="line.2837"></a>
+<span class="sourceLineNo">2838</span>  }<a name="line.2838"></a>
+<span class="sourceLineNo">2839</span><a name="line.2839"></a>
+<span class="sourceLineNo">2840</span>  @Override<a name="line.2840"></a>
+<span class="sourceLineNo">2841</span>  public CatalogJanitor getCatalogJanitor() {<a name="line.2841"></a>
+<span class="sourceLineNo">2842</span>    return this.catalogJanitorChore;<a name="line.2842"></a>
+<span class="sourceLineNo">2843</span>  }<a name="line.2843"></a>
+<span class="sourceLineNo">2844</span><a name="line.2844"></a>
+<span class="sourceLineNo">2845</span>  public MemoryBoundedLogMessageBuffer getRegionServerFatalLogBuffer() {<a name="line.2845"></a>
+<span class="sourceLineNo">2846</span>    return rsFatals;<a name="line.2846"></a>
+<span class="sourceLineNo">2847</span>  }<a name="line.2847"></a>
+<span class="sourceLineNo">2848</span><a name="line.2848"></a>
+<span class="sourceLineNo">2849</span>  /**<a name="line.2849"></a>
+<span class="sourceLineNo">2850</span>   * Shutdown the cluster.<a name="line.2850"></a>
+<span class="sourceLineNo">2851</span>   * Master runs a coordinated stop of all RegionServers and then itself.<a name="line.2851"></a>
+<span class="sourceLineNo">2852</span>   */<a name="line.2852"></a>
+<span class="sourceLineNo">2853</span>  public void shutdown() throws IOException {<a name="line.2853"></a>
+<span class="sourceLineNo">2854</span>    if (cpHost != null) {<a name="line.2854"></a>
+<span class="sourceLineNo">2855</span>      cpHost.preShutdown();<a name="line.2855"></a>
+<span class="sourceLineNo">2856</span>    }<a name="line.2856"></a>
+<span class="sourceLineNo">2857</span>    // Tell the servermanager cluster shutdown has been called. This makes it so when Master is<a name="line.2857"></a>
+<span class="sourceLineNo">2858</span>    // last running server, it'll stop itself. Next, we broadcast the cluster shutdown by setting<a name="line.2858"></a>
+<span class="sourceLineNo">2859</span>    // the cluster status as down. RegionServers will notice this change in state and will start<a name="line.2859"></a>
+<span class="sourceLineNo">2860</span>    // shutting themselves down. When last has exited, Master can go down.<a name="line.2860"></a>
+<span class="sourceLineNo">2861</span>    if (this.serverManager != null) {<a name="line.2861"></a>
+<span class="sourceLineNo">2862</span>      this.serverManager.shutdownCluster();<a name="line.2862"></a>
+<span class="sourceLineNo">2863</span>    }<a name="line.2863"></a>
+<span class="sourceLineNo">2864</span>    if (this.clusterStatusTracker != null) {<a name="line.2864"></a>
+<span class="sourceLineNo">2865</span>      try {<a name="line.2865"></a>
+<span class="sourceLineNo">2866</span>        this.clusterStatusTracker.setClusterDown();<a name="line.2866"></a>
+<span class="sourceLineNo">2867</span>      } catch (KeeperException e) {<a name="line.2867"></a>
+<span class="sourceLineNo">2868</span>        LOG.error("ZooKeeper exception trying to set cluster as down in ZK", e);<a name="line.2868"></a>
+<span class="sourceLineNo">2869</span>      }<a name="line.2869"></a>
+<span class="sourceLineNo">2870</span>    }<a name="line.2870"></a>
+<span class="sourceLineNo">2871</span>    // Stop the procedure executor. Will stop any ongoing assign, unassign, server crash etc.,<a name="line.2871"></a>
+<span class="sourceLineNo">2872</span>    // processing so we can go down.<a name="line.2872"></a>
+<span class="sourceLineNo">2873</span>    if (this.procedureExecutor != null) {<a name="line.2873"></a>
+<span class="sourceLineNo">2874</span>      this.procedureExecutor.stop();<a name="line.2874"></a>
+<span class="sourceLineNo">2875</span>    }<a name="line.2875"></a>
+<span class="sourceLineNo">2876</span>    // Shutdown our cluster connection. This will kill any hosted RPCs that might be going on;<a name="line.2876"></a>
+<span class="sourceLineNo">2877</span>    // this is what we want especially if the Master is in startup phase doing call outs to<a name="line.2877"></a>
+<span class="sourceLineNo">2878</span>    // hbase:meta, etc. when cluster is down. Without ths connection close, we'd have to wait on<a name="line.2878"></a>
+<span class="sourceLineNo">2879</span>    // the rpc to timeout.<a name="line.2879"></a>
+<span class="sourceLineNo">2880</span>    if (this.asyncClusterConnection != null) {<a name="line.2880"></a>
+<span class="sourceLineNo">2881</span>      this.asyncClusterConnection.close();<a name="line.2881"></a>
+<span class="sourceLineNo">2882</span>    }<a name="line.2882"></a>
+<span class="sourceLineNo">2883</span>  }<a name="line.2883"></a>
+<span class="sourceLineNo">2884</span><a name="line.2884"></a>
+<span class="sourceLineNo">2885</span>  public void stopMaster() throws IOException {<a name="line.2885"></a>
+<span class="sourceLineNo">2886</span>    if (cpHost != null) {<a name="line.2886"></a>
+<span class="sourceLineNo">2887</span>      cpHost.preStopMaster();<a name="line.2887"></a>
+<span class="sourceLineNo">2888</span>    }<a name="line.2888"></a>
+<span class="sourceLineNo">2889</span>    stop("Stopped by " + Thread.currentThread().getName());<a name="line.2889"></a>
+<span class="sourceLineNo">2890</span>  }<a name="line.2890"></a>
+<span class="sourceLineNo">2891</span><a name="line.2891"></a>
+<span class="sourceLineNo">2892</span>  @Override<a name="line.2892"></a>
+<span class="sourceLineNo">2893</span>  public void stop(String msg) {<a name="line.2893"></a>
+<span class="sourceLineNo">2894</span>    if (!isStopped()) {<a name="line.2894"></a>
+<span class="sourceLineNo">2895</span>      super.stop(msg);<a name="line.2895"></a>
+<span class="sourceLineNo">2896</span>      if (this.activeMasterManager != null) {<a name="line.2896"></a>
+<span class="sourceLineNo">2897</span>        this.activeMasterManager.stop();<a name="line.2897"></a>
+<span class="sourceLineNo">2898</span>      }<a name="line.2898"></a>
+<span class="sourceLineNo">2899</span>    }<a name="line.2899"></a>
+<span class="sourceLineNo">2900</span>  }<a name="line.2900"></a>
+<span class="sourceLineNo">2901</span><a name="line.2901"></a>
+<span class="sourceLineNo">2902</span>  @VisibleForTesting<a name="line.2902"></a>
+<span class="sourceLineNo">2903</span>  protected void checkServiceStarted() throws ServerNotRunningYetException {<a name="line.2903"></a>
+<span class="sourceLineNo">2904</span>    if (!serviceStarted) {<a name="line.2904"></a>
+<span class="sourceLineNo">2905</span>      throw new ServerNotRunningYetException("Server is not running yet");<a name="line.2905"></a>
+<span class="sourceLineNo">2906</span>    }<a name="line.2906"></a>
+<span class="sourceLineNo">2907</span>  }<a name="line.2907"></a>
+<span class="sourceLineNo">2908</span><a name="line.2908"></a>
+<span class="sourceLineNo">2909</span>  public static class MasterStoppedException extends DoNotRetryIOException {<a name="line.2909"></a>
+<span class="sourceLineNo">2910</span>    MasterStoppedException() {<a name="line.2910"></a>
+<span class="sourceLineNo">2911</span>      super();<a name="line.2911"></a>
+<span class="sourceLineNo">2912</span>    }<a name="line.2912"></a>
+<span class="sourceLineNo">2913</span>  }<a name="line.2913"></a>
+<span class="sourceLineNo">2914</span><a name="line.2914"></a>
+<span class="sourceLineNo">2915</span>  void checkInitialized() throws PleaseHoldException, ServerNotRunningYetException,<a name="line.2915"></a>
+<span class="sourceLineNo">2916</span>      MasterNotRunningException, MasterStoppedException {<a name="line.2916"></a>
+<span class="sourceLineNo">2917</span>    checkServiceStarted();<a name="line.2917"></a>
+<span class="sourceLineNo">2918</span>    if (!isInitialized()) {<a name="line.2918"></a>
+<span class="sourceLineNo">2919</span>      throw new PleaseHoldException("Master is initializing");<a name="line.2919"></a>
+<span class="sourceLineNo">2920</span>    }<a name="line.2920"></a>
+<span class="sourceLineNo">2921</span>    if (isStopped()) {<a name="line.2921"></a>
+<span class="sourceLineNo">2922</span>      throw new MasterStoppedException();<a name="line.2922"></a>
+<span class="sourceLineNo">2923</span>    }<a name="line.2923"></a>
+<span class="sourceLineNo">2924</span>  }<a name="line.2924"></a>
+<span class="sourceLineNo">2925</span><a name="line.2925"></a>
+<span class="sourceLineNo">2926</span>  /**<a name="line.2926"></a>
+<span class="sourceLineNo">2927</span>   * Report whether this master is currently the active master or not.<a name="line.2927"></a>
+<span class="sourceLineNo">2928</span>   * If not active master, we are parked on ZK waiting to become active.<a name="line.2928"></a>
+<span class="sourceLineNo">2929</span>   *<a name="line.2929"></a>
+<span class="sourceLineNo">2930</span>   * This method is used for testing.<a name="line.2930"></a>
+<span class="sourceLineNo">2931</span>   *<a name="line.2931"></a>
+<span class="sourceLineNo">2932</span>   * @return true if active master, false if not.<a name="line.2932"></a>
+<span class="sourceLineNo">2933</span>   */<a name="line.2933"></a>
+<span class="sourceLineNo">2934</span>  @Override<a name="line.2934"></a>
+<span class="sourceLineNo">2935</span>  public boolean isActiveMaster() {<a name="line.2935"></a>
+<span class="sourceLineNo">2936</span>    return activeMaster;<a name="line.2936"></a>
+<span class="sourceLineNo">2937</span>  }<a name="line.2937"></a>
+<span class="sourceLineNo">2938</span><a name="line.2938"></a>
+<span class="sourceLineNo">2939</span>  /**<a name="line.2939"></a>
+<span class="sourceLineNo">2940</span>   * Report whether this master has completed with its initialization and is<a name="line.2940"></a>
+<span class="sourceLineNo">2941</span>   * ready.  If ready, the master is also the active master.  A standby master<a name="line.2941"></a>
+<span class="sourceLineNo">2942</span>   * is never ready.<a name="line.2942"></a>
+<span class="sourceLineNo">2943</span>   *<a name="line.2943"></a>
+<span class="sourceLineNo">2944</span>   * This method is used for testing.<a name="line.2944"></a>
+<span class="sourceLineNo">2945</span>   *<a name="line.2945"></a>
+<span class="sourceLineNo">2946</span>   * @return true if master is ready to go, false if not.<a name="line.2946"></a>
+<span class="sourceLineNo">2947</span>   */<a name="line.2947"></a>
+<span class="sourceLineNo">2948</span>  @Override<a name="line.2948"></a>
+<span class="sourceLineNo">2949</span>  public boolean isInitialized() {<a name="line.2949"></a>
+<span class="sourceLineNo">2950</span>    return initialized.isReady();<a name="line.2950"></a>
+<span class="sourceLineNo">2951</span>  }<a name="line.2951"></a>
+<span class="sourceLineNo">2952</span><a name="line.2952"></a>
+<span class="sourceLineNo">2953</span>  /**<a name="line.2953"></a>
+<span class="sourceLineNo">2954</span>   * Report whether this master is in maintenance mode.<a name="line.2954"></a>
+<span class="sourceLineNo">2955</span>   *<a name="line.2955"></a>
+<span class="sourceLineNo">2956</span>   * @return true if master is in maintenanceMode<a name="line.2956"></a>
+<span class="sourceLineNo">2957</span>   */<a name="line.2957"></a>
+<span class="sourceLineNo">2958</span>  @Override<a name="line.2958"></a>
+<span class="sourceLineNo">2959</span>  public boolean isInMaintenanceMode() {<a name="line.2959"></a>
+<span class="sourceLineNo">2960</span>    return maintenanceMode;<a name="line.2960"></a>
+<span class="sourceLineNo">2961</span>  }<a name="line.2961"></a>
+<span class="sourceLineNo">2962</span><a name="line.2962"></a>
+<span class="sourceLineNo">2963</span>  @VisibleForTesting<a name="line.2963"></a>
+<span class="sourceLineNo">2964</span>  public void setInitialized(boolean isInitialized) {<a name="line.2964"></a>
+<span class="sourceLineNo">2965</span>    procedureExecutor.getEnvironment().setEventReady(initialized, isInitialized);<a name="line.2965"></a>
+<span class="sourceLineNo">2966</span>  }<a name="line.2966"></a>
+<span class="sourceLineNo">2967</span><a name="line.2967"></a>
+<span class="sourceLineNo">2968</span>  @Override<a name="line.2968"></a>
+<span class="sourceLineNo">2969</span>  public ProcedureEvent&lt;?&gt; getInitializedEvent() {<a name="line.2969"></a>
+<span class="sourceLineNo">2970</span>    return initialized;<a name="line.2970"></a>
+<span class="sourceLineNo">2971</span>  }<a name="line.2971"></a>
+<span class="sourceLineNo">2972</span><a name="line.2972"></a>
+<span class="sourceLineNo">2973</span>  /**<a name="line.2973"></a>
+<span class="sourceLineNo">2974</span>   * Compute the average load across all region servers.<a name="line.2974"></a>
+<span class="sourceLineNo">2975</span>   * Currently, this uses a very naive computation - just uses the number of<a name="line.2975"></a>
+<span class="sourceLineNo">2976</span>   * regions being served, ignoring stats about number of requests.<a name="line.2976"></a>
+<span class="sourceLineNo">2977</span>   * @return the average load<a name="line.2977"></a>
+<span class="sourceLineNo">2978</span>   */<a name="line.2978"></a>
+<span class="sourceLineNo">2979</span>  public double getAverageLoad() {<a name="line.2979"></a>
+<span class="sourceLineNo">2980</span>    if (this.assignmentManager == null) {<a name="line.2980"></a>
+<span class="sourceLineNo">2981</span>      return 0;<a name="line.2981"></a>
+<span class="sourceLineNo">2982</span>    }<a name="line.2982"></a>
+<span class="sourceLineNo">2983</span><a name="line.2983"></a>
+<span class="sourceLineNo">2984</span>    RegionStates regionStates = this.assignmentManager.getRegionStates();<a name="line.2984"></a>
+<span class="sourceLineNo">2985</span>    if (regionStates == null) {<a name="line.2985"></a>
+<span class="sourceLineNo">2986</span>      return 0;<a name="line.2986"></a>
+<span class="sourceLineNo">2987</span>    }<a name="line.2987"></a>
+<span class="sourceLineNo">2988</span>    return regionStates.getAverageLoad();<a name="line.2988"></a>
+<span class="sourceLineNo">2989</span>  }<a name="line.2989"></a>
+<span class="sourceLineNo">2990</span><a name="line.2990"></a>
+<span class="sourceLineNo">2991</span>  /*<a name="line.2991"></a>
+<span class="sourceLineNo">2992</span>   * @return the count of region split plans executed<a name="line.2992"></a>
+<span class="sourceLineNo">2993</span>   */<a name="line.2993"></a>
+<span class="sourceLineNo">2994</span>  public long getSplitPlanCount() {<a name="line.2994"></a>
+<span class="sourceLineNo">2995</span>    return splitPlanCount;<a name="line.2995"></a>
+<span class="sourceLineNo">2996</span>  }<a name="line.2996"></a>
+<span class="sourceLineNo">2997</span><a name="line.2997"></a>
+<span class="sourceLineNo">2998</span>  /*<a name="line.2998"></a>
+<span class="sourceLineNo">2999</span>   * @return the count of region merge plans executed<a name="line.2999"></a>
+<span class="sourceLineNo">3000</span>   */<a name="line.3000"></a>
+<span class="sourceLineNo">3001</span>  public long getMergePlanCount() {<a name="line.3001"></a>
+<span class="sourceLineNo">3002</span>    return mergePlanCount;<a name="line.3002"></a>
+<span class="sourceLineNo">3003</span>  }<a name="line.3003"></a>
+<span class="sourceLineNo">3004</span><a name="line.3004"></a>
+<span class="sourceLineNo">3005</span>  @Override<a name="line.3005"></a>
+<span class="sourceLineNo">3006</span>  public boolean registerService(Service instance) {<a name="line.3006"></a>
+<span class="sourceLineNo">3007</span>    /*<a name="line.3007"></a>
+<span class="sourceLineNo">3008</span>     * No stacking of instances is allowed for a single service name<a name="line.3008"></a>
+<span class="sourceLineNo">3009</span>     */<a name="line.3009"></a>
+<span class="sourceLineNo">3010</span>    Descriptors.ServiceDescriptor serviceDesc = instance.getDescriptorForType();<a name="line.3010"></a>
+<span class="sourceLineNo">3011</span>    String serviceName = CoprocessorRpcUtils.getServiceName(serviceDesc);<a name="line.3011"></a>
+<span class="sourceLineNo">3012</span>    if (coprocessorServiceHandlers.containsKey(serviceName)) {<a name="line.3012"></a>
+<span class="sourceLineNo">3013</span>      LOG.error("Coprocessor service "+serviceName+<a name="line.3013"></a>
+<span class="sourceLineNo">3014</span>          " already registered, rejecting request from "+instance<a name="line.3014"></a>
+<span class="sourceLineNo">3015</span>      );<a name="line.3015"></a>
+<span class="sourceLineNo">3016</span>      return false;<a name="line.3016"></a>
+<span class="sourceLineNo">3017</span>    }<a name="line.3017"></a>
+<span class="sourceLineNo">3018</span><a name="line.3018"></a>
+<span class="sourceLineNo">3019</span>    coprocessorServiceHandlers.put(serviceName, instance);<a name="line.3019"></a>
+<span class="sourceLineNo">3020</span>    if (LOG.isDebugEnabled()) {<a name="line.3020"></a>
+<span class="sourceLineNo">3021</span>      LOG.debug("Registered master coprocessor service: service="+serviceName);<a name="line.3021"></a>
+<span class="sourceLineNo">3022</span>    }<a name="line.3022"></a>
+<span class="sourceLineNo">3023</span>    return true;<a name="line.3023"></a>
+<span class="sourceLineNo">3024</span>  }<a name="line.3024"></a>
+<span class="sourceLineNo">3025</span><a name="line.3025"></a>
+<span class="sourceLineNo">3026</span>  /**<a name="line.3026"></a>
+<span class="sourceLineNo">3027</span>   * Utility for constructing an instance of the passed HMaster class.<a name="line.3027"></a>
+<span class="sourceLineNo">3028</span>   * @param masterClass<a name="line.3028"></a>
+<span class="sourceLineNo">3029</span>   * @return HMaster instance.<a name="line.3029"></a>
+<span class="sourceLineNo">3030</span>   */<a name="line.3030"></a>
+<span class="sourceLineNo">3031</span>  public static HMaster constructMaster(Class&lt;? extends HMaster&gt; masterClass,<a name="line.3031"></a>
+<span class="sourceLineNo">3032</span>      final Configuration conf)  {<a name="line.3032"></a>
+<span class="sourceLineNo">3033</span>    try {<a name="line.3033"></a>
+<span class="sourceLineNo">3034</span>      Constructor&lt;? extends HMaster&gt; c = masterClass.getConstructor(Configuration.class);<a name="line.3034"></a>
+<span class="sourceLineNo">3035</span>      return c.newInstance(conf);<a name="line.3035"></a>
+<span class="sourceLineNo">3036</span>    } catch(Exception e) {<a name="line.3036"></a>
+<span class="sourceLineNo">3037</span>      Throwable error = e;<a name="line.3037"></a>
+<span class="sourceLineNo">3038</span>      if (e instanceof InvocationTargetException &amp;&amp;<a name="line.3038"></a>
+<span class="sourceLineNo">3039</span>          ((InvocationTargetException)e).getTargetException() != null) {<a name="line.3039"></a>
+<span class="sourceLineNo">3040</span>        error = ((InvocationTargetException)e).getTargetException();<a name="line.3040"></a>
+<span class="sourceLineNo">3041</span>      }<a name="line.3041"></a>
+<span class="sourceLineNo">3042</span>      throw new RuntimeException("Failed construction of Master: " + masterClass.toString() + ". "<a name="line.3042"></a>
+<span class="sourceLineNo">3043</span>        , error);<a name="line.3043"></a>
+<span class="sourceLineNo">3044</span>    }<a name="line.3044"></a>
+<span class="sourceLineNo">3045</span>  }<a name="line.3045"></a>
+<span class="sourceLineNo">3046</span><a name="line.3046"></a>
+<span class="sourceLineNo">3047</span>  /**<a name="line.3047"></a>
+<span class="sourceLineNo">3048</span>   * @see org.apache.hadoop.hbase.master.HMasterCommandLine<a name="line.3048"></a>
+<span class="sourceLineNo">3049</span>   */<a name="line.3049"></a>
+<span class="sourceLineNo">3050</span>  public static void main(String [] args) {<a name="line.3050"></a>
+<span class="sourceLineNo">3051</span>    LOG.info("STARTING service " + HMaster.class.getSimpleName());<a name="line.3051"></a>
+<span class="sourceLineNo">3052</span>    VersionInfo.logVersion();<a name="line.3052"></a>
+<span class="sourceLineNo">3053</span>    new HMasterCommandLine(HMaster.class).doMain(args);<a name="line.3053"></a>
+<span class="sourceLineNo">3054</span>  }<a name="line.3054"></a>
+<span class="sourceLineNo">3055</span><a name="line.3055"></a>
+<span class="sourceLineNo">3056</span>  public HFileCleaner getHFileCleaner() {<a name="line.3056"></a>
+<span class="sourceLineNo">3057</span>    return this.hfileCleaner;<a name="line.3057"></a>
+<span class="sourceLineNo">3058</span>  }<a name="line.3058"></a>
+<span class="sourceLineNo">3059</span><a name="line.3059"></a>
+<span class="sourceLineNo">3060</span>  public LogCleaner getLogCleaner() {<a name="line.3060"></a>
+<span class="sourceLineNo">3061</span>    return this.logCleaner;<a name="line.3061"></a>
+<span class="sourceLineNo">3062</span>  }<a name="line.3062"></a>
+<span class="sourceLineNo">3063</span><a name="line.3063"></a>
+<span class="sourceLineNo">3064</span>  /**<a name="line.3064"></a>
+<span class="sourceLineNo">3065</span>   * @return the underlying snapshot manager<a name="line.3065"></a>
+<span class="sourceLineNo">3066</span>   */<a name="line.3066"></a>
+<span class="sourceLineNo">3067</span>  @Override<a name="line.3067"></a>
+<span class="sourceLineNo">3068</span>  public SnapshotManager getSnapshotManager() {<a name="line.3068"></a>
+<span class="sourceLineNo">3069</span>    return this.snapshotManager;<a name="line.3069"></a>
+<span class="sourceLineNo">3070</span>  }<a name="line.3070"></a>
+<span class="sourceLineNo">3071</span><a name="line.3071"></a>
+<span class="sourceLineNo">3072</span>  /**<a name="line.3072"></a>
+<span class="sourceLineNo">3073</span>   * @return the underlying MasterProcedureManagerHost<a name="line.3073"></a>
+<span class="sourceLineNo">3074</span>   */<a name="line.3074"></a>
+<span class="sourceLineNo">3075</span>  @Override<a name="line.3075"></a>
+<span class="sourceLineNo">3076</span>  public MasterProcedureManagerHost getMasterProcedureManagerHost() {<a name="line.3076"></a>
+<span class="sourceLineNo">3077</span>    return mpmHost;<a name="line.3077"></a>
+<span class="sourceLineNo">3078</span>  }<a name="line.3078"></a>
+<span class="sourceLineNo">3079</span><a name="line.3079"></a>
+<span class="sourceLineNo">3080</span>  @Override<a name="line.3080"></a>
+<span class="sourceLineNo">3081</span>  public ClusterSchema getClusterSchema() {<a name="line.3081"></a>
+<span class="sourceLineNo">3082</span>    return this.clusterSchemaService;<a name="line.3082"></a>
+<span class="sourceLineNo">3083</span>  }<a name="line.3083"></a>
+<span class="sourceLineNo">3084</span><a name="line.3084"></a>
+<span class="sourceLineNo">3085</span>  /**<a name="line.3085"></a>
+<span class="sourceLineNo">3086</span>   * Create a new Namespace.<a name="line.3086"></a>
+<span class="sourceLineNo">3087</span>   * @param namespaceDescriptor descriptor for new Namespace<a name="line.3087"></a>
+<span class="sourceLineNo">3088</span>   * @param nonceGroup Identifier for the source of the request, a client or process.<a name="line.3088"></a>
+<span class="sourceLineNo">3089</span>   * @param nonce A unique identifier for this operation from the client or process identified by<a name="line.3089"></a>
+<span class="sourceLineNo">3090</span>   * &lt;code&gt;nonceGroup&lt;/code&gt; (the source must ensure each operation gets a unique id).<a name="line.3090"></a>
+<span class="sourceLineNo">3091</span>   * @return procedure id<a name="line.3091"></a>
+<span class="sourceLineNo">3092</span>   */<a name="line.3092"></a>
+<span class="sourceLineNo">3093</span>  long createNamespace(final NamespaceDescriptor namespaceDescriptor, final long nonceGroup,<a name="line.3093"></a>
+<span class="sourceLineNo">3094</span>      final long nonce) throws IOException {<a name="line.3094"></a>
+<span class="sourceLineNo">3095</span>    checkInitialized();<a name="line.3095"></a>
+<span class="sourceLineNo">3096</span><a name="line.3096"></a>
+<span class="sourceLineNo">3097</span>    TableName.isLegalNamespaceName(Bytes.toBytes(namespaceDescriptor.getName()));<a name="line.3097"></a>
+<span class="sourceLineNo">3098</span><a name="line.3098"></a>
+<span class="sourceLineNo">3099</span>    return MasterProcedureUtil.submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this,<a name="line.3099"></a>
+<span class="sourceLineNo">3100</span>          nonceGroup, nonce) {<a name="line.3100"></a>
+<span class="sourceLineNo">3101</span>      @Override<a name="line.3101"></a>
+<span class="sourceLineNo">3102</span>      protected void run() throws IOException {<a name="line.3102"></a>
+<span class="sourceLineNo">3103</span>        getMaster().getMasterCoprocessorHost().preCreateNamespace(namespaceDescriptor);<a name="line.3103"></a>
+<span class="sourceLineNo">3104</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.3104"></a>
+<span class="sourceLineNo">3105</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.3105"></a>
+<span class="sourceLineNo">3106</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.3106"></a>
+<span class="sourceLineNo">3107</span>        LOG.info(getClientIdAuditPrefix() + " creating " + namespaceDescriptor);<a name="line.3107"></a>
+<span class="sourceLineNo">3108</span>        // Execute the operation synchronously - wait for the operation to complete before<a name="line.3108"></a>
+<span class="sourceLineNo">3109</span>        // continuing.<a name="line.3109"></a>
+<span class="sourceLineNo">3110</span>        setProcId(getClusterSchema().createNamespace(namespaceDescriptor, getNonceKey(), latch));<a name="line.3110"></a>
+<span class="sourceLineNo">3111</span>        latch.await();<a name="line.3111"></a>
+<span class="sourceLineNo">3112</span>        getMaster().getMasterCoprocessorHost().postCreateNamespace(namespaceDescriptor);<a name="line.3112"></a>
+<span class="sourceLineNo">3113</span>      }<a name="line.3113"></a>
+<span class="sourceLineNo">3114</span><a name="line.3114"></a>
+<span class="sourceLineNo">3115</span>      @Override<a name="line.3115"></a>
+<span class="sourceLineNo">3116</span>      protected String getDescription() {<a name="line.3116"></a>
+<span class="sourceLineNo">3117</span>        return "CreateNamespaceProcedure";<a name="line.3117"></a>
+<span class="sourceLineNo">3118</span>      }<a name="line.3118"></a>
+<span class="sourceLineNo">3119</span>    });<a name="line.3119"></a>
+<span class="sourceLineNo">3120</span>  }<a name="line.3120"></a>
+<span class="sourceLineNo">3121</span><a name="line.3121"></a>
+<span class="sourceLineNo">3122</span>  /**<a name="line.3122"></a>
+<span class="sourceLineNo">3123</span>   * Modify an existing Namespace.<a name="line.3123"></a>
+<span class="sourceLineNo">3124</span>   * @param nonceGroup Identifier for the source of the request, a client or process.<a name="line.3124"></a>
+<span class="sourceLineNo">3125</span>   * @param nonce A unique identifier for this operation from the client or process identified by<a name="line.3125"></a>
+<span class="sourceLineNo">3126</span>   * &lt;code&gt;nonceGroup&lt;/code&gt; (the source must ensure each operation gets a unique id).<a name="line.3126"></a>
+<span class="sourceLineNo">3127</span>   * @return procedure id<a name="line.3127"></a>
+<span class="sourceLineNo">3128</span>   */<a name="line.3128"></a>
+<span class="sourceLineNo">3129</span>  long modifyNamespace(final NamespaceDescriptor newNsDescriptor, final long nonceGroup,<a name="line.3129"></a>
+<span class="sourceLineNo">3130</span>      final long nonce) throws IOException {<a name="line.3130"></a>
+<span class="sourceLineNo">3131</span>    checkInitialized();<a name="line.3131"></a>
+<span class="sourceLineNo">3132</span><a name="line.3132"></a>
+<span class="sourceLineNo">3133</span>    TableName.isLegalNamespaceName(Bytes.toBytes(newNsDescriptor.getName()));<a name="line.3133"></a>
+<span class="sourceLineNo">3134</span><a name="line.3134"></a>
+<span class="sourceLineNo">3135</span>    return MasterProcedureUtil.submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this,<a name="line.3135"></a>
+<span class="sourceLineNo">3136</span>          nonceGroup, nonce) {<a name="line.3136"></a>
+<span class="sourceLineNo">3137</span>      @Override<a name="line.3137"></a>
+<span class="sourceLineNo">3138</span>      protected void run() throws IOException {<a name="line.3138"></a>
+<span class="sourceLineNo">3139</span>        NamespaceDescriptor oldNsDescriptor = getNamespace(newNsDescriptor.getName());<a name="line.3139"></a>
+<span class="sourceLineNo">3140</span>        getMaster().getMasterCoprocessorHost().preModifyNamespace(oldNsDescriptor, newNsDescriptor);<a name="line.3140"></a>
+<span class="sourceLineNo">3141</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.3141"></a>
+<span class="sourceLineNo">3142</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.3142"></a>
+<span class="sourceLineNo">3143</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.3143"></a>
+<span class="sourceLineNo">3144</span>        LOG.info(getClientIdAuditPrefix() + " modify " + newNsDescriptor);<a name="line.3144"></a>
+<span class="sourceLineNo">3145</span>        // Execute the operation synchronously - wait for the operation to complete before<a name="line.3145"></a>
+<span class="sourceLineNo">3146</span>        // continuing.<a name="line.3146"></a>
+<span class="sourceLineNo">3147</span>        setProcId(getClusterSchema().modifyNamespace(newNsDescriptor, getNonceKey(), latch));<a name="line.3147"></a>
+<span class="sourceLineNo">3148</span>        latch.await();<a name="line.3148"></a>
+<span class="sourceLineNo">3149</span>        getMaster().getMasterCoprocessorHost().postModifyNamespace(oldNsDescriptor,<a name="line.3149"></a>
+<span class="sourceLineNo">3150</span>          newNsDescriptor);<a name="line.3150"></a>
+<span class="sourceLineNo">3151</span>      }<a name="line.3151"></a>
+<span class="sourceLineNo">3152</span><a name="line.3152"></a>
+<span class="sourceLineNo">3153</span>      @Override<a name="line.3153"></a>
+<span class="sourceLineNo">3154</span>      protected String getDescription() {<a name="line.3154"></a>
+<span class="sourceLineNo">3155</span>        return "ModifyNamespaceProcedure";<a name="line.3155"></a>
+<span class="sourceLineNo">3156</span>      }<a name="line.3156"></a>
+<span class="sourceLineNo">3157</span>    });<a name="line.3157"></a>
+<span class="sourceLineNo">3158</span>  }<a name="line.3158"></a>
+<span class="sourceLineNo">3159</span><a name="line.3159"></a>
+<span class="sourceLineNo">3160</span>  /**<a name="line.3160"></a>
+<span class="sourceLineNo">3161</span>   * Delete an existing Namespace. Only empty Namespaces (no tables) can be removed.<a name="line.3161"></a>
+<span class="sourceLineNo">3162</span>   * @param nonceGroup Identifier for the source of the request, a client or process.<a name="line.3162"></a>
+<span class="sourceLineNo">3163</span>   * @param nonce A unique identifier for this operation from the client or process identified by<a name="line.3163"></a>
+<span class="sourceLineNo">3164</span>   * &lt;code&gt;nonceGroup&lt;/code&gt; (the source must ensure each operation gets a unique id).<a name="line.3164"></a>
+<span class="sourceLineNo">3165</span>   * @return procedure id<a name="line.3165"></a>
+<span class="sourceLineNo">3166</span>   */<a name="line.3166"></a>
+<span class="sourceLineNo">3167</span>  long deleteNamespace(final String name, final long nonceGroup, final long nonce)<a name="line.3167"></a>
+<span class="sourceLineNo">3168</span>      throws IOException {<a name="line.3168"></a>
+<span class="sourceLineNo">3169</span>    checkInitialized();<a name="line.3169"></a>
+<span class="sourceLineNo">3170</span><a name="line.3170"></a>
+<span class="sourceLineNo">3171</span>    return MasterProcedureUtil.submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this,<a name="line.3171"></a>
+<span class="sourceLineNo">3172</span>          nonceGroup, nonce) {<a name="line.3172"></a>
+<span class="sourceLineNo">3173</span>      @Override<a name="line.3173"></a>
+<span class="sourceLineNo">3174</span>      protected void run() throws IOException {<a name="line.3174"></a>
+<span class="sourceLineNo">3175</span>        getMaster().getMasterCoprocessorHost().preDeleteNamespace(name);<a name="line.3175"></a>
+<span class="sourceLineNo">3176</span>        LOG.info(getClientIdAuditPrefix() + " delete " + name);<a name="line.3176"></a>
+<span class="sourceLineNo">3177</span>        // Execute the operation synchronously - wait for the operation to complete before<a name="line.3177"></a>
+<span class="sourceLineNo">3178</span>        // continuing.<a name="line.3178"></a>
+<span class="sourceLineNo">3179</span>        //<a name="line.3179"></a>
+<span class="sourceLineNo">3180</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.3180"></a>
+<span class="sourceLineNo">3181</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.3181"></a>
+<span class="sourceLineNo">3182</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.3182"></a>
+<span class="sourceLineNo">3183</span>        setProcId(submitProcedure(<a name="line.3183"></a>
+<span class="sourceLineNo">3184</span>              new DeleteNamespaceProcedure(procedureExecutor.getEnvironment(), name, latch)));<a name="line.3184"></a>
+<span class="sourceLineNo">3185</span>        latch.await();<a name="line.3185"></a>
+<span class="sourceLineNo">3186</span>        // Will not be invoked in the face of Exception thrown by the Procedure's execution<a name="line.3186"></a>
+<span class="sourceLineNo">3187</span>        getMaster().getMasterCoprocessorHost().postDeleteNamespace(name);<a name="line.3187"></a>
+<span class="sourceLineNo">3188</span>      }<a name="line.3188"></a>
+<span class="sourceLineNo">3189</span><a name="line.3189"></a>
+<span class="sourceLineNo">3190</span>      @Override<a name="line.3190"></a>
+<span class="sourceLineNo">3191</span>      protected String getDescription() {<a name="line.3191"></a>
+<span class="sourceLineNo">3192</span>        return "DeleteNamespaceProcedure";<a name="line.3192"></a>
+<span class="sourceLineNo">3193</span>      }<a name="line.3193"></a>
+<span class="sourceLineNo">3194</span>    });<a name="line.3194"></a>
+<span class="sourceLineNo">3195</span>  }<a name="line.3195"></a>
+<span class="sourceLineNo">3196</span><a name="line.3196"></a>
+<span class="sourceLineNo">3197</span>  /**<a name="line.3197"></a>
+<span class="sourceLineNo">3198</span>   * Get a Namespace<a name="line.3198"></a>
+<span class="sourceLineNo">3199</span>   * @param name Name of the Namespace<a name="line.3199"></a>
+<span class="sourceLineNo">3200</span>   * @return Namespace descriptor for &lt;code&gt;name&lt;/code&gt;<a name="line.3200"></a>
+<span class="sourceLineNo">3201</span>   */<a name="line.3201"></a>
+<span class="sourceLineNo">3202</span>  NamespaceDescriptor getNamespace(String name) throws IOException {<a name="line.3202"></a>
+<span class="sourceLineNo">3203</span>    checkInitialized();<a name="line.3203"></a>
+<span class="sourceLineNo">3204</span>    if (this.cpHost != null) this.cpHost.preGetNamespaceDescriptor(name);<a name="line.3204"></a>
+<span class="sourceLineNo">3205</span>    NamespaceDescriptor nsd = this.clusterSchemaService.getNamespace(name);<a name="line.3205"></a>
+<span class="sourceLineNo">3206</span>    if (this.cpHost != null) this.cpHost.postGetNamespaceDescriptor(nsd);<a name="line.3206"></a>
+<span class="sourceLineNo">3207</span>    return nsd;<a name="line.3207"></a>
+<span class="sourceLineNo">3208</span>  }<a name="line.3208"></a>
+<span class="sourceLineNo">3209</span><a name="line.3209"></a>
+<span class="sourceLineNo">3210</span>  /**<a name="line.3210"></a>
+<span class="sourceLineNo">3211</span>   * Get all Namespaces<a name="line.3211"></a>
+<span class="sourceLineNo">3212</span>   * @return All Namespace descriptors<a name="line.3212"></a>
+<span class="sourceLineNo">3213</span>   */<a name="line.3213"></a>
+<span class="sourceLineNo">3214</span>  List&lt;NamespaceDescriptor&gt; getNamespaces() throws IOException {<a name="line.3214"></a>
+<span class="sourceLineNo">3215</span>    checkInitialized();<a name="line.3215"></a>
+<span class="sourceLineNo">3216</span>    final List&lt;NamespaceDescriptor&gt; nsds = new ArrayList&lt;&gt;();<a name="line.3216"></a>
+<span class="sourceLineNo">3217</span>    if (cpHost != null) {<a name="line.3217"></a>
+<span class="sourceLineNo">3218</span>      cpHost.preListNamespaceDescriptors(nsds);<a name="line.3218"></a>
+<span class="sourceLineNo">3219</span>    }<a name="line.3219"></a>
+<span class="sourceLineNo">3220</span>    nsds.addAll(this.clusterSchemaService.getNamespaces());<a name="line.3220"></a>
+<span class="sourceLineNo">3221</span>    if (this.cpHost != null) {<a name="line.3221"></a>
+<span class="sourceLineNo">3222</span>      this.cpHost.postListNamespaceDescriptors(nsds);<a name="line.3222"></a>
+<span class="sourceLineNo">3223</span>    }<a name="line.3223"></a>
+<span class="sourceLineNo">3224</span>    return nsds;<a name="line.3224"></a>
+<span class="sourceLineNo">3225</span>  }<a name="line.3225"></a>
+<span class="sourceLineNo">3226</span><a name="line.3226"></a>
+<span class="sourceLineNo">3227</span>  /**<a name="line.3227"></a>
+<span class="sourceLineNo">3228</span>   * List namespace names<a name="line.3228"></a>
+<span class="sourceLineNo">3229</span>   * @return All namespace names<a name="line.3229"></a>
+<span class="sourceLineNo">3230</span>   */<a name="line.3230"></a>
+<span class="sourceLineNo">3231</span>  public List&lt;String&gt; listNamespaces() throws IOException {<a name="line.3231"></a>
+<span class="sourceLineNo">3232</span>    checkInitialized();<a name="line.3232"></a>
+<span class="sourceLineNo">3233</span>    List&lt;String&gt; namespaces = new ArrayList&lt;&gt;();<a name="line.3233"></a>
+<span class="sourceLineNo">3234</span>    if (cpHost != null) {<a name="line.3234"></a>
+<span class="sourceLineNo">3235</span>      cpHost.preListNamespaces(namespaces);<a name="line.3235"></a>
+<span class="sourceLineNo">3236</span>    }<a name="line.3236"></a>
+<span class="sourceLineNo">3237</span>    for (NamespaceDescriptor namespace : clusterSchemaService.getNamespaces()) {<a name="line.3237"></a>
+<span class="sourceLineNo">3238</span>      namespaces.add(namespace.getName());<a name="line.3238"></a>
+<span class="sourceLineNo">3239</span>    }<a name="line.3239"></a>
+<span class="sourceLineNo">3240</span>    if (cpHost != null) {<a name="line.3240"></a>
+<span class="sourceLineNo">3241</span>      cpHost.postListNamespaces(namespaces);<a name="line.3241"></a>
+<span class="sourceLineNo">3242</span>    }<a name="line.3242"></a>
+<span class="sourceLineNo">3243</span>    return namespaces;<a name="line.3243"></a>
+<span class="sourceLineNo">3244</span>  }<a name="line.3244"></a>
+<span class="sourceLineNo">3245</span><a name="line.3245"></a>
+<span class="sourceLineNo">3246</span>  @Override<a name="line.3246"></a>
+<span class="sourceLineNo">3247</span>  public List&lt;TableName&gt; listTableNamesByNamespace(String name) throws IOException {<a name="line.3247"></a>
+<span class="sourceLineNo">3248</span>    checkInitialized();<a name="line.3248"></a>
+<span class="sourceLineNo">3249</span>    return listTableNames(name, null, true);<a name="line.3249"></a>
+<span class="sourceLineNo">3250</span>  }<a name="line.3250"></a>
+<span class="sourceLineNo">3251</span><a name="line.3251"></a>
+<span class="sourceLineNo">3252</span>  @Override<a name="line.3252"></a>
+<span class="sourceLineNo">3253</span>  public List&lt;TableDescriptor&gt; listTableDescriptorsByNamespace(String name) throws IOException {<a name="line.3253"></a>
+<span class="sourceLineNo">3254</span>    checkInitialized();<a name="line.3254"></a>
+<span class="sourceLineNo">3255</span>    return listTableDescriptors(name, null, null, true);<a name="line.3255"></a>
+<span class="sourceLineNo">3256</span>  }<a name="line.3256"></a>
+<span class="sourceLineNo">3257</span><a name="line.3257"></a>
+<span class="sourceLineNo">3258</span>  @Override<a name="line.3258"></a>
+<span class="sourceLineNo">3259</span>  public boolean abortProcedure(final long procId, final boolean mayInterruptIfRunning)<a name="line.3259"></a>
+<span class="sourceLineNo">3260</span>      throws IOException {<a name="line.3260"></a>
+<span class="sourceLineNo">3261</span>    if (cpHost != null) {<a name="line.3261"></a>
+<span class="sourceLineNo">3262</span>      cpHost.preAbortProcedure(this.procedureExecutor, procId);<a name="line.3262"></a>
+<span class="sourceLineNo">3263</span>    }<a name="line.3263"></a>
+<span class="sourceLineNo">3264</span><a name="line.3264"></a>
+<span class="sourceLineNo">3265</span>    final boolean result = this.procedureExecutor.abort(procId, mayInterruptIfRunning);<a name="line.3265"></a>
+<span class="sourceLineNo">3266</span><a name="line.3266"></a>
+<span class="sourceLineNo">3267</span>    if (cpHost != null) {<a name="line.3267"></a>
+<span class="sourceLineNo">3268</span>      cpHost.postAbortProcedure();<a name="line.3268"></a>
+<span class="sourceLineNo">3269</span>    }<a name="line.3269"></a>
+<span class="sourceLineNo">3270</span><a name="line.3270"></a>
+<span class="sourceLineNo">3271</span>    return result;<a name="line.3271"></a>
+<span class="sourceLineNo">3272</span>  }<a name="line.3272"></a>
+<span class="sourceLineNo">3273</span><a name="line.3273"></a>
+<span class="sourceLineNo">3274</span>  @Override<a name="line.3274"></a>
+<span class="sourceLineNo">3275</span>  public List&lt;Procedure&lt;?&gt;&gt; getProcedures() throws IOException {<a name="line.3275"></a>
+<span class="sourceLineNo">3276</span>    if (cpHost != null) {<a name="line.3276"></a>
+<span class="sourceLineNo">3277</span>      cpHost.preGetProcedures();<a name="line.3277"></a>
+<span class="sourceLineNo">3278</span>    }<a name="line.3278"></a>
+<span class="sourceLineNo">3279</span><a name="line.3279"></a>
+<span class="sourceLineNo">3280</span>    @SuppressWarnings({ "unchecked", "rawtypes" })<a name="line.3280"></a>
+<span class="sourceLineNo">3281</span>    List&lt;Procedure&lt;?&gt;&gt; procList = (List) this.procedureExecutor.getProcedures();<a name="line.3281"></a>
+<span class="sourceLineNo">3282</span><a name="line.3282"></a>
+<span class="sourceLineNo">3283</span>    if (cpHost != null) {<a name="line.3283"></a>
+<span class="sourceLineNo">3284</span>      cpHost.postGetProcedures(procList);<a name="line.3284"></a>
+<span class="sourceLineNo">3285</span>    }<a name="line.3285"></a>
+<span class="sourceLineNo">3286</span><a name="line.3286"></a>
+<span class="sourceLineNo">3287</span>    return procList;<a name="line.3287"></a>
+<span class="sourceLineNo">3288</span>  }<a name="line.3288"></a>
+<span class="sourceLineNo">3289</span><a name="line.3289"></a>
+<span class="sourceLineNo">3290</span>  @Override<a name="line.3290"></a>
+<span class="sourceLineNo">3291</span>  public List&lt;LockedResource&gt; getLocks() throws IOException {<a name="line.3291"></a>
+<span class="sourceLineNo">3292</span>    if (cpHost != null) {<a name="line.3292"></a>
+<span class="sourceLineNo">3293</span>      cpHost.preGetLocks();<a name="line.3293"></a>
+<span class="sourceLineNo">3294</span>    }<a name="line.3294"></a>
+<span class="sourceLineNo">3295</span><a name="line.3295"></a>
+<span class="sourceLineNo">3296</span>    MasterProcedureScheduler procedureScheduler =<a name="line.3296"></a>
+<span class="sourceLineNo">3297</span>      procedureExecutor.getEnvironment().getProcedureScheduler();<a name="line.3297"></a>
+<span class="sourceLineNo">3298</span><a name="line.3298"></a>
+<span class="sourceLineNo">3299</span>    final List&lt;LockedResource&gt; lockedResources = procedureScheduler.getLocks();<a name="line.3299"></a>
+<span class="sourceLineNo">3300</span><a name="line.3300"></a>
+<span class="sourceLineNo">3301</span>    if (cpHost != null) {<a name="line.3301"></a>
+<span class="sourceLineNo">3302</span>      cpHost.postGetLocks(lockedResources);<a name="line.3302"></a>
+<span class="sourceLineNo">3303</span>    }<a name="line.3303"></a>
+<span class="sourceLineNo">3304</span><a name="line.3304"></a>
+<span class="sourceLineNo">3305</span>    return lockedResources;<a name="line.3305"></a>
+<span class="sourceLineNo">3306</span>  }<a name="line.3306"></a>
+<span class="sourceLineNo">3307</span><a name="line.3307"></a>
+<span class="sourceLineNo">3308</span>  /**<a name="line.3308"></a>
+<span class="sourceLineNo">3309</span>   * Returns the list of table descriptors that match the specified request<a name="line.3309"></a>
+<span class="sourceLineNo">3310</span>   * @param namespace the namespace to query, or null if querying for all<a name="line.3310"></a>
+<span class="sourceLineNo">3311</span>   * @param regex The regular expression to match against, or null if querying for all<a name="line.3311"></a>
+<span class="sourceLineNo">3312</span>   * @param tableNameList the list of table names, or null if querying for all<a name="line.3312"></a>
+<span class="sourceLineNo">3313</span>   * @param includeSysTables False to match only against userspace tables<a name="line.3313"></a>
+<span class="sourceLineNo">3314</span>   * @return the list of table descriptors<a name="line.3314"></a>
+<span class="sourceLineNo">3315</span>   */<a name="line.3315"></a>
+<span class="sourceLineNo">3316</span>  public List&lt;TableDescriptor&gt; listTableDescriptors(final String namespace, final String regex,<a name="line.3316"></a>
+<span class="sourceLineNo">3317</span>      final List&lt;TableName&gt; tableNameList, final boolean includeSysTables)<a name="line.3317"></a>
+<span class="sourceLineNo">3318</span>  throws IOException {<a name="line.3318"></a>
+<span class="sourceLineNo">3319</span>    List&lt;TableDescriptor&gt; htds = new ArrayList&lt;&gt;();<a name="line.3319"></a>
+<span class="sourceLineNo">3320</span>    if (cpHost != null) {<a name="line.3320"></a>
+<span class="sourceLineNo">3321</span>      cpHost.preGetTableDescriptors(tableNameList, htds, regex);<a name="line.3321"></a>
+<span class="sourceLineNo">3322</span>    }<a name="line.3322"></a>
+<span class="sourceLineNo">3323</span>    htds = getTableDescriptors(htds, namespace, regex, tableNameList, includeSysTables);<a name="line.3323"></a>
+<span class="sourceLineNo">3324</span>    if (cpHost != null) {<a name="line.3324"></a>
+<span class="sourceLineNo">3325</span>      cpHost.postGetTableDescriptors(tableNameList, htds, regex);<a name="line.3325"></a>
+<span class="sourceLineNo">3326</span>    }<a name="line.3326"></a>
+<span class="sourceLineNo">3327</span>    return htds;<a name="line.3327"></a>
+<span class="sourceLineNo">3328</span>  }<a name="line.3328"></a>
+<span class="sourceLineNo">3329</span><a name="line.3329"></a>
+<span class="sourceLineNo">3330</span>  /**<a name="line.3330"></a>
+<span class="sourceLineNo">3331</span>   * Returns the list of table names that match the specified request<a name="line.3331"></a>
+<span class="sourceLineNo">3332</span>   * @param regex The regular expression to match against, or null if querying for all<a name="line.3332"></a>
+<span class="sourceLineNo">3333</span>   * @param namespace the namespace to query, or null if querying for all<a name="line.3333"></a>
+<span class="sourceLineNo">3334</span>   * @param includeSysTables False to match only against userspace tables<a name="line.3334"></a>
+<span class="sourceLineNo">3335</span>   * @return the list of table names<a name="line.3335"></a>
+<span class="sourceLineNo">3336</span>   */<a name="line.3336"></a>
+<span class="sourceLineNo">3337</span>  public List&lt;TableName&gt; listTableNames(final String namespace, final String regex,<a name="line.3337"></a>
+<span class="sourceLineNo">3338</span>      final boolean includeSysTables) throws IOException {<a name="line.3338"></a>
+<span class="sourceLineNo">3339</span>    List&lt;TableDescriptor&gt; htds = new ArrayList&lt;&gt;();<a name="line.3339"></a>
+<span class="sourceLineNo">3340</span>    if (cpHost != null) {<a name="line.3340"></a>
+<span class="sourceLineNo">3341</span>      cpHost.preGetTableNames(htds, regex);<a name="line.3341"></a>
+<span class="sourceLineNo">3342</span>    }<a name="line.3342"></a>
+<span class="sourceLineNo">3343</span>    htds = getTableDescriptors(htds, namespace, regex, null, includeSysTables);<a name="line.3343"></a>
+<span class="sourceLineNo">3344</span>    if (cpHost != null) {<a name="line.3344"></a>
+<span class="sourceLineNo">3345</span>      cpHost.postGetTableNames(htds, regex);<a name="line.3345"></a>
+<span class="sourceLineNo">3346</span>    }<a name="line.3346"></a>
+<span class="sourceLineNo">3347</span>    List&lt;TableName&gt; result = new ArrayList&lt;&gt;(htds.size());<a name="line.3347"></a>
+<span class="sourceLineNo">3348</span>    for (TableDescriptor htd: htds) result.add(htd.getTableName());<a name="line.3348"></a>
+<span class="sourceLineNo">3349</span>    return result;<a name="line.3349"></a>
+<span class="sourceLineNo">3350</span>  }<a name="line.3350"></a>
+<span class="sourceLineNo">3351</span><a name="line.3351"></a>
+<span class="sourceLineNo">3352</span>  /**<a name="line.3352"></a>
+<span class="sourceLineNo">3353</span>   * @return list of table table descriptors after filtering by regex and whether to include system<a name="line.3353"></a>
+<span class="sourceLineNo">3354</span>   *    tables, etc.<a name="line.3354"></a>
+<span class="sourceLineNo">3355</span>   * @throws IOException<a name="line.3355"></a>
+<span class="sourceLineNo">3356</span>   */<a name="line.3356"></a>
+<span class="sourceLineNo">3357</span>  private List&lt;TableDescriptor&gt; getTableDescriptors(final List&lt;TableDescriptor&gt; htds,<a name="line.3357"></a>
+<span class="sourceLineNo">3358</span>      final String namespace, final String regex, final List&lt;TableName&gt; tableNameList,<a name="line.3358"></a>
+<span class="sourceLineNo">3359</span>      final boolean includeSysTables)<a name="line.3359"></a>
+<span class="sourceLineNo">3360</span>  throws IOException {<a name="line.3360"></a>
+<span class="sourceLineNo">3361</span>    if (tableNameList == null || tableNameList.isEmpty()) {<a name="line.3361"></a>
+<span class="sourceLineNo">3362</span>      // request for all TableDescriptors<a name="line.3362"></a>
+<span class="sourceLineNo">3363</span>      Collection&lt;TableDescriptor&gt; allHtds;<a name="line.3363"></a>
+<span class="sourceLineNo">3364</span>      if (namespace != null &amp;&amp; namespace.length() &gt; 0) {<a name="line.3364"></a>
+<span class="sourceLineNo">3365</span>        // Do a check on the namespace existence. Will fail if does not exist.<a name="line.3365"></a>
+<span class="sourceLineNo">3366</span>        this.clusterSchemaService.getNamespace(namespace);<a name="line.3366"></a>
+<span class="sourceLineNo">3367</span>        allHtds = tableDescriptors.getByNamespace(namespace).values();<a name="line.3367"></a>
+<span class="sourceLineNo">3368</span>      } else {<a name="line.3368"></a>
+<span class="sourceLineNo">3369</span>        allHtds = tableDescriptors.getAll().values();<a name="line.3369"></a>
+<span class="sourceLineNo">3370</span>      }<a name="line.3370"></a>
+<span class="sourceLineNo">3371</span>      for (TableDescriptor desc: allHtds) {<a name="line.3371"></a>
+<span class="sourceLineNo">3372</span>        if (tableStateManager.isTablePresent(desc.getTableName())<a name="line.3372"></a>
+<span class="sourceLineNo">3373</span>            &amp;&amp; (includeSysTables || !desc.getTableName().isSystemTable())) {<a name="line.3373"></a>
+<span class="sourceLineNo">3374</span>          htds.add(desc);<a name="line.3374"></a>
+<span class="sourceLineNo">3375</span>        }<a name="line.3375"></a>
+<span class="sourceLineNo">3376</span>      }<a name="line.3376"></a>
+<span class="sourceLineNo">3377</span>    } else {<a name="line.3377"></a>
+<span class="sourceLineNo">3378</span>      for (TableName s: tableNameList) {<a name="line.3378"></a>
+<span class="sourceLineNo">3379</span>        if (tableStateManager.isTablePresent(s)) {<a name="line.3379"></a>
+<span class="sourceLineNo">3380</span>          TableDescriptor desc = tableDescriptors.get(s);<a name="line.3380"></a>
+<span class="sourceLineNo">3381</span>          if (desc != null) {<a name="line.3381"></a>
+<span class="sourceLineNo">3382</span>            htds.add(desc);<a name="line.3382"></a>
+<span class="sourceLineNo">3383</span>          }<a name="line.3383"></a>
+<span class="sourceLineNo">3384</span>        }<a name="line.3384"></a>
+<span class="sourceLineNo">3385</span>      }<a name="line.3385"></a>
+<span class="sourceLineNo">3386</span>    }<a name="line.3386"></a>
+<span class="sourceLineNo">3387</span><a name="line.3387"></a>
+<span class="sourceLineNo">3388</span>    // Retains only those matched by regular expression.<a name="line.3388"></a>
+<span class="sourceLineNo">3389</span>    if (regex != null) filterTablesByRegex(htds, Pattern.compile(regex));<a name="line.3389"></a>
+<span class="sourceLineNo">3390</span>    return htds;<a name="line.3390"></a>
+<span class="sourceLineNo">3391</span>  }<a name="line.3391"></a>
+<span class="sourceLineNo">3392</span><a name="line.3392"></a>
+<span class="sourceLineNo">3393</span>  /**<a name="line.3393"></a>
+<span class="sourceLineNo">3394</span>   * Removes the table descriptors that don't match the pattern.<a name="line.3394"></a>
+<span class="sourceLineNo">3395</span>   * @param descriptors list of table descriptors to filter<a name="line.3395"></a>
+<span class="sourceLineNo">3396</span>   * @param pattern the regex to use<a name="line.3396"></a>
+<span class="sourceLineNo">3397</span>   */<a name="line.3397"></a>
+<span class="sourceLineNo">3398</span>  private static void filterTablesByRegex(final Collection&lt;TableDescriptor&gt; descriptors,<a name="line.3398"></a>
+<span class="sourceLineNo">3399</span>      final Pattern pattern) {<a name="line.3399"></a>
+<span class="sourceLineNo">3400</span>    final String defaultNS = NamespaceDescriptor.DEFAULT_NAMESPACE_NAME_STR;<a name="line.3400"></a>
+<span class="sourceLineNo">3401</span>    Iterator&lt;TableDescriptor&gt; itr = descriptors.iterator();<a name="line.3401"></a>
+<span class="sourceLineNo">3402</span>    while (itr.hasNext()) {<a name="line.3402"></a>
+<span class="sourceLineNo">3403</span>      TableDescriptor htd = itr.next();<a name="line.3403"></a>
+<span class="sourceLineNo">3404</span>      String tableName = htd.getTableName().getNameAsString();<a name="line.3404"></a>
+<span class="sourceLineNo">3405</span>      boolean matched = pattern.matcher(tableName).matches();<a name="line.3405"></a>
+<span class="sourceLineNo">3406</span>      if (!matched &amp;&amp; htd.getTableName().getNamespaceAsString().equals(defaultNS)) {<a name="line.3406"></a>
+<span class="sourceLineNo">3407</span>        matched = pattern.matcher(defaultNS + TableName.NAMESPACE_DELIM + tableName).matches();<a name="line.3407"></a>
+<span class="sourceLineNo">3408</span>      }<a name="line.3408"></a>
+<span class="sourceLineNo">3409</span>      if (!matched) {<a name="line.3409"></a>
+<span class="sourceLineNo">3410</span>        itr.remove();<a name="line.3410"></a>
+<span class="sourceLineNo">3411</span>      }<a name="line.3411"></a>
+<span class="sourceLineNo">3412</span>    }<a name="line.3412"></a>
+<span class="sourceLineNo">3413</span>  }<a name="line.3413"></a>
+<span class="sourceLineNo">3414</span><a name="line.3414"></a>
+<span class="sourceLineNo">3415</span>  @Override<a name="line.3415"></a>
+<span class="sourceLineNo">3416</span>  public long getLastMajorCompactionTimestamp(TableName table) throws IOException {<a name="line.3416"></a>
+<span class="sourceLineNo">3417</span>    return getClusterMetrics(EnumSet.of(Option.LIVE_SERVERS))<a name="line.3417"></a>
+<span class="sourceLineNo">3418</span>        .getLastMajorCompactionTimestamp(table);<a name="line.3418"></a>
+<span class="sourceLineNo">3419</span>  }<a name="line.3419"></a>
+<span class="sourceLineNo">3420</span><a name="line.3420"></a>
+<span class="sourceLineNo">3421</span>  @Override<a name="line.3421"></a>
+<span class="sourceLineNo">3422</span>  public long getLastMajorCompactionTimestampForRegion(byte[] regionName) throws IOException {<a name="line.3422"></a>
+<span class="sourceLineNo">3423</span>    return getClusterMetrics(EnumSet.of(Option.LIVE_SERVERS))<a name="line.3423"></a>
+<span class="sourceLineNo">3424</span>        .getLastMajorCompactionTimestamp(regionName);<a name="line.3424"></a>
+<span class="sourceLineNo">3425</span>  }<a name="line.3425"></a>
+<span class="sourceLineNo">3426</span><a name="line.3426"></a>
+<span class="sourceLineNo">3427</span>  /**<a name="line.3427"></a>
+<span class="sourceLineNo">3428</span>   * Gets the mob file compaction state for a specific table.<a name="line.3428"></a>
+<span class="sourceLineNo">3429</span>   * Whether all the mob files are selected is known during the compaction execution, but<a name="line.3429"></a>
+<span class="sourceLineNo">3430</span>   * the statistic is done just before compaction starts, it is hard to know the compaction<a name="line.3430"></a>
+<span class="sourceLineNo">3431</span>   * type at that time, so the rough statistics are chosen for the mob file compaction. Only two<a name="line.3431"></a>
+<span class="sourceLineNo">3432</span>   * compaction states are available, CompactionState.MAJOR_AND_MINOR and CompactionState.NONE.<a name="line.3432"></a>
+<span class="sourceLineNo">3433</span>   * @param tableName The current table name.<a name="line.3433"></a>
+<span class="sourceLineNo">3434</span>   * @return If a given table is in mob file compaction now.<a name="line.3434"></a>
+<span class="sourceLineNo">3435</span>   */<a name="line.3435"></a>
+<span class="sourceLineNo">3436</span>  public CompactionState getMobCompactionState(TableName tableName) {<a name="line.3436"></a>
+<span class="sourceLineNo">3437</span>    AtomicInteger compactionsCount = mobCompactionStates.get(tableName);<a name="line.3437"></a>
+<span class="sourceLineNo">3438</span>    if (compactionsCount != null &amp;&amp; compactionsCount.get() != 0) {<a name="line.3438"></a>
+<span class="sourceLineNo">3439</span>      return CompactionState.MAJOR_AND_MINOR;<a name="line.3439"></a>
+<span class="sourceLineNo">3440</span>    }<a name="line.3440"></a>
+<span class="sourceLineNo">3441</span>    return CompactionState.NONE;<a name="line.3441"></a>
+<span class="sourceLineNo">3442</span>  }<a name="line.3442"></a>
+<span class="sourceLineNo">3443</span><a name="line.3443"></a>
+<span class="sourceLineNo">3444</span>  public void reportMobCompactionStart(TableName tableName) throws IOException {<a name="line.3444"></a>
+<span class="sourceLineNo">3445</span>    IdLock.Entry lockEntry = null;<a name="line.3445"></a>
+<span class="sourceLineNo">3446</span>    try {<a name="line.3446"></a>
+<span class="sourceLineNo">3447</span>      lockEntry = mobCompactionLock.getLockEntry(tableName.hashCode());<a name="line.3447"></a>
+<span class="sourceLineNo">3448</span>      AtomicInteger compactionsCount = mobCompactionStates.get(tableName);<a name="line.3448"></a>
+<span class="sourceLineNo">3449</span>      if (compactionsCount == null) {<a name="line.3449"></a>
+<span class="sourceLineNo">3450</span>        compactionsCount = new AtomicInteger(0);<a name="line.3450"></a>
+<span class="sourceLineNo">3451</span>        mobCompactionStates.put(tableName, compactionsCount);<a name="line.3451"></a>
+<span class="sourceLineNo">3452</span>      }<a name="line.3452"></a>
+<span class="sourceLineNo">3453</span>      compactionsCount.incrementAndGet();<a name="line.3453"></a>
+<span class="sourceLineNo">3454</span>    } finally {<a name="line.3454"></a>
+<span class="sourceLineNo">3455</span>      if (lockEntry != null) {<a name="line.3455"></a>
+<span class="sourceLineNo">3456</span>        mobCompactionLock.releaseLockEntry(lockEntry);<a name="line.3456"></a>
+<span class="sourceLineNo">3457</span>      }<a name="line.3457"></a>
+<span class="sourceLineNo">3458</span>    }<a name="line.3458"></a>
+<span class="sourceLineNo">3459</span>  }<a name="line.3459"></a>
+<span class="sourceLineNo">3460</span><a name="line.3460"></a>
+<span class="sourceLineNo">3461</span>  public void reportMobCompactionEnd(TableName tableName) throws IOException {<a name="line.3461"></a>
+<span class="sourceLineNo">3462</span>    IdLock.Entry lockEntry = null;<a name="line.3462"></a>
+<span class="sourceLineNo">3463</span>    try {<a name="line.3463"></a>
+<span class="sourceLineNo">3464</span>      lockEntry = mobCompactionLock.getLockEntry(tableName.hashCode());<a name="line.3464"></a>
+<span class="sourceLineNo">3465</span>      AtomicInteger compactionsCount = mobCompactionStates.get(tableName);<a name="line.3465"></a>
+<span class="sourceLineNo">3466</span>      if (compactionsCount != null) {<a name="line.3466"></a>
+<span class="sourceLineNo">3467</span>        int count = compactionsCount.decrementAndGet();<a name="line.3467"></a>
+<span class="sourceLineNo">3468</span>        // remove the entry if the count is 0.<a name="line.3468"></a>
+<span class="sourceLineNo">3469</span>        if (count == 0) {<a name="line.3469"></a>
+<span class="sourceLineNo">3470</span>          mobCompactionStates.remove(tableName);<a name="line.3470"></a>
+<span class="sourceLineNo">3471</span>        }<a name="line.3471"></a>
+<span class="sourceLineNo">3472</span>      }<a name="line.3472"></a>
+<span class="sourceLineNo">3473</span>    } finally {<a name="line.3473"></a>
+<span class="sourceLineNo">3474</span>      if (lockEntry != null) {<a name="line.3474"></a>
+<span class="sourceLineNo">3475</span>        mobCompactionLock.releaseLockEntry(lockEntry);<a name="line.3475"></a>
+<span class="sourceLineNo">3476</span>      }<a name="line.3476"></a>
+<span class="sourceLineNo">3477</span>    }<a name="line.3477"></a>
+<span class="sourceLineNo">3478</span>  }<a name="line.3478"></a>
+<span class="sourceLineNo">3479</span><a name="line.3479"></a>
+<span class="sourceLineNo">3480</span>  /**<a name="line.3480"></a>
+<span class="sourceLineNo">3481</span>   * Requests mob compaction.<a name="line.3481"></a>
+<span class="sourceLineNo">3482</span>   * @param tableName The table the compact.<a name="line.3482"></a>
+<span class="sourceLineNo">3483</span>   * @param columns The compacted columns.<a name="line.3483"></a>
+<span class="sourceLineNo">3484</span>   * @param allFiles Whether add all mob files into the compaction.<a name="line.3484"></a>
+<span class="sourceLineNo">3485</span>   */<a name="line.3485"></a>
+<span class="sourceLineNo">3486</span>  public void requestMobCompaction(TableName tableName,<a name="line.3486"></a>
+<span class="sourceLineNo">3487</span>                                   List&lt;ColumnFamilyDescriptor&gt; columns, boolean allFiles) throws IOException {<a name="line.3487"></a>
+<span class="sourceLineNo">3488</span>    mobCompactThread.requestMobCompaction(conf, getFileSystem(), tableName, columns, allFiles);<a name="line.3488"></a>
+<span class="sourceLineNo">3489</span>  }<a name="line.3489"></a>
+<span class="sourceLineNo">3490</span><a name="line.3490"></a>
+<span class="sourceLineNo">3491</span>  /**<a name="line.3491"></a>
+<span class="sourceLineNo">3492</span>   * Queries the state of the {@link LoadBalancerTracker}. If the balancer is not initialized,<a name="line.3492"></a>
+<span class="sourceLineNo">3493</span>   * false is returned.<a name="line.3493"></a>
+<span class="sourceLineNo">3494</span>   *<a name="line.3494"></a>
+<span class="sourceLineNo">3495</span>   * @return The state of the load balancer, or false if the load balancer isn't defined.<a name="line.3495"></a>
+<span class="sourceLineNo">3496</span>   */<a name="line.3496"></a>
+<span class="sourceLineNo">3497</span>  public boolean isBalancerOn() {<a name="line.3497"></a>
+<span class="sourceLineNo">3498</span>    return !isInMaintenanceMode()<a name="line.3498"></a>
+<span class="sourceLineNo">3499</span>        &amp;&amp; loadBalancerTracker != null<a name="line.3499"></a>
+<span class="sourceLineNo">3500</span>        &amp;&amp; loadBalancerTracker.isBalancerOn();<a name="line.3500"></a>
+<span class="sourceLineNo">3501</span>  }<a name="line.3501"></a>
+<span class="sourceLineNo">3502</span><a name="line.3502"></a>
+<span class="sourceLineNo">3503</span>  /**<a name="line.3503"></a>
+<span class="sourceLineNo">3504</span>   * Queries the state of the {@link RegionNormalizerTracker}. If it's not initialized,<a name="line.3504"></a>
+<span class="sourceLineNo">3505</span>   * false is returned.<a name="line.3505"></a>
+<span class="sourceLineNo">3506</span>   */<a name="line.3506"></a>
+<span class="sourceLineNo">3507</span>  public boolean isNormalizerOn() {<a name="line.3507"></a>
+<span class="sourceLineNo">3508</span>    return !isInMaintenanceMode()<a name="line.3508"></a>
+<span class="sourceLineNo">3509</span>        &amp;&amp; regionNormalizerTracker != null<a name="line.3509"></a>
+<span class="sourceLineNo">3510</span>        &amp;&amp; regionNormalizerTracker.isNormalizerOn();<a name="line.3510"></a>
+<span class="sourceLineNo">3511</span>  }<a name="line.3511"></a>
+<span class="sourceLineNo">3512</span><a name="line.3512"></a>
+<span class="sourceLineNo">3513</span>  /**<a name="line.3513"></a>
+<span class="sourceLineNo">3514</span>   * Queries the state of the {@link SplitOrMergeTracker}. If it is not initialized,<a name="line.3514"></a>
+<span class="sourceLineNo">3515</span>   * false is returned. If switchType is illegal, false will return.<a name="line.3515"></a>
+<span class="sourceLineNo">3516</span>   * @param switchType see {@link org.apache.hadoop.hbase.client.MasterSwitchType}<a name="line.3516"></a>
+<span class="sourceLineNo">3517</span>   * @return The state of the switch<a name="line.3517"></a>
+<span class="sourceLineNo">3518</span>   */<a name="line.3518"></a>
+<span class="sourceLineNo">3519</span>  @Override<a name="line.3519"></a>
+<span class="sourceLineNo">3520</span>  public boolean isSplitOrMergeEnabled(MasterSwitchType switchType) {<a name="line.3520"></a>
+<span class="sourceLineNo">3521</span>    return !isInMaintenanceMode()<a name="line.3521"></a>
+<span class="sourceLineNo">3522</span>        &amp;&amp; splitOrMergeTracker != null<a name="line.3522"></a>
+<span class="sourceLineNo">3523</span>        &amp;&amp; splitOrMergeTracker.isSplitOrMergeEnabled(switchType);<a name="line.3523"></a>
+<span class="sourceLineNo">3524</span>  }<a name="line.3524"></a>
+<span class="sourceLineNo">3525</span><a name="line.3525"></a>
+<span class="sourceLineNo">3526</span>  /**<a name="line.3526"></a>
+<span class="sourceLineNo">3527</span>   * Fetch the configured {@link LoadBalancer} class name. If none is set, a default is returned.<a name="line.3527"></a>
+<span class="sourceLineNo">3528</span>   *<a name="line.3528"></a>
+<span class="sourceLineNo">3529</span>   * @return The name of the {@link LoadBalancer} in use.<a name="line.3529"></a>
+<span class="sourceLineNo">3530</span>   */<a name="line.3530"></a>
+<span class="sourceLineNo">3531</span>  public String getLoadBalancerClassName() {<a name="line.3531"></a>
+<span class="sourceLineNo">3532</span>    return conf.get(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, LoadBalancerFactory<a name="line.3532"></a>
+<span class="sourceLineNo">3533</span>        .getDefaultLoadBalancerClass().getName());<a name="line.3533"></a>
+<span class="sourceLineNo">3534</span>  }<a name="line.3534"></a>
+<span class="sourceLineNo">3535</span><a name="line.3535"></a>
+<span class="sourceLineNo">3536</span>  /**<a name="line.3536"></a>
+<span class="sourceLineNo">3537</span>   * @return RegionNormalizerTracker instance<a name="line.3537"></a>
+<span class="sourceLineNo">3538</span>   */<a name="line.3538"></a>
+<span class="sourceLineNo">3539</span>  public RegionNormalizerTracker getRegionNormalizerTracker() {<a name="line.3539"></a>
+<span class="sourceLineNo">3540</span>    return regionNormalizerTracker;<a name="line.3540"></a>
+<span class="sourceLineNo">3541</span>  }<a name="line.3541"></a>
+<span class="sourceLineNo">3542</span><a name="line.3542"></a>
+<span class="sourceLineNo">3543</span>  public SplitOrMergeTracker getSplitOrMergeTracker() {<a name="line.3543"></a>
+<span class="sourceLineNo">3544</span>    return splitOrMergeTracker;<a name="line.3544"></a>
+<span class="sourceLineNo">3545</span>  }<a name="line.3545"></a>
+<span class="sourceLineNo">3546</span><a name="line.3546"></a>
+<span class="sourceLineNo">3547</span>  @Override<a name="line.3547"></a>
+<span class="sourceLineNo">3548</span>  public LoadBalancer getLoadBalancer() {<a name="line.3548"></a>
+<span class="sourceLineNo">3549</span>    return balancer;<a name="line.3549"></a>
+<span class="sourceLineNo">3550</span>  }<a name="line.3550"></a>
+<span class="sourceLineNo">3551</span><a name="line.3551"></a>
+<span class="sourceLineNo">3552</span>  @Override<a name="line.3552"></a>
+<span class="sourceLineNo">3553</span>  public FavoredNodesManager getFavoredNodesManager() {<a name="line.3553"></a>
+<span class="sourceLineNo">3554</span>    return favoredNodesManager;<a name="line.3554"></a>
+<span class="sourceLineNo">3555</span>  }<a name="line.3555"></a>
+<span class="sourceLineNo">3556</span><a name="line.3556"></a>
+<span class="sourceLineNo">3557</span>  private long executePeerProcedure(AbstractPeerProcedure&lt;?&gt; procedure) throws IOException {<a name="line.3557"></a>
+<span class="sourceLineNo">3558</span>    long procId = procedureExecutor.submitProcedure(procedure);<a name="line.3558"></a>
+<span class="sourceLineNo">3559</span>    procedure.getLatch().await();<a name="line.3559"></a>
+<span class="sourceLineNo">3560</span>    return procId;<a name="line.3560"></a>
+<span class="sourceLineNo">3561</span>  }<a name="line.3561"></a>
+<span class="sourceLineNo">3562</span><a name="line.3562"></a>
+<span class="sourceLineNo">3563</span>  @Override<a name="line.3563"></a>
+<span class="sourceLineNo">3564</span>  public long addReplicationPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled)<a name="line.3564"></a>
+<span class="sourceLineNo">3565</span>      throws ReplicationException, IOException {<a name="line.3565"></a>
+<span class="sourceLineNo">3566</span>    LOG.info(getClientIdAuditPrefix() + " creating replication peer, id=" + peerId + ", config=" +<a name="line.3566"></a>
+<span class="sourceLineNo">3567</span>      peerConfig + ", state=" + (enabled ? "ENABLED" : "DISABLED"));<a name="line.3567"></a>
+<span class="sourceLineNo">3568</span>    return executePeerProcedure(new AddPeerProcedure(peerId, peerConfig, enabled));<a name="line.3568"></a>
+<span class="sourceLineNo">3569</span>  }<a name="line.3569"></a>
+<span class="sourceLineNo">3570</span><a name="line.3570"></a>
+<span class="sourceLineNo">3571</span>  @Override<a name="line.3571"></a>
+<span class="sourceLineNo">3572</span>  public long removeReplicationPeer(String peerId) throws ReplicationException, IOException {<a name="line.3572"></a>
+<span class="sourceLineNo">3573</span>    LOG.info(getClientIdAuditPrefix() + " removing replication peer, id=" + peerId);<a name="line.3573"></a>
+<span class="sourceLineNo">3574</span>    return executePeerProcedure(new RemovePeerProcedure(peerId));<a name="line.3574"></a>
+<span class="sourceLineNo">3575</span>  }<a name="line.3575"></a>
+<span class="sourceLineNo">3576</span><a name="line.3576"></a>
+<span class="sourceLineNo">3577</span>  @Override<a name="line.3577"></a>
+<span class="sourceLineNo">3578</span>  public long enableReplicationPeer(String peerId) throws ReplicationException, IOException {<a name="line.3578"></a>
+<span class="sourceLineNo">3579</span>    LOG.info(getClientIdAuditPrefix() + " enable replication peer, id=" + peerId);<a name="line.3579"></a>
+<span class="sourceLineNo">3580</span>    return executePeerProcedure(new EnablePeerProcedure(peerId));<a name="line.3580"></a>
+<span class="sourceLineNo">3581</span>  }<a name="line.3581"></a>
+<span class="sourceLineNo">3582</span><a name="line.3582"></a>
+<span class="sourceLineNo">3583</span>  @Override<a name="line.3583"></a>
+<span class="sourceLineNo">3584</span>  public long disableReplicationPeer(String peerId) throws ReplicationException, IOException {<a name="line.3584"></a>
+<span class="sourceLineNo">3585</span>    LOG.info(getClientIdAuditPrefix() + " disable replication peer, id=" + peerId);<a name="line.3585"></a>
+<span class="sourceLineNo">3586</span>    return executePeerProcedure(new DisablePeerProcedure(peerId));<a name="line.3586"></a>
+<span class="sourceLineNo">3587</span>  }<a name="line.3587"></a>
+<span class="sourceLineNo">3588</span><a name="line.3588"></a>
+<span class="sourceLineNo">3589</span>  @Override<a name="line.3589"></a>
+<span class="sourceLineNo">3590</span>  public ReplicationPeerConfig getReplicationPeerConfig(String peerId)<a name="line.3590"></a>
+<span class="sourceLineNo">3591</span>      throws ReplicationException, IOException {<a name="line.3591"></a>
+<span class="sourceLineNo">3592</span>    if (cpHost != null) {<a name="line.3592"></a>
+<span class="sourceLineNo">3593</span>      cpHost.preGetReplicationPeerConfig(peerId);<a name="line.3593"></a>
+<span class="sourceLineNo">3594</span>    }<a name="line.3594"></a>
+<span class="sourceLineNo">3595</span>    LOG.info(getClientIdAuditPrefix() + " get replication peer config, id=" + peerId);<a name="line.3595"></a>
+<span class="sourceLineNo">3596</span>    ReplicationPeerConfig peerConfig = this.replicationPeerManager.getPeerConfig(peerId)<a name="line.3596"></a>
+<span class="sourceLineNo">3597</span>        .orElseThrow(() -&gt; new ReplicationPeerNotFoundException(peerId));<a name="line.3597"></a>
+<span class="sourceLineNo">3598</span>    if (cpHost != null) {<a name="line.3598"></a>
+<span class="sourceLineNo">3599</span>      cpHost.postGetReplicationPeerConfig(peerId);<a name="line.3599"></a>
+<span class="sourceLineNo">3600</span>    }<a name="line.3600"></a>
+<span class="sourceLineNo">3601</span>    return peerConfig;<a name="line.3601"></a>
+<span class="sourceLineNo">3602</span>  }<a name="line.3602"></a>
+<span class="sourceLineNo">3603</span><a name="line.3603"></a>
+<span class="sourceLineNo">3604</span>  @Override<a name="line.3604"></a>
+<span class="sourceLineNo">3605</span>  public long updateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig)<a name="line.3605"></a>
+<span class="sourceLineNo">3606</span>      throws ReplicationException, IOException {<a name="line.3606"></a>
+<span class="sourceLineNo">3607</span>    LOG.info(getClientIdAuditPrefix() + " update replication peer config, id=" + peerId +<a name="line.3607"></a>
+<span class="sourceLineNo">3608</span>      ", config=" + peerConfig);<a name="line.3608"></a>
+<span class="sourceLineNo">3609</span>    return executePeerProcedure(new UpdatePeerConfigProcedure(peerId, peerConfig));<a name="line.3609"></a>
+<span class="sourceLineNo">3610</span>  }<a name="line.3610"></a>
+<span class="sourceLineNo">3611</span><a name="line.3611"></a>
+<span class="sourceLineNo">3612</span>  @Override<a name="line.3612"></a>
+<span class="sourceLineNo">3613</span>  public List&lt;ReplicationPeerDescription&gt; listReplicationPeers(String regex)<a name="line.3613"></a>
+<span class="sourceLineNo">3614</span>      throws ReplicationException, IOException {<a name="line.3614"></a>
+<span class="sourceLineNo">3615</span>    if (cpHost != null) {<a name="line.3615"></a>
+<span class="sourceLineNo">3616</span>      cpHost.preListReplicationPeers(regex);<a name="line.3616"></a>
+<span class="sourceLineNo">3617</span>    }<a name="line.3617"></a>
+<span class="sourceLineNo">3618</span>    LOG.debug("{} list replication peers, regex={}", getClientIdAuditPrefix(), regex);<a name="line.3618"></a>
+<span class="sourceLineNo">3619</span>    Pattern pattern = regex == null ? null : Pattern.compile(regex);<a name="line.3619"></a>
+<span class="sourceLineNo">3620</span>    List&lt;ReplicationPeerDescription&gt; peers =<a name="line.3620"></a>
+<span class="sourceLineNo">3621</span>      this.replicationPeerManager.listPeers(pattern);<a name="line.3621"></a>
+<span class="sourceLineNo">3622</span>    if (cpHost != null) {<a name="line.3622"></a>
+<span class="sourceLineNo">3623</span>      cpHost.postListReplicationPeers(regex);<a name="line.3623"></a>
+<span class="sourceLineNo">3624</span>    }<a name="line.3624"></a>
+<span class="sourceLineNo">3625</span>    return peers;<a name="line.3625"></a>
+<span class="sourceLineNo">3626</span>  }<a name="line.3626"></a>
+<span class="sourceLineNo">3627</span><a name="line.3627"></a>
+<span class="sourceLineNo">3628</span>  @Override<a name="line.3628"></a>
+<span class="sourceLineNo">3629</span>  public long transitReplicationPeerSyncReplicationState(String peerId, SyncReplicationState state)<a name="line.3629"></a>
+<span class="sourceLineNo">3630</span>    throws ReplicationException, IOException {<a name="line.3630"></a>
+<span class="sourceLineNo">3631</span>    LOG.info(<a name="line.3631"></a>
+<span class="sourceLineNo">3632</span>      getClientIdAuditPrefix() +<a name="line.3632"></a>
+<span class="sourceLineNo">3633</span>        " transit current cluster state to {} in a synchronous replication peer id={}",<a name="line.3633"></a>
+<span class="sourceLineNo">3634</span>      state, peerId);<a name="line.3634"></a>
+<span class="sourceLineNo">3635</span>    return executePeerProcedure(new TransitPeerSyncReplicationStateProcedure(peerId, state));<a name="line.3635"></a>
+<span class="sourceLineNo">3636</span>  }<a name="line.3636"></a>
+<span class="sourceLineNo">3637</span><a name="line.3637"></a>
+<span class="sourceLineNo">3638</span>  /**<a name="line.3638"></a>
+<span class="sourceLineNo">3639</span>   * Mark region server(s) as decommissioned (previously called 'draining') to prevent additional<a name="line.3639"></a>
+<span class="sourceLineNo">3640</span>   * regions from getting assigned to them. Also unload the regions on the servers asynchronously.0<a name="line.3640"></a>
+<span class="sourceLineNo">3641</span>   * @param servers Region servers to decommission.<a name="line.3641"></a>
+<span class="sourceLineNo">3642</span>   */<a name="line.3642"></a>
+<span class="sourceLineNo">3643</span>  public void decommissionRegionServers(final List&lt;ServerName&gt; servers, final boolean offload)<a name="line.3643"></a>
+<span class="sourceLineNo">3644</span>      throws HBaseIOException {<a name="line.3644"></a>
+<span class="sourceLineNo">3645</span>    List&lt;ServerName&gt; serversAdded = new ArrayList&lt;&gt;(servers.size());<a name="line.3645"></a>
+<span class="sourceLineNo">3646</span>    // Place the decommission marker first.<a name="line.3646"></a>
+<span class="sourceLineNo">3647</span>    String parentZnode = getZooKeeper().getZNodePaths().drainingZNode;<a name="line.3647"></a>
+<span class="sourceLineNo">3648</span>    for (ServerName server : servers) {<a name="line.3648"></a>
+<span class="sourceLineNo">3649</span>      try {<a name="line.3649"></a>
+<span class="sourceLineNo">3650</span>        String node = ZNodePaths.joinZNode(parentZnode, server.getServerName());<a name="line.3650"></a>
+<span class="sourceLineNo">3651</span>        ZKUtil.createAndFailSilent(getZooKeeper(), node);<a name="line.3651"></a>
+<span class="sourceLineNo">3652</span>      } catch (KeeperException ke) {<a name="line.3652"></a>
+<span class="sourceLineNo">3653</span>        throw new HBaseIOException(<a name="line.3653"></a>
+<span class="sourceLineNo">3654</span>          this.zooKeeper.prefix("Unable to decommission '" + server.getServerName() + "'."), ke);<a name="line.3654"></a>
+<span class="sourceLineNo">3655</span>      }<a name="line.3655"></a>
+<span class="sourceLineNo">3656</span>      if (this.serverManager.addServerToDrainList(server)) {<a name="line.3656"></a>
+<span class="sourceLineNo">3657</span>        serversAdded.add(server);<a name="line.3657"></a>
+<span class="sourceLineNo">3658</span>      }<a name="line.3658"></a>
+<span class="sourceLineNo">3659</span>    }<a name="line.3659"></a>
+<span class="sourceLineNo">3660</span>    // Move the regions off the decommissioned servers.<a name="line.3660"></a>
+<span class="sourceLineNo">3661</span>    if (offload) {<a name="line.3661"></a>
+<span class="sourceLineNo">3662</span>      final List&lt;ServerName&gt; destServers = this.serverManager.createDestinationServersList();<a name="line.3662"></a>
+<span class="sourceLineNo">3663</span>      for (ServerName server : serversAdded) {<a name="line.3663"></a>
+<span class="sourceLineNo">3664</span>        final List&lt;RegionInfo&gt; regionsOnServer = this.assignmentManager.getRegionsOnServer(server);<a name="line.3664"></a>
+<span class="sourceLineNo">3665</span>        for (RegionInfo hri : regionsOnServer) {<a name="line.3665"></a>
+<span class="sourceLineNo">3666</span>          ServerName dest = balancer.randomAssignment(hri, destServers);<a name="line.3666"></a>
+<span class="sourceLineNo">3667</span>          if (dest == null) {<a name="line.3667"></a>
+<span class="sourceLineNo">3668</span>            throw new HBaseIOException("Unable to determine a plan to move " + hri);<a name="line.3668"></a>
+<span class="sourceLineNo">3669</span>          }<a name="line.3669"></a>
+<span class="sourceLineNo">3670</span>          RegionPlan rp = new RegionPlan(hri, server, dest);<a name="line.3670"></a>
+<span class="sourceLineNo">3671</span>          this.assignmentManager.moveAsync(rp);<a name="line.3671"></a>
+<span class="sourceLineNo">3672</span>        }<a name="line.3672"></a>
+<span class="sourceLineNo">3673</span>      }<a name="line.3673"></a>
+<span class="sourceLineNo">3674</span>    }<a name="line.3674"></a>
+<span class="sourceLineNo">3675</span>  }<a name="line.3675"></a>
+<span class="sourceLineNo">3676</span><a name="line.3676"></a>
+<span class="sourceLineNo">3677</span>  /**<a name="line.3677"></a>
+<span class="sourceLineNo">3678</span>   * List region servers marked as decommissioned (previously called 'draining') to not get regions<a name="line.3678"></a>
+<span class="sourceLineNo">3679</span>   * assigned to them.<a name="line.3679"></a>
+<span class="sourceLineNo">3680</span>   * @return List of decommissioned servers.<a name="line.3680"></a>
+<span class="sourceLineNo">3681</span>   */<a name="line.3681"></a>
+<span class="sourceLineNo">3682</span>  public List&lt;ServerName&gt; listDecommissionedRegionServers() {<a name="line.3682"></a>
+<span class="sourceLineNo">3683</span>    return this.serverManager.getDrainingServersList();<a name="line.3683"></a>
+<span class="sourceLineNo">3684</span>  }<a name="line.3684"></a>
+<span class="sourceLineNo">3685</span><a name="line.3685"></a>
+<span class="sourceLineNo">3686</span>  /**<a name="line.3686"></a>
+<span class="sourceLineNo">3687</span>   * Remove decommission marker (previously called 'draining') from a region server to allow regions<a name="line.3687"></a>
+<span class="sourceLineNo">3688</span>   * assignments. Load regions onto the server asynchronously if a list of regions is given<a name="line.3688"></a>
+<span class="sourceLineNo">3689</span>   * @param server Region server to remove decommission marker from.<a name="line.3689"></a>
+<span class="sourceLineNo">3690</span>   */<a name="line.3690"></a>
+<span class="sourceLineNo">3691</span>  public void recommissionRegionServer(final ServerName server,<a name="line.3691"></a>
+<span class="sourceLineNo">3692</span>      final List&lt;byte[]&gt; encodedRegionNames) throws IOException {<a name="line.3692"></a>
+<span class="sourceLineNo">3693</span>    // Remove the server from decommissioned (draining) server list.<a name="line.3693"></a>
+<span class="sourceLineNo">3694</span>    String parentZnode = getZooKeeper().getZNodePaths().drainingZNode;<a name="line.3694"></a>
+<span class="sourceLineNo">3695</span>    String node = ZNodePaths.joinZNode(parentZnode, server.getServerName());<a name="line.3695"></a>
+<span class="sourceLineNo">3696</span>    try {<a name="line.3696"></a>
+<span class="sourceLineNo">3697</span>      ZKUtil.deleteNodeFailSilent(getZooKeeper(), node);<a name="line.3697"></a>
+<span class="sourceLineNo">3698</span>    } catch (KeeperException ke) {<a name="line.3698"></a>
+<span class="sourceLineNo">3699</span>      throw new HBaseIOException(<a name="line.3699"></a>
+<span class="sourceLineNo">3700</span>        this.zooKeeper.prefix("Unable to recommission '" + server.getServerName() + "'."), ke);<a name="line.3700"></a>
+<span class="sourceLineNo">3701</span>    }<a name="line.3701"></a>
+<span class="sourceLineNo">3702</span>    this.serverManager.removeServerFromDrainList(server);<a name="line.3702"></a>
+<span class="sourceLineNo">3703</span><a name="line.3703"></a>
+<span class="sourceLineNo">3704</span>    // Load the regions onto the server if we are given a list of regions.<a name="line.3704"></a>
+<span class="sourceLineNo">3705</span>    if (encodedRegionNames == null || encodedRegionNames.isEmpty()) {<a name="line.3705"></a>
+<span class="sourceLineNo">3706</span>      return;<a name="line.3706"></a>
+<span class="sourceLineNo">3707</span>    }<a name="line.3707"></a>
+<span class="sourceLineNo">3708</span>    if (!this.serverManager.isServerOnline(server)) {<a name="line.3708"></a>
+<span class="sourceLineNo">3709</span>      return;<a name="line.3709"></a>
+<span class="sourceLineNo">3710</span>    }<a name="line.3710"></a>
+<span class="sourceLineNo">3711</span>    for (byte[] encodedRegionName : encodedRegionNames) {<a name="line.3711"></a>
+<span class="sourceLineNo">3712</span>      RegionState regionState =<a name="line.3712"></a>
+<span class="sourceLineNo">3713</span>        assignmentManager.getRegionStates().getRegionState(Bytes.toString(encodedRegionName));<a name="line.3713"></a>
+<span class="sourceLineNo">3714</span>      if (regionState == null) {<a name="line.3714"></a>
+<span class="sourceLineNo">3715</span>        LOG.warn("Unknown region " + Bytes.toStringBinary(encodedRegionName));<a name="line.3715"></a>
+<span class="sourceLineNo">3716</span>        continue;<a name="line.3716"></a>
+<span class="sourceLineNo">3717</span>      }<a name="line.3717"></a>
+<span class="sourceLineNo">3718</span>      RegionInfo hri = regionState.getRegion();<a name="line.3718"></a>
+<span class="sourceLineNo">3719</span>      if (server.equals(regionState.getServerName())) {<a name="line.3719"></a>
+<span class="sourceLineNo">3720</span>        LOG.info("Skipping move of region " + hri.getRegionNameAsString() +<a name="line.3720"></a>
+<span class="sourceLineNo">3721</span>          " because region already assigned to the same server " + server + ".");<a name="line.3721"></a>
+<span class="sourceLineNo">3722</span>        continue;<a name="line.3722"></a>
+<span class="sourceLineNo">3723</span>      }<a name="line.3723"></a>
+<span class="sourceLineNo">3724</span>      RegionPlan rp = new RegionPlan(hri, regionState.getServerName(), server);<a name="line.3724"></a>
+<span class="sourceLineNo">3725</span>      this.assignmentManager.moveAsync(rp);<a name="line.3725"></a>
+<span class="sourceLineNo">3726</span>    }<a name="line.3726"></a>
+<span class="sourceLineNo">3727</span>  }<a name="line.3727"></a>
+<span class="sourceLineNo">3728</span><a name="line.3728"></a>
+<span class="sourceLineNo">3729</span>  @Override<a name="line.3729"></a>
+<span class="sourceLineNo">3730</span>  public LockManager getLockManager() {<a name="line.3730"></a>
+<span class="sourceLineNo">3731</span>    return lockManager;<a name="line.3731"></a>
+<span class="sourceLineNo">3732</span>  }<a name="line.3732"></a>
+<span class="sourceLineNo">3733</span><a name="line.3733"></a>
+<span class="sourceLineNo">3734</span>  public QuotaObserverChore getQuotaObserverChore() {<a name="line.3734"></a>
+<span class="sourceLineNo">3735</span>    return this.quotaObserverChore;<a name="line.3735"></a>
+<span class="sourceLineNo">3736</span>  }<a name="line.3736"></a>
+<span class="sourceLineNo">3737</span><a name="line.3737"></a>
+<span class="sourceLineNo">3738</span>  public SpaceQuotaSnapshotNotifier getSpaceQuotaSnapshotNotifier() {<a name="line.3738"></a>
+<span class="sourceLineNo">3739</span>    return this.spaceQuotaSnapshotNotifier;<a name="line.3739"></a>
+<span class="sourceLineNo">3740</span>  }<a name="line.3740"></a>
+<span class="sourceLineNo">3741</span><a name="line.3741"></a>
+<span class="sourceLineNo">3742</span>  @SuppressWarnings("unchecked")<a name="line.3742"></a>
+<span class="sourceLineNo">3743</span>  private RemoteProcedure&lt;MasterProcedureEnv, ?&gt; getRemoteProcedure(long procId) {<a name="line.3743"></a>
+<span class="sourceLineNo">3744</span>    Procedure&lt;?&gt; procedure = procedureExecutor.getProcedure(procId);<a name="line.3744"></a>
+<span class="sourceLineNo">3745</span>    if (procedure == null) {<a name="line.3745"></a>
+<span class="sourceLineNo">3746</span>      return null;<a name="line.3746"></a>
+<span class="sourceLineNo">3747</span>    }<a name="line.3747"></a>
+<span class="sourceLineNo">3748</span>    assert procedure instanceof RemoteProcedure;<a name="line.3748"></a>
+<span class="sourceLineNo">3749</span>    return (RemoteProcedure&lt;MasterProcedureEnv, ?&gt;) procedure;<a name="line.3749"></a>
+<span class="sourceLineNo">3750</span>  }<a name="line.3750"></a>
+<span class="sourceLineNo">3751</span><a name="line.3751"></a>
+<span class="sourceLineNo">3752</span>  public void remoteProcedureCompleted(long procId) {<a name="line.3752"></a>
+<span class="sourceLineNo">3753</span>    LOG.debug("Remote procedure done, pid={}", procId);<a name="line.3753"></a>
+<span class="sourceLineNo">3754</span>    RemoteProcedure&lt;MasterProcedureEnv, ?&gt; procedure = getRemoteProcedure(procId);<a name="line.3754"></a>
+<span class="sourceLineNo">3755</span>    if (procedure != null) {<a name="line.3755"></a>
+<span class="sourceLineNo">3756</span>      procedure.remoteOperationCompleted(procedureExecutor.getEnvironment());<a name="line.3756"></a>
+<span class="sourceLineNo">3757</span>    }<a name="line.3757"></a>
+<span class="sourceLineNo">3758</span>  }<a name="line.3758"></a>
+<span class="sourceLineNo">3759</span><a name="line.3759"></a>
+<span class="sourceLineNo">3760</span>  public void remoteProcedureFailed(long procId, RemoteProcedureException error) {<a name="line.3760"></a>
+<span class="sourceLineNo">3761</span>    LOG.debug("Remote procedure failed, pid={}", procId, error);<a name="line.3761"></a>
+<span class="sourceLineNo">3762</span>    RemoteProcedure&lt;MasterProcedureEnv, ?&gt; procedure = getRemoteProcedure(procId);<a name="line.3762"></a>
+<span class="sourceLineNo">3763</span>    if (procedure != null) {<a name="line.3763"></a>
+<span class="sourceLineNo">3764</span>      procedure.remoteOperationFailed(procedureExecutor.getEnvironment(), error);<a name="line.3764"></a>
+<span class="sourceLineNo">3765</span>    }<a name="line.3765"></a>
+<span class="sourceLineNo">3766</span>  }<a name="line.3766"></a>
+<span class="sourceLineNo">3767</span><a name="line.3767"></a>
+<span class="sourceLineNo">3768</span>  /**<a name="line.3768"></a>
+<span class="sourceLineNo">3769</span>   * Reopen regions provided in the argument<a name="line.3769"></a>
+<span class="sourceLineNo">3770</span>   *<a name="line.3770"></a>
+<span class="sourceLineNo">3771</span>   * @param tableName The current table name<a name="line.3771"></a>
+<span class="sourceLineNo">3772</span>   * @param regionNames The region names of the regions to reopen<a name="line.3772"></a>
+<span class="sourceLineNo">3773</span>   * @param nonceGroup Identifier for the source of the request, a client or process<a name="line.3773"></a>
+<span class="sourceLineNo">3774</span>   * @param nonce A unique identifier for this operation from the client or process identified by<a name="line.3774"></a>
+<span class="sourceLineNo">3775</span>   *   &lt;code&gt;nonceGroup&lt;/code&gt; (the source must ensure each operation gets a unique id).<a name="line.3775"></a>
+<span class="sourceLineNo">3776</span>   * @return procedure Id<a name="line.3776"></a>
+<span class="sourceLineNo">3777</span>   * @throws IOException if reopening region fails while running procedure<a name="line.3777"></a>
+<span class="sourceLineNo">3778</span>   */<a name="line.3778"></a>
+<span class="sourceLineNo">3779</span>  long reopenRegions(final TableName tableName, final List&lt;byte[]&gt; regionNames,<a name="line.3779"></a>
+<span class="sourceLineNo">3780</span>      final long nonceGroup, final long nonce)<a name="line.3780"></a>
+<span class="sourceLineNo">3781</span>      throws IOException {<a name="line.3781"></a>
+<span class="sourceLineNo">3782</span><a name="line.3782"></a>
+<span class="sourceLineNo">3783</span>    return MasterProcedureUtil<a name="line.3783"></a>
+<span class="sourceLineNo">3784</span>      .submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.3784"></a>
+<span class="sourceLineNo">3785</span><a name="line.3785"></a>
+<span class="sourceLineNo">3786</span>        @Override<a name="line.3786"></a>
+<span class="sourceLineNo">3787</span>        protected void run() throws IOException {<a name="line.3787"></a>
+<span class="sourceLineNo">3788</span>          submitProcedure(new ReopenTableRegionsProcedure(tableName, regionNames));<a name="line.3788"></a>
+<span class="sourceLineNo">3789</span>        }<a name="line.3789"></a>
+<span class="sourceLineNo">3790</span><a name="line.3790"></a>
+<span class="sourceLineNo">3791</span>        @Override<a name="line.3791"></a>
+<span class="sourceLineNo">3792</span>        protected String getDescription() {<a name="line.3792"></a>
+<span class="sourceLineNo">3793</span>          return "ReopenTableRegionsProcedure";<a name="line.3793"></a>
+<span class="sourceLineNo">3794</span>        }<a name="line.3794"></a>
+<span class="sourceLineNo">3795</span><a name="line.3795"></a>
+<span class="sourceLineNo">3796</span>      });<a name="line.3796"></a>
+<span class="sourceLineNo">3797</span><a name="line.3797"></a>
+<span class="sourceLineNo">3798</span>  }<a name="line.3798"></a>
+<span class="sourceLineNo">3799</span><a name="line.3799"></a>
+<span class="sourceLineNo">3800</span>  @Override<a name="line.3800"></a>
+<span class="sourceLineNo">3801</span>  public ReplicationPeerManager getReplicationPeerManager() {<a name="line.3801"></a>
+<span class="sourceLineNo">3802</span>    return replicationPeerManager;<a name="line.3802"></a>
+<span class="sourceLineNo">3803</span>  }<a name="line.3803"></a>
+<span class="sourceLineNo">3804</span><a name="line.3804"></a>
+<span class="sourceLineNo">3805</span>  public HashMap&lt;String, List&lt;Pair&lt;ServerName, ReplicationLoadSource&gt;&gt;&gt;<a name="line.3805"></a>
+<span class="sourceLineNo">3806</span>      getReplicationLoad(ServerName[] serverNames) {<a name="line.3806"></a>
+<span class="sourceLineNo">3807</span>    List&lt;ReplicationPeerDescription&gt; peerList = this.getReplicationPeerManager().listPeers(null);<a name="line.3807"></a>
+<span class="sourceLineNo">3808</span>    if (peerList == null) {<a name="line.3808"></a>
+<span class="sourceLineNo">3809</span>      return null;<a name="line.3809"></a>
+<span class="sourceLineNo">3810</span>    }<a name="line.3810"></a>
+<span class="sourceLineNo">3811</span>    HashMap&lt;String, List&lt;Pair&lt;ServerName, ReplicationLoadSource&gt;&gt;&gt; replicationLoadSourceMap =<a name="line.3811"></a>
+<span class="sourceLineNo">3812</span>        new HashMap&lt;&gt;(peerList.size());<a name="line.3812"></a>
+<span class="sourceLineNo">3813</span>    peerList.stream()<a name="line.3813"></a>
+<span class="sourceLineNo">3814</span>        .forEach(peer -&gt; replicationLoadSourceMap.put(peer.getPeerId(), new ArrayList&lt;&gt;()));<a name="line.3814"></a>
+<span class="sourceLineNo">3815</span>    for (ServerName serverName : serverNames) {<a name="line.3815"></a>
+<span class="sourceLineNo">3816</span>      List&lt;ReplicationLoadSource&gt; replicationLoadSources =<a name="line.3816"></a>
+<span class="sourceLineNo">3817</span>          getServerManager().getLoad(serverName).getReplicationLoadSourceList();<a name="line.3817"></a>
+<span class="sourceLineNo">3818</span>      for (ReplicationLoadSource replicationLoadSource : replicationLoadSources) {<a name="line.3818"></a>
+<span class="sourceLineNo">3819</span>        replicationLoadSourceMap.get(replicationLoadSource.getPeerID())<a name="line.3819"></a>
+<span class="sourceLineNo">3820</span>            .add(new Pair&lt;&gt;(serverName, replicationLoadSource));<a name="line.3820"></a>
+<span class="sourceLineNo">3821</span>      }<a name="line.3821"></a>
+<span class="sourceLineNo">3822</span>    }<a name="line.3822"></a>
+<span class="sourceLineNo">3823</span>    for (List&lt;Pair&lt;ServerName, ReplicationLoadSource&gt;&gt; loads : replicationLoadSourceMap.values()) {<a name="line.3823"></a>
+<span class="sourceLineNo">3824</span>      if (loads.size() &gt; 0) {<a name="line.3824"></a>
+<span class="sourceLineNo">3825</span>        loads.sort(Comparator.comparingLong(load -&gt; (-1) * load.getSecond().getReplicationLag()));<a name="line.3825"></a>
+<span class="sourceLineNo">3826</span>      }<a name="line.3826"></a>
+<span class="sourceLineNo">3827</span>    }<a name="line.3827"></a>
+<span class="sourceLineNo">3828</span>    return replicationLoadSourceMap;<a name="line.3828"></a>
+<span class="sourceLineNo">3829</span>  }<a name="line.3829"></a>
+<span class="sourceLineNo">3830</span><a name="line.3830"></a>
+<span class="sourceLineNo">3831</span>  /**<a name="line.3831"></a>
+<span class="sourceLineNo">3832</span>   * This method modifies the master's configuration in order to inject replication-related features<a name="line.3832"></a>
+<span class="sourceLineNo">3833</span>   */<a name="line.3833"></a>
+<span class="sourceLineNo">3834</span>  @VisibleForTesting<a name="line.3834"></a>
+<span class="sourceLineNo">3835</span>  public static void decorateMasterConfiguration(Configuration conf) {<a name="line.3835"></a>
+<span class="sourceLineNo">3836</span>    String plugins = conf.get(HBASE_MASTER_LOGCLEANER_PLUGINS);<a name="line.3836"></a>
+<span class="sourceLineNo">3837</span>    String cleanerClass = ReplicationLogCleaner.class.getCanonicalName();<a name="line.3837"></a>
+<span class="sourceLineNo">3838</span>    if (!plugins.contains(cleanerClass)) {<a name="line.3838"></a>
+<span class="sourceLineNo">3839</span>      conf.set(HBASE_MASTER_LOGCLEANER_PLUGINS, plugins + "," + cleanerClass);<a name="line.3839"></a>
+<span class="sourceLineNo">3840</span>    }<a name="line.3840"></a>
+<span class="sourceLineNo">3841</span>    if (ReplicationUtils.isReplicationForBulkLoadDataEnabled(conf)) {<a name="line.3841"></a>
+<span class="sourceLineNo">3842</span>      plugins = conf.get(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS);<a name="line.3842"></a>
+<span class="sourceLineNo">3843</span>      cleanerClass = ReplicationHFileCleaner.class.getCanonicalName();<a name="line.3843"></a>
+<span class="sourceLineNo">3844</span>      if (!plugins.contains(cleanerClass)) {<a name="line.3844"></a>
+<span class="sourceLineNo">3845</span>        conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS, plugins + "," + cleanerClass);<a name="line.3845"></a>
+<span class="sourceLineNo">3846</span>      }<a name="line.3846"></a>
+<span class="sourceLineNo">3847</span>    }<a name="line.3847"></a>
+<span class="sourceLineNo">3848</span>  }<a name="line.3848"></a>
+<span class="sourceLineNo">3849</span><a name="line.3849"></a>
+<span class="sourceLineNo">3850</span>  public SnapshotQuotaObserverChore getSnapshotQuotaObserverChore() {<a name="line.3850"></a>
+<span class="sourceLineNo">3851</span>    return this.snapshotQuotaChore;<a name="line.3851"></a>
+<span class="sourceLineNo">3852</span>  }<a name="line.3852"></a>
+<span class="sourceLineNo">3853</span><a name="line.3853"></a>
+<span class="sourceLineNo">3854</span>  @Override<a name="line.3854"></a>
+<span class="sourceLineNo">3855</span>  public SyncReplicationReplayWALManager getSyncReplicationReplayWALManager() {<a name="line.3855"></a>
+<span class="sourceLineNo">3856</span>    return this.syncReplicationReplayWALManager;<a name="line.3856"></a>
+<span class="sourceLineNo">3857</span>  }<a name="line.3857"></a>
+<span class="sourceLineNo">3858</span><a name="line.3858"></a>
+<span class="sourceLineNo">3859</span>  @Override<a name="line.3859"></a>
+<span class="sourceLineNo">3860</span>  public Map&lt;String, ReplicationStatus&gt; getWalGroupsReplicationStatus() {<a name="line.3860"></a>
+<span class="sourceLineNo">3861</span>    if (!this.isOnline() || !LoadBalancer.isMasterCanHostUserRegions(conf)) {<a name="line.3861"></a>
+<span class="sourceLineNo">3862</span>      return new HashMap&lt;&gt;();<a name="line.3862"></a>
+<span class="sourceLineNo">3863</span>    }<a name="line.3863"></a>
+<span class="sourceLineNo">3864</span>    return super.getWalGroupsReplicationStatus();<a name="line.3864"></a>
+<span class="sourceLineNo">3865</span>  }<a name="line.3865"></a>
+<span class="sourceLineNo">3866</span><a name="line.3866"></a>
+<span class="sourceLineNo">3867</span>  public HbckChore getHbckChore() {<a name="line.3867"></a>
+<span class="sourceLineNo">3868</span>    return this.hbckChore;<a name="line.3868"></a>
+<span class="sourceLineNo">3869</span>  }<a name="line.3869"></a>
+<span class="sourceLineNo">3870</span><a name="line.3870"></a>
+<span class="sourceLineNo">3871</span>  @Override<a name="line.3871"></a>
+<span class="sourceLineNo">3872</span>  public String getClusterId() {<a name="line.3872"></a>
+<span class="sourceLineNo">3873</span>    if (activeMaster) {<a name="line.3873"></a>
+<span class="sourceLineNo">3874</span>      return super.getClusterId();<a name="line.3874"></a>
+<span class="sourceLineNo">3875</span>    }<a name="line.3875"></a>
+<span class="sourceLineNo">3876</span>    return cachedClusterId.getFromCacheOrFetch();<a name="line.3876"></a>
+<span class="sourceLineNo">3877</span>  }<a name="line.3877"></a>
+<span class="sourceLineNo">3878</span><a name="line.3878"></a>
+<span class="sourceLineNo">3879</span>  @Override<a name="line.3879"></a>
+<span class="sourceLineNo">3880</span>  public void runReplicationBarrierCleaner() {<a name="line.3880"></a>
+<span class="sourceLineNo">3881</span>    ReplicationBarrierCleaner rbc = this.replicationBarrierCleaner;<a name="line.3881"></a>
+<span class="sourceLineNo">3882</span>    if (rbc != null) {<a name="line.3882"></a>
+<span class="sourceLineNo">3883</span>      rbc.chore();<a name="line.3883"></a>
+<span class="sourceLineNo">3884</span>    }<a name="line.3884"></a>
+<span class="sourceLineNo">3885</span>  }<a name="line.3885"></a>
+<span class="sourceLineNo">3886</span>}<a name="line.3886"></a>
 
 
 
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html
index 8e8c2bc..63f1c1d 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.MasterStoppedException.html
@@ -1696,2201 +1696,2202 @@
 <span class="sourceLineNo">1688</span>   * @return Maximum time we should run balancer for<a name="line.1688"></a>
 <span class="sourceLineNo">1689</span>   */<a name="line.1689"></a>
 <span class="sourceLineNo">1690</span>  private int getMaxBalancingTime() {<a name="line.1690"></a>
-<span class="sourceLineNo">1691</span>    int maxBalancingTime = getConfiguration().getInt(HConstants.HBASE_BALANCER_MAX_BALANCING, -1);<a name="line.1691"></a>
-<span class="sourceLineNo">1692</span>    if (maxBalancingTime == -1) {<a name="line.1692"></a>
-<span class="sourceLineNo">1693</span>      // if max balancing time isn't set, defaulting it to period time<a name="line.1693"></a>
-<span class="sourceLineNo">1694</span>      maxBalancingTime = getConfiguration().getInt(HConstants.HBASE_BALANCER_PERIOD,<a name="line.1694"></a>
-<span class="sourceLineNo">1695</span>        HConstants.DEFAULT_HBASE_BALANCER_PERIOD);<a name="line.1695"></a>
-<span class="sourceLineNo">1696</span>    }<a name="line.1696"></a>
-<span class="sourceLineNo">1697</span>    return maxBalancingTime;<a name="line.1697"></a>
-<span class="sourceLineNo">1698</span>  }<a name="line.1698"></a>
-<span class="sourceLineNo">1699</span><a name="line.1699"></a>
-<span class="sourceLineNo">1700</span>  /**<a name="line.1700"></a>
-<span class="sourceLineNo">1701</span>   * @return Maximum number of regions in transition<a name="line.1701"></a>
-<span class="sourceLineNo">1702</span>   */<a name="line.1702"></a>
-<span class="sourceLineNo">1703</span>  private int getMaxRegionsInTransition() {<a name="line.1703"></a>
-<span class="sourceLineNo">1704</span>    int numRegions = this.assignmentManager.getRegionStates().getRegionAssignments().size();<a name="line.1704"></a>
-<span class="sourceLineNo">1705</span>    return Math.max((int) Math.floor(numRegions * this.maxRitPercent), 1);<a name="line.1705"></a>
-<span class="sourceLineNo">1706</span>  }<a name="line.1706"></a>
-<span class="sourceLineNo">1707</span><a name="line.1707"></a>
-<span class="sourceLineNo">1708</span>  /**<a name="line.1708"></a>
-<span class="sourceLineNo">1709</span>   * It first sleep to the next balance plan start time. Meanwhile, throttling by the max<a name="line.1709"></a>
-<span class="sourceLineNo">1710</span>   * number regions in transition to protect availability.<a name="line.1710"></a>
-<span class="sourceLineNo">1711</span>   * @param nextBalanceStartTime The next balance plan start time<a name="line.1711"></a>
-<span class="sourceLineNo">1712</span>   * @param maxRegionsInTransition max number of regions in transition<a name="line.1712"></a>
-<span class="sourceLineNo">1713</span>   * @param cutoffTime when to exit balancer<a name="line.1713"></a>
-<span class="sourceLineNo">1714</span>   */<a name="line.1714"></a>
-<span class="sourceLineNo">1715</span>  private void balanceThrottling(long nextBalanceStartTime, int maxRegionsInTransition,<a name="line.1715"></a>
-<span class="sourceLineNo">1716</span>      long cutoffTime) {<a name="line.1716"></a>
-<span class="sourceLineNo">1717</span>    boolean interrupted = false;<a name="line.1717"></a>
-<span class="sourceLineNo">1718</span><a name="line.1718"></a>
-<span class="sourceLineNo">1719</span>    // Sleep to next balance plan start time<a name="line.1719"></a>
-<span class="sourceLineNo">1720</span>    // But if there are zero regions in transition, it can skip sleep to speed up.<a name="line.1720"></a>
-<span class="sourceLineNo">1721</span>    while (!interrupted &amp;&amp; System.currentTimeMillis() &lt; nextBalanceStartTime<a name="line.1721"></a>
-<span class="sourceLineNo">1722</span>        &amp;&amp; this.assignmentManager.getRegionStates().hasRegionsInTransition()) {<a name="line.1722"></a>
-<span class="sourceLineNo">1723</span>      try {<a name="line.1723"></a>
-<span class="sourceLineNo">1724</span>        Thread.sleep(100);<a name="line.1724"></a>
-<span class="sourceLineNo">1725</span>      } catch (InterruptedException ie) {<a name="line.1725"></a>
-<span class="sourceLineNo">1726</span>        interrupted = true;<a name="line.1726"></a>
-<span class="sourceLineNo">1727</span>      }<a name="line.1727"></a>
-<span class="sourceLineNo">1728</span>    }<a name="line.1728"></a>
-<span class="sourceLineNo">1729</span><a name="line.1729"></a>
-<span class="sourceLineNo">1730</span>    // Throttling by max number regions in transition<a name="line.1730"></a>
-<span class="sourceLineNo">1731</span>    while (!interrupted<a name="line.1731"></a>
-<span class="sourceLineNo">1732</span>        &amp;&amp; maxRegionsInTransition &gt; 0<a name="line.1732"></a>
-<span class="sourceLineNo">1733</span>        &amp;&amp; this.assignmentManager.getRegionStates().getRegionsInTransitionCount()<a name="line.1733"></a>
-<span class="sourceLineNo">1734</span>        &gt;= maxRegionsInTransition &amp;&amp; System.currentTimeMillis() &lt;= cutoffTime) {<a name="line.1734"></a>
-<span class="sourceLineNo">1735</span>      try {<a name="line.1735"></a>
-<span class="sourceLineNo">1736</span>        // sleep if the number of regions in transition exceeds the limit<a name="line.1736"></a>
-<span class="sourceLineNo">1737</span>        Thread.sleep(100);<a name="line.1737"></a>
-<span class="sourceLineNo">1738</span>      } catch (InterruptedException ie) {<a name="line.1738"></a>
-<span class="sourceLineNo">1739</span>        interrupted = true;<a name="line.1739"></a>
-<span class="sourceLineNo">1740</span>      }<a name="line.1740"></a>
-<span class="sourceLineNo">1741</span>    }<a name="line.1741"></a>
-<span class="sourceLineNo">1742</span><a name="line.1742"></a>
-<span class="sourceLineNo">1743</span>    if (interrupted) Thread.currentThread().interrupt();<a name="line.1743"></a>
-<span class="sourceLineNo">1744</span>  }<a name="line.1744"></a>
-<span class="sourceLineNo">1745</span><a name="line.1745"></a>
-<span class="sourceLineNo">1746</span>  public boolean balance() throws IOException {<a name="line.1746"></a>
-<span class="sourceLineNo">1747</span>    return balance(false);<a name="line.1747"></a>
-<span class="sourceLineNo">1748</span>  }<a name="line.1748"></a>
-<span class="sourceLineNo">1749</span><a name="line.1749"></a>
-<span class="sourceLineNo">1750</span>  public boolean balance(boolean force) throws IOException {<a name="line.1750"></a>
-<span class="sourceLineNo">1751</span>    // if master not initialized, don't run balancer.<a name="line.1751"></a>
-<span class="sourceLineNo">1752</span>    if (!isInitialized()) {<a name="line.1752"></a>
-<span class="sourceLineNo">1753</span>      LOG.debug("Master has not been initialized, don't run balancer.");<a name="line.1753"></a>
-<span class="sourceLineNo">1754</span>      return false;<a name="line.1754"></a>
-<span class="sourceLineNo">1755</span>    }<a name="line.1755"></a>
-<span class="sourceLineNo">1756</span><a name="line.1756"></a>
-<span class="sourceLineNo">1757</span>    if (isInMaintenanceMode()) {<a name="line.1757"></a>
-<span class="sourceLineNo">1758</span>      LOG.info("Master is in maintenanceMode mode, don't run balancer.");<a name="line.1758"></a>
-<span class="sourceLineNo">1759</span>      return false;<a name="line.1759"></a>
-<span class="sourceLineNo">1760</span>    }<a name="line.1760"></a>
-<span class="sourceLineNo">1761</span><a name="line.1761"></a>
-<span class="sourceLineNo">1762</span>    synchronized (this.balancer) {<a name="line.1762"></a>
-<span class="sourceLineNo">1763</span>      // If balance not true, don't run balancer.<a name="line.1763"></a>
-<span class="sourceLineNo">1764</span>      if (!this.loadBalancerTracker.isBalancerOn()) return false;<a name="line.1764"></a>
-<span class="sourceLineNo">1765</span>        // Only allow one balance run at at time.<a name="line.1765"></a>
-<span class="sourceLineNo">1766</span>      if (this.assignmentManager.hasRegionsInTransition()) {<a name="line.1766"></a>
-<span class="sourceLineNo">1767</span>        List&lt;RegionStateNode&gt; regionsInTransition = assignmentManager.getRegionsInTransition();<a name="line.1767"></a>
-<span class="sourceLineNo">1768</span>        // if hbase:meta region is in transition, result of assignment cannot be recorded<a name="line.1768"></a>
-<span class="sourceLineNo">1769</span>        // ignore the force flag in that case<a name="line.1769"></a>
-<span class="sourceLineNo">1770</span>        boolean metaInTransition = assignmentManager.isMetaRegionInTransition();<a name="line.1770"></a>
-<span class="sourceLineNo">1771</span>        String prefix = force &amp;&amp; !metaInTransition ? "R" : "Not r";<a name="line.1771"></a>
-<span class="sourceLineNo">1772</span>        List&lt;RegionStateNode&gt; toPrint = regionsInTransition;<a name="line.1772"></a>
-<span class="sourceLineNo">1773</span>        int max = 5;<a name="line.1773"></a>
-<span class="sourceLineNo">1774</span>        boolean truncated = false;<a name="line.1774"></a>
-<span class="sourceLineNo">1775</span>        if (regionsInTransition.size() &gt; max) {<a name="line.1775"></a>
-<span class="sourceLineNo">1776</span>          toPrint = regionsInTransition.subList(0, max);<a name="line.1776"></a>
-<span class="sourceLineNo">1777</span>          truncated = true;<a name="line.1777"></a>
-<span class="sourceLineNo">1778</span>        }<a name="line.1778"></a>
-<span class="sourceLineNo">1779</span>        LOG.info(prefix + "unning balancer because " + regionsInTransition.size() +<a name="line.1779"></a>
-<span class="sourceLineNo">1780</span>          " region(s) in transition: " + toPrint + (truncated? "(truncated list)": ""));<a name="line.1780"></a>
-<span class="sourceLineNo">1781</span>        if (!force || metaInTransition) return false;<a name="line.1781"></a>
-<span class="sourceLineNo">1782</span>      }<a name="line.1782"></a>
-<span class="sourceLineNo">1783</span>      if (this.serverManager.areDeadServersInProgress()) {<a name="line.1783"></a>
-<span class="sourceLineNo">1784</span>        LOG.info("Not running balancer because processing dead regionserver(s): " +<a name="line.1784"></a>
-<span class="sourceLineNo">1785</span>          this.serverManager.getDeadServers());<a name="line.1785"></a>
-<span class="sourceLineNo">1786</span>        return false;<a name="line.1786"></a>
-<span class="sourceLineNo">1787</span>      }<a name="line.1787"></a>
-<span class="sourceLineNo">1788</span><a name="line.1788"></a>
-<span class="sourceLineNo">1789</span>      if (this.cpHost != null) {<a name="line.1789"></a>
-<span class="sourceLineNo">1790</span>        try {<a name="line.1790"></a>
-<span class="sourceLineNo">1791</span>          if (this.cpHost.preBalance()) {<a name="line.1791"></a>
-<span class="sourceLineNo">1792</span>            LOG.debug("Coprocessor bypassing balancer request");<a name="line.1792"></a>
-<span class="sourceLineNo">1793</span>            return false;<a name="line.1793"></a>
-<span class="sourceLineNo">1794</span>          }<a name="line.1794"></a>
-<span class="sourceLineNo">1795</span>        } catch (IOException ioe) {<a name="line.1795"></a>
-<span class="sourceLineNo">1796</span>          LOG.error("Error invoking master coprocessor preBalance()", ioe);<a name="line.1796"></a>
-<span class="sourceLineNo">1797</span>          return false;<a name="line.1797"></a>
-<span class="sourceLineNo">1798</span>        }<a name="line.1798"></a>
-<span class="sourceLineNo">1799</span>      }<a name="line.1799"></a>
-<span class="sourceLineNo">1800</span><a name="line.1800"></a>
-<span class="sourceLineNo">1801</span>      boolean isByTable = getConfiguration().getBoolean("hbase.master.loadbalance.bytable", false);<a name="line.1801"></a>
-<span class="sourceLineNo">1802</span>      Map&lt;TableName, Map&lt;ServerName, List&lt;RegionInfo&gt;&gt;&gt; assignments =<a name="line.1802"></a>
-<span class="sourceLineNo">1803</span>        this.assignmentManager.getRegionStates()<a name="line.1803"></a>
-<span class="sourceLineNo">1804</span>          .getAssignmentsForBalancer(tableStateManager, this.serverManager.getOnlineServersList(),<a name="line.1804"></a>
-<span class="sourceLineNo">1805</span>            isByTable);<a name="line.1805"></a>
-<span class="sourceLineNo">1806</span>      for (Map&lt;ServerName, List&lt;RegionInfo&gt;&gt; serverMap : assignments.values()) {<a name="line.1806"></a>
-<span class="sourceLineNo">1807</span>        serverMap.keySet().removeAll(this.serverManager.getDrainingServersList());<a name="line.1807"></a>
-<span class="sourceLineNo">1808</span>      }<a name="line.1808"></a>
-<span class="sourceLineNo">1809</span><a name="line.1809"></a>
-<span class="sourceLineNo">1810</span>      //Give the balancer the current cluster state.<a name="line.1810"></a>
-<span class="sourceLineNo">1811</span>      this.balancer.setClusterMetrics(getClusterMetricsWithoutCoprocessor());<a name="line.1811"></a>
-<span class="sourceLineNo">1812</span>      this.balancer.setClusterLoad(assignments);<a name="line.1812"></a>
-<span class="sourceLineNo">1813</span><a name="line.1813"></a>
-<span class="sourceLineNo">1814</span>      List&lt;RegionPlan&gt; plans = new ArrayList&lt;&gt;();<a name="line.1814"></a>
-<span class="sourceLineNo">1815</span>      for (Entry&lt;TableName, Map&lt;ServerName, List&lt;RegionInfo&gt;&gt;&gt; e : assignments.entrySet()) {<a name="line.1815"></a>
-<span class="sourceLineNo">1816</span>        List&lt;RegionPlan&gt; partialPlans = this.balancer.balanceCluster(e.getKey(), e.getValue());<a name="line.1816"></a>
-<span class="sourceLineNo">1817</span>        if (partialPlans != null) {<a name="line.1817"></a>
-<span class="sourceLineNo">1818</span>          plans.addAll(partialPlans);<a name="line.1818"></a>
-<span class="sourceLineNo">1819</span>        }<a name="line.1819"></a>
-<span class="sourceLineNo">1820</span>      }<a name="line.1820"></a>
+<span class="sourceLineNo">1691</span>    // if max balancing time isn't set, defaulting it to period time<a name="line.1691"></a>
+<span class="sourceLineNo">1692</span>    int maxBalancingTime = getConfiguration().getInt(HConstants.HBASE_BALANCER_MAX_BALANCING,<a name="line.1692"></a>
+<span class="sourceLineNo">1693</span>      getConfiguration()<a name="line.1693"></a>
+<span class="sourceLineNo">1694</span>        .getInt(HConstants.HBASE_BALANCER_PERIOD, HConstants.DEFAULT_HBASE_BALANCER_PERIOD));<a name="line.1694"></a>
+<span class="sourceLineNo">1695</span>    return maxBalancingTime;<a name="line.1695"></a>
+<span class="sourceLineNo">1696</span>  }<a name="line.1696"></a>
+<span class="sourceLineNo">1697</span><a name="line.1697"></a>
+<span class="sourceLineNo">1698</span>  /**<a name="line.1698"></a>
+<span class="sourceLineNo">1699</span>   * @return Maximum number of regions in transition<a name="line.1699"></a>
+<span class="sourceLineNo">1700</span>   */<a name="line.1700"></a>
+<span class="sourceLineNo">1701</span>  private int getMaxRegionsInTransition() {<a name="line.1701"></a>
+<span class="sourceLineNo">1702</span>    int numRegions = this.assignmentManager.getRegionStates().getRegionAssignments().size();<a name="line.1702"></a>
+<span class="sourceLineNo">1703</span>    return Math.max((int) Math.floor(numRegions * this.maxRitPercent), 1);<a name="line.1703"></a>
+<span class="sourceLineNo">1704</span>  }<a name="line.1704"></a>
+<span class="sourceLineNo">1705</span><a name="line.1705"></a>
+<span class="sourceLineNo">1706</span>  /**<a name="line.1706"></a>
+<span class="sourceLineNo">1707</span>   * It first sleep to the next balance plan start time. Meanwhile, throttling by the max<a name="line.1707"></a>
+<span class="sourceLineNo">1708</span>   * number regions in transition to protect availability.<a name="line.1708"></a>
+<span class="sourceLineNo">1709</span>   * @param nextBalanceStartTime The next balance plan start time<a name="line.1709"></a>
+<span class="sourceLineNo">1710</span>   * @param maxRegionsInTransition max number of regions in transition<a name="line.1710"></a>
+<span class="sourceLineNo">1711</span>   * @param cutoffTime when to exit balancer<a name="line.1711"></a>
+<span class="sourceLineNo">1712</span>   */<a name="line.1712"></a>
+<span class="sourceLineNo">1713</span>  private void balanceThrottling(long nextBalanceStartTime, int maxRegionsInTransition,<a name="line.1713"></a>
+<span class="sourceLineNo">1714</span>      long cutoffTime) {<a name="line.1714"></a>
+<span class="sourceLineNo">1715</span>    boolean interrupted = false;<a name="line.1715"></a>
+<span class="sourceLineNo">1716</span><a name="line.1716"></a>
+<span class="sourceLineNo">1717</span>    // Sleep to next balance plan start time<a name="line.1717"></a>
+<span class="sourceLineNo">1718</span>    // But if there are zero regions in transition, it can skip sleep to speed up.<a name="line.1718"></a>
+<span class="sourceLineNo">1719</span>    while (!interrupted &amp;&amp; System.currentTimeMillis() &lt; nextBalanceStartTime<a name="line.1719"></a>
+<span class="sourceLineNo">1720</span>        &amp;&amp; this.assignmentManager.getRegionStates().hasRegionsInTransition()) {<a name="line.1720"></a>
+<span class="sourceLineNo">1721</span>      try {<a name="line.1721"></a>
+<span class="sourceLineNo">1722</span>        Thread.sleep(100);<a name="line.1722"></a>
+<span class="sourceLineNo">1723</span>      } catch (InterruptedException ie) {<a name="line.1723"></a>
+<span class="sourceLineNo">1724</span>        interrupted = true;<a name="line.1724"></a>
+<span class="sourceLineNo">1725</span>      }<a name="line.1725"></a>
+<span class="sourceLineNo">1726</span>    }<a name="line.1726"></a>
+<span class="sourceLineNo">1727</span><a name="line.1727"></a>
+<span class="sourceLineNo">1728</span>    // Throttling by max number regions in transition<a name="line.1728"></a>
+<span class="sourceLineNo">1729</span>    while (!interrupted<a name="line.1729"></a>
+<span class="sourceLineNo">1730</span>        &amp;&amp; maxRegionsInTransition &gt; 0<a name="line.1730"></a>
+<span class="sourceLineNo">1731</span>        &amp;&amp; this.assignmentManager.getRegionStates().getRegionsInTransitionCount()<a name="line.1731"></a>
+<span class="sourceLineNo">1732</span>        &gt;= maxRegionsInTransition &amp;&amp; System.currentTimeMillis() &lt;= cutoffTime) {<a name="line.1732"></a>
+<span class="sourceLineNo">1733</span>      try {<a name="line.1733"></a>
+<span class="sourceLineNo">1734</span>        // sleep if the number of regions in transition exceeds the limit<a name="line.1734"></a>
+<span class="sourceLineNo">1735</span>        Thread.sleep(100);<a name="line.1735"></a>
+<span class="sourceLineNo">1736</span>      } catch (InterruptedException ie) {<a name="line.1736"></a>
+<span class="sourceLineNo">1737</span>        interrupted = true;<a name="line.1737"></a>
+<span class="sourceLineNo">1738</span>      }<a name="line.1738"></a>
+<span class="sourceLineNo">1739</span>    }<a name="line.1739"></a>
+<span class="sourceLineNo">1740</span><a name="line.1740"></a>
+<span class="sourceLineNo">1741</span>    if (interrupted) Thread.currentThread().interrupt();<a name="line.1741"></a>
+<span class="sourceLineNo">1742</span>  }<a name="line.1742"></a>
+<span class="sourceLineNo">1743</span><a name="line.1743"></a>
+<span class="sourceLineNo">1744</span>  public boolean balance() throws IOException {<a name="line.1744"></a>
+<span class="sourceLineNo">1745</span>    return balance(false);<a name="line.1745"></a>
+<span class="sourceLineNo">1746</span>  }<a name="line.1746"></a>
+<span class="sourceLineNo">1747</span><a name="line.1747"></a>
+<span class="sourceLineNo">1748</span>  public boolean balance(boolean force) throws IOException {<a name="line.1748"></a>
+<span class="sourceLineNo">1749</span>    // if master not initialized, don't run balancer.<a name="line.1749"></a>
+<span class="sourceLineNo">1750</span>    if (!isInitialized()) {<a name="line.1750"></a>
+<span class="sourceLineNo">1751</span>      LOG.debug("Master has not been initialized, don't run balancer.");<a name="line.1751"></a>
+<span class="sourceLineNo">1752</span>      return false;<a name="line.1752"></a>
+<span class="sourceLineNo">1753</span>    }<a name="line.1753"></a>
+<span class="sourceLineNo">1754</span><a name="line.1754"></a>
+<span class="sourceLineNo">1755</span>    if (isInMaintenanceMode()) {<a name="line.1755"></a>
+<span class="sourceLineNo">1756</span>      LOG.info("Master is in maintenanceMode mode, don't run balancer.");<a name="line.1756"></a>
+<span class="sourceLineNo">1757</span>      return false;<a name="line.1757"></a>
+<span class="sourceLineNo">1758</span>    }<a name="line.1758"></a>
+<span class="sourceLineNo">1759</span><a name="line.1759"></a>
+<span class="sourceLineNo">1760</span>    synchronized (this.balancer) {<a name="line.1760"></a>
+<span class="sourceLineNo">1761</span>      // If balance not true, don't run balancer.<a name="line.1761"></a>
+<span class="sourceLineNo">1762</span>      if (!this.loadBalancerTracker.isBalancerOn()) return false;<a name="line.1762"></a>
+<span class="sourceLineNo">1763</span>        // Only allow one balance run at at time.<a name="line.1763"></a>
+<span class="sourceLineNo">1764</span>      if (this.assignmentManager.hasRegionsInTransition()) {<a name="line.1764"></a>
+<span class="sourceLineNo">1765</span>        List&lt;RegionStateNode&gt; regionsInTransition = assignmentManager.getRegionsInTransition();<a name="line.1765"></a>
+<span class="sourceLineNo">1766</span>        // if hbase:meta region is in transition, result of assignment cannot be recorded<a name="line.1766"></a>
+<span class="sourceLineNo">1767</span>        // ignore the force flag in that case<a name="line.1767"></a>
+<span class="sourceLineNo">1768</span>        boolean metaInTransition = assignmentManager.isMetaRegionInTransition();<a name="line.1768"></a>
+<span class="sourceLineNo">1769</span>        String prefix = force &amp;&amp; !metaInTransition ? "R" : "Not r";<a name="line.1769"></a>
+<span class="sourceLineNo">1770</span>        List&lt;RegionStateNode&gt; toPrint = regionsInTransition;<a name="line.1770"></a>
+<span class="sourceLineNo">1771</span>        int max = 5;<a name="line.1771"></a>
+<span class="sourceLineNo">1772</span>        boolean truncated = false;<a name="line.1772"></a>
+<span class="sourceLineNo">1773</span>        if (regionsInTransition.size() &gt; max) {<a name="line.1773"></a>
+<span class="sourceLineNo">1774</span>          toPrint = regionsInTransition.subList(0, max);<a name="line.1774"></a>
+<span class="sourceLineNo">1775</span>          truncated = true;<a name="line.1775"></a>
+<span class="sourceLineNo">1776</span>        }<a name="line.1776"></a>
+<span class="sourceLineNo">1777</span>        LOG.info(prefix + "unning balancer because " + regionsInTransition.size() +<a name="line.1777"></a>
+<span class="sourceLineNo">1778</span>          " region(s) in transition: " + toPrint + (truncated? "(truncated list)": ""));<a name="line.1778"></a>
+<span class="sourceLineNo">1779</span>        if (!force || metaInTransition) return false;<a name="line.1779"></a>
+<span class="sourceLineNo">1780</span>      }<a name="line.1780"></a>
+<span class="sourceLineNo">1781</span>      if (this.serverManager.areDeadServersInProgress()) {<a name="line.1781"></a>
+<span class="sourceLineNo">1782</span>        LOG.info("Not running balancer because processing dead regionserver(s): " +<a name="line.1782"></a>
+<span class="sourceLineNo">1783</span>          this.serverManager.getDeadServers());<a name="line.1783"></a>
+<span class="sourceLineNo">1784</span>        return false;<a name="line.1784"></a>
+<span class="sourceLineNo">1785</span>      }<a name="line.1785"></a>
+<span class="sourceLineNo">1786</span><a name="line.1786"></a>
+<span class="sourceLineNo">1787</span>      if (this.cpHost != null) {<a name="line.1787"></a>
+<span class="sourceLineNo">1788</span>        try {<a name="line.1788"></a>
+<span class="sourceLineNo">1789</span>          if (this.cpHost.preBalance()) {<a name="line.1789"></a>
+<span class="sourceLineNo">1790</span>            LOG.debug("Coprocessor bypassing balancer request");<a name="line.1790"></a>
+<span class="sourceLineNo">1791</span>            return false;<a name="line.1791"></a>
+<span class="sourceLineNo">1792</span>          }<a name="line.1792"></a>
+<span class="sourceLineNo">1793</span>        } catch (IOException ioe) {<a name="line.1793"></a>
+<span class="sourceLineNo">1794</span>          LOG.error("Error invoking master coprocessor preBalance()", ioe);<a name="line.1794"></a>
+<span class="sourceLineNo">1795</span>          return false;<a name="line.1795"></a>
+<span class="sourceLineNo">1796</span>        }<a name="line.1796"></a>
+<span class="sourceLineNo">1797</span>      }<a name="line.1797"></a>
+<span class="sourceLineNo">1798</span><a name="line.1798"></a>
+<span class="sourceLineNo">1799</span>      boolean isByTable = getConfiguration().getBoolean("hbase.master.loadbalance.bytable", false);<a name="line.1799"></a>
+<span class="sourceLineNo">1800</span>      Map&lt;TableName, Map&lt;ServerName, List&lt;RegionInfo&gt;&gt;&gt; assignments =<a name="line.1800"></a>
+<span class="sourceLineNo">1801</span>        this.assignmentManager.getRegionStates()<a name="line.1801"></a>
+<span class="sourceLineNo">1802</span>          .getAssignmentsForBalancer(tableStateManager, this.serverManager.getOnlineServersList(),<a name="line.1802"></a>
+<span class="sourceLineNo">1803</span>            isByTable);<a name="line.1803"></a>
+<span class="sourceLineNo">1804</span>      for (Map&lt;ServerName, List&lt;RegionInfo&gt;&gt; serverMap : assignments.values()) {<a name="line.1804"></a>
+<span class="sourceLineNo">1805</span>        serverMap.keySet().removeAll(this.serverManager.getDrainingServersList());<a name="line.1805"></a>
+<span class="sourceLineNo">1806</span>      }<a name="line.1806"></a>
+<span class="sourceLineNo">1807</span><a name="line.1807"></a>
+<span class="sourceLineNo">1808</span>      //Give the balancer the current cluster state.<a name="line.1808"></a>
+<span class="sourceLineNo">1809</span>      this.balancer.setClusterMetrics(getClusterMetricsWithoutCoprocessor());<a name="line.1809"></a>
+<span class="sourceLineNo">1810</span>      this.balancer.setClusterLoad(assignments);<a name="line.1810"></a>
+<span class="sourceLineNo">1811</span><a name="line.1811"></a>
+<span class="sourceLineNo">1812</span>      List&lt;RegionPlan&gt; plans = new ArrayList&lt;&gt;();<a name="line.1812"></a>
+<span class="sourceLineNo">1813</span>      for (Entry&lt;TableName, Map&lt;ServerName, List&lt;RegionInfo&gt;&gt;&gt; e : assignments.entrySet()) {<a name="line.1813"></a>
+<span class="sourceLineNo">1814</span>        List&lt;RegionPlan&gt; partialPlans = this.balancer.balanceCluster(e.getKey(), e.getValue());<a name="line.1814"></a>
+<span class="sourceLineNo">1815</span>        if (partialPlans != null) {<a name="line.1815"></a>
+<span class="sourceLineNo">1816</span>          plans.addAll(partialPlans);<a name="line.1816"></a>
+<span class="sourceLineNo">1817</span>        }<a name="line.1817"></a>
+<span class="sourceLineNo">1818</span>      }<a name="line.1818"></a>
+<span class="sourceLineNo">1819</span><a name="line.1819"></a>
+<span class="sourceLineNo">1820</span>      List&lt;RegionPlan&gt; sucRPs = executeRegionPlansWithThrottling(plans);<a name="line.1820"></a>
 <span class="sourceLineNo">1821</span><a name="line.1821"></a>
-<span class="sourceLineNo">1822</span>      List&lt;RegionPlan&gt; sucRPs = executeRegionPlansWithThrottling(plans);<a name="line.1822"></a>
-<span class="sourceLineNo">1823</span><a name="line.1823"></a>
-<span class="sourceLineNo">1824</span>      if (this.cpHost != null) {<a name="line.1824"></a>
-<span class="sourceLineNo">1825</span>        try {<a name="line.1825"></a>
-<span class="sourceLineNo">1826</span>          this.cpHost.postBalance(sucRPs);<a name="line.1826"></a>
-<span class="sourceLineNo">1827</span>        } catch (IOException ioe) {<a name="line.1827"></a>
-<span class="sourceLineNo">1828</span>          // balancing already succeeded so don't change the result<a name="line.1828"></a>
-<span class="sourceLineNo">1829</span>          LOG.error("Error invoking master coprocessor postBalance()", ioe);<a name="line.1829"></a>
-<span class="sourceLineNo">1830</span>        }<a name="line.1830"></a>
-<span class="sourceLineNo">1831</span>      }<a name="line.1831"></a>
-<span class="sourceLineNo">1832</span>    }<a name="line.1832"></a>
-<span class="sourceLineNo">1833</span>    // If LoadBalancer did not generate any plans, it means the cluster is already balanced.<a name="line.1833"></a>
-<span class="sourceLineNo">1834</span>    // Return true indicating a success.<a name="line.1834"></a>
-<span class="sourceLineNo">1835</span>    return true;<a name="line.1835"></a>
-<span class="sourceLineNo">1836</span>  }<a name="line.1836"></a>
-<span class="sourceLineNo">1837</span><a name="line.1837"></a>
-<span class="sourceLineNo">1838</span>  public List&lt;RegionPlan&gt; executeRegionPlansWithThrottling(List&lt;RegionPlan&gt; plans) {<a name="line.1838"></a>
-<span class="sourceLineNo">1839</span>    List&lt;RegionPlan&gt; sucRPs = new ArrayList&lt;&gt;();<a name="line.1839"></a>
-<span class="sourceLineNo">1840</span>    int maxRegionsInTransition = getMaxRegionsInTransition();<a name="line.1840"></a>
-<span class="sourceLineNo">1841</span>    long balanceStartTime = System.currentTimeMillis();<a name="line.1841"></a>
-<span class="sourceLineNo">1842</span>    long cutoffTime = balanceStartTime + this.maxBlancingTime;<a name="line.1842"></a>
-<span class="sourceLineNo">1843</span>    int rpCount = 0;  // number of RegionPlans balanced so far<a name="line.1843"></a>
-<span class="sourceLineNo">1844</span>    if (plans != null &amp;&amp; !plans.isEmpty()) {<a name="line.1844"></a>
-<span class="sourceLineNo">1845</span>      int balanceInterval = this.maxBlancingTime / plans.size();<a name="line.1845"></a>
-<span class="sourceLineNo">1846</span>      LOG.info("Balancer plans size is " + plans.size() + ", the balance interval is "<a name="line.1846"></a>
-<span class="sourceLineNo">1847</span>          + balanceInterval + " ms, and the max number regions in transition is "<a name="line.1847"></a>
-<span class="sourceLineNo">1848</span>          + maxRegionsInTransition);<a name="line.1848"></a>
-<span class="sourceLineNo">1849</span><a name="line.1849"></a>
-<span class="sourceLineNo">1850</span>      for (RegionPlan plan: plans) {<a name="line.1850"></a>
-<span class="sourceLineNo">1851</span>        LOG.info("balance " + plan);<a name="line.1851"></a>
-<span class="sourceLineNo">1852</span>        //TODO: bulk assign<a name="line.1852"></a>
-<span class="sourceLineNo">1853</span>        try {<a name="line.1853"></a>
-<span class="sourceLineNo">1854</span>          this.assignmentManager.moveAsync(plan);<a name="line.1854"></a>
-<span class="sourceLineNo">1855</span>        } catch (HBaseIOException hioe) {<a name="line.1855"></a>
-<span class="sourceLineNo">1856</span>          //should ignore failed plans here, avoiding the whole balance plans be aborted<a name="line.1856"></a>
-<span class="sourceLineNo">1857</span>          //later calls of balance() can fetch up the failed and skipped plans<a name="line.1857"></a>
-<span class="sourceLineNo">1858</span>          LOG.warn("Failed balance plan {}, skipping...", plan, hioe);<a name="line.1858"></a>
-<span class="sourceLineNo">1859</span>        }<a name="line.1859"></a>
-<span class="sourceLineNo">1860</span>        //rpCount records balance plans processed, does not care if a plan succeeds<a name="line.1860"></a>
-<span class="sourceLineNo">1861</span>        rpCount++;<a name="line.1861"></a>
-<span class="sourceLineNo">1862</span><a name="line.1862"></a>
-<span class="sourceLineNo">1863</span>        balanceThrottling(balanceStartTime + rpCount * balanceInterval, maxRegionsInTransition,<a name="line.1863"></a>
-<span class="sourceLineNo">1864</span>            cutoffTime);<a name="line.1864"></a>
+<span class="sourceLineNo">1822</span>      if (this.cpHost != null) {<a name="line.1822"></a>
+<span class="sourceLineNo">1823</span>        try {<a name="line.1823"></a>
+<span class="sourceLineNo">1824</span>          this.cpHost.postBalance(sucRPs);<a name="line.1824"></a>
+<span class="sourceLineNo">1825</span>        } catch (IOException ioe) {<a name="line.1825"></a>
+<span class="sourceLineNo">1826</span>          // balancing already succeeded so don't change the result<a name="line.1826"></a>
+<span class="sourceLineNo">1827</span>          LOG.error("Error invoking master coprocessor postBalance()", ioe);<a name="line.1827"></a>
+<span class="sourceLineNo">1828</span>        }<a name="line.1828"></a>
+<span class="sourceLineNo">1829</span>      }<a name="line.1829"></a>
+<span class="sourceLineNo">1830</span>    }<a name="line.1830"></a>
+<span class="sourceLineNo">1831</span>    // If LoadBalancer did not generate any plans, it means the cluster is already balanced.<a name="line.1831"></a>
+<span class="sourceLineNo">1832</span>    // Return true indicating a success.<a name="line.1832"></a>
+<span class="sourceLineNo">1833</span>    return true;<a name="line.1833"></a>
+<span class="sourceLineNo">1834</span>  }<a name="line.1834"></a>
+<span class="sourceLineNo">1835</span><a name="line.1835"></a>
+<span class="sourceLineNo">1836</span>  public List&lt;RegionPlan&gt; executeRegionPlansWithThrottling(List&lt;RegionPlan&gt; plans) {<a name="line.1836"></a>
+<span class="sourceLineNo">1837</span>    List&lt;RegionPlan&gt; sucRPs = new ArrayList&lt;&gt;();<a name="line.1837"></a>
+<span class="sourceLineNo">1838</span>    int maxRegionsInTransition = getMaxRegionsInTransition();<a name="line.1838"></a>
+<span class="sourceLineNo">1839</span>    long balanceStartTime = System.currentTimeMillis();<a name="line.1839"></a>
+<span class="sourceLineNo">1840</span>    long cutoffTime = balanceStartTime + this.maxBlancingTime;<a name="line.1840"></a>
+<span class="sourceLineNo">1841</span>    int rpCount = 0;  // number of RegionPlans balanced so far<a name="line.1841"></a>
+<span class="sourceLineNo">1842</span>    if (plans != null &amp;&amp; !plans.isEmpty()) {<a name="line.1842"></a>
+<span class="sourceLineNo">1843</span>      int balanceInterval = this.maxBlancingTime / plans.size();<a name="line.1843"></a>
+<span class="sourceLineNo">1844</span>      LOG.info("Balancer plans size is " + plans.size() + ", the balance interval is "<a name="line.1844"></a>
+<span class="sourceLineNo">1845</span>          + balanceInterval + " ms, and the max number regions in transition is "<a name="line.1845"></a>
+<span class="sourceLineNo">1846</span>          + maxRegionsInTransition);<a name="line.1846"></a>
+<span class="sourceLineNo">1847</span><a name="line.1847"></a>
+<span class="sourceLineNo">1848</span>      for (RegionPlan plan: plans) {<a name="line.1848"></a>
+<span class="sourceLineNo">1849</span>        LOG.info("balance " + plan);<a name="line.1849"></a>
+<span class="sourceLineNo">1850</span>        //TODO: bulk assign<a name="line.1850"></a>
+<span class="sourceLineNo">1851</span>        try {<a name="line.1851"></a>
+<span class="sourceLineNo">1852</span>          this.assignmentManager.moveAsync(plan);<a name="line.1852"></a>
+<span class="sourceLineNo">1853</span>        } catch (HBaseIOException hioe) {<a name="line.1853"></a>
+<span class="sourceLineNo">1854</span>          //should ignore failed plans here, avoiding the whole balance plans be aborted<a name="line.1854"></a>
+<span class="sourceLineNo">1855</span>          //later calls of balance() can fetch up the failed and skipped plans<a name="line.1855"></a>
+<span class="sourceLineNo">1856</span>          LOG.warn("Failed balance plan {}, skipping...", plan, hioe);<a name="line.1856"></a>
+<span class="sourceLineNo">1857</span>        }<a name="line.1857"></a>
+<span class="sourceLineNo">1858</span>        //rpCount records balance plans processed, does not care if a plan succeeds<a name="line.1858"></a>
+<span class="sourceLineNo">1859</span>        rpCount++;<a name="line.1859"></a>
+<span class="sourceLineNo">1860</span><a name="line.1860"></a>
+<span class="sourceLineNo">1861</span>        if (this.maxBlancingTime &gt; 0) {<a name="line.1861"></a>
+<span class="sourceLineNo">1862</span>          balanceThrottling(balanceStartTime + rpCount * balanceInterval, maxRegionsInTransition,<a name="line.1862"></a>
+<span class="sourceLineNo">1863</span>            cutoffTime);<a name="line.1863"></a>
+<span class="sourceLineNo">1864</span>        }<a name="line.1864"></a>
 <span class="sourceLineNo">1865</span><a name="line.1865"></a>
 <span class="sourceLineNo">1866</span>        // if performing next balance exceeds cutoff time, exit the loop<a name="line.1866"></a>
-<span class="sourceLineNo">1867</span>        if (rpCount &lt; plans.size() &amp;&amp; System.currentTimeMillis() &gt; cutoffTime) {<a name="line.1867"></a>
-<span class="sourceLineNo">1868</span>          // TODO: After balance, there should not be a cutoff time (keeping it as<a name="line.1868"></a>
-<span class="sourceLineNo">1869</span>          // a security net for now)<a name="line.1869"></a>
-<span class="sourceLineNo">1870</span>          LOG.debug("No more balancing till next balance run; maxBalanceTime="<a name="line.1870"></a>
-<span class="sourceLineNo">1871</span>              + this.maxBlancingTime);<a name="line.1871"></a>
-<span class="sourceLineNo">1872</span>          break;<a name="line.1872"></a>
-<span class="sourceLineNo">1873</span>        }<a name="line.1873"></a>
-<span class="sourceLineNo">1874</span>      }<a name="line.1874"></a>
-<span class="sourceLineNo">1875</span>    }<a name="line.1875"></a>
-<span class="sourceLineNo">1876</span>    return sucRPs;<a name="line.1876"></a>
-<span class="sourceLineNo">1877</span>  }<a name="line.1877"></a>
-<span class="sourceLineNo">1878</span><a name="line.1878"></a>
-<span class="sourceLineNo">1879</span>  @Override<a name="line.1879"></a>
-<span class="sourceLineNo">1880</span>  @VisibleForTesting<a name="line.1880"></a>
-<span class="sourceLineNo">1881</span>  public RegionNormalizer getRegionNormalizer() {<a name="line.1881"></a>
-<span class="sourceLineNo">1882</span>    return this.normalizer;<a name="line.1882"></a>
-<span class="sourceLineNo">1883</span>  }<a name="line.1883"></a>
-<span class="sourceLineNo">1884</span><a name="line.1884"></a>
-<span class="sourceLineNo">1885</span>  /**<a name="line.1885"></a>
-<span class="sourceLineNo">1886</span>   * Perform normalization of cluster (invoked by {@link RegionNormalizerChore}).<a name="line.1886"></a>
-<span class="sourceLineNo">1887</span>   *<a name="line.1887"></a>
-<span class="sourceLineNo">1888</span>   * @return true if normalization step was performed successfully, false otherwise<a name="line.1888"></a>
-<span class="sourceLineNo">1889</span>   *    (specifically, if HMaster hasn't been initialized properly or normalization<a name="line.1889"></a>
-<span class="sourceLineNo">1890</span>   *    is globally disabled)<a name="line.1890"></a>
-<span class="sourceLineNo">1891</span>   */<a name="line.1891"></a>
-<span class="sourceLineNo">1892</span>  public boolean normalizeRegions() throws IOException {<a name="line.1892"></a>
-<span class="sourceLineNo">1893</span>    if (!isInitialized()) {<a name="line.1893"></a>
-<span class="sourceLineNo">1894</span>      LOG.debug("Master has not been initialized, don't run region normalizer.");<a name="line.1894"></a>
-<span class="sourceLineNo">1895</span>      return false;<a name="line.1895"></a>
-<span class="sourceLineNo">1896</span>    }<a name="line.1896"></a>
-<span class="sourceLineNo">1897</span>    if (this.getServerManager().isClusterShutdown()) {<a name="line.1897"></a>
-<span class="sourceLineNo">1898</span>      LOG.info("Cluster is shutting down, don't run region normalizer.");<a name="line.1898"></a>
-<span class="sourceLineNo">1899</span>      return false;<a name="line.1899"></a>
-<span class="sourceLineNo">1900</span>    }<a name="line.1900"></a>
-<span class="sourceLineNo">1901</span>    if (isInMaintenanceMode()) {<a name="line.1901"></a>
-<span class="sourceLineNo">1902</span>      LOG.info("Master is in maintenance mode, don't run region normalizer.");<a name="line.1902"></a>
-<span class="sourceLineNo">1903</span>      return false;<a name="line.1903"></a>
-<span class="sourceLineNo">1904</span>    }<a name="line.1904"></a>
-<span class="sourceLineNo">1905</span>    if (!this.regionNormalizerTracker.isNormalizerOn()) {<a name="line.1905"></a>
-<span class="sourceLineNo">1906</span>      LOG.debug("Region normalization is disabled, don't run region normalizer.");<a name="line.1906"></a>
-<span class="sourceLineNo">1907</span>      return false;<a name="line.1907"></a>
-<span class="sourceLineNo">1908</span>    }<a name="line.1908"></a>
-<span class="sourceLineNo">1909</span><a name="line.1909"></a>
-<span class="sourceLineNo">1910</span>    synchronized (this.normalizer) {<a name="line.1910"></a>
-<span class="sourceLineNo">1911</span>      // Don't run the normalizer concurrently<a name="line.1911"></a>
-<span class="sourceLineNo">1912</span>      List&lt;TableName&gt; allEnabledTables = new ArrayList&lt;&gt;(<a name="line.1912"></a>
-<span class="sourceLineNo">1913</span>        this.tableStateManager.getTablesInStates(TableState.State.ENABLED));<a name="line.1913"></a>
-<span class="sourceLineNo">1914</span><a name="line.1914"></a>
-<span class="sourceLineNo">1915</span>      Collections.shuffle(allEnabledTables);<a name="line.1915"></a>
-<span class="sourceLineNo">1916</span><a name="line.1916"></a>
-<span class="sourceLineNo">1917</span>      for (TableName table : allEnabledTables) {<a name="line.1917"></a>
-<span class="sourceLineNo">1918</span>        if (isInMaintenanceMode()) {<a name="line.1918"></a>
-<span class="sourceLineNo">1919</span>          LOG.debug("Master is in maintenance mode, stop running region normalizer.");<a name="line.1919"></a>
-<span class="sourceLineNo">1920</span>          return false;<a name="line.1920"></a>
-<span class="sourceLineNo">1921</span>        }<a name="line.1921"></a>
-<span class="sourceLineNo">1922</span><a name="line.1922"></a>
-<span class="sourceLineNo">1923</span>        TableDescriptor tblDesc = getTableDescriptors().get(table);<a name="line.1923"></a>
-<span class="sourceLineNo">1924</span>        if (table.isSystemTable() || (tblDesc != null &amp;&amp;<a name="line.1924"></a>
-<span class="sourceLineNo">1925</span>            !tblDesc.isNormalizationEnabled())) {<a name="line.1925"></a>
-<span class="sourceLineNo">1926</span>          LOG.trace("Skipping normalization for {}, as it's either system"<a name="line.1926"></a>
-<span class="sourceLineNo">1927</span>              + " table or doesn't have auto normalization turned on", table);<a name="line.1927"></a>
-<span class="sourceLineNo">1928</span>          continue;<a name="line.1928"></a>
-<span class="sourceLineNo">1929</span>        }<a name="line.1929"></a>
-<span class="sourceLineNo">1930</span>        List&lt;NormalizationPlan&gt; plans = this.normalizer.computePlanForTable(table);<a name="line.1930"></a>
-<span class="sourceLineNo">1931</span>        if (plans != null) {<a name="line.1931"></a>
-<span class="sourceLineNo">1932</span>          for (NormalizationPlan plan : plans) {<a name="line.1932"></a>
-<span class="sourceLineNo">1933</span>            plan.execute(asyncClusterConnection.toConnection().getAdmin());<a name="line.1933"></a>
-<span class="sourceLineNo">1934</span>            if (plan.getType() == PlanType.SPLIT) {<a name="line.1934"></a>
-<span class="sourceLineNo">1935</span>              splitPlanCount++;<a name="line.1935"></a>
-<span class="sourceLineNo">1936</span>            } else if (plan.getType() == PlanType.MERGE) {<a name="line.1936"></a>
-<span class="sourceLineNo">1937</span>              mergePlanCount++;<a name="line.1937"></a>
-<span class="sourceLineNo">1938</span>            }<a name="line.1938"></a>
-<span class="sourceLineNo">1939</span>          }<a name="line.1939"></a>
-<span class="sourceLineNo">1940</span>        }<a name="line.1940"></a>
-<span class="sourceLineNo">1941</span>      }<a name="line.1941"></a>
-<span class="sourceLineNo">1942</span>    }<a name="line.1942"></a>
-<span class="sourceLineNo">1943</span>    // If Region did not generate any plans, it means the cluster is already balanced.<a name="line.1943"></a>
-<span class="sourceLineNo">1944</span>    // Return true indicating a success.<a name="line.1944"></a>
-<span class="sourceLineNo">1945</span>    return true;<a name="line.1945"></a>
-<span class="sourceLineNo">1946</span>  }<a name="line.1946"></a>
-<span class="sourceLineNo">1947</span><a name="line.1947"></a>
-<span class="sourceLineNo">1948</span>  /**<a name="line.1948"></a>
-<span class="sourceLineNo">1949</span>   * @return Client info for use as prefix on an audit log string; who did an action<a name="line.1949"></a>
-<span class="sourceLineNo">1950</span>   */<a name="line.1950"></a>
-<span class="sourceLineNo">1951</span>  @Override<a name="line.1951"></a>
-<span class="sourceLineNo">1952</span>  public String getClientIdAuditPrefix() {<a name="line.1952"></a>
-<span class="sourceLineNo">1953</span>    return "Client=" + RpcServer.getRequestUserName().orElse(null)<a name="line.1953"></a>
-<span class="sourceLineNo">1954</span>        + "/" + RpcServer.getRemoteAddress().orElse(null);<a name="line.1954"></a>
-<span class="sourceLineNo">1955</span>  }<a name="line.1955"></a>
-<span class="sourceLineNo">1956</span><a name="line.1956"></a>
-<span class="sourceLineNo">1957</span>  /**<a name="line.1957"></a>
-<span class="sourceLineNo">1958</span>   * Switch for the background CatalogJanitor thread.<a name="line.1958"></a>
-<span class="sourceLineNo">1959</span>   * Used for testing.  The thread will continue to run.  It will just be a noop<a name="line.1959"></a>
-<span class="sourceLineNo">1960</span>   * if disabled.<a name="line.1960"></a>
-<span class="sourceLineNo">1961</span>   * @param b If false, the catalog janitor won't do anything.<a name="line.1961"></a>
-<span class="sourceLineNo">1962</span>   */<a name="line.1962"></a>
-<span class="sourceLineNo">1963</span>  public void setCatalogJanitorEnabled(final boolean b) {<a name="line.1963"></a>
-<span class="sourceLineNo">1964</span>    this.catalogJanitorChore.setEnabled(b);<a name="line.1964"></a>
-<span class="sourceLineNo">1965</span>  }<a name="line.1965"></a>
-<span class="sourceLineNo">1966</span><a name="line.1966"></a>
-<span class="sourceLineNo">1967</span>  @Override<a name="line.1967"></a>
-<span class="sourceLineNo">1968</span>  public long mergeRegions(<a name="line.1968"></a>
-<span class="sourceLineNo">1969</span>      final RegionInfo[] regionsToMerge,<a name="line.1969"></a>
-<span class="sourceLineNo">1970</span>      final boolean forcible,<a name="line.1970"></a>
-<span class="sourceLineNo">1971</span>      final long ng,<a name="line.1971"></a>
-<span class="sourceLineNo">1972</span>      final long nonce) throws IOException {<a name="line.1972"></a>
-<span class="sourceLineNo">1973</span>    checkInitialized();<a name="line.1973"></a>
-<span class="sourceLineNo">1974</span><a name="line.1974"></a>
-<span class="sourceLineNo">1975</span>    final String mergeRegionsStr = Arrays.stream(regionsToMerge).<a name="line.1975"></a>
-<span class="sourceLineNo">1976</span>      map(r -&gt; RegionInfo.getShortNameToLog(r)).collect(Collectors.joining(", "));<a name="line.1976"></a>
-<span class="sourceLineNo">1977</span>    return MasterProcedureUtil.submitProcedure(new NonceProcedureRunnable(this, ng, nonce) {<a name="line.1977"></a>
-<span class="sourceLineNo">1978</span>      @Override<a name="line.1978"></a>
-<span class="sourceLineNo">1979</span>      protected void run() throws IOException {<a name="line.1979"></a>
-<span class="sourceLineNo">1980</span>        getMaster().getMasterCoprocessorHost().preMergeRegions(regionsToMerge);<a name="line.1980"></a>
-<span class="sourceLineNo">1981</span>        String aid = getClientIdAuditPrefix();<a name="line.1981"></a>
-<span class="sourceLineNo">1982</span>        LOG.info("{} merge regions {}", aid, mergeRegionsStr);<a name="line.1982"></a>
-<span class="sourceLineNo">1983</span>        submitProcedure(new MergeTableRegionsProcedure(procedureExecutor.getEnvironment(),<a name="line.1983"></a>
-<span class="sourceLineNo">1984</span>            regionsToMerge, forcible));<a name="line.1984"></a>
-<span class="sourceLineNo">1985</span>        getMaster().getMasterCoprocessorHost().postMergeRegions(regionsToMerge);<a name="line.1985"></a>
-<span class="sourceLineNo">1986</span>      }<a name="line.1986"></a>
-<span class="sourceLineNo">1987</span><a name="line.1987"></a>
-<span class="sourceLineNo">1988</span>      @Override<a name="line.1988"></a>
-<span class="sourceLineNo">1989</span>      protected String getDescription() {<a name="line.1989"></a>
-<span class="sourceLineNo">1990</span>        return "MergeTableProcedure";<a name="line.1990"></a>
-<span class="sourceLineNo">1991</span>      }<a name="line.1991"></a>
-<span class="sourceLineNo">1992</span>    });<a name="line.1992"></a>
-<span class="sourceLineNo">1993</span>  }<a name="line.1993"></a>
-<span class="sourceLineNo">1994</span><a name="line.1994"></a>
-<span class="sourceLineNo">1995</span>  @Override<a name="line.1995"></a>
-<span class="sourceLineNo">1996</span>  public long splitRegion(final RegionInfo regionInfo, final byte[] splitRow,<a name="line.1996"></a>
-<span class="sourceLineNo">1997</span>      final long nonceGroup, final long nonce)<a name="line.1997"></a>
-<span class="sourceLineNo">1998</span>  throws IOException {<a name="line.1998"></a>
-<span class="sourceLineNo">1999</span>    checkInitialized();<a name="line.1999"></a>
-<span class="sourceLineNo">2000</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2000"></a>
-<span class="sourceLineNo">2001</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2001"></a>
-<span class="sourceLineNo">2002</span>      @Override<a name="line.2002"></a>
-<span class="sourceLineNo">2003</span>      protected void run() throws IOException {<a name="line.2003"></a>
-<span class="sourceLineNo">2004</span>        getMaster().getMasterCoprocessorHost().preSplitRegion(regionInfo.getTable(), splitRow);<a name="line.2004"></a>
-<span class="sourceLineNo">2005</span>        LOG.info(getClientIdAuditPrefix() + " split " + regionInfo.getRegionNameAsString());<a name="line.2005"></a>
-<span class="sourceLineNo">2006</span><a name="line.2006"></a>
-<span class="sourceLineNo">2007</span>        // Execute the operation asynchronously<a name="line.2007"></a>
-<span class="sourceLineNo">2008</span>        submitProcedure(getAssignmentManager().createSplitProcedure(regionInfo, splitRow));<a name="line.2008"></a>
-<span class="sourceLineNo">2009</span>      }<a name="line.2009"></a>
-<span class="sourceLineNo">2010</span><a name="line.2010"></a>
-<span class="sourceLineNo">2011</span>      @Override<a name="line.2011"></a>
-<span class="sourceLineNo">2012</span>      protected String getDescription() {<a name="line.2012"></a>
-<span class="sourceLineNo">2013</span>        return "SplitTableProcedure";<a name="line.2013"></a>
-<span class="sourceLineNo">2014</span>      }<a name="line.2014"></a>
-<span class="sourceLineNo">2015</span>    });<a name="line.2015"></a>
-<span class="sourceLineNo">2016</span>  }<a name="line.2016"></a>
-<span class="sourceLineNo">2017</span><a name="line.2017"></a>
-<span class="sourceLineNo">2018</span>  private void warmUpRegion(ServerName server, RegionInfo region) {<a name="line.2018"></a>
-<span class="sourceLineNo">2019</span>    FutureUtils.addListener(asyncClusterConnection.getRegionServerAdmin(server)<a name="line.2019"></a>
-<span class="sourceLineNo">2020</span>      .warmupRegion(RequestConverter.buildWarmupRegionRequest(region)), (r, e) -&gt; {<a name="line.2020"></a>
-<span class="sourceLineNo">2021</span>        if (e != null) {<a name="line.2021"></a>
-<span class="sourceLineNo">2022</span>          LOG.warn("Failed to warm up region {} on server {}", region, server, e);<a name="line.2022"></a>
-<span class="sourceLineNo">2023</span>        }<a name="line.2023"></a>
-<span class="sourceLineNo">2024</span>      });<a name="line.2024"></a>
-<span class="sourceLineNo">2025</span>  }<a name="line.2025"></a>
-<span class="sourceLineNo">2026</span><a name="line.2026"></a>
-<span class="sourceLineNo">2027</span>  // Public so can be accessed by tests. Blocks until move is done.<a name="line.2027"></a>
-<span class="sourceLineNo">2028</span>  // Replace with an async implementation from which you can get<a name="line.2028"></a>
-<span class="sourceLineNo">2029</span>  // a success/failure result.<a name="line.2029"></a>
-<span class="sourceLineNo">2030</span>  @VisibleForTesting<a name="line.2030"></a>
-<span class="sourceLineNo">2031</span>  public void move(final byte[] encodedRegionName, byte[] destServerName) throws HBaseIOException {<a name="line.2031"></a>
-<span class="sourceLineNo">2032</span>    RegionState regionState = assignmentManager.getRegionStates().<a name="line.2032"></a>
-<span class="sourceLineNo">2033</span>      getRegionState(Bytes.toString(encodedRegionName));<a name="line.2033"></a>
-<span class="sourceLineNo">2034</span><a name="line.2034"></a>
-<span class="sourceLineNo">2035</span>    RegionInfo hri;<a name="line.2035"></a>
-<span class="sourceLineNo">2036</span>    if (regionState != null) {<a name="line.2036"></a>
-<span class="sourceLineNo">2037</span>      hri = regionState.getRegion();<a name="line.2037"></a>
-<span class="sourceLineNo">2038</span>    } else {<a name="line.2038"></a>
-<span class="sourceLineNo">2039</span>      throw new UnknownRegionException(Bytes.toStringBinary(encodedRegionName));<a name="line.2039"></a>
-<span class="sourceLineNo">2040</span>    }<a name="line.2040"></a>
-<span class="sourceLineNo">2041</span><a name="line.2041"></a>
-<span class="sourceLineNo">2042</span>    ServerName dest;<a name="line.2042"></a>
-<span class="sourceLineNo">2043</span>    List&lt;ServerName&gt; exclude = hri.getTable().isSystemTable() ? assignmentManager.getExcludedServersForSystemTable()<a name="line.2043"></a>
-<span class="sourceLineNo">2044</span>        : new ArrayList&lt;&gt;(1);<a name="line.2044"></a>
-<span class="sourceLineNo">2045</span>    if (destServerName != null &amp;&amp; exclude.contains(ServerName.valueOf(Bytes.toString(destServerName)))) {<a name="line.2045"></a>
-<span class="sourceLineNo">2046</span>      LOG.info(<a name="line.2046"></a>
-<span class="sourceLineNo">2047</span>          Bytes.toString(encodedRegionName) + " can not move to " + Bytes.toString(destServerName)<a name="line.2047"></a>
-<span class="sourceLineNo">2048</span>              + " because the server is in exclude list");<a name="line.2048"></a>
-<span class="sourceLineNo">2049</span>      destServerName = null;<a name="line.2049"></a>
-<span class="sourceLineNo">2050</span>    }<a name="line.2050"></a>
-<span class="sourceLineNo">2051</span>    if (destServerName == null || destServerName.length == 0) {<a name="line.2051"></a>
-<span class="sourceLineNo">2052</span>      LOG.info("Passed destination servername is null/empty so " +<a name="line.2052"></a>
-<span class="sourceLineNo">2053</span>        "choosing a server at random");<a name="line.2053"></a>
-<span class="sourceLineNo">2054</span>      exclude.add(regionState.getServerName());<a name="line.2054"></a>
-<span class="sourceLineNo">2055</span>      final List&lt;ServerName&gt; destServers = this.serverManager.createDestinationServersList(exclude);<a name="line.2055"></a>
-<span class="sourceLineNo">2056</span>      dest = balancer.randomAssignment(hri, destServers);<a name="line.2056"></a>
-<span class="sourceLineNo">2057</span>      if (dest == null) {<a name="line.2057"></a>
-<span class="sourceLineNo">2058</span>        LOG.debug("Unable to determine a plan to assign " + hri);<a name="line.2058"></a>
-<span class="sourceLineNo">2059</span>        return;<a name="line.2059"></a>
-<span class="sourceLineNo">2060</span>      }<a name="line.2060"></a>
-<span class="sourceLineNo">2061</span>    } else {<a name="line.2061"></a>
-<span class="sourceLineNo">2062</span>      ServerName candidate = ServerName.valueOf(Bytes.toString(destServerName));<a name="line.2062"></a>
-<span class="sourceLineNo">2063</span>      dest = balancer.randomAssignment(hri, Lists.newArrayList(candidate));<a name="line.2063"></a>
-<span class="sourceLineNo">2064</span>      if (dest == null) {<a name="line.2064"></a>
-<span class="sourceLineNo">2065</span>        LOG.debug("Unable to determine a plan to assign " + hri);<a name="line.2065"></a>
-<span class="sourceLineNo">2066</span>        return;<a name="line.2066"></a>
-<span class="sourceLineNo">2067</span>      }<a name="line.2067"></a>
-<span class="sourceLineNo">2068</span>      // TODO: What is this? I don't get it.<a name="line.2068"></a>
-<span class="sourceLineNo">2069</span>      if (dest.equals(serverName) &amp;&amp; balancer instanceof BaseLoadBalancer<a name="line.2069"></a>
-<span class="sourceLineNo">2070</span>          &amp;&amp; !((BaseLoadBalancer)balancer).shouldBeOnMaster(hri)) {<a name="line.2070"></a>
-<span class="sourceLineNo">2071</span>        // To avoid unnecessary region moving later by balancer. Don't put user<a name="line.2071"></a>
-<span class="sourceLineNo">2072</span>        // regions on master.<a name="line.2072"></a>
-<span class="sourceLineNo">2073</span>        LOG.debug("Skipping move of region " + hri.getRegionNameAsString()<a name="line.2073"></a>
-<span class="sourceLineNo">2074</span>          + " to avoid unnecessary region moving later by load balancer,"<a name="line.2074"></a>
-<span class="sourceLineNo">2075</span>          + " because it should not be on master");<a name="line.2075"></a>
-<span class="sourceLineNo">2076</span>        return;<a name="line.2076"></a>
-<span class="sourceLineNo">2077</span>      }<a name="line.2077"></a>
-<span class="sourceLineNo">2078</span>    }<a name="line.2078"></a>
-<span class="sourceLineNo">2079</span><a name="line.2079"></a>
-<span class="sourceLineNo">2080</span>    if (dest.equals(regionState.getServerName())) {<a name="line.2080"></a>
-<span class="sourceLineNo">2081</span>      LOG.debug("Skipping move of region " + hri.getRegionNameAsString()<a name="line.2081"></a>
-<span class="sourceLineNo">2082</span>        + " because region already assigned to the same server " + dest + ".");<a name="line.2082"></a>
-<span class="sourceLineNo">2083</span>      return;<a name="line.2083"></a>
-<span class="sourceLineNo">2084</span>    }<a name="line.2084"></a>
-<span class="sourceLineNo">2085</span><a name="line.2085"></a>
-<span class="sourceLineNo">2086</span>    // Now we can do the move<a name="line.2086"></a>
-<span class="sourceLineNo">2087</span>    RegionPlan rp = new RegionPlan(hri, regionState.getServerName(), dest);<a name="line.2087"></a>
-<span class="sourceLineNo">2088</span>    assert rp.getDestination() != null: rp.toString() + " " + dest;<a name="line.2088"></a>
-<span class="sourceLineNo">2089</span><a name="line.2089"></a>
-<span class="sourceLineNo">2090</span>    try {<a name="line.2090"></a>
-<span class="sourceLineNo">2091</span>      checkInitialized();<a name="line.2091"></a>
-<span class="sourceLineNo">2092</span>      if (this.cpHost != null) {<a name="line.2092"></a>
-<span class="sourceLineNo">2093</span>        this.cpHost.preMove(hri, rp.getSource(), rp.getDestination());<a name="line.2093"></a>
-<span class="sourceLineNo">2094</span>      }<a name="line.2094"></a>
-<span class="sourceLineNo">2095</span><a name="line.2095"></a>
-<span class="sourceLineNo">2096</span>      TransitRegionStateProcedure proc =<a name="line.2096"></a>
-<span class="sourceLineNo">2097</span>        this.assignmentManager.createMoveRegionProcedure(rp.getRegionInfo(), rp.getDestination());<a name="line.2097"></a>
-<span class="sourceLineNo">2098</span>      // Warmup the region on the destination before initiating the move.<a name="line.2098"></a>
-<span class="sourceLineNo">2099</span>      // A region server could reject the close request because it either does not<a name="line.2099"></a>
-<span class="sourceLineNo">2100</span>      // have the specified region or the region is being split.<a name="line.2100"></a>
-<span class="sourceLineNo">2101</span>      warmUpRegion(rp.getDestination(), hri);<a name="line.2101"></a>
-<span class="sourceLineNo">2102</span><a name="line.2102"></a>
-<span class="sourceLineNo">2103</span>      LOG.info(getClientIdAuditPrefix() + " move " + rp + ", running balancer");<a name="line.2103"></a>
-<span class="sourceLineNo">2104</span>      Future&lt;byte[]&gt; future = ProcedureSyncWait.submitProcedure(this.procedureExecutor, proc);<a name="line.2104"></a>
-<span class="sourceLineNo">2105</span>      try {<a name="line.2105"></a>
-<span class="sourceLineNo">2106</span>        // Is this going to work? Will we throw exception on error?<a name="line.2106"></a>
-<span class="sourceLineNo">2107</span>        // TODO: CompletableFuture rather than this stunted Future.<a name="line.2107"></a>
-<span class="sourceLineNo">2108</span>        future.get();<a name="line.2108"></a>
-<span class="sourceLineNo">2109</span>      } catch (InterruptedException | ExecutionException e) {<a name="line.2109"></a>
-<span class="sourceLineNo">2110</span>        throw new HBaseIOException(e);<a name="line.2110"></a>
-<span class="sourceLineNo">2111</span>      }<a name="line.2111"></a>
-<span class="sourceLineNo">2112</span>      if (this.cpHost != null) {<a name="line.2112"></a>
-<span class="sourceLineNo">2113</span>        this.cpHost.postMove(hri, rp.getSource(), rp.getDestination());<a name="line.2113"></a>
-<span class="sourceLineNo">2114</span>      }<a name="line.2114"></a>
-<span class="sourceLineNo">2115</span>    } catch (IOException ioe) {<a name="line.2115"></a>
-<span class="sourceLineNo">2116</span>      if (ioe instanceof HBaseIOException) {<a name="line.2116"></a>
-<span class="sourceLineNo">2117</span>        throw (HBaseIOException)ioe;<a name="line.2117"></a>
-<span class="sourceLineNo">2118</span>      }<a name="line.2118"></a>
-<span class="sourceLineNo">2119</span>      throw new HBaseIOException(ioe);<a name="line.2119"></a>
-<span class="sourceLineNo">2120</span>    }<a name="line.2120"></a>
-<span class="sourceLineNo">2121</span>  }<a name="line.2121"></a>
-<span class="sourceLineNo">2122</span><a name="line.2122"></a>
-<span class="sourceLineNo">2123</span>  @Override<a name="line.2123"></a>
-<span class="sourceLineNo">2124</span>  public long createTable(final TableDescriptor tableDescriptor, final byte[][] splitKeys,<a name="line.2124"></a>
-<span class="sourceLineNo">2125</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2125"></a>
-<span class="sourceLineNo">2126</span>    checkInitialized();<a name="line.2126"></a>
-<span class="sourceLineNo">2127</span>    TableDescriptor desc = getMasterCoprocessorHost().preCreateTableRegionsInfos(tableDescriptor);<a name="line.2127"></a>
-<span class="sourceLineNo">2128</span>    if (desc == null) {<a name="line.2128"></a>
-<span class="sourceLineNo">2129</span>      throw new IOException("Creation for " + tableDescriptor + " is canceled by CP");<a name="line.2129"></a>
-<span class="sourceLineNo">2130</span>    }<a name="line.2130"></a>
-<span class="sourceLineNo">2131</span>    String namespace = desc.getTableName().getNamespaceAsString();<a name="line.2131"></a>
-<span class="sourceLineNo">2132</span>    this.clusterSchemaService.getNamespace(namespace);<a name="line.2132"></a>
-<span class="sourceLineNo">2133</span><a name="line.2133"></a>
-<span class="sourceLineNo">2134</span>    RegionInfo[] newRegions = ModifyRegionUtils.createRegionInfos(desc, splitKeys);<a name="line.2134"></a>
-<span class="sourceLineNo">2135</span>    TableDescriptorChecker.sanityCheck(conf, desc);<a name="line.2135"></a>
-<span class="sourceLineNo">2136</span><a name="line.2136"></a>
-<span class="sourceLineNo">2137</span>    return MasterProcedureUtil<a name="line.2137"></a>
-<span class="sourceLineNo">2138</span>      .submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2138"></a>
-<span class="sourceLineNo">2139</span>        @Override<a name="line.2139"></a>
-<span class="sourceLineNo">2140</span>        protected void run() throws IOException {<a name="line.2140"></a>
-<span class="sourceLineNo">2141</span>          getMaster().getMasterCoprocessorHost().preCreateTable(desc, newRegions);<a name="line.2141"></a>
-<span class="sourceLineNo">2142</span><a name="line.2142"></a>
-<span class="sourceLineNo">2143</span>          LOG.info(getClientIdAuditPrefix() + " create " + desc);<a name="line.2143"></a>
-<span class="sourceLineNo">2144</span><a name="line.2144"></a>
-<span class="sourceLineNo">2145</span>          // TODO: We can handle/merge duplicate requests, and differentiate the case of<a name="line.2145"></a>
-<span class="sourceLineNo">2146</span>          // TableExistsException by saying if the schema is the same or not.<a name="line.2146"></a>
-<span class="sourceLineNo">2147</span>          //<a name="line.2147"></a>
-<span class="sourceLineNo">2148</span>          // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2148"></a>
-<span class="sourceLineNo">2149</span>          // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2149"></a>
-<span class="sourceLineNo">2150</span>          ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2150"></a>
-<span class="sourceLineNo">2151</span>          submitProcedure(<a name="line.2151"></a>
-<span class="sourceLineNo">2152</span>            new CreateTableProcedure(procedureExecutor.getEnvironment(), desc, newRegions, latch));<a name="line.2152"></a>
-<span class="sourceLineNo">2153</span>          latch.await();<a name="line.2153"></a>
-<span class="sourceLineNo">2154</span><a name="line.2154"></a>
-<span class="sourceLineNo">2155</span>          getMaster().getMasterCoprocessorHost().postCreateTable(desc, newRegions);<a name="line.2155"></a>
-<span class="sourceLineNo">2156</span>        }<a name="line.2156"></a>
-<span class="sourceLineNo">2157</span><a name="line.2157"></a>
-<span class="sourceLineNo">2158</span>        @Override<a name="line.2158"></a>
-<span class="sourceLineNo">2159</span>        protected String getDescription() {<a name="line.2159"></a>
-<span class="sourceLineNo">2160</span>          return "CreateTableProcedure";<a name="line.2160"></a>
-<span class="sourceLineNo">2161</span>        }<a name="line.2161"></a>
-<span class="sourceLineNo">2162</span>      });<a name="line.2162"></a>
-<span class="sourceLineNo">2163</span>  }<a name="line.2163"></a>
-<span class="sourceLineNo">2164</span><a name="line.2164"></a>
-<span class="sourceLineNo">2165</span>  @Override<a name="line.2165"></a>
-<span class="sourceLineNo">2166</span>  public long createSystemTable(final TableDescriptor tableDescriptor) throws IOException {<a name="line.2166"></a>
-<span class="sourceLineNo">2167</span>    if (isStopped()) {<a name="line.2167"></a>
-<span class="sourceLineNo">2168</span>      throw new MasterNotRunningException();<a name="line.2168"></a>
-<span class="sourceLineNo">2169</span>    }<a name="line.2169"></a>
-<span class="sourceLineNo">2170</span><a name="line.2170"></a>
-<span class="sourceLineNo">2171</span>    TableName tableName = tableDescriptor.getTableName();<a name="line.2171"></a>
-<span class="sourceLineNo">2172</span>    if (!(tableName.isSystemTable())) {<a name="line.2172"></a>
-<span class="sourceLineNo">2173</span>      throw new IllegalArgumentException(<a name="line.2173"></a>
-<span class="sourceLineNo">2174</span>        "Only system table creation can use this createSystemTable API");<a name="line.2174"></a>
-<span class="sourceLineNo">2175</span>    }<a name="line.2175"></a>
-<span class="sourceLineNo">2176</span><a name="line.2176"></a>
-<span class="sourceLineNo">2177</span>    RegionInfo[] newRegions = ModifyRegionUtils.createRegionInfos(tableDescriptor, null);<a name="line.2177"></a>
-<span class="sourceLineNo">2178</span><a name="line.2178"></a>
-<span class="sourceLineNo">2179</span>    LOG.info(getClientIdAuditPrefix() + " create " + tableDescriptor);<a name="line.2179"></a>
-<span class="sourceLineNo">2180</span><a name="line.2180"></a>
-<span class="sourceLineNo">2181</span>    // This special create table is called locally to master.  Therefore, no RPC means no need<a name="line.2181"></a>
-<span class="sourceLineNo">2182</span>    // to use nonce to detect duplicated RPC call.<a name="line.2182"></a>
-<span class="sourceLineNo">2183</span>    long procId = this.procedureExecutor.submitProcedure(<a name="line.2183"></a>
-<span class="sourceLineNo">2184</span>      new CreateTableProcedure(procedureExecutor.getEnvironment(), tableDescriptor, newRegions));<a name="line.2184"></a>
-<span class="sourceLineNo">2185</span><a name="line.2185"></a>
-<span class="sourceLineNo">2186</span>    return procId;<a name="line.2186"></a>
-<span class="sourceLineNo">2187</span>  }<a name="line.2187"></a>
-<span class="sourceLineNo">2188</span><a name="line.2188"></a>
-<span class="sourceLineNo">2189</span>  private void startActiveMasterManager(int infoPort) throws KeeperException {<a name="line.2189"></a>
-<span class="sourceLineNo">2190</span>    String backupZNode = ZNodePaths.joinZNode(<a name="line.2190"></a>
-<span class="sourceLineNo">2191</span>      zooKeeper.getZNodePaths().backupMasterAddressesZNode, serverName.toString());<a name="line.2191"></a>
-<span class="sourceLineNo">2192</span>    /*<a name="line.2192"></a>
-<span class="sourceLineNo">2193</span>    * Add a ZNode for ourselves in the backup master directory since we<a name="line.2193"></a>
-<span class="sourceLineNo">2194</span>    * may not become the active master. If so, we want the actual active<a name="line.2194"></a>
-<span class="sourceLineNo">2195</span>    * master to know we are backup masters, so that it won't assign<a name="line.2195"></a>
-<span class="sourceLineNo">2196</span>    * regions to us if so configured.<a name="line.2196"></a>
-<span class="sourceLineNo">2197</span>    *<a name="line.2197"></a>
-<span class="sourceLineNo">2198</span>    * If we become the active master later, ActiveMasterManager will delete<a name="line.2198"></a>
-<span class="sourceLineNo">2199</span>    * this node explicitly.  If we crash before then, ZooKeeper will delete<a name="line.2199"></a>
-<span class="sourceLineNo">2200</span>    * this node for us since it is ephemeral.<a name="line.2200"></a>
-<span class="sourceLineNo">2201</span>    */<a name="line.2201"></a>
-<span class="sourceLineNo">2202</span>    LOG.info("Adding backup master ZNode " + backupZNode);<a name="line.2202"></a>
-<span class="sourceLineNo">2203</span>    if (!MasterAddressTracker.setMasterAddress(zooKeeper, backupZNode, serverName, infoPort)) {<a name="line.2203"></a>
-<span class="sourceLineNo">2204</span>      LOG.warn("Failed create of " + backupZNode + " by " + serverName);<a name="line.2204"></a>
-<span class="sourceLineNo">2205</span>    }<a name="line.2205"></a>
-<span class="sourceLineNo">2206</span>    this.activeMasterManager.setInfoPort(infoPort);<a name="line.2206"></a>
-<span class="sourceLineNo">2207</span>    int timeout = conf.getInt(HConstants.ZK_SESSION_TIMEOUT, HConstants.DEFAULT_ZK_SESSION_TIMEOUT);<a name="line.2207"></a>
-<span class="sourceLineNo">2208</span>    // If we're a backup master, stall until a primary to write this address<a name="line.2208"></a>
-<span class="sourceLineNo">2209</span>    if (conf.getBoolean(HConstants.MASTER_TYPE_BACKUP, HConstants.DEFAULT_MASTER_TYPE_BACKUP)) {<a name="line.2209"></a>
-<span class="sourceLineNo">2210</span>      LOG.debug("HMaster started in backup mode. Stalling until master znode is written.");<a name="line.2210"></a>
-<span class="sourceLineNo">2211</span>      // This will only be a minute or so while the cluster starts up,<a name="line.2211"></a>
-<span class="sourceLineNo">2212</span>      // so don't worry about setting watches on the parent znode<a name="line.2212"></a>
-<span class="sourceLineNo">2213</span>      while (!activeMasterManager.hasActiveMaster()) {<a name="line.2213"></a>
-<span class="sourceLineNo">2214</span>        LOG.debug("Waiting for master address and cluster state znode to be written.");<a name="line.2214"></a>
-<span class="sourceLineNo">2215</span>        Threads.sleep(timeout);<a name="line.2215"></a>
-<span class="sourceLineNo">2216</span>      }<a name="line.2216"></a>
-<span class="sourceLineNo">2217</span>    }<a name="line.2217"></a>
-<span class="sourceLineNo">2218</span>    MonitoredTask status = TaskMonitor.get().createStatus("Master startup");<a name="line.2218"></a>
-<span class="sourceLineNo">2219</span>    status.setDescription("Master startup");<a name="line.2219"></a>
-<span class="sourceLineNo">2220</span>    try {<a name="line.2220"></a>
-<span class="sourceLineNo">2221</span>      if (activeMasterManager.blockUntilBecomingActiveMaster(timeout, status)) {<a name="line.2221"></a>
-<span class="sourceLineNo">2222</span>        finishActiveMasterInitialization(status);<a name="line.2222"></a>
-<span class="sourceLineNo">2223</span>      }<a name="line.2223"></a>
-<span class="sourceLineNo">2224</span>    } catch (Throwable t) {<a name="line.2224"></a>
-<span class="sourceLineNo">2225</span>      status.setStatus("Failed to become active: " + t.getMessage());<a name="line.2225"></a>
-<span class="sourceLineNo">2226</span>      LOG.error(HBaseMarkers.FATAL, "Failed to become active master", t);<a name="line.2226"></a>
-<span class="sourceLineNo">2227</span>      // HBASE-5680: Likely hadoop23 vs hadoop 20.x/1.x incompatibility<a name="line.2227"></a>
-<span class="sourceLineNo">2228</span>      if (t instanceof NoClassDefFoundError &amp;&amp; t.getMessage().<a name="line.2228"></a>
-<span class="sourceLineNo">2229</span>          contains("org/apache/hadoop/hdfs/protocol/HdfsConstants$SafeModeAction")) {<a name="line.2229"></a>
-<span class="sourceLineNo">2230</span>        // improved error message for this special case<a name="line.2230"></a>
-<span class="sourceLineNo">2231</span>        abort("HBase is having a problem with its Hadoop jars.  You may need to recompile " +<a name="line.2231"></a>
-<span class="sourceLineNo">2232</span>          "HBase against Hadoop version " + org.apache.hadoop.util.VersionInfo.getVersion() +<a name="line.2232"></a>
-<span class="sourceLineNo">2233</span>          " or change your hadoop jars to start properly", t);<a name="line.2233"></a>
-<span class="sourceLineNo">2234</span>      } else {<a name="line.2234"></a>
-<span class="sourceLineNo">2235</span>        abort("Unhandled exception. Starting shutdown.", t);<a name="line.2235"></a>
-<span class="sourceLineNo">2236</span>      }<a name="line.2236"></a>
-<span class="sourceLineNo">2237</span>    } finally {<a name="line.2237"></a>
-<span class="sourceLineNo">2238</span>      status.cleanup();<a name="line.2238"></a>
-<span class="sourceLineNo">2239</span>    }<a name="line.2239"></a>
-<span class="sourceLineNo">2240</span>  }<a name="line.2240"></a>
-<span class="sourceLineNo">2241</span><a name="line.2241"></a>
-<span class="sourceLineNo">2242</span>  private static boolean isCatalogTable(final TableName tableName) {<a name="line.2242"></a>
-<span class="sourceLineNo">2243</span>    return tableName.equals(TableName.META_TABLE_NAME);<a name="line.2243"></a>
-<span class="sourceLineNo">2244</span>  }<a name="line.2244"></a>
-<span class="sourceLineNo">2245</span><a name="line.2245"></a>
-<span class="sourceLineNo">2246</span>  @Override<a name="line.2246"></a>
-<span class="sourceLineNo">2247</span>  public long deleteTable(<a name="line.2247"></a>
-<span class="sourceLineNo">2248</span>      final TableName tableName,<a name="line.2248"></a>
-<span class="sourceLineNo">2249</span>      final long nonceGroup,<a name="line.2249"></a>
-<span class="sourceLineNo">2250</span>      final long nonce) throws IOException {<a name="line.2250"></a>
-<span class="sourceLineNo">2251</span>    checkInitialized();<a name="line.2251"></a>
-<span class="sourceLineNo">2252</span><a name="line.2252"></a>
-<span class="sourceLineNo">2253</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2253"></a>
-<span class="sourceLineNo">2254</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2254"></a>
-<span class="sourceLineNo">2255</span>      @Override<a name="line.2255"></a>
-<span class="sourceLineNo">2256</span>      protected void run() throws IOException {<a name="line.2256"></a>
-<span class="sourceLineNo">2257</span>        getMaster().getMasterCoprocessorHost().preDeleteTable(tableName);<a name="line.2257"></a>
-<span class="sourceLineNo">2258</span><a name="line.2258"></a>
-<span class="sourceLineNo">2259</span>        LOG.info(getClientIdAuditPrefix() + " delete " + tableName);<a name="line.2259"></a>
-<span class="sourceLineNo">2260</span><a name="line.2260"></a>
-<span class="sourceLineNo">2261</span>        // TODO: We can handle/merge duplicate request<a name="line.2261"></a>
-<span class="sourceLineNo">2262</span>        //<a name="line.2262"></a>
-<span class="sourceLineNo">2263</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2263"></a>
-<span class="sourceLineNo">2264</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2264"></a>
-<span class="sourceLineNo">2265</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2265"></a>
-<span class="sourceLineNo">2266</span>        submitProcedure(new DeleteTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2266"></a>
-<span class="sourceLineNo">2267</span>            tableName, latch));<a name="line.2267"></a>
-<span class="sourceLineNo">2268</span>        latch.await();<a name="line.2268"></a>
-<span class="sourceLineNo">2269</span><a name="line.2269"></a>
-<span class="sourceLineNo">2270</span>        getMaster().getMasterCoprocessorHost().postDeleteTable(tableName);<a name="line.2270"></a>
-<span class="sourceLineNo">2271</span>      }<a name="line.2271"></a>
-<span class="sourceLineNo">2272</span><a name="line.2272"></a>
-<span class="sourceLineNo">2273</span>      @Override<a name="line.2273"></a>
-<span class="sourceLineNo">2274</span>      protected String getDescription() {<a name="line.2274"></a>
-<span class="sourceLineNo">2275</span>        return "DeleteTableProcedure";<a name="line.2275"></a>
-<span class="sourceLineNo">2276</span>      }<a name="line.2276"></a>
-<span class="sourceLineNo">2277</span>    });<a name="line.2277"></a>
-<span class="sourceLineNo">2278</span>  }<a name="line.2278"></a>
-<span class="sourceLineNo">2279</span><a name="line.2279"></a>
-<span class="sourceLineNo">2280</span>  @Override<a name="line.2280"></a>
-<span class="sourceLineNo">2281</span>  public long truncateTable(<a name="line.2281"></a>
-<span class="sourceLineNo">2282</span>      final TableName tableName,<a name="line.2282"></a>
-<span class="sourceLineNo">2283</span>      final boolean preserveSplits,<a name="line.2283"></a>
-<span class="sourceLineNo">2284</span>      final long nonceGroup,<a name="line.2284"></a>
-<span class="sourceLineNo">2285</span>      final long nonce) throws IOException {<a name="line.2285"></a>
-<span class="sourceLineNo">2286</span>    checkInitialized();<a name="line.2286"></a>
-<span class="sourceLineNo">2287</span><a name="line.2287"></a>
-<span class="sourceLineNo">2288</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2288"></a>
-<span class="sourceLineNo">2289</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2289"></a>
-<span class="sourceLineNo">2290</span>      @Override<a name="line.2290"></a>
-<span class="sourceLineNo">2291</span>      protected void run() throws IOException {<a name="line.2291"></a>
-<span class="sourceLineNo">2292</span>        getMaster().getMasterCoprocessorHost().preTruncateTable(tableName);<a name="line.2292"></a>
-<span class="sourceLineNo">2293</span><a name="line.2293"></a>
-<span class="sourceLineNo">2294</span>        LOG.info(getClientIdAuditPrefix() + " truncate " + tableName);<a name="line.2294"></a>
-<span class="sourceLineNo">2295</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createLatch(2, 0);<a name="line.2295"></a>
-<span class="sourceLineNo">2296</span>        submitProcedure(new TruncateTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2296"></a>
-<span class="sourceLineNo">2297</span>            tableName, preserveSplits, latch));<a name="line.2297"></a>
-<span class="sourceLineNo">2298</span>        latch.await();<a name="line.2298"></a>
-<span class="sourceLineNo">2299</span><a name="line.2299"></a>
-<span class="sourceLineNo">2300</span>        getMaster().getMasterCoprocessorHost().postTruncateTable(tableName);<a name="line.2300"></a>
-<span class="sourceLineNo">2301</span>      }<a name="line.2301"></a>
-<span class="sourceLineNo">2302</span><a name="line.2302"></a>
-<span class="sourceLineNo">2303</span>      @Override<a name="line.2303"></a>
-<span class="sourceLineNo">2304</span>      protected String getDescription() {<a name="line.2304"></a>
-<span class="sourceLineNo">2305</span>        return "TruncateTableProcedure";<a name="line.2305"></a>
-<span class="sourceLineNo">2306</span>      }<a name="line.2306"></a>
-<span class="sourceLineNo">2307</span>    });<a name="line.2307"></a>
-<span class="sourceLineNo">2308</span>  }<a name="line.2308"></a>
-<span class="sourceLineNo">2309</span><a name="line.2309"></a>
-<span class="sourceLineNo">2310</span>  @Override<a name="line.2310"></a>
-<span class="sourceLineNo">2311</span>  public long addColumn(final TableName tableName, final ColumnFamilyDescriptor column,<a name="line.2311"></a>
-<span class="sourceLineNo">2312</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2312"></a>
-<span class="sourceLineNo">2313</span>    checkInitialized();<a name="line.2313"></a>
-<span class="sourceLineNo">2314</span>    checkTableExists(tableName);<a name="line.2314"></a>
-<span class="sourceLineNo">2315</span><a name="line.2315"></a>
-<span class="sourceLineNo">2316</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2316"></a>
-<span class="sourceLineNo">2317</span><a name="line.2317"></a>
-<span class="sourceLineNo">2318</span>      @Override<a name="line.2318"></a>
-<span class="sourceLineNo">2319</span>      public TableDescriptor get() throws IOException {<a name="line.2319"></a>
-<span class="sourceLineNo">2320</span>        TableDescriptor old = getTableDescriptors().get(tableName);<a name="line.2320"></a>
-<span class="sourceLineNo">2321</span>        if (old.hasColumnFamily(column.getName())) {<a name="line.2321"></a>
-<span class="sourceLineNo">2322</span>          throw new InvalidFamilyOperationException("Column family '" + column.getNameAsString()<a name="line.2322"></a>
-<span class="sourceLineNo">2323</span>              + "' in table '" + tableName + "' already exists so cannot be added");<a name="line.2323"></a>
-<span class="sourceLineNo">2324</span>        }<a name="line.2324"></a>
-<span class="sourceLineNo">2325</span><a name="line.2325"></a>
-<span class="sourceLineNo">2326</span>        return TableDescriptorBuilder.newBuilder(old).setColumnFamily(column).build();<a name="line.2326"></a>
-<span class="sourceLineNo">2327</span>      }<a name="line.2327"></a>
-<span class="sourceLineNo">2328</span>    }, nonceGroup, nonce, true);<a name="line.2328"></a>
-<span class="sourceLineNo">2329</span>  }<a name="line.2329"></a>
-<span class="sourceLineNo">2330</span><a name="line.2330"></a>
-<span class="sourceLineNo">2331</span>  /**<a name="line.2331"></a>
-<span class="sourceLineNo">2332</span>   * Implement to return TableDescriptor after pre-checks<a name="line.2332"></a>
-<span class="sourceLineNo">2333</span>   */<a name="line.2333"></a>
-<span class="sourceLineNo">2334</span>  protected interface TableDescriptorGetter {<a name="line.2334"></a>
-<span class="sourceLineNo">2335</span>    TableDescriptor get() throws IOException;<a name="line.2335"></a>
-<span class="sourceLineNo">2336</span>  }<a name="line.2336"></a>
-<span class="sourceLineNo">2337</span><a name="line.2337"></a>
-<span class="sourceLineNo">2338</span>  @Override<a name="line.2338"></a>
-<span class="sourceLineNo">2339</span>  public long modifyColumn(final TableName tableName, final ColumnFamilyDescriptor descriptor,<a name="line.2339"></a>
-<span class="sourceLineNo">2340</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2340"></a>
-<span class="sourceLineNo">2341</span>    checkInitialized();<a name="line.2341"></a>
-<span class="sourceLineNo">2342</span>    checkTableExists(tableName);<a name="line.2342"></a>
-<span class="sourceLineNo">2343</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2343"></a>
-<span class="sourceLineNo">2344</span><a name="line.2344"></a>
-<span class="sourceLineNo">2345</span>      @Override<a name="line.2345"></a>
-<span class="sourceLineNo">2346</span>      public TableDescriptor get() throws IOException {<a name="line.2346"></a>
-<span class="sourceLineNo">2347</span>        TableDescriptor old = getTableDescriptors().get(tableName);<a name="line.2347"></a>
-<span class="sourceLineNo">2348</span>        if (!old.hasColumnFamily(descriptor.getName())) {<a name="line.2348"></a>
-<span class="sourceLineNo">2349</span>          throw new InvalidFamilyOperationException("Family '" + descriptor.getNameAsString()<a name="line.2349"></a>
-<span class="sourceLineNo">2350</span>              + "' does not exist, so it cannot be modified");<a name="line.2350"></a>
-<span class="sourceLineNo">2351</span>        }<a name="line.2351"></a>
-<span class="sourceLineNo">2352</span><a name="line.2352"></a>
-<span class="sourceLineNo">2353</span>        return TableDescriptorBuilder.newBuilder(old).modifyColumnFamily(descriptor).build();<a name="line.2353"></a>
-<span class="sourceLineNo">2354</span>      }<a name="line.2354"></a>
-<span class="sourceLineNo">2355</span>    }, nonceGroup, nonce, true);<a name="line.2355"></a>
-<span class="sourceLineNo">2356</span>  }<a name="line.2356"></a>
-<span class="sourceLineNo">2357</span><a name="line.2357"></a>
-<span class="sourceLineNo">2358</span>  @Override<a name="line.2358"></a>
-<span class="sourceLineNo">2359</span>  public long deleteColumn(final TableName tableName, final byte[] columnName,<a name="line.2359"></a>
-<span class="sourceLineNo">2360</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2360"></a>
-<span class="sourceLineNo">2361</span>    checkInitialized();<a name="line.2361"></a>
-<span class="sourceLineNo">2362</span>    checkTableExists(tableName);<a name="line.2362"></a>
-<span class="sourceLineNo">2363</span><a name="line.2363"></a>
-<span class="sourceLineNo">2364</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2364"></a>
-<span class="sourceLineNo">2365</span><a name="line.2365"></a>
-<span class="sourceLineNo">2366</span>      @Override<a name="line.2366"></a>
-<span class="sourceLineNo">2367</span>      public TableDescriptor get() throws IOException {<a name="line.2367"></a>
-<span class="sourceLineNo">2368</span>        TableDescriptor old = getTableDescriptors().get(tableName);<a name="line.2368"></a>
-<span class="sourceLineNo">2369</span><a name="line.2369"></a>
-<span class="sourceLineNo">2370</span>        if (!old.hasColumnFamily(columnName)) {<a name="line.2370"></a>
-<span class="sourceLineNo">2371</span>          throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName)<a name="line.2371"></a>
-<span class="sourceLineNo">2372</span>              + "' does not exist, so it cannot be deleted");<a name="line.2372"></a>
-<span class="sourceLineNo">2373</span>        }<a name="line.2373"></a>
-<span class="sourceLineNo">2374</span>        if (old.getColumnFamilyCount() == 1) {<a name="line.2374"></a>
-<span class="sourceLineNo">2375</span>          throw new InvalidFamilyOperationException("Family '" + Bytes.toString(columnName)<a name="line.2375"></a>
-<span class="sourceLineNo">2376</span>              + "' is the only column family in the table, so it cannot be deleted");<a name="line.2376"></a>
-<span class="sourceLineNo">2377</span>        }<a name="line.2377"></a>
-<span class="sourceLineNo">2378</span>        return TableDescriptorBuilder.newBuilder(old).removeColumnFamily(columnName).build();<a name="line.2378"></a>
-<span class="sourceLineNo">2379</span>      }<a name="line.2379"></a>
-<span class="sourceLineNo">2380</span>    }, nonceGroup, nonce, true);<a name="line.2380"></a>
-<span class="sourceLineNo">2381</span>  }<a name="line.2381"></a>
-<span class="sourceLineNo">2382</span><a name="line.2382"></a>
-<span class="sourceLineNo">2383</span>  @Override<a name="line.2383"></a>
-<span class="sourceLineNo">2384</span>  public long enableTable(final TableName tableName, final long nonceGroup, final long nonce)<a name="line.2384"></a>
-<span class="sourceLineNo">2385</span>      throws IOException {<a name="line.2385"></a>
-<span class="sourceLineNo">2386</span>    checkInitialized();<a name="line.2386"></a>
-<span class="sourceLineNo">2387</span><a name="line.2387"></a>
-<span class="sourceLineNo">2388</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2388"></a>
-<span class="sourceLineNo">2389</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2389"></a>
-<span class="sourceLineNo">2390</span>      @Override<a name="line.2390"></a>
-<span class="sourceLineNo">2391</span>      protected void run() throws IOException {<a name="line.2391"></a>
-<span class="sourceLineNo">2392</span>        getMaster().getMasterCoprocessorHost().preEnableTable(tableName);<a name="line.2392"></a>
-<span class="sourceLineNo">2393</span><a name="line.2393"></a>
-<span class="sourceLineNo">2394</span>        // Normally, it would make sense for this authorization check to exist inside<a name="line.2394"></a>
-<span class="sourceLineNo">2395</span>        // AccessController, but because the authorization check is done based on internal state<a name="line.2395"></a>
-<span class="sourceLineNo">2396</span>        // (rather than explicit permissions) we'll do the check here instead of in the<a name="line.2396"></a>
-<span class="sourceLineNo">2397</span>        // coprocessor.<a name="line.2397"></a>
-<span class="sourceLineNo">2398</span>        MasterQuotaManager quotaManager = getMasterQuotaManager();<a name="line.2398"></a>
-<span class="sourceLineNo">2399</span>        if (quotaManager != null) {<a name="line.2399"></a>
-<span class="sourceLineNo">2400</span>          if (quotaManager.isQuotaInitialized()) {<a name="line.2400"></a>
-<span class="sourceLineNo">2401</span>              SpaceQuotaSnapshot currSnapshotOfTable =<a name="line.2401"></a>
-<span class="sourceLineNo">2402</span>                  QuotaTableUtil.getCurrentSnapshotFromQuotaTable(getConnection(), tableName);<a name="line.2402"></a>
-<span class="sourceLineNo">2403</span>              if (currSnapshotOfTable != null) {<a name="line.2403"></a>
-<span class="sourceLineNo">2404</span>                SpaceQuotaStatus quotaStatus = currSnapshotOfTable.getQuotaStatus();<a name="line.2404"></a>
-<span class="sourceLineNo">2405</span>                if (quotaStatus.isInViolation()<a name="line.2405"></a>
-<span class="sourceLineNo">2406</span>                    &amp;&amp; SpaceViolationPolicy.DISABLE == quotaStatus.getPolicy().orElse(null)) {<a name="line.2406"></a>
-<span class="sourceLineNo">2407</span>                throw new AccessDeniedException("Enabling the table '" + tableName<a name="line.2407"></a>
-<span class="sourceLineNo">2408</span>                    + "' is disallowed due to a violated space quota.");<a name="line.2408"></a>
-<span class="sourceLineNo">2409</span>              }<a name="line.2409"></a>
-<span class="sourceLineNo">2410</span>            }<a name="line.2410"></a>
-<span class="sourceLineNo">2411</span>          } else if (LOG.isTraceEnabled()) {<a name="line.2411"></a>
-<span class="sourceLineNo">2412</span>            LOG.trace("Unable to check for space quotas as the MasterQuotaManager is not enabled");<a name="line.2412"></a>
-<span class="sourceLineNo">2413</span>          }<a name="line.2413"></a>
-<span class="sourceLineNo">2414</span>        }<a name="line.2414"></a>
-<span class="sourceLineNo">2415</span><a name="line.2415"></a>
-<span class="sourceLineNo">2416</span>        LOG.info(getClientIdAuditPrefix() + " enable " + tableName);<a name="line.2416"></a>
-<span class="sourceLineNo">2417</span><a name="line.2417"></a>
-<span class="sourceLineNo">2418</span>        // Execute the operation asynchronously - client will check the progress of the operation<a name="line.2418"></a>
-<span class="sourceLineNo">2419</span>        // In case the request is from a &lt;1.1 client before returning,<a name="line.2419"></a>
-<span class="sourceLineNo">2420</span>        // we want to make sure that the table is prepared to be<a name="line.2420"></a>
-<span class="sourceLineNo">2421</span>        // enabled (the table is locked and the table state is set).<a name="line.2421"></a>
-<span class="sourceLineNo">2422</span>        // Note: if the procedure throws exception, we will catch it and rethrow.<a name="line.2422"></a>
-<span class="sourceLineNo">2423</span>        final ProcedurePrepareLatch prepareLatch = ProcedurePrepareLatch.createLatch();<a name="line.2423"></a>
-<span class="sourceLineNo">2424</span>        submitProcedure(new EnableTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2424"></a>
-<span class="sourceLineNo">2425</span>            tableName, prepareLatch));<a name="line.2425"></a>
-<span class="sourceLineNo">2426</span>        prepareLatch.await();<a name="line.2426"></a>
-<span class="sourceLineNo">2427</span><a name="line.2427"></a>
-<span class="sourceLineNo">2428</span>        getMaster().getMasterCoprocessorHost().postEnableTable(tableName);<a name="line.2428"></a>
-<span class="sourceLineNo">2429</span>      }<a name="line.2429"></a>
-<span class="sourceLineNo">2430</span><a name="line.2430"></a>
-<span class="sourceLineNo">2431</span>      @Override<a name="line.2431"></a>
-<span class="sourceLineNo">2432</span>      protected String getDescription() {<a name="line.2432"></a>
-<span class="sourceLineNo">2433</span>        return "EnableTableProcedure";<a name="line.2433"></a>
-<span class="sourceLineNo">2434</span>      }<a name="line.2434"></a>
-<span class="sourceLineNo">2435</span>    });<a name="line.2435"></a>
-<span class="sourceLineNo">2436</span>  }<a name="line.2436"></a>
-<span class="sourceLineNo">2437</span><a name="line.2437"></a>
-<span class="sourceLineNo">2438</span>  @Override<a name="line.2438"></a>
-<span class="sourceLineNo">2439</span>  public long disableTable(final TableName tableName, final long nonceGroup, final long nonce)<a name="line.2439"></a>
-<span class="sourceLineNo">2440</span>      throws IOException {<a name="line.2440"></a>
-<span class="sourceLineNo">2441</span>    checkInitialized();<a name="line.2441"></a>
-<span class="sourceLineNo">2442</span><a name="line.2442"></a>
-<span class="sourceLineNo">2443</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2443"></a>
-<span class="sourceLineNo">2444</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2444"></a>
-<span class="sourceLineNo">2445</span>      @Override<a name="line.2445"></a>
-<span class="sourceLineNo">2446</span>      protected void run() throws IOException {<a name="line.2446"></a>
-<span class="sourceLineNo">2447</span>        getMaster().getMasterCoprocessorHost().preDisableTable(tableName);<a name="line.2447"></a>
-<span class="sourceLineNo">2448</span><a name="line.2448"></a>
-<span class="sourceLineNo">2449</span>        LOG.info(getClientIdAuditPrefix() + " disable " + tableName);<a name="line.2449"></a>
-<span class="sourceLineNo">2450</span><a name="line.2450"></a>
-<span class="sourceLineNo">2451</span>        // Execute the operation asynchronously - client will check the progress of the operation<a name="line.2451"></a>
-<span class="sourceLineNo">2452</span>        // In case the request is from a &lt;1.1 client before returning,<a name="line.2452"></a>
-<span class="sourceLineNo">2453</span>        // we want to make sure that the table is prepared to be<a name="line.2453"></a>
-<span class="sourceLineNo">2454</span>        // enabled (the table is locked and the table state is set).<a name="line.2454"></a>
-<span class="sourceLineNo">2455</span>        // Note: if the procedure throws exception, we will catch it and rethrow.<a name="line.2455"></a>
-<span class="sourceLineNo">2456</span>        //<a name="line.2456"></a>
-<span class="sourceLineNo">2457</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2457"></a>
-<span class="sourceLineNo">2458</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2458"></a>
-<span class="sourceLineNo">2459</span>        final ProcedurePrepareLatch prepareLatch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2459"></a>
-<span class="sourceLineNo">2460</span>        submitProcedure(new DisableTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2460"></a>
-<span class="sourceLineNo">2461</span>            tableName, false, prepareLatch));<a name="line.2461"></a>
-<span class="sourceLineNo">2462</span>        prepareLatch.await();<a name="line.2462"></a>
-<span class="sourceLineNo">2463</span><a name="line.2463"></a>
-<span class="sourceLineNo">2464</span>        getMaster().getMasterCoprocessorHost().postDisableTable(tableName);<a name="line.2464"></a>
-<span class="sourceLineNo">2465</span>      }<a name="line.2465"></a>
-<span class="sourceLineNo">2466</span><a name="line.2466"></a>
-<span class="sourceLineNo">2467</span>      @Override<a name="line.2467"></a>
-<span class="sourceLineNo">2468</span>      protected String getDescription() {<a name="line.2468"></a>
-<span class="sourceLineNo">2469</span>        return "DisableTableProcedure";<a name="line.2469"></a>
-<span class="sourceLineNo">2470</span>      }<a name="line.2470"></a>
-<span class="sourceLineNo">2471</span>    });<a name="line.2471"></a>
-<span class="sourceLineNo">2472</span>  }<a name="line.2472"></a>
-<span class="sourceLineNo">2473</span><a name="line.2473"></a>
-<span class="sourceLineNo">2474</span>  private long modifyTable(final TableName tableName,<a name="line.2474"></a>
-<span class="sourceLineNo">2475</span>      final TableDescriptorGetter newDescriptorGetter, final long nonceGroup, final long nonce,<a name="line.2475"></a>
-<span class="sourceLineNo">2476</span>      final boolean shouldCheckDescriptor) throws IOException {<a name="line.2476"></a>
-<span class="sourceLineNo">2477</span>    return MasterProcedureUtil<a name="line.2477"></a>
-<span class="sourceLineNo">2478</span>        .submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2478"></a>
-<span class="sourceLineNo">2479</span>          @Override<a name="line.2479"></a>
-<span class="sourceLineNo">2480</span>          protected void run() throws IOException {<a name="line.2480"></a>
-<span class="sourceLineNo">2481</span>            TableDescriptor oldDescriptor = getMaster().getTableDescriptors().get(tableName);<a name="line.2481"></a>
-<span class="sourceLineNo">2482</span>            TableDescriptor newDescriptor = getMaster().getMasterCoprocessorHost()<a name="line.2482"></a>
-<span class="sourceLineNo">2483</span>                .preModifyTable(tableName, oldDescriptor, newDescriptorGetter.get());<a name="line.2483"></a>
-<span class="sourceLineNo">2484</span>            TableDescriptorChecker.sanityCheck(conf, newDescriptor);<a name="line.2484"></a>
-<span class="sourceLineNo">2485</span>            LOG.info("{} modify table {} from {} to {}", getClientIdAuditPrefix(), tableName,<a name="line.2485"></a>
-<span class="sourceLineNo">2486</span>                oldDescriptor, newDescriptor);<a name="line.2486"></a>
-<span class="sourceLineNo">2487</span><a name="line.2487"></a>
-<span class="sourceLineNo">2488</span>            // Execute the operation synchronously - wait for the operation completes before<a name="line.2488"></a>
-<span class="sourceLineNo">2489</span>            // continuing.<a name="line.2489"></a>
-<span class="sourceLineNo">2490</span>            //<a name="line.2490"></a>
-<span class="sourceLineNo">2491</span>            // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.2491"></a>
-<span class="sourceLineNo">2492</span>            // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.2492"></a>
-<span class="sourceLineNo">2493</span>            ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.2493"></a>
-<span class="sourceLineNo">2494</span>            submitProcedure(new ModifyTableProcedure(procedureExecutor.getEnvironment(),<a name="line.2494"></a>
-<span class="sourceLineNo">2495</span>                newDescriptor, latch, oldDescriptor, shouldCheckDescriptor));<a name="line.2495"></a>
-<span class="sourceLineNo">2496</span>            latch.await();<a name="line.2496"></a>
-<span class="sourceLineNo">2497</span><a name="line.2497"></a>
-<span class="sourceLineNo">2498</span>            getMaster().getMasterCoprocessorHost().postModifyTable(tableName, oldDescriptor,<a name="line.2498"></a>
-<span class="sourceLineNo">2499</span>              newDescriptor);<a name="line.2499"></a>
-<span class="sourceLineNo">2500</span>          }<a name="line.2500"></a>
-<span class="sourceLineNo">2501</span><a name="line.2501"></a>
-<span class="sourceLineNo">2502</span>          @Override<a name="line.2502"></a>
-<span class="sourceLineNo">2503</span>          protected String getDescription() {<a name="line.2503"></a>
-<span class="sourceLineNo">2504</span>            return "ModifyTableProcedure";<a name="line.2504"></a>
-<span class="sourceLineNo">2505</span>          }<a name="line.2505"></a>
-<span class="sourceLineNo">2506</span>        });<a name="line.2506"></a>
-<span class="sourceLineNo">2507</span><a name="line.2507"></a>
-<span class="sourceLineNo">2508</span>  }<a name="line.2508"></a>
-<span class="sourceLineNo">2509</span><a name="line.2509"></a>
-<span class="sourceLineNo">2510</span>  @Override<a name="line.2510"></a>
-<span class="sourceLineNo">2511</span>  public long modifyTable(final TableName tableName, final TableDescriptor newDescriptor,<a name="line.2511"></a>
-<span class="sourceLineNo">2512</span>      final long nonceGroup, final long nonce) throws IOException {<a name="line.2512"></a>
-<span class="sourceLineNo">2513</span>    checkInitialized();<a name="line.2513"></a>
-<span class="sourceLineNo">2514</span>    return modifyTable(tableName, new TableDescriptorGetter() {<a name="line.2514"></a>
-<span class="sourceLineNo">2515</span>      @Override<a name="line.2515"></a>
-<span class="sourceLineNo">2516</span>      public TableDescriptor get() throws IOException {<a name="line.2516"></a>
-<span class="sourceLineNo">2517</span>        return newDescriptor;<a name="line.2517"></a>
-<span class="sourceLineNo">2518</span>      }<a name="line.2518"></a>
-<span class="sourceLineNo">2519</span>    }, nonceGroup, nonce, false);<a name="line.2519"></a>
-<span class="sourceLineNo">2520</span><a name="line.2520"></a>
-<span class="sourceLineNo">2521</span>  }<a name="line.2521"></a>
-<span class="sourceLineNo">2522</span><a name="line.2522"></a>
-<span class="sourceLineNo">2523</span>  public long restoreSnapshot(final SnapshotDescription snapshotDesc,<a name="line.2523"></a>
-<span class="sourceLineNo">2524</span>      final long nonceGroup, final long nonce, final boolean restoreAcl) throws IOException {<a name="line.2524"></a>
-<span class="sourceLineNo">2525</span>    checkInitialized();<a name="line.2525"></a>
-<span class="sourceLineNo">2526</span>    getSnapshotManager().checkSnapshotSupport();<a name="line.2526"></a>
-<span class="sourceLineNo">2527</span><a name="line.2527"></a>
-<span class="sourceLineNo">2528</span>    // Ensure namespace exists. Will throw exception if non-known NS.<a name="line.2528"></a>
-<span class="sourceLineNo">2529</span>    final TableName dstTable = TableName.valueOf(snapshotDesc.getTable());<a name="line.2529"></a>
-<span class="sourceLineNo">2530</span>    getClusterSchema().getNamespace(dstTable.getNamespaceAsString());<a name="line.2530"></a>
-<span class="sourceLineNo">2531</span><a name="line.2531"></a>
-<span class="sourceLineNo">2532</span>    return MasterProcedureUtil.submitProcedure(<a name="line.2532"></a>
-<span class="sourceLineNo">2533</span>        new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a name="line.2533"></a>
-<span class="sourceLineNo">2534</span>      @Override<a name="line.2534"></a>
-<span class="sourceLineNo">2535</span>      protected void run() throws IOException {<a name="line.2535"></a>
-<span class="sourceLineNo">2536</span>          setProcId(<a name="line.2536"></a>
-<span class="sourceLineNo">2537</span>            getSnapshotManager().restoreOrCloneSnapshot(snapshotDesc, getNonceKey(), restoreAcl));<a name="line.2537"></a>
-<span class="sourceLineNo">2538</span>      }<a name="line.2538"></a>
-<span class="sourceLineNo">2539</span><a name="line.2539"></a>
-<span class="sourceLineNo">2540</span>      @Override<a name="line.2540"></a>
-<span class="sourceLineNo">2541</span>      protected String getDescription() {<a name="line.2541"></a>
-<span class="sourceLineNo">2542</span>        return "RestoreSnapshotProcedure";<a name="line.2542"></a>
-<span class="sourceLineNo">2543</span>      }<a name="line.2543"></a>
-<span class="sourceLineNo">2544</span>    });<a name="line.2544"></a>
-<span class="sourceLineNo">2545</span>  }<a name="line.2545"></a>
-<span class="sourceLineNo">2546</span><a name="line.2546"></a>
-<span class="sourceLineNo">2547</span>  private void checkTableExists(final TableName tableName)<a name="line.2547"></a>
-<span class="sourceLineNo">2548</span>      throws IOException, TableNotFoundException {<a name="line.2548"></a>
-<span class="sourceLineNo">2549</span>    if (!MetaTableAccessor.tableExists(getConnection(), tableName)) {<a name="line.2549"></a>
-<span class="sourceLineNo">2550</span>      throw new TableNotFoundException(tableName);<a name="line.2550"></a>
-<span class="sourceLineNo">2551</span>    }<a name="line.2551"></a>
-<span class="sourceLineNo">2552</span>  }<a name="line.2552"></a>
-<span class="sourceLineNo">2553</span><a name="line.2553"></a>
-<span class="sourceLineNo">2554</span>  @Override<a name="line.2554"></a>
-<span class="sourceLineNo">2555</span>  public void checkTableModifiable(final TableName tableName)<a name="line.2555"></a>
-<span class="sourceLineNo">2556</span>      throws IOException, TableNotFoundException, TableNotDisabledException {<a name="line.2556"></a>
-<span class="sourceLineNo">2557</span>    if (isCatalogTable(tableName)) {<a name="line.2557"></a>
-<span class="sourceLineNo">2558</span>      throw new IOException("Can't modify catalog tables");<a name="line.2558"></a>
-<span class="sourceLineNo">2559</span>    }<a name="line.2559"></a>
-<span class="sourceLineNo">2560</span>    checkTableExists(tableName);<a name="line.2560"></a>
-<span class="sourceLineNo">2561</span>    TableState ts = getTableStateManager().getTableState(tableName);<a name="line.2561"></a>
-<span class="sourceLineNo">2562</span>    if (!ts.isDisabled()) {<a name="line.2562"></a>
-<span class="sourceLineNo">2563</span>      throw new TableNotDisabledException("Not DISABLED; " + ts);<a name="line.2563"></a>
-<span class="sourceLineNo">2564</span>    }<a name="line.2564"></a>
-<span class="sourceLineNo">2565</span>  }<a name="line.2565"></a>
-<span class="sourceLineNo">2566</span><a name="line.2566"></a>
-<span class="sourceLineNo">2567</span>  public ClusterMetrics getClusterMetricsWithoutCoprocessor() throws InterruptedIOException {<a name="line.2567"></a>
-<span class="sourceLineNo">2568</span>    return getClusterMetricsWithoutCoprocessor(EnumSet.allOf(Option.class));<a name="line.2568"></a>
-<span class="sourceLineNo">2569</span>  }<a name="line.2569"></a>
-<span class="sourceLineNo">2570</span><a name="line.2570"></a>
-<span class="sourceLineNo">2571</span>  public ClusterMetrics getClusterMetricsWithoutCoprocessor(EnumSet&lt;Option&gt; options)<a name="line.2571"></a>
-<span class="sourceLineNo">2572</span>      throws InterruptedIOException {<a name="line.2572"></a>
-<span class="sourceLineNo">2573</span>    ClusterMetricsBuilder builder = ClusterMetricsBuilder.newBuilder();<a name="line.2573"></a>
-<span class="sourceLineNo">2574</span>    // given that hbase1 can't submit the request with Option,<a name="line.2574"></a>
-<span class="sourceLineNo">2575</span>    // we return all information to client if the list of Option is empty.<a name="line.2575"></a>
-<span class="sourceLineNo">2576</span>    if (options.isEmpty()) {<a name="line.2576"></a>
-<span class="sourceLineNo">2577</span>      options = EnumSet.allOf(Option.class);<a name="line.2577"></a>
-<span class="sourceLineNo">2578</span>    }<a name="line.2578"></a>
-<span class="sourceLineNo">2579</span><a name="line.2579"></a>
-<span class="sourceLineNo">2580</span>    for (Option opt : options) {<a name="line.2580"></a>
-<span class="sourceLineNo">2581</span>      switch (opt) {<a name="line.2581"></a>
-<span class="sourceLineNo">2582</span>        case HBASE_VERSION: builder.setHBaseVersion(VersionInfo.getVersion()); break;<a name="line.2582"></a>
-<span class="sourceLineNo">2583</span>        case CLUSTER_ID: builder.setClusterId(getClusterId()); break;<a name="line.2583"></a>
-<span class="sourceLineNo">2584</span>        case MASTER: builder.setMasterName(getServerName()); break;<a name="line.2584"></a>
-<span class="sourceLineNo">2585</span>        case BACKUP_MASTERS: builder.setBackerMasterNames(getBackupMasters()); break;<a name="line.2585"></a>
-<span class="sourceLineNo">2586</span>        case LIVE_SERVERS: {<a name="line.2586"></a>
-<span class="sourceLineNo">2587</span>          if (serverManager != null) {<a name="line.2587"></a>
-<span class="sourceLineNo">2588</span>            builder.setLiveServerMetrics(serverManager.getOnlineServers().entrySet().stream()<a name="line.2588"></a>
-<span class="sourceLineNo">2589</span>              .collect(Collectors.toMap(e -&gt; e.getKey(), e -&gt; e.getValue())));<a name="line.2589"></a>
-<span class="sourceLineNo">2590</span>          }<a name="line.2590"></a>
-<span class="sourceLineNo">2591</span>          break;<a name="line.2591"></a>
-<span class="sourceLineNo">2592</span>        }<a name="line.2592"></a>
-<span class="sourceLineNo">2593</span>        case DEAD_SERVERS: {<a name="line.2593"></a>
-<span class="sourceLineNo">2594</span>          if (serverManager != null) {<a name="line.2594"></a>
-<span class="sourceLineNo">2595</span>            builder.setDeadServerNames(new ArrayList&lt;&gt;(<a name="line.2595"></a>
-<span class="sourceLineNo">2596</span>              serverManager.getDeadServers().copyServerNames()));<a name="line.2596"></a>
-<span class="sourceLineNo">2597</span>          }<a name="line.2597"></a>
-<span class="sourceLineNo">2598</span>          break;<a name="line.2598"></a>
-<span class="sourceLineNo">2599</span>        }<a name="line.2599"></a>
-<span class="sourceLineNo">2600</span>        case MASTER_COPROCESSORS: {<a name="line.2600"></a>
-<span class="sourceLineNo">2601</span>          if (cpHost != null) {<a name="line.2601"></a>
-<span class="sourceLineNo">2602</span>            builder.setMasterCoprocessorNames(Arrays.asList(getMasterCoprocessors()));<a name="line.2602"></a>
-<span class="sourceLineNo">2603</span>          }<a name="line.2603"></a>
-<span class="sourceLineNo">2604</span>          break;<a name="line.2604"></a>
-<span class="sourceLineNo">2605</span>        }<a name="line.2605"></a>
-<span class="sourceLineNo">2606</span>        case REGIONS_IN_TRANSITION: {<a name="line.2606"></a>
-<span class="sourceLineNo">2607</span>          if (assignmentManager != null) {<a name="line.2607"></a>
-<span class="sourceLineNo">2608</span>            builder.setRegionsInTransition(assignmentManager.getRegionStates()<a name="line.2608"></a>
-<span class="sourceLineNo">2609</span>                .getRegionsStateInTransition());<a name="line.2609"></a>
-<span class="sourceLineNo">2610</span>          }<a name="line.2610"></a>
-<span class="sourceLineNo">2611</span>          break;<a name="line.2611"></a>
-<span class="sourceLineNo">2612</span>        }<a name="line.2612"></a>
-<span class="sourceLineNo">2613</span>        case BALANCER_ON: {<a name="line.2613"></a>
-<span class="sourceLineNo">2614</span>          if (loadBalancerTracker != null) {<a name="line.2614"></a>
-<span class="sourceLineNo">2615</span>            builder.setBalancerOn(loadBalancerTracker.isBalancerOn());<a name="line.2615"></a>
-<span class="sourceLineNo">2616</span>          }<a name="line.2616"></a>
-<span class="sourceLineNo">2617</span>          break;<a name="line.2617"></a>
-<span class="sourceLineNo">2618</span>        }<a name="line.2618"></a>
-<span class="sourceLineNo">2619</span>        case MASTER_INFO_PORT: {<a name="line.2619"></a>
-<span class="sourceLineNo">2620</span>          if (infoServer != null) {<a name="line.2620"></a>
-<span class="sourceLineNo">2621</span>            builder.setMasterInfoPort(infoServer.getPort());<a name="line.2621"></a>
-<span class="sourceLineNo">2622</span>          }<a name="line.2622"></a>
-<span class="sourceLineNo">2623</span>          break;<a name="line.2623"></a>
-<span class="sourceLineNo">2624</span>        }<a name="line.2624"></a>
-<span class="sourceLineNo">2625</span>        case SERVERS_NAME: {<a name="line.2625"></a>
-<span class="sourceLineNo">2626</span>          if (serverManager != null) {<a name="line.2626"></a>
-<span class="sourceLineNo">2627</span>            builder.setServerNames(serverManager.getOnlineServersList());<a name="line.2627"></a>
-<span class="sourceLineNo">2628</span>          }<a name="line.2628"></a>
-<span class="sourceLineNo">2629</span>          break;<a name="line.2629"></a>
-<span class="sourceLineNo">2630</span>        }<a name="line.2630"></a>
-<span class="sourceLineNo">2631</span>        case TABLE_TO_REGIONS_COUNT: {<a name="line.2631"></a>
-<span class="sourceLineNo">2632</span>          if (isActiveMaster() &amp;&amp; isInitialized() &amp;&amp; assignmentManager != null) {<a name="line.2632"></a>
-<span class="sourceLineNo">2633</span>            try {<a name="line.2633"></a>
-<span class="sourceLineNo">2634</span>              Map&lt;TableName, RegionStatesCount&gt; tableRegionStatesCountMap = new HashMap&lt;&gt;();<a name="line.2634"></a>
-<span class="sourceLineNo">2635</span>              Map&lt;String, TableDescriptor&gt; tableDescriptorMap = getTableDescriptors().getAll();<a name="line.2635"></a>
-<span class="sourceLineNo">2636</span>              for (TableDescriptor tableDescriptor : tableDescriptorMap.values()) {<a name="line.2636"></a>
-<span class="sourceLineNo">2637</span>                TableName tableName = tableDescriptor.getTableName();<a name="line.2637"></a>
-<span class="sourceLineNo">2638</span>                RegionStatesCount regionStatesCount = assignmentManager<a name="line.2638"></a>
-<span class="sourceLineNo">2639</span>                  .getRegionStatesCount(tableName);<a name="line.2639"></a>
-<span class="sourceLineNo">2640</span>                tableRegionStatesCountMap.put(tableName, regionStatesCount);<a name="line.2640"></a>
-<span class="sourceLineNo">2641</span>              }<a name="line.2641"></a>
-<span class="sourceLineNo">2642</span>              builder.setTableRegionStatesCount(tableRegionStatesCountMap);<a name="line.2642"></a>
-<span class="sourceLineNo">2643</span>            } catch (IOException e) {<a name="line.2643"></a>
-<span class="sourceLineNo">2644</span>              LOG.error("Error while populating TABLE_TO_REGIONS_COUNT for Cluster Metrics..", e);<a name="line.2644"></a>
-<span class="sourceLineNo">2645</span>            }<a name="line.2645"></a>
-<span class="sourceLineNo">2646</span>          }<a name="line.2646"></a>
-<span class="sourceLineNo">2647</span>          break;<a name="line.2647"></a>
-<span class="sourceLineNo">2648</span>        }<a name="line.2648"></a>
-<span class="sourceLineNo">2649</span>      }<a name="line.2649"></a>
-<span class="sourceLineNo">2650</span>    }<a name="line.2650"></a>
-<span class="sourceLineNo">2651</span>    return builder.build();<a name="line.2651"></a>
-<span class="sourceLineNo">2652</span>  }<a name="line.2652"></a>
-<span class="sourceLineNo">2653</span><a name="line.2653"></a>
-<span class="sourceLineNo">2654</span>  /**<a name="line.2654"></a>
-<span class="sourceLineNo">2655</span>   * @return cluster status<a name="line.2655"></a>
-<span class="sourceLineNo">2656</span>   */<a name="line.2656"></a>
-<span class="sourceLineNo">2657</span>  public ClusterMetrics getClusterMetrics() throws IOException {<a name="line.2657"></a>
-<span class="sourceLineNo">2658</span>    return getClusterMetrics(EnumSet.allOf(Option.class));<a name="line.2658"></a>
-<span class="sourceLineNo">2659</span>  }<a name="line.2659"></a>
-<span class="sourceLineNo">2660</span><a name="line.2660"></a>
-<span class="sourceLineNo">2661</span>  public ClusterMetrics getClusterMetrics(EnumSet&lt;Option&gt; options) throws IOException {<a name="line.2661"></a>
-<span class="sourceLineNo">2662</span>    if (cpHost != null) {<a name="line.2662"></a>
-<span class="sourceLineNo">2663</span>      cpHost.preGetClusterMetrics();<a name="line.2663"></a>
-<span class="sourceLineNo">2664</span>    }<a name="line.2664"></a>
-<span class="sourceLineNo">2665</span>    ClusterMetrics status = getClusterMetricsWithoutCoprocessor(options);<a name="line.2665"></a>
-<span class="sourceLineNo">2666</span>    if (cpHost != null) {<a name="line.2666"></a>
-<span class="sourceLineNo">2667</span>      cpHost.postGetClusterMetrics(status);<a name="line.2667"></a>
-<span class="sourceLineNo">2668</span>    }<a name="line.2668"></a>
-<span class="sourceLineNo">2669</span>    return status;<a name="line.2669"></a>
-<span class="sourceLineNo">2670</span>  }<a name="line.2670"></a>
-<span class="sourceLineNo">2671</span><a name="line.2671"></a>
-<span class="sourceLineNo">2672</span>  private List&lt;ServerName&gt; getBackupMasters() throws InterruptedIOException {<a name="line.2672"></a>
-<span class="sourceLineNo">2673</span>    // Build Set of backup masters from ZK nodes<a name="line.2673"></a>
-<span class="sourceLineNo">2674</span>    List&lt;String&gt; backupMasterStrings;<a name="line.2674"></a>
-<span class="sourceLineNo">2675</span>    try {<a name="line.2675"></a>
-<span class="sourceLineNo">2676</span>      backupMasterStrings = ZKUtil.listChildrenNoWatch(this.zooKeeper,<a name="line.2676"></a>
-<span class="sourceLineNo">2677</span>        this.zooKeeper.getZNodePaths().backupMasterAddressesZNode);<a name="line.2677"></a>
-<span class="sourceLineNo">2678</span>    } catch (KeeperException e) {<a name="line.2678"></a>
-<span class="sourceLineNo">2679</span>      LOG.warn(this.zooKeeper.prefix("Unable to list backup servers"), e);<a name="line.2679"></a>
-<span class="sourceLineNo">2680</span>      backupMasterStrings = null;<a name="line.2680"></a>
-<span class="sourceLineNo">2681</span>    }<a name="line.2681"></a>
-<span class="sourceLineNo">2682</span><a name="line.2682"></a>
-<span class="sourceLineNo">2683</span>    List&lt;ServerName&gt; backupMasters = Collections.emptyList();<a name="line.2683"></a>
-<span class="sourceLineNo">2684</span>    if (backupMasterStrings != null &amp;&amp; !backupMasterStrings.isEmpty()) {<a name="line.2684"></a>
-<span class="sourceLineNo">2685</span>      backupMasters = new ArrayList&lt;&gt;(backupMasterStrings.size());<a name="line.2685"></a>
-<span class="sourceLineNo">2686</span>      for (String s: backupMasterStrings) {<a name="line.2686"></a>
-<span class="sourceLineNo">2687</span>        try {<a name="line.2687"></a>
-<span class="sourceLineNo">2688</span>          byte [] bytes;<a name="line.2688"></a>
-<span class="sourceLineNo">2689</span>          try {<a name="line.2689"></a>
-<span class="sourceLineNo">2690</span>            bytes = ZKUtil.getData(this.zooKeeper, ZNodePaths.joinZNode(<a name="line.2690"></a>
-<span class="sourceLineNo">2691</span>                this.zooKeeper.getZNodePaths().backupMasterAddressesZNode, s));<a name="line.2691"></a>
-<span class="sourceLineNo">2692</span>          } catch (InterruptedException e) {<a name="line.2692"></a>
-<span class="sourceLineNo">2693</span>            throw new InterruptedIOException();<a name="line.2693"></a>
-<span class="sourceLineNo">2694</span>          }<a name="line.2694"></a>
-<span class="sourceLineNo">2695</span>          if (bytes != null) {<a name="line.2695"></a>
-<span class="sourceLineNo">2696</span>            ServerName sn;<a name="line.2696"></a>
-<span class="sourceLineNo">2697</span>            try {<a name="line.2697"></a>
-<span class="sourceLineNo">2698</span>              sn = ProtobufUtil.parseServerNameFrom(bytes);<a name="line.2698"></a>
-<span class="sourceLineNo">2699</span>            } catch (DeserializationException e) {<a name="line.2699"></a>
-<span class="sourceLineNo">2700</span>              LOG.warn("Failed parse, skipping registering backup server", e);<a name="line.2700"></a>
-<span class="sourceLineNo">2701</span>              continue;<a name="line.2701"></a>
-<span class="sourceLineNo">2702</span>            }<a name="line.2702"></a>
-<span class="sourceLineNo">2703</span>            backupMasters.add(sn);<a name="line.2703"></a>
-<span class="sourceLineNo">2704</span>          }<a name="line.2704"></a>
-<span class="sourceLineNo">2705</span>        } catch (KeeperException e) {<a name="line.2705"></a>
-<span class="sourceLineNo">2706</span>          LOG.warn(this.zooKeeper.prefix("Unable to get information about " +<a name="line.2706"></a>
-<span class="sourceLineNo">2707</span>                   "backup servers"), e);<a name="line.2707"></a>
-<span class="sourceLineNo">2708</span>        }<a name="line.2708"></a>
-<span class="sourceLineNo">2709</span>      }<a name="line.2709"></a>
-<span class="sourceLineNo">2710</span>      Collections.sort(backupMasters, new Comparator&lt;ServerName&gt;() {<a name="line.2710"></a>
-<span class="sourceLineNo">2711</span>        @Override<a name="line.2711"></a>
-<span class="sourceLineNo">2712</span>        public int compare(ServerName s1, ServerName s2) {<a name="line.2712"></a>
-<span class="sourceLineNo">2713</span>          return s1.getServerName().compareTo(s2.getServerName());<a name="line.2713"></a>
-<span class="sourceLineNo">2714</span>        }});<a name="line.2714"></a>
-<span class="sourceLineNo">2715</span>    }<a name="line.2715"></a>
-<span class="sourceLineNo">2716</span>    return backupMasters;<a name="line.2716"></a>
-<span class="sourceLineNo">2717</span>  }<a name="line.2717"></a>
-<span class="sourceLineNo">2718</span><a name="line.2718"></a>
-<span class="sourceLineNo">2719</span>  /**<a name="line.2719"></a>
-<span class="sourceLineNo">2720</span>   * The set of loaded coprocessors is stored in a static set. Since it's<a name="line.2720"></a>
-<span class="sourceLineNo">2721</span>   * statically allocated, it does not require that HMaster's cpHost be<a name="line.2721"></a>
-<span class="sourceLineNo">2722</span>   * initialized prior to accessing it.<a name="line.2722"></a>
-<span class="sourceLineNo">2723</span>   * @return a String representation of the set of names of the loaded coprocessors.<a name="line.2723"></a>
-<span class="sourceLineNo">2724</span>   */<a name="line.2724"></a>
-<span class="sourceLineNo">2725</span>  public static String getLoadedCoprocessors() {<a name="line.2725"></a>
-<span class="sourceLineNo">2726</span>    return CoprocessorHost.getLoadedCoprocessors().toString();<a name="line.2726"></a>
-<span class="sourceLineNo">2727</span>  }<a name="line.2727"></a>
-<span class="sourceLineNo">2728</span><a name="line.2728"></a>
-<span class="sourceLineNo">2729</span>  /**<a name="line.2729"></a>
-<span class="sourceLineNo">2730</span>   * @return timestamp in millis when HMaster was started.<a name="line.2730"></a>
-<span class="sourceLineNo">2731</span>   */<a name="line.2731"></a>
-<span class="sourceLineNo">2732</span>  public long getMasterStartTime() {<a name="line.2732"></a>
-<span class="sourceLineNo">2733</span>    return startcode;<a name="line.2733"></a>
-<span class="sourceLineNo">2734</span>  }<a name="line.2734"></a>
-<span class="sourceLineNo">2735</span><a name="line.2735"></a>
-<span class="sourceLineNo">2736</span>  /**<a name="line.2736"></a>
-<span class="sourceLineNo">2737</span>   * @return timestamp in millis when HMaster became the active master.<a name="line.2737"></a>
-<span class="sourceLineNo">2738</span>   */<a name="line.2738"></a>
-<span class="sourceLineNo">2739</span>  public long getMasterActiveTime() {<a name="line.2739"></a>
-<span class="sourceLineNo">2740</span>    return masterActiveTime;<a name="line.2740"></a>
-<span class="sourceLineNo">2741</span>  }<a name="line.2741"></a>
-<span class="sourceLineNo">2742</span><a name="line.2742"></a>
-<span class="sourceLineNo">2743</span>  /**<a name="line.2743"></a>
-<span class="sourceLineNo">2744</span>   * @return timestamp in millis when HMaster finished becoming the active master<a name="line.2744"></a>
-<span class="sourceLineNo">2745</span>   */<a name="line.2745"></a>
-<span class="sourceLineNo">2746</span>  public long getMasterFinishedInitializationTime() {<a name="line.2746"></a>
-<span class="sourceLineNo">2747</span>    return masterFinishedInitializationTime;<a name="line.2747"></a>
-<span class="sourceLineNo">2748</span>  }<a name="line.2748"></a>
-<span class="sourceLineNo">2749</span><a name="line.2749"></a>
-<span class="sourceLineNo">2750</span>  public int getNumWALFiles() {<a name="line.2750"></a>
-<span class="sourceLineNo">2751</span>    return 0;<a name="line.2751"></a>
-<span class="sourceLineNo">2752</span>  }<a name="line.2752"></a>
-<span class="sourceLineNo">2753</span><a name="line.2753"></a>
-<span class="sourceLineNo">2754</span>  public ProcedureStore getProcedureStore() {<a name="line.2754"></a>
-<span class="sourceLineNo">2755</span>    return procedureStore;<a name="line.2755"></a>
-<span class="sourceLineNo">2756</span>  }<a name="line.2756"></a>
-<span class="sourceLineNo">2757</span><a name="line.2757"></a>
-<span class="sourceLineNo">2758</span>  public int getRegionServerInfoPort(final ServerName sn) {<a name="line.2758"></a>
-<span class="sourceLineNo">2759</span>    int port = this.serverManager.getInfoPort(sn);<a name="line.2759"></a>
-<span class="sourceLineNo">2760</span>    return port == 0 ? conf.getInt(HConstants.REGIONSERVER_INFO_PORT,<a name="line.2760"></a>
-<span class="sourceLineNo">2761</span>      HConstants.DEFAULT_REGIONSERVER_INFOPORT) : port;<a name="line.2761"></a>
-<span class="sourceLineNo">2762</span>  }<a name="line.2762"></a>
-<span class="sourceLineNo">2763</span><a name="line.2763"></a>
-<span class="sourceLineNo">2764</span>  @Override<a name="line.2764"></a>
-<span class="sourceLineNo">2765</span>  public String getRegionServerVersion(ServerName sn) {<a name="line.2765"></a>
-<span class="sourceLineNo">2766</span>    // Will return "0.0.0" if the server is not online to prevent move system region to unknown<a name="line.2766"></a>
-<span class="sourceLineNo">2767</span>    // version RS.<a name="line.2767"></a>
-<span class="sourceLineNo">2768</span>    return this.serverManager.getVersion(sn);<a name="line.2768"></a>
-<span class="sourceLineNo">2769</span>  }<a name="line.2769"></a>
-<span class="sourceLineNo">2770</span><a name="line.2770"></a>
-<span class="sourceLineNo">2771</span>  @Override<a name="line.2771"></a>
-<span class="sourceLineNo">2772</span>  public void checkIfShouldMoveSystemRegionAsync() {<a name="line.2772"></a>
-<span class="sourceLineNo">2773</span>    assignmentManager.checkIfShouldMoveSystemRegionAsync();<a name="line.2773"></a>
-<span class="sourceLineNo">2774</span>  }<a name="line.2774"></a>
-<span class="sourceLineNo">2775</span><a name="line.2775"></a>
-<span class="sourceLineNo">2776</span>  /**<a name="line.2776"></a>
-<span class="sourceLineNo">2777</span>   * @return array of coprocessor SimpleNames.<a name="line.2777"></a>
-<span class="sourceLineNo">2778</span>   */<a name="line.2778"></a>
-<span class="sourceLineNo">2779</span>  public String[] getMasterCoprocessors() {<a name="line.2779"></a>
-<span class="sourceLineNo">2780</span>    Set&lt;String&gt; masterCoprocessors = getMasterCoprocessorHost().getCoprocessors();<a name="line.2780"></a>
-<span class="sourceLineNo">2781</span>    return masterCoprocessors.toArray(new String[masterCoprocessors.size()]);<a name="line.2781"></a>
-<span class="sourceLineNo">2782</span>  }<a name="line.2782"></a>
-<span class="sourceLineNo">2783</span><a name="line.2783"></a>
-<span class="sourceLineNo">2784</span>  @Override<a name="line.2784"></a>
-<span class="sourceLineNo">2785</span>  public void abort(String reason, Throwable cause) {<a name="line.2785"></a>
-<span class="sourceLineNo">2786</span>    if (isAborted() || isStopped()) {<a name="line.2786"></a>
-<span class="sourceLineNo">2787</span>      return;<a name="line.2787"></a>
-<span class="sourceLineNo">2788</span>    }<a name="line.2788"></a>
-<span class="sourceLineNo">2789</span>    setAbortRequested();<a name="line.2789"></a>
-<span class="sourceLineNo">2790</span>    if (cpHost != null) {<a name="line.2790"></a>
-<span class="sourceLineNo">2791</span>      // HBASE-4014: dump a list of loaded coprocessors.<a name="line.2791"></a>
-<span class="sourceLineNo">2792</span>      LOG.error(HBaseMarkers.FATAL, "Master server abort: loaded coprocessors are: " +<a name="line.2792"></a>
-<span class="sourceLineNo">2793</span>          getLoadedCoprocessors());<a name="line.2793"></a>
-<span class="sourceLineNo">2794</span>    }<a name="line.2794"></a>
-<span class="sourceLineNo">2795</span>    String msg = "***** ABORTING master " + this + ": " + reason + " *****";<a name="line.2795"></a>
-<span class="sourceLineNo">2796</span>    if (cause != null) {<a name="line.2796"></a>
-<span class="sourceLineNo">2797</span>      LOG.error(HBaseMarkers.FATAL, msg, cause);<a name="line.2797"></a>
-<span class="sourceLineNo">2798</span>    } else {<a name="line.2798"></a>
-<span class="sourceLineNo">2799</span>      LOG.error(HBaseMarkers.FATAL, msg);<a name="line.2799"></a>
-<span class="sourceLineNo">2800</span>    }<a name="line.2800"></a>
-<span class="sourceLineNo">2801</span><a name="line.2801"></a>
-<span class="sourceLineNo">2802</span>    try {<a name="line.2802"></a>
-<span class="sourceLineNo">2803</span>      stopMaster();<a name="line.2803"></a>
-<span class="sourceLineNo">2804</span>    } catch (IOException e) {<a name="line.2804"></a>
-<span class="sourceLineNo">2805</span>      LOG.error("Exception occurred while stopping master", e);<a name="line.2805"></a>
-<span class="sourceLineNo">2806</span>    }<a name="line.2806"></a>
-<span class="sourceLineNo">2807</span>  }<a name="line.2807"></a>
-<span class="sourceLineNo">2808</span><a name="line.2808"></a>
-<span class="sourceLineNo">2809</span>  @Override<a name="line.2809"></a>
-<span class="sourceLineNo">2810</span>  public ZKWatcher getZooKeeper() {<a name="line.2810"></a>
-<span class="sourceLineNo">2811</span>    return zooKeeper;<a name="line.2811"></a>
-<span class="sourceLineNo">2812</span>  }<a name="line.2812"></a>
-<span class="sourceLineNo">2813</span><a name="line.2813"></a>
-<span class="sourceLineNo">2814</span>  @Override<a name="line.2814"></a>
-<span class="sourceLineNo">2815</span>  public MasterCoprocessorHost getMasterCoprocessorHost() {<a name="line.2815"></a>
-<span class="sourceLineNo">2816</span>    return cpHost;<a name="line.2816"></a>
-<span class="sourceLineNo">2817</span>  }<a name="line.2817"></a>
-<span class="sourceLineNo">2818</span><a name="line.2818"></a>
-<span class="sourceLineNo">2819</span>  @Override<a name="line.2819"></a>
-<span class="sourceLineNo">2820</span>  public MasterQuotaManager getMasterQuotaManager() {<a name="line.2820"></a>
-<span class="sourceLineNo">2821</span>    return quotaManager;<a name="line.2821"></a>
-<span class="sourceLineNo">2822</span>  }<a name="line.2822"></a>
-<span class="sourceLineNo">2823</span><a name="line.2823"></a>
-<span class="sourceLineNo">2824</span>  @Override<a name="line.2824"></a>
-<span class="sourceLineNo">2825</span>  public ProcedureExecutor&lt;MasterProcedureEnv&gt; getMasterProcedureExecutor() {<a name="line.2825"></a>
-<span class="sourceLineNo">2826</span>    return procedureExecutor;<a name="line.2826"></a>
-<span class="sourceLineNo">2827</span>  }<a name="line.2827"></a>
-<span class="sourceLineNo">2828</span><a name="line.2828"></a>
-<span class="sourceLineNo">2829</span>  @Override<a name="line.2829"></a>
-<span class="sourceLineNo">2830</span>  public ServerName getServerName() {<a name="line.2830"></a>
-<span class="sourceLineNo">2831</span>    return this.serverName;<a name="line.2831"></a>
-<span class="sourceLineNo">2832</span>  }<a name="line.2832"></a>
-<span class="sourceLineNo">2833</span><a name="line.2833"></a>
-<span class="sourceLineNo">2834</span>  @Override<a name="line.2834"></a>
-<span class="sourceLineNo">2835</span>  public AssignmentManager getAssignmentManager() {<a name="line.2835"></a>
-<span class="sourceLineNo">2836</span>    return this.assignmentManager;<a name="line.2836"></a>
-<span class="sourceLineNo">2837</span>  }<a name="line.2837"></a>
-<span class="sourceLineNo">2838</span><a name="line.2838"></a>
-<span class="sourceLineNo">2839</span>  @Override<a name="line.2839"></a>
-<span class="sourceLineNo">2840</span>  public CatalogJanitor getCatalogJanitor() {<a name="line.2840"></a>
-<span class="sourceLineNo">2841</span>    return this.catalogJanitorChore;<a name="line.2841"></a>
-<span class="sourceLineNo">2842</span>  }<a name="line.2842"></a>
-<span class="sourceLineNo">2843</span><a name="line.2843"></a>
-<span class="sourceLineNo">2844</span>  public MemoryBoundedLogMessageBuffer getRegionServerFatalLogBuffer() {<a name="line.2844"></a>
-<span class="sourceLineNo">2845</span>    return rsFatals;<a name="line.2845"></a>
-<span class="sourceLineNo">2846</span>  }<a name="line.2846"></a>
-<span class="sourceLineNo">2847</span><a name="line.2847"></a>
-<span class="sourceLineNo">2848</span>  /**<a name="line.2848"></a>
-<span class="sourceLineNo">2849</span>   * Shutdown the cluster.<a name="line.2849"></a>
-<span class="sourceLineNo">2850</span>   * Master runs a coordinated stop of all RegionServers and then itself.<a name="line.2850"></a>
-<span class="sourceLineNo">2851</span>   */<a name="line.2851"></a>
-<span class="sourceLineNo">2852</span>  public void shutdown() throws IOException {<a name="line.2852"></a>
-<span class="sourceLineNo">2853</span>    if (cpHost != null) {<a name="line.2853"></a>
-<span class="sourceLineNo">2854</span>      cpHost.preShutdown();<a name="line.2854"></a>
-<span class="sourceLineNo">2855</span>    }<a name="line.2855"></a>
-<span class="sourceLineNo">2856</span>    // Tell the servermanager cluster shutdown has been called. This makes it so when Master is<a name="line.2856"></a>
-<span class="sourceLineNo">2857</span>    // last running server, it'll stop itself. Next, we broadcast the cluster shutdown by setting<a name="line.2857"></a>
-<span class="sourceLineNo">2858</span>    // the cluster status as down. RegionServers will notice this change in state and will start<a name="line.2858"></a>
-<span class="sourceLineNo">2859</span>    // shutting themselves down. When last has exited, Master can go down.<a name="line.2859"></a>
-<span class="sourceLineNo">2860</span>    if (this.serverManager != null) {<a name="line.2860"></a>
-<span class="sourceLineNo">2861</span>      this.serverManager.shutdownCluster();<a name="line.2861"></a>
-<span class="sourceLineNo">2862</span>    }<a name="line.2862"></a>
-<span class="sourceLineNo">2863</span>    if (this.clusterStatusTracker != null) {<a name="line.2863"></a>
-<span class="sourceLineNo">2864</span>      try {<a name="line.2864"></a>
-<span class="sourceLineNo">2865</span>        this.clusterStatusTracker.setClusterDown();<a name="line.2865"></a>
-<span class="sourceLineNo">2866</span>      } catch (KeeperException e) {<a name="line.2866"></a>
-<span class="sourceLineNo">2867</span>        LOG.error("ZooKeeper exception trying to set cluster as down in ZK", e);<a name="line.2867"></a>
-<span class="sourceLineNo">2868</span>      }<a name="line.2868"></a>
-<span class="sourceLineNo">2869</span>    }<a name="line.2869"></a>
-<span class="sourceLineNo">2870</span>    // Stop the procedure executor. Will stop any ongoing assign, unassign, server crash etc.,<a name="line.2870"></a>
-<span class="sourceLineNo">2871</span>    // processing so we can go down.<a name="line.2871"></a>
-<span class="sourceLineNo">2872</span>    if (this.procedureExecutor != null) {<a name="line.2872"></a>
-<span class="sourceLineNo">2873</span>      this.procedureExecutor.stop();<a name="line.2873"></a>
-<span class="sourceLineNo">2874</span>    }<a name="line.2874"></a>
-<span class="sourceLineNo">2875</span>    // Shutdown our cluster connection. This will kill any hosted RPCs that might be going on;<a name="line.2875"></a>
-<span class="sourceLineNo">2876</span>    // this is what we want especially if the Master is in startup phase doing call outs to<a name="line.2876"></a>
-<span class="sourceLineNo">2877</span>    // hbase:meta, etc. when cluster is down. Without ths connection close, we'd have to wait on<a name="line.2877"></a>
-<span class="sourceLineNo">2878</span>    // the rpc to timeout.<a name="line.2878"></a>
-<span class="sourceLineNo">2879</span>    if (this.asyncClusterConnection != null) {<a name="line.2879"></a>
-<span class="sourceLineNo">2880</span>      this.asyncClusterConnection.close();<a name="line.2880"></a>
-<span class="sourceLineNo">2881</span>    }<a name="line.2881"></a>
-<span class="sourceLineNo">2882</span>  }<a name="line.2882"></a>
-<span class="sourceLineNo">2883</span><a name="line.2883"></a>
-<span class="sourceLineNo">2884</span>  public void stopMaster() throws IOException {<a name="line.2884"></a>
-<span class="sourceLineNo">2885</span>    if (cpHost != null) {<a name="line.2885"></a>
-<span class="sourceLineNo">2886</span>      cpHost.preStopMaster();<a name="line.2886"></a>
-<span class="sourceLineNo">2887</span>    }<a name="line.2887"></a>
-<span class="sourceLineNo">2888</span>    stop("Stopped by " + Thread.currentThread().getName());<a name="line.2888"></a>
-<span class="sourceLineNo">2889</span>  }<a name="line.2889"></a>
-<span class="sourceLineNo">2890</span><a name="line.2890"></a>
-<span class="sourceLineNo">2891</span>  @Override<a name="line.2891"></a>
-<span class="sourceLineNo">2892</span>  public void stop(String msg) {<a name="line.2892"></a>
-<span class="sourceLineNo">2893</span>    if (!isStopped()) {<a name="line.2893"></a>
-<span class="sourceLineNo">2894</span>      super.stop(msg);<a name="line.2894"></a>
-<span class="sourceLineNo">2895</span>      if (this.activeMasterManager != null) {<a name="line.2895"></a>
-<span class="sourceLineNo">2896</span>        this.activeMasterManager.stop();<a name="line.2896"></a>
-<span class="sourceLineNo">2897</span>      }<a name="line.2897"></a>
-<span class="sourceLineNo">2898</span>    }<a name="line.2898"></a>
-<span class="sourceLineNo">2899</span>  }<a name="line.2899"></a>
-<span class="sourceLineNo">2900</span><a name="line.2900"></a>
-<span class="sourceLineNo">2901</span>  @VisibleForTesting<a name="line.2901"></a>
-<span class="sourceLineNo">2902</span>  protected void checkServiceStarted() throws ServerNotRunningYetException {<a name="line.2902"></a>
-<span class="sourceLineNo">2903</span>    if (!serviceStarted) {<a name="line.2903"></a>
-<span class="sourceLineNo">2904</span>      throw new ServerNotRunningYetException("Server is not running yet");<a name="line.2904"></a>
-<span class="sourceLineNo">2905</span>    }<a name="line.2905"></a>
-<span class="sourceLineNo">2906</span>  }<a name="line.2906"></a>
-<span class="sourceLineNo">2907</span><a name="line.2907"></a>
-<span class="sourceLineNo">2908</span>  public static class MasterStoppedException extends DoNotRetryIOException {<a name="line.2908"></a>
-<span class="sourceLineNo">2909</span>    MasterStoppedException() {<a name="line.2909"></a>
-<span class="sourceLineNo">2910</span>      super();<a name="line.2910"></a>
-<span class="sourceLineNo">2911</span>    }<a name="line.2911"></a>
-<span class="sourceLineNo">2912</span>  }<a name="line.2912"></a>
-<span class="sourceLineNo">2913</span><a name="line.2913"></a>
-<span class="sourceLineNo">2914</span>  void checkInitialized() throws PleaseHoldException, ServerNotRunningYetException,<a name="line.2914"></a>
-<span class="sourceLineNo">2915</span>      MasterNotRunningException, MasterStoppedException {<a name="line.2915"></a>
-<span class="sourceLineNo">2916</span>    checkServiceStarted();<a name="line.2916"></a>
-<span class="sourceLineNo">2917</span>    if (!isInitialized()) {<a name="line.2917"></a>
-<span class="sourceLineNo">2918</span>      throw new PleaseHoldException("Master is initializing");<a name="line.2918"></a>
-<span class="sourceLineNo">2919</span>    }<a name="line.2919"></a>
-<span class="sourceLineNo">2920</span>    if (isStopped()) {<a name="line.2920"></a>
-<span class="sourceLineNo">2921</span>      throw new MasterStoppedException();<a name="line.2921"></a>
-<span class="sourceLineNo">2922</span>    }<a name="line.2922"></a>
-<span class="sourceLineNo">2923</span>  }<a name="line.2923"></a>
-<span class="sourceLineNo">2924</span><a name="line.2924"></a>
-<span class="sourceLineNo">2925</span>  /**<a name="line.2925"></a>
-<span class="sourceLineNo">2926</span>   * Report whether this master is currently the active master or not.<a name="line.2926"></a>
-<span class="sourceLineNo">2927</span>   * If not active master, we are parked on ZK waiting to become active.<a name="line.2927"></a>
-<span class="sourceLineNo">2928</span>   *<a name="line.2928"></a>
-<span class="sourceLineNo">2929</span>   * This method is used for testing.<a name="line.2929"></a>
-<span class="sourceLineNo">2930</span>   *<a name="line.2930"></a>
-<span class="sourceLineNo">2931</span>   * @return true if active master, false if not.<a name="line.2931"></a>
-<span class="sourceLineNo">2932</span>   */<a name="line.2932"></a>
-<span class="sourceLineNo">2933</span>  @Override<a name="line.2933"></a>
-<span class="sourceLineNo">2934</span>  public boolean isActiveMaster() {<a name="line.2934"></a>
-<span class="sourceLineNo">2935</span>    return activeMaster;<a name="line.2935"></a>
-<span class="sourceLineNo">2936</span>  }<a name="line.2936"></a>
-<span class="sourceLineNo">2937</span><a name="line.2937"></a>
-<span class="sourceLineNo">2938</span>  /**<a name="line.2938"></a>
-<span class="sourceLineNo">2939</span>   * Report whether this master has completed with its initialization and is<a name="line.2939"></a>
-<span class="sourceLineNo">2940</span>   * ready.  If ready, the master is also the active master.  A standby master<a name="line.2940"></a>
-<span class="sourceLineNo">2941</span>   * is never ready.<a name="line.2941"></a>
-<span class="sourceLineNo">2942</span>   *<a name="line.2942"></a>
-<span class="sourceLineNo">2943</span>   * This method is used for testing.<a name="line.2943"></a>
-<span class="sourceLineNo">2944</span>   *<a name="line.2944"></a>
-<span class="sourceLineNo">2945</span>   * @return true if master is ready to go, false if not.<a name="line.2945"></a>
-<span class="sourceLineNo">2946</span>   */<a name="line.2946"></a>
-<span class="sourceLineNo">2947</span>  @Override<a name="line.2947"></a>
-<span class="sourceLineNo">2948</span>  public boolean isInitialized() {<a name="line.2948"></a>
-<span class="sourceLineNo">2949</span>    return initialized.isReady();<a name="line.2949"></a>
-<span class="sourceLineNo">2950</span>  }<a name="line.2950"></a>
-<span class="sourceLineNo">2951</span><a name="line.2951"></a>
-<span class="sourceLineNo">2952</span>  /**<a name="line.2952"></a>
-<span class="sourceLineNo">2953</span>   * Report whether this master is in maintenance mode.<a name="line.2953"></a>
-<span class="sourceLineNo">2954</span>   *<a name="line.2954"></a>
-<span class="sourceLineNo">2955</span>   * @return true if master is in maintenanceMode<a name="line.2955"></a>
-<span class="sourceLineNo">2956</span>   */<a name="line.2956"></a>
-<span class="sourceLineNo">2957</span>  @Override<a name="line.2957"></a>
-<span class="sourceLineNo">2958</span>  public boolean isInMaintenanceMode() {<a name="line.2958"></a>
-<span class="sourceLineNo">2959</span>    return maintenanceMode;<a name="line.2959"></a>
-<span class="sourceLineNo">2960</span>  }<a name="line.2960"></a>
-<span class="sourceLineNo">2961</span><a name="line.2961"></a>
-<span class="sourceLineNo">2962</span>  @VisibleForTesting<a name="line.2962"></a>
-<span class="sourceLineNo">2963</span>  public void setInitialized(boolean isInitialized) {<a name="line.2963"></a>
-<span class="sourceLineNo">2964</span>    procedureExecutor.getEnvironment().setEventReady(initialized, isInitialized);<a name="line.2964"></a>
-<span class="sourceLineNo">2965</span>  }<a name="line.2965"></a>
-<span class="sourceLineNo">2966</span><a name="line.2966"></a>
-<span class="sourceLineNo">2967</span>  @Override<a name="line.2967"></a>
-<span class="sourceLineNo">2968</span>  public ProcedureEvent&lt;?&gt; getInitializedEvent() {<a name="line.2968"></a>
-<span class="sourceLineNo">2969</span>    return initialized;<a name="line.2969"></a>
-<span class="sourceLineNo">2970</span>  }<a name="line.2970"></a>
-<span class="sourceLineNo">2971</span><a name="line.2971"></a>
-<span class="sourceLineNo">2972</span>  /**<a name="line.2972"></a>
-<span class="sourceLineNo">2973</span>   * Compute the average load across all region servers.<a name="line.2973"></a>
-<span class="sourceLineNo">2974</span>   * Currently, this uses a very naive computation - just uses the number of<a name="line.2974"></a>
-<span class="sourceLineNo">2975</span>   * regions being served, ignoring stats about number of requests.<a name="line.2975"></a>
-<span class="sourceLineNo">2976</span>   * @return the average load<a name="line.2976"></a>
-<span class="sourceLineNo">2977</span>   */<a name="line.2977"></a>
-<span class="sourceLineNo">2978</span>  public double getAverageLoad() {<a name="line.2978"></a>
-<span class="sourceLineNo">2979</span>    if (this.assignmentManager == null) {<a name="line.2979"></a>
-<span class="sourceLineNo">2980</span>      return 0;<a name="line.2980"></a>
-<span class="sourceLineNo">2981</span>    }<a name="line.2981"></a>
-<span class="sourceLineNo">2982</span><a name="line.2982"></a>
-<span class="sourceLineNo">2983</span>    RegionStates regionStates = this.assignmentManager.getRegionStates();<a name="line.2983"></a>
-<span class="sourceLineNo">2984</span>    if (regionStates == null) {<a name="line.2984"></a>
-<span class="sourceLineNo">2985</span>      return 0;<a name="line.2985"></a>
-<span class="sourceLineNo">2986</span>    }<a name="line.2986"></a>
-<span class="sourceLineNo">2987</span>    return regionStates.getAverageLoad();<a name="line.2987"></a>
-<span class="sourceLineNo">2988</span>  }<a name="line.2988"></a>
-<span class="sourceLineNo">2989</span><a name="line.2989"></a>
-<span class="sourceLineNo">2990</span>  /*<a name="line.2990"></a>
-<span class="sourceLineNo">2991</span>   * @return the count of region split plans executed<a name="line.2991"></a>
-<span class="sourceLineNo">2992</span>   */<a name="line.2992"></a>
-<span class="sourceLineNo">2993</span>  public long getSplitPlanCount() {<a name="line.2993"></a>
-<span class="sourceLineNo">2994</span>    return splitPlanCount;<a name="line.2994"></a>
-<span class="sourceLineNo">2995</span>  }<a name="line.2995"></a>
-<span class="sourceLineNo">2996</span><a name="line.2996"></a>
-<span class="sourceLineNo">2997</span>  /*<a name="line.2997"></a>
-<span class="sourceLineNo">2998</span>   * @return the count of region merge plans executed<a name="line.2998"></a>
-<span class="sourceLineNo">2999</span>   */<a name="line.2999"></a>
-<span class="sourceLineNo">3000</span>  public long getMergePlanCount() {<a name="line.3000"></a>
-<span class="sourceLineNo">3001</span>    return mergePlanCount;<a name="line.3001"></a>
-<span class="sourceLineNo">3002</span>  }<a name="line.3002"></a>
-<span class="sourceLineNo">3003</span><a name="line.3003"></a>
-<span class="sourceLineNo">3004</span>  @Override<a name="line.3004"></a>
-<span class="sourceLineNo">3005</span>  public boolean registerService(Service instance) {<a name="line.3005"></a>
-<span class="sourceLineNo">3006</span>    /*<a name="line.3006"></a>
-<span class="sourceLineNo">3007</span>     * No stacking of instances is allowed for a single service name<a name="line.3007"></a>
-<span class="sourceLineNo">3008</span>     */<a name="line.3008"></a>
-<span class="sourceLineNo">3009</span>    Descriptors.ServiceDescriptor serviceDesc = instance.getDescriptorForType();<a name="line.3009"></a>
-<span class="sourceLineNo">3010</span>    String serviceName = CoprocessorRpcUtils.getServiceName(serviceDesc);<a name="line.3010"></a>
-<span class="sourceLineNo">3011</span>    if (coprocessorServiceHandlers.containsKey(serviceName)) {<a name="line.3011"></a>
-<span class="sourceLineNo">3012</span>      LOG.error("Coprocessor service "+serviceName+<a name="line.3012"></a>
-<span class="sourceLineNo">3013</span>          " already registered, rejecting request from "+instance<a name="line.3013"></a>
-<span class="sourceLineNo">3014</span>      );<a name="line.3014"></a>
-<span class="sourceLineNo">3015</span>      return false;<a name="line.3015"></a>
-<span class="sourceLineNo">3016</span>    }<a name="line.3016"></a>
-<span class="sourceLineNo">3017</span><a name="line.3017"></a>
-<span class="sourceLineNo">3018</span>    coprocessorServiceHandlers.put(serviceName, instance);<a name="line.3018"></a>
-<span class="sourceLineNo">3019</span>    if (LOG.isDebugEnabled()) {<a name="line.3019"></a>
-<span class="sourceLineNo">3020</span>      LOG.debug("Registered master coprocessor service: service="+serviceName);<a name="line.3020"></a>
-<span class="sourceLineNo">3021</span>    }<a name="line.3021"></a>
-<span class="sourceLineNo">3022</span>    return true;<a name="line.3022"></a>
-<span class="sourceLineNo">3023</span>  }<a name="line.3023"></a>
-<span class="sourceLineNo">3024</span><a name="line.3024"></a>
-<span class="sourceLineNo">3025</span>  /**<a name="line.3025"></a>
-<span class="sourceLineNo">3026</span>   * Utility for constructing an instance of the passed HMaster class.<a name="line.3026"></a>
-<span class="sourceLineNo">3027</span>   * @param masterClass<a name="line.3027"></a>
-<span class="sourceLineNo">3028</span>   * @return HMaster instance.<a name="line.3028"></a>
-<span class="sourceLineNo">3029</span>   */<a name="line.3029"></a>
-<span class="sourceLineNo">3030</span>  public static HMaster constructMaster(Class&lt;? extends HMaster&gt; masterClass,<a name="line.3030"></a>
-<span class="sourceLineNo">3031</span>      final Configuration conf)  {<a name="line.3031"></a>
-<span class="sourceLineNo">3032</span>    try {<a name="line.3032"></a>
-<span class="sourceLineNo">3033</span>      Constructor&lt;? extends HMaster&gt; c = masterClass.getConstructor(Configuration.class);<a name="line.3033"></a>
-<span class="sourceLineNo">3034</span>      return c.newInstance(conf);<a name="line.3034"></a>
-<span class="sourceLineNo">3035</span>    } catch(Exception e) {<a name="line.3035"></a>
-<span class="sourceLineNo">3036</span>      Throwable error = e;<a name="line.3036"></a>
-<span class="sourceLineNo">3037</span>      if (e instanceof InvocationTargetException &amp;&amp;<a name="line.3037"></a>
-<span class="sourceLineNo">3038</span>          ((InvocationTargetException)e).getTargetException() != null) {<a name="line.3038"></a>
-<span class="sourceLineNo">3039</span>        error = ((InvocationTargetException)e).getTargetException();<a name="line.3039"></a>
-<span class="sourceLineNo">3040</span>      }<a name="line.3040"></a>
-<span class="sourceLineNo">3041</span>      throw new RuntimeException("Failed construction of Master: " + masterClass.toString() + ". "<a name="line.3041"></a>
-<span class="sourceLineNo">3042</span>        , error);<a name="line.3042"></a>
-<span class="sourceLineNo">3043</span>    }<a name="line.3043"></a>
-<span class="sourceLineNo">3044</span>  }<a name="line.3044"></a>
-<span class="sourceLineNo">3045</span><a name="line.3045"></a>
-<span class="sourceLineNo">3046</span>  /**<a name="line.3046"></a>
-<span class="sourceLineNo">3047</span>   * @see org.apache.hadoop.hbase.master.HMasterCommandLine<a name="line.3047"></a>
-<span class="sourceLineNo">3048</span>   */<a name="line.3048"></a>
-<span class="sourceLineNo">3049</span>  public static void main(String [] args) {<a name="line.3049"></a>
-<span class="sourceLineNo">3050</span>    LOG.info("STARTING service " + HMaster.class.getSimpleName());<a name="line.3050"></a>
-<span class="sourceLineNo">3051</span>    VersionInfo.logVersion();<a name="line.3051"></a>
-<span class="sourceLineNo">3052</span>    new HMasterCommandLine(HMaster.class).doMain(args);<a name="line.3052"></a>
-<span class="sourceLineNo">3053</span>  }<a name="line.3053"></a>
-<span class="sourceLineNo">3054</span><a name="line.3054"></a>
-<span class="sourceLineNo">3055</span>  public HFileCleaner getHFileCleaner() {<a name="line.3055"></a>
-<span class="sourceLineNo">3056</span>    return this.hfileCleaner;<a name="line.3056"></a>
-<span class="sourceLineNo">3057</span>  }<a name="line.3057"></a>
-<span class="sourceLineNo">3058</span><a name="line.3058"></a>
-<span class="sourceLineNo">3059</span>  public LogCleaner getLogCleaner() {<a name="line.3059"></a>
-<span class="sourceLineNo">3060</span>    return this.logCleaner;<a name="line.3060"></a>
-<span class="sourceLineNo">3061</span>  }<a name="line.3061"></a>
-<span class="sourceLineNo">3062</span><a name="line.3062"></a>
-<span class="sourceLineNo">3063</span>  /**<a name="line.3063"></a>
-<span class="sourceLineNo">3064</span>   * @return the underlying snapshot manager<a name="line.3064"></a>
-<span class="sourceLineNo">3065</span>   */<a name="line.3065"></a>
-<span class="sourceLineNo">3066</span>  @Override<a name="line.3066"></a>
-<span class="sourceLineNo">3067</span>  public SnapshotManager getSnapshotManager() {<a name="line.3067"></a>
-<span class="sourceLineNo">3068</span>    return this.snapshotManager;<a name="line.3068"></a>
-<span class="sourceLineNo">3069</span>  }<a name="line.3069"></a>
-<span class="sourceLineNo">3070</span><a name="line.3070"></a>
-<span class="sourceLineNo">3071</span>  /**<a name="line.3071"></a>
-<span class="sourceLineNo">3072</span>   * @return the underlying MasterProcedureManagerHost<a name="line.3072"></a>
-<span class="sourceLineNo">3073</span>   */<a name="line.3073"></a>
-<span class="sourceLineNo">3074</span>  @Override<a name="line.3074"></a>
-<span class="sourceLineNo">3075</span>  public MasterProcedureManagerHost getMasterProcedureManagerHost() {<a name="line.3075"></a>
-<span class="sourceLineNo">3076</span>    return mpmHost;<a name="line.3076"></a>
-<span class="sourceLineNo">3077</span>  }<a name="line.3077"></a>
-<span class="sourceLineNo">3078</span><a name="line.3078"></a>
-<span class="sourceLineNo">3079</span>  @Override<a name="line.3079"></a>
-<span class="sourceLineNo">3080</span>  public ClusterSchema getClusterSchema() {<a name="line.3080"></a>
-<span class="sourceLineNo">3081</span>    return this.clusterSchemaService;<a name="line.3081"></a>
-<span class="sourceLineNo">3082</span>  }<a name="line.3082"></a>
-<span class="sourceLineNo">3083</span><a name="line.3083"></a>
-<span class="sourceLineNo">3084</span>  /**<a name="line.3084"></a>
-<span class="sourceLineNo">3085</span>   * Create a new Namespace.<a name="line.3085"></a>
-<span class="sourceLineNo">3086</span>   * @param namespaceDescriptor descriptor for new Namespace<a name="line.3086"></a>
-<span class="sourceLineNo">3087</span>   * @param nonceGroup Identifier for the source of the request, a client or process.<a name="line.3087"></a>
-<span class="sourceLineNo">3088</span>   * @param nonce A unique identifier for this operation from the client or process identified by<a name="line.3088"></a>
-<span class="sourceLineNo">3089</span>   * &lt;code&gt;nonceGroup&lt;/code&gt; (the source must ensure each operation gets a unique id).<a name="line.3089"></a>
-<span class="sourceLineNo">3090</span>   * @return procedure id<a name="line.3090"></a>
-<span class="sourceLineNo">3091</span>   */<a name="line.3091"></a>
-<span class="sourceLineNo">3092</span>  long createNamespace(final NamespaceDescriptor namespaceDescriptor, final long nonceGroup,<a name="line.3092"></a>
-<span class="sourceLineNo">3093</span>      final long nonce) throws IOException {<a name="line.3093"></a>
-<span class="sourceLineNo">3094</span>    checkInitialized();<a name="line.3094"></a>
-<span class="sourceLineNo">3095</span><a name="line.3095"></a>
-<span class="sourceLineNo">3096</span>    TableName.isLegalNamespaceName(Bytes.toBytes(namespaceDescriptor.getName()));<a name="line.3096"></a>
-<span class="sourceLineNo">3097</span><a name="line.3097"></a>
-<span class="sourceLineNo">3098</span>    return MasterProcedureUtil.submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this,<a name="line.3098"></a>
-<span class="sourceLineNo">3099</span>          nonceGroup, nonce) {<a name="line.3099"></a>
-<span class="sourceLineNo">3100</span>      @Override<a name="line.3100"></a>
-<span class="sourceLineNo">3101</span>      protected void run() throws IOException {<a name="line.3101"></a>
-<span class="sourceLineNo">3102</span>        getMaster().getMasterCoprocessorHost().preCreateNamespace(namespaceDescriptor);<a name="line.3102"></a>
-<span class="sourceLineNo">3103</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.3103"></a>
-<span class="sourceLineNo">3104</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.3104"></a>
-<span class="sourceLineNo">3105</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.3105"></a>
-<span class="sourceLineNo">3106</span>        LOG.info(getClientIdAuditPrefix() + " creating " + namespaceDescriptor);<a name="line.3106"></a>
-<span class="sourceLineNo">3107</span>        // Execute the operation synchronously - wait for the operation to complete before<a name="line.3107"></a>
-<span class="sourceLineNo">3108</span>        // continuing.<a name="line.3108"></a>
-<span class="sourceLineNo">3109</span>        setProcId(getClusterSchema().createNamespace(namespaceDescriptor, getNonceKey(), latch));<a name="line.3109"></a>
-<span class="sourceLineNo">3110</span>        latch.await();<a name="line.3110"></a>
-<span class="sourceLineNo">3111</span>        getMaster().getMasterCoprocessorHost().postCreateNamespace(namespaceDescriptor);<a name="line.3111"></a>
-<span class="sourceLineNo">3112</span>      }<a name="line.3112"></a>
-<span class="sourceLineNo">3113</span><a name="line.3113"></a>
-<span class="sourceLineNo">3114</span>      @Override<a name="line.3114"></a>
-<span class="sourceLineNo">3115</span>      protected String getDescription() {<a name="line.3115"></a>
-<span class="sourceLineNo">3116</span>        return "CreateNamespaceProcedure";<a name="line.3116"></a>
-<span class="sourceLineNo">3117</span>      }<a name="line.3117"></a>
-<span class="sourceLineNo">3118</span>    });<a name="line.3118"></a>
-<span class="sourceLineNo">3119</span>  }<a name="line.3119"></a>
-<span class="sourceLineNo">3120</span><a name="line.3120"></a>
-<span class="sourceLineNo">3121</span>  /**<a name="line.3121"></a>
-<span class="sourceLineNo">3122</span>   * Modify an existing Namespace.<a name="line.3122"></a>
-<span class="sourceLineNo">3123</span>   * @param nonceGroup Identifier for the source of the request, a client or process.<a name="line.3123"></a>
-<span class="sourceLineNo">3124</span>   * @param nonce A unique identifier for this operation from the client or process identified by<a name="line.3124"></a>
-<span class="sourceLineNo">3125</span>   * &lt;code&gt;nonceGroup&lt;/code&gt; (the source must ensure each operation gets a unique id).<a name="line.3125"></a>
-<span class="sourceLineNo">3126</span>   * @return procedure id<a name="line.3126"></a>
-<span class="sourceLineNo">3127</span>   */<a name="line.3127"></a>
-<span class="sourceLineNo">3128</span>  long modifyNamespace(final NamespaceDescriptor newNsDescriptor, final long nonceGroup,<a name="line.3128"></a>
-<span class="sourceLineNo">3129</span>      final long nonce) throws IOException {<a name="line.3129"></a>
-<span class="sourceLineNo">3130</span>    checkInitialized();<a name="line.3130"></a>
-<span class="sourceLineNo">3131</span><a name="line.3131"></a>
-<span class="sourceLineNo">3132</span>    TableName.isLegalNamespaceName(Bytes.toBytes(newNsDescriptor.getName()));<a name="line.3132"></a>
-<span class="sourceLineNo">3133</span><a name="line.3133"></a>
-<span class="sourceLineNo">3134</span>    return MasterProcedureUtil.submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this,<a name="line.3134"></a>
-<span class="sourceLineNo">3135</span>          nonceGroup, nonce) {<a name="line.3135"></a>
-<span class="sourceLineNo">3136</span>      @Override<a name="line.3136"></a>
-<span class="sourceLineNo">3137</span>      protected void run() throws IOException {<a name="line.3137"></a>
-<span class="sourceLineNo">3138</span>        NamespaceDescriptor oldNsDescriptor = getNamespace(newNsDescriptor.getName());<a name="line.3138"></a>
-<span class="sourceLineNo">3139</span>        getMaster().getMasterCoprocessorHost().preModifyNamespace(oldNsDescriptor, newNsDescriptor);<a name="line.3139"></a>
-<span class="sourceLineNo">3140</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.3140"></a>
-<span class="sourceLineNo">3141</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.3141"></a>
-<span class="sourceLineNo">3142</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.3142"></a>
-<span class="sourceLineNo">3143</span>        LOG.info(getClientIdAuditPrefix() + " modify " + newNsDescriptor);<a name="line.3143"></a>
-<span class="sourceLineNo">3144</span>        // Execute the operation synchronously - wait for the operation to complete before<a name="line.3144"></a>
-<span class="sourceLineNo">3145</span>        // continuing.<a name="line.3145"></a>
-<span class="sourceLineNo">3146</span>        setProcId(getClusterSchema().modifyNamespace(newNsDescriptor, getNonceKey(), latch));<a name="line.3146"></a>
-<span class="sourceLineNo">3147</span>        latch.await();<a name="line.3147"></a>
-<span class="sourceLineNo">3148</span>        getMaster().getMasterCoprocessorHost().postModifyNamespace(oldNsDescriptor,<a name="line.3148"></a>
-<span class="sourceLineNo">3149</span>          newNsDescriptor);<a name="line.3149"></a>
-<span class="sourceLineNo">3150</span>      }<a name="line.3150"></a>
-<span class="sourceLineNo">3151</span><a name="line.3151"></a>
-<span class="sourceLineNo">3152</span>      @Override<a name="line.3152"></a>
-<span class="sourceLineNo">3153</span>      protected String getDescription() {<a name="line.3153"></a>
-<span class="sourceLineNo">3154</span>        return "ModifyNamespaceProcedure";<a name="line.3154"></a>
-<span class="sourceLineNo">3155</span>      }<a name="line.3155"></a>
-<span class="sourceLineNo">3156</span>    });<a name="line.3156"></a>
-<span class="sourceLineNo">3157</span>  }<a name="line.3157"></a>
-<span class="sourceLineNo">3158</span><a name="line.3158"></a>
-<span class="sourceLineNo">3159</span>  /**<a name="line.3159"></a>
-<span class="sourceLineNo">3160</span>   * Delete an existing Namespace. Only empty Namespaces (no tables) can be removed.<a name="line.3160"></a>
-<span class="sourceLineNo">3161</span>   * @param nonceGroup Identifier for the source of the request, a client or process.<a name="line.3161"></a>
-<span class="sourceLineNo">3162</span>   * @param nonce A unique identifier for this operation from the client or process identified by<a name="line.3162"></a>
-<span class="sourceLineNo">3163</span>   * &lt;code&gt;nonceGroup&lt;/code&gt; (the source must ensure each operation gets a unique id).<a name="line.3163"></a>
-<span class="sourceLineNo">3164</span>   * @return procedure id<a name="line.3164"></a>
-<span class="sourceLineNo">3165</span>   */<a name="line.3165"></a>
-<span class="sourceLineNo">3166</span>  long deleteNamespace(final String name, final long nonceGroup, final long nonce)<a name="line.3166"></a>
-<span class="sourceLineNo">3167</span>      throws IOException {<a name="line.3167"></a>
-<span class="sourceLineNo">3168</span>    checkInitialized();<a name="line.3168"></a>
-<span class="sourceLineNo">3169</span><a name="line.3169"></a>
-<span class="sourceLineNo">3170</span>    return MasterProcedureUtil.submitProcedure(new MasterProcedureUtil.NonceProcedureRunnable(this,<a name="line.3170"></a>
-<span class="sourceLineNo">3171</span>          nonceGroup, nonce) {<a name="line.3171"></a>
-<span class="sourceLineNo">3172</span>      @Override<a name="line.3172"></a>
-<span class="sourceLineNo">3173</span>      protected void run() throws IOException {<a name="line.3173"></a>
-<span class="sourceLineNo">3174</span>        getMaster().getMasterCoprocessorHost().preDeleteNamespace(name);<a name="line.3174"></a>
-<span class="sourceLineNo">3175</span>        LOG.info(getClientIdAuditPrefix() + " delete " + name);<a name="line.3175"></a>
-<span class="sourceLineNo">3176</span>        // Execute the operation synchronously - wait for the operation to complete before<a name="line.3176"></a>
-<span class="sourceLineNo">3177</span>        // continuing.<a name="line.3177"></a>
-<span class="sourceLineNo">3178</span>        //<a name="line.3178"></a>
-<span class="sourceLineNo">3179</span>        // We need to wait for the procedure to potentially fail due to "prepare" sanity<a name="line.3179"></a>
-<span class="sourceLineNo">3180</span>        // checks. This will block only the beginning of the procedure. See HBASE-19953.<a name="line.3180"></a>
-<span class="sourceLineNo">3181</span>        ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch();<a name="line.3181"></a>
-<span class="sourceLineNo">3182</span>        setProcId(submitProcedure(<a name="line.3182"></a>
-<span class="sourceLineNo">3183</span>              new DeleteNamespaceProcedure(procedureExecutor.getEnvironment(), name, latch)));<a name="line.3183"></a>
-<span class="sourceLineNo">3184</span>        latch.await();<a name="line.3184"></a>
-<span class="sourceLineNo">3185</span>        // Will not be invoked in the face of Exception thrown by the Procedure's execution<a name="line.3185"></a>
-<span class="sourceLineNo">3186</span>        getMaster().getMasterCoprocessorHost().postDeleteNamespace(name);<a name="line.3186"></a>
-<span class="sourceLineNo">3187</span>      }<a name="line.3187"></a>
-<span class="sourceLineNo">3188</span><a name="line.3188"></a>
-<span class="sourceLineNo">3189</span>      @Override<a name="line.3189"></a>
-<span class="sourceLineNo">3190</span>      protected String getDescription() {<a name="line.3190"></a>
-<span class="sourceLineNo">3191</span>        return "DeleteNamespaceProcedure";<a name="line.3191"></a>
-<span class="sourceLineNo">3192</span>      }<a name="line.3192"></a>
-<span class="sourceLineNo">3193</span>    });<a name="line.3193"></a>
-<span class="sourceLineNo">3194</span>  }<a name="line.3194"></a>
-<span class="sourceLineNo">3195</span><a name="line.3195"></a>
-<span class="sourceLineNo">3196</span>  /**<a name="line.3196"></a>
-<span class="sourceLineNo">3197</span>   * Get a Namespace<a name="line.3197"></a>
-<span class="sourceLineNo">3198</span>   * @param name Name of the Namespace<a name="line.3198"></a>
-<span class="sourceLineNo">3199</span>   * @return Namespace descriptor for &lt;code&gt;name&lt;/code&gt;<a name="line.3199"></a>
-<span class="sourceLineNo">3200</span>   */<a name="line.3200"></a>
-<span class="sourceLineNo">3201</span>  NamespaceDescriptor getNamespace(String name) throws IOException {<a name="line.3201"></a>
-<span class="sourceLineNo">3202</span>    checkInitialized();<a name="line.3202"></a>
-<span class="sourceLineNo">3203</span>    if (this.cpHost != null) this.cpHost.preGetNamespaceDescriptor(name);<a name="line.3203"></a>
-<span class="sourceLineNo">3204</span>    NamespaceDescriptor nsd = this.clusterSchemaService.getNamespace(name);<a name="line.3204"></a>
-<span class="sourceLineNo">3205</span>    if (this.cpHost != null) this.cpHost.postGetNamespaceDescriptor(nsd);<a name="line.3205"></a>
-<span class="sourceLineNo">3206</span>    return nsd;<a name="line.3206"></a>
-<span class="sourceLineNo">3207</span>  }<a name="line.3207"></a>
-<span class="sourceLineNo">3208</span><a name="line.3208"></a>
-<span class="sourceLineNo">3209</span>  /**<a name="line.3209"></a>
-<span class="sourceLineNo">3210</span>   * Get all Namespaces<a name="line.3210"></a>
-<span class="sourceLineNo">3211</span>   * @return All Namespace descriptors<a name="line.3211"></a>
-<span class="sourceLineNo">3212</span>   */<a name="line.3212"></a>
-<span class="sourceLineNo">3213</span>  List&lt;NamespaceDescriptor&gt; getNamespaces() throws IOException {<a name="line.3213"></a>
-<span class="sourceLineNo">3214</span>    checkInitialized();<a name="line.3214"></a>
-<span class="sourceLineNo">3215</span>    final List&lt;NamespaceDescriptor&gt; nsds = new ArrayList&lt;&gt;();<a name="line.3215"></a>
-<span class="sourceLineNo">3216</span>    if (cpHost != null) {<a name="line.3216"></a>
-<span class="sourceLineNo">3217</span>      cpHost.preListNamespaceDescriptors(nsds);<a name="line.3217"></a>
-<span class="sourceLineNo">3218</span>    }<a name="line.3218"></a>
-<span class="sourceLineNo">3219</span>    nsds.addAll(this.clusterSchemaService.getNamespaces());<a name="line.3219"></a>
-<span class="sourceLineNo">3220</span>    if (this.cpHost != null) {<a name="line.3220"></a>
-<span class="sourceLineNo">3221</span>      this.cpHost.postListNamespaceDescriptors(nsds);<a name="line.3221"></a>
-<span class="sourceLineNo">3222</span>    }<a name="line.3222"></a>
-<span class="sourceLineNo">3223</span>    return nsds;<a name="line.3223"></a>
-<span class="sourceLineNo">3224</span>  }<a name="line.3224"></a>
-<span class="sourceLineNo">3225</span><a name="line.3225"></a>
-<span class="sourceLineNo">3226</span>  /**<a name="line.3226"></a>
-<span class="sourceLineNo">3227</span>   * List namespace names<a name="line.3227"></a>
-<span class="sourceLineNo">3228</span>   * @return All namespace names<a name="line.3228"></a>
-<span class="sourceLineNo">3229</span>   */<a name="line.3229"></a>
-<span class="sourceLineNo">3230</span>  public List&lt;String&gt; listNamespaces() throws IOException {<a name="line.3230"></a>
-<span class="sourceLineNo">3231</span>    checkInitialized();<a name="line.3231"></a>
-<span class="sourceLineNo">3232</span>    List&lt;String&gt; namespaces = new ArrayList&lt;&gt;();<a name="line.3232"></a>
-<span class="sourceLineNo">3233</span>    if (cpHost != null) {<a name="line.3233"></a>
-<span class="sourceLineNo">3234</span>      cpHost.preListNamespaces(namespaces);<a name="line.3234"></a>
-<span class="sourceLineNo">3235</span>    }<a name="line.3235"></a>
-<span class="sourceLineNo">3236</span>    for (NamespaceDescriptor namespace : clusterSchemaService.getNamespaces()) {<a name="line.3236"></a>
-<span class="sourceLineNo">3237</span>      namespaces.add(namespace.getName());<a name="line.3237"></a>
-<span class="sourceLineNo">3238</span>    }<a name="line.3238"></a>
-<span class="sourceLineNo">3239</span>    if (cpHost != null) {<a name="line.3239"></a>
-<span class="sourceLineNo">3240</span>      cpHost.postListNamespaces(namespaces);<a name="line.3240"></a>
-<span class="sourceLineNo">3241</span>    }<a name="line.3241"></a>
-<span class="sourceLineNo">3242</span>    return namespaces;<a name="line.3242"></a>
-<span class="sourceLineNo">3243</span>  }<a name="line.3243"></a>
-<span class="sourceLineNo">3244</span><a name="line.3244"></a>
-<span class="sourceLineNo">3245</span>  @Override<a name="line.3245"></a>
-<span class="sourceLineNo">3246</span>  public List&lt;TableName&gt; listTableNamesByNamespace(String name) throws IOException {<a name="line.3246"></a>
-<span class="sourceLineNo">3247</span>    checkInitialized();<a name="line.3247"></a>
-<span class="sourceLineNo">3248</span>    return listTableNames(name, null, true);<a name="line.3248"></a>
-<span class="sourceLineNo">3249</span>  }<a name="line.3249"></a>
-<span class="sourceLineNo">3250</span><a name="line.3250"></a>
-<span class="sourceLineNo">3251</span>  @Override<a name="line.3251"></a>
-<span class="sourceLineNo">3252</span>  public List&lt;TableDescriptor&gt; listTableDescriptorsByNamespace(String name) throws IOException {<a name="line.3252"></a>
-<span class="sourceLineNo">3253</span>    checkInitialized();<a name="line.3253"></a>
-<span class="sourceLineNo">3254</span>    return listTableDescriptors(name, null, null, true);<a name="line.3254"></a>
-<span class="sourceLineNo">3255</span>  }<a name="line.3255"></a>
-<span class="sourceLineNo">3256</span><a name="line.3256"></a>
-<span class="sourceLineNo">3257</span>  @Override<a name="line.3257"></a>
-<span class="sourceLineNo">3258</span>  public boolean abortProcedure(final long procId, final boolean mayInterruptIfRunning)<a name="line.3258"></a>
-<span class="sourceLineNo">3259</span>      throws IOException {<a name="line.3259"></a>
-<span class="sourceLineNo">3260</span>    if (cpHost != null) {<a name="line.3260"></a>
-<span class="sourceLineNo">3261</span>      cpHost.preAbortProcedure(this.procedureExecutor, procId);<a name="line.3261"></a>
-<span class="sourceLineNo">3262</span>    }<a name="line.3262"></a>
-<span class="sourceLineNo">3263</span><a name="line.3263"></a>
-<span class="sourceLineNo">3264</span>    final boolean result = this.procedureExecutor.abort(procId, mayInterruptIfRunning);<a name="line.3264"></a>
-<span class="sourceLineNo">3265</span><a name="line.3265"></a>
-<span class="sourceLineNo">3266</span>    if (cpHost != null) {<a name="line.3266"></a>
-<span class="sourceLineNo">3267</span>      cpHost.postAbortProcedure();<a name="line.3267"></a>
-<span class="sourceLineNo">3268</span>    }<a name="line.3268"></a>
-<span class="sourceLineNo">3269</span><a name="line.3269"></a>
-<span class="sourceLineNo">3270</span>    return result;<a name="line.3270"></a>
-<span class="sourceLineNo">3271</span>  }<a name="line.3271"></a>
-<span class="sourceLineNo">3272</span><a name="line.3272"></a>
-<span class="sourceLineNo">3273</span>  @Override<a name="line.3273"></a>
-<span class="sourceLineNo">3274</span>  public List&lt;Procedure&lt;?&gt;&gt; getProcedures() throws IOException {<a name="line.3274"></a>
-<span class="sourceLineNo">3275</span>    if (cpHost != null) {<a name="line.3275"></a>
-<span class="sourceLineNo">3276</span>      cpHost.preGetProcedures();<a name="line.3276"></a>
-<span class="sourceLineNo">3277</span>    }<a name="line.3277"></a>
-<span class="sourceLineNo">3278</span><a name="line.3278"></a>
-<span class="sourceLineNo">3279</span>    @SuppressWarnings({ "unchecked", "rawtypes" })<a name="line.3279"></a>
-<span class="sourceLineNo">3280</span>    List&lt;Procedure&lt;?&gt;&gt; procList = (List) this.procedureExecutor.getProcedures();<a name="line.3280"></a>
-<span class="sourceLineNo">3281</span><a name="line.3281"></a>
-<span class="sourceLineNo">3282</span>    if (cpHost != null) {<a name="line.3282"></a>
-<span class="sourceLineNo">3283</span>      cpHost.postGetProcedures(procList);<a name="line.3283"></a>
-<span class="sourceLineNo">3284</span>    }<a name="line.3284"></a>
-<span class="sourceLineNo">3285</span><a name="line.3285"></a>
-<span class="sourceLineNo">3286</span>    return procList;<a name="line.3286"></a>
-<span class="sourceLineNo">3287</span>  }<a name="line.3287"></a>
-<span class="sourceLineNo">3288</span><a name="line.3288"></a>
-<span class="sourceLineNo">3289</span>  @Override<a name="line.3289"></a>
-<span class="sourceLineNo">3290</span>  public List&lt;LockedResource&gt; getLocks() throws IOException {<a name="line.3290"></a>
-<span class="sourceLineNo">3291</span>    if (cpHost != null) {<a name="line.3291"></a>
-<span class="sourceLineNo">3292</span>      cpHost.preGetLocks();<a name="line.3292"></a>
-<span class="sourceLineNo">3293</span>    }<a name="line.3293"></a>
-<span class="sourceLineNo">3294</span><a name="line.3294"></a>
-<span class="sourceLineNo">3295</span>    MasterProcedureScheduler procedureScheduler =<a name="line.3295"></a>
-<span class="sourceLineNo">3296</span>      procedureExecutor.getEnvironment().getProcedureScheduler();<a name="line.3296"></a>
-<span class="sourceLineNo">3297</span><a name="line.3297"></a>
-<span class="sourceLineNo">3298</span>    final List&lt;LockedResource&gt; lockedResources = procedureScheduler.getLocks();<a name="line.3298"></a>
-<span class="sourceLineNo">3299</span><a name="line.3299"></a>
-<span class="sourceLineNo">3300</span>    if (cpHost != null) {<a name="line.3300"></a>
-<span class="sourceLineNo">3301</span>      cpHost.postGetLocks(lockedResources);<a name="line.3301"></a>
-<span class="sourceLineNo">3302</span>    }<a name="line.3302"></a>
-<span class="sourceLineNo">3303</span><a name="line.3303"></a>
-<span class="sourceLineNo">3304</span>    return lockedResources;<a name="line.3304"></a>
-<span class="sourceLineNo">3305</span>  }<a name="line.3305"></a>
-<span class="sourceLineNo">3306</span><a name="line.3306"></a>
-<span class="sourceLineNo">3307</span>  /**<a name="line.3307"></a>
-<span class="sourceLineNo">3308</span>   * Returns the list of table descriptors that match the specified request<a name="line.3308"></a>
-<span class="sourceLineNo">3309</span>   * @param namespace the namespace to query, or null if querying for all<a name="line.3309"></a>
-<span class="sourceLineNo">3310</span>   * @param regex The regular expression to match against, or null if querying for all<a name="line.3310"></a>
-<span class="sourceLineNo">3311</span>   * @param tableNameList the list of table names, or null if querying for all<a name="line.3311"></a>
-<span class="sourceLineNo">3312</span>   * @param includeSysTables False to match only against userspace tables<a name="line.3312"></a>
-<span class="sourceLineNo">3313</span>   * @return the list of table descriptors<a name="line.3313"></a>
-<span class="sourceLineNo">3314</span>   */<a name="line.3314"></a>
-<span class="sourceLineNo">3315</span>  public List&lt;TableDescriptor&gt; listTableDescriptors(final String namespace, final String regex,<a name="line.3315"></a>
-<span class="sourceLineNo">3316</span>      final List&lt;TableName&gt; tableNameList, final boolean includeSysTables)<a name="line.3316"></a>
-<span class="sourceLineNo">3317</span>  throws IOException {<a name="line.3317"></a>
-<span class="sourceLineNo">3318</span>    List&lt;TableDescriptor&gt; htds = new ArrayList&lt;&gt;();<a name="line.3318"></a>
-<span class="sourceLineNo">3319</span>    if (cpHost != null) {<a name="line.3319"></a>
-<span class="sourceLineNo">3320</span>      cpHost.preGetTableDescriptors(tableNameList, htds, regex);<a name="line.3320"></a>
-<span class="sourceLineNo">3321</span>    }<a name="line.3321"></a>
-<span class="sourceLineNo">3322</span>    htds = getTableDescriptors(htds, namespace, regex, tableNameList, includeSysTables);<a name="line.3322"></a>
-<span class="sourceLineNo">3323</span>    if (cpHost != null) {<a name="line.3323"></a>
-<span class="sourceLineNo">3324</span>      cpHost.postGetTableDescriptors(tableNameList, htds, regex);<a name="line.3324"></a>
-<span class="sourceLineNo">3325</span>    }<a name="line.3325"></a>
-<span class="sourceLineNo">3326</span>    return htds;<a name="line.3326"></a>
-<span class="sourceLineNo">3327</span>  }<a name="line.3327"></a>
-<span class="sourceLineNo">3328</span><a name="line.3328"></a>
-<span class="sourceLineNo">3329</span>  /**<a name="line.3329"></a>
-<span class="sourceLineNo">3330</span>   * Returns the list of table names that match the specified request<a name="line.3330"></a>
-<span class="sourceLineNo">3331</span>   * @param regex The regular expression to match against, or null if querying for all<a name="line.3331"></a>
-<span class="sourceLineNo">3332</span>   * @param namespace the namespace to query, or null if querying for all<a name="line.3332"></a>
-<span class="sourceLineNo">3333</span>   * @param includeSysTables False to match only against userspace tables<a name="line.3333"></a>
-<span class="sourceLineNo">3334</span>   * @return the list of table names<a name="line.3334"></a>
-<span class="sourceLineNo">3335</span>   */<a name="line.3335"></a>
-<span class="sourceLineNo">3336</span>  public List&lt;TableName&gt; listTableNames(final String namespace, final String regex,<a name="line.3336"></a>
-<span class="sourceLineNo">3337</span>      final boolean includeSysTables) throws IOException {<a name="line.3337"></a>
-<span class="sourceLineNo">3338</span>    List&lt;TableDescriptor&gt; htds = new ArrayList&lt;&gt;();<a name="line.3338"></a>
-<span class="sourceLineNo">3339</span>    if (cpHost != null) {<a name="line.3339"></a>
-<span class="sourceLineNo">3340</span>      cpHost.preGetTableNames(htds, regex);<a name="line.3340"></a>
-<span class="sourceLineNo">3341</span>    }<a name="line.3341"></a>
-<span class="sourceLineNo">3342</span>    htds = getTableDescriptors(htds, namespace, regex, null, includeSysTables);<a name="line.3342"></a>
-<span class="sourceLineNo">3343</span>    if (cpHost != null) {<a name="line.3343"></a>
-<span class="sourceLineNo">3344</span>      cpHost.postGetTableNames(htds, regex);<a name="line.3344"></a>
-<span class="sourceLineNo">3345</span>    }<a name="line.3345"></a>
-<span class="sourceLineNo">3346</span>    List&lt;TableName&gt; result = new ArrayList&lt;&gt;(htds.size());<a name="line.3346"></a>
-<span class="sourceLineNo">3347</span>    for (TableDescriptor htd: htds) result.add(htd.getTableName());<a name="line.3347"></a>
-<span class="sourceLineNo">3348</span>    return result;<a name="line.3348"></a>
-<span class="sourceLineNo">3349</span>  }<a name="line.3349"></a>
-<span class="sourceLineNo">3350</span><a name="line.3350"></a>
-<span class="sourceLineNo">3351</span>  /**<a name="line.3351"></a>
-<span class="sourceLineNo">3352</span>   * @return list of table table descriptors after filtering by regex and whether to include system<a name="line.3352"></a>
-<span class="sourceLineNo">3353</span>   *    tables, etc.<a name="line.3353"></a>
-<span class="sourceLineNo">3354</span>   * @throws IOException<a name="line.3354"></a>
-<span class="sourceLineNo">3355</span>   */<a name="line.3355"></a>
-<span class="sourceLineNo">3356</span>  private List&lt;TableDescriptor&gt; getTableDescriptors(final List&lt;TableDescriptor&gt; htds,<a name="line.3356"></a>
-<span class="sourceLineNo">3357</span>      final String namespace, final String regex, final List&lt;TableName&gt; tableNameList,<a name="line.3357"></a>
-<span class="sourceLineNo">3358</span>      final boolean includeSysTables)<a name="line.3358"></a>
-<span class="sourceLineNo">3359</span>  throws IOException {<a name="line.3359"></a>
-<span class="sourceLineNo">3360</span>    if (tableNameList == null || tableNameList.isEmpty()) {<a name="line.3360"></a>
-<span class="sourceLineNo">3361</span>      // request for all TableDescriptors<a name="line.3361"></a>
-<span class="sourceLineNo">3362</span>      Collection&lt;TableDescriptor&gt; allHtds;<a name="line.3362"></a>
-<span class="sourceLineNo">3363</span>      if (namespace != null &amp;&amp; namespace.length() &gt; 0) {<a name="line.3363"></a>
-<span class="sourceLineNo">3364</span>        // Do a check on the namespace existence. Will fail if does not exist.<a name="line.3364"></a>
-<span class="sourceLineNo">3365</span>        this.clusterSchemaService.getNamespace(namespace);<a name="line.3365"></a>
-<span class="sourceLineNo">3366</span>        allHtds = tableDescriptors.getByNamespace(namespace).values();<a name="line.3366"></a>
-<span class="sourceLineNo">3367</span>      } else {<a name="line.3367"></a>
-<span class="sourceLineNo">3368</span>        allHtds = tableDescriptors.getAll().values();<a name="line.3368"></a>
-<span class="sourceLineNo">3369</span>      }<a name="line.3369"></a>
-<span class="sourceLineNo">3370</span>      for (TableDescriptor desc: allHtds) {<a name="line.3370"></a>
-<span class="sourceLineNo">3371</span>        if (tableStateManager.isTablePresent(desc.getTableName())<a name="line.3371"></a>
-<span class="sourceLineNo">3372</span>            &amp;&amp; (includeSysTables || !desc.getTableName().isSystemTable())) {<a name="line.3372"></a>
-<span class="sourceLineNo">3373</span>          htds.add(desc);<a name="line.3373"></a>
-<span class="sourceLineNo">3374</span>        }<a name="line.3374"></a>
-<span class="sourceLineNo">3375</span>      }<a name="line.3375"></a>
-<span class="sourceLineNo">3376</span>    } else {<a name="line.3376"></a>
-<span class="sourceLineNo">3377</span>      for (TableName s: tableNameList) {<a name="line.3377"></a>
-<span class="sourceLineNo">3378</span>        if (tableStateManager.isTablePresent(s)) {<a name="line.3378"></a>
-<span class="sourceLineNo">3379</span>          TableDescriptor desc = tableDescriptors.get(s);<a name="line.3379"></a>
-<span class="sourceLineNo">3380</span>          if (desc != null) {<a name="line.3380"></a>
-<span class="sourceLineNo">3381</span>            htds.add(desc);<a name="line.3381"></a>
-<span class="sourceLineNo">3382</span>          }<a name="line.3382"></a>
-<span class="sourceLineNo">3383</span>        }<a name="line.3383"></a>
-<span class="sourceLineNo">3384</span>      }<a name="line.3384"></a>
-<span class="sourceLineNo">3385</span>    }<a name="line.3385"></a>
-<span class="sourceLineNo">3386</span><a name="line.3386"></a>
-<span class="sourceLineNo">3387</span>    // Retains only those matched by regular expression.<a name="line.3387"></a>
-<span class="sourceLineNo">3388</span>    if (regex != null) filterTablesByRegex(htds, Pattern.compile(regex));<a name="line.3388"></a>
-<span class="sourceLineNo">3389</span>    return htds;<a name="line.3389"></a>
-<span class="sourceLineNo">3390</span>  }<a name="line.3390"></a>
-<span class="sourceLineNo">3391</span><a name="line.3391"></a>
-<span class="sourceLineNo">3392</span>  /**<a name="line.3392"></a>
-<span class="sourceLineNo">3393</span>   * Removes the table descriptors that don't match the pattern.<a name="line.3393"></a>
-<span class="sourceLineNo">3394</span>   * @param descriptors list of table descriptors to filter<a name="line.3394"></a>
-<span class="sourceLineNo">3395</span>   * @param pattern the regex to use<a name="line.3395"></a>
-<span class="sourceLineNo">3396</span>   */<a name="line.3396"></a>
-<span class="sourceLineNo">3397</span>  private static void filterTablesByRegex(final Collection&lt;TableDescriptor&gt; descriptors,<a name="line.3397"></a>
-<span class="sourceLineNo">3398</span>      final Pattern pattern) {<a name="line.3398"></a>
-<span class="sourceLineNo">3399</span>    final String defaultNS = NamespaceDescriptor.DEFAULT_NAMESPACE_NAME_STR;<a name="line.3399"></a>
-<span class="sourceLineNo">3400</span>    Iterator&lt;TableDescriptor&gt; itr = descriptors.iterator();<a name="line.3400"></a>
-<span class="sourceLineNo">3401</span>    while (itr.hasNext()) {<a name="line.3401"></a>
-<span class="sourceLineNo">3402</span>      TableDescriptor htd = itr.next();<a name="line.3402"></a>
-<span class="sourceLineNo">3403</span>      String tableName = htd.getTableName().getNameAsString();<a name="line.3403"></a>
-<span class="sourceLineNo">3404</span>      boolean matched = pattern.matcher(tableName).matches();<a name="line.3404"></a>
-<span class="sourceLineNo">3405</span>      if (!matched &amp;&amp; htd.getTableName().getNamespaceAsString().equals(defaultNS)) {<a name="line.3405"></a>
-<span class="sourceLineNo">3406</span>        matched = pattern.matcher(defaultNS + TableName.NAMESPACE_DELIM + tableName).matches();<a name="line.3406"></a>
-<span class="sourceLineNo">3407</span>      }<a name="line.3407"></a>
-<span class="sourceLineNo">3408</span>      if (!matched) {<a name="line.3408"></a>
-<span class="sourceLineNo">3409</span>        itr.remove();<a name="line.3409"></a>
-<span class="sourceLineNo">3410</span>      }<a name="line.3410"></a>
-<span class="sourceLineNo">3411</span>    }<a name="line.3411"></a>
-<span class="sourceLineNo">3412</span>  }<a name="line.3412"></a>
-<span class="sourceLineNo">3413</span><a name="line.3413"></a>
-<span class="sourceLineNo">3414</span>  @Override<a name="line.3414"></a>
-<span class="sourceLineNo">3415</span>  public long getLastMajorCompactionTimestamp(TableName table) throws IOException {<a name="line.3415"></a>
-<span class="sourceLineNo">3416</span>    return getClusterMetrics(EnumSet.of(Option.LIVE_SERVERS))<a name="line.3416"></a>
-<span class="sourceLineNo">3417</span>        .getLastMajorCompactionTimestamp(table);<a name="line.3417"></a>
-<span class="sourceLineNo">3418</span>  }<a name="line.3418"></a>
-<span class="sourceLineNo">3419</span><a name="line.3419"></a>
-<span class="sourceLineNo">3420</span>  @Override<a name="line.3420"></a>
-<span class="sourceLineNo">3421</span>  public long getLastMajorCompactionTimestampForRegion(byte[] regionName) throws IOException {<a name="line.3421"></a>
-<span class="sourceLineNo">3422</span>    return getClusterMetrics(EnumSet.of(Option.LIVE_SERVERS))<a name="line.3422"></a>
-<span class="sourceLineNo">3423</span>        .getLastMajorCompactionTimestamp(regionName);<a name="line.3423"></a>
-<span class="sourceLineNo">3424</span>  }<a name="line.3424"></a>
-<span class="sourceLineNo">3425</span><a name="line.3425"></a>
-<span class="sourceLineNo">3426</span>  /**<a name="line.3426"></a>
-<span class="sourceLineNo">3427</span>   * Gets the mob file compaction state for a specific table.<a name="line.3427"></a>
-<span class="sourceLineNo">3428</span>   * Whether all the mob files are selected is known during the compaction execution, but<a name="line.3428"></a>
-<span class="sourceLineNo">3429</span>   * the statistic is done just before compaction starts, it is hard to know the compaction<a name="line.3429"></a>
-<span class="sourceLineNo">3430</span>   * type at that time, so the rough statistics are chosen for the mob file compaction. Only two<a name="line.3430"></a>
-<span class="sourceLineNo">3431</span>   * compaction states are available, CompactionState.MAJOR_AND_MINOR and CompactionState.NONE.<a name="line.3431"></a>
-<span class="sourceLineNo">3432</span>   * @param tableName The current table name.<a name="line.3432"></a>
-<span class="sourceLineNo">3433</span>   * @return If a given table is in mob file compaction now.<a name="line.3433"></a>
-<span class="sourceLineNo">3434</span>   */<a name="line.3434"></a>
-<span class="sourceLineNo">3435</span>  public CompactionState getMobCompactionState(TableName tableName) {<a name="line.3435"></a>
-<span class="sourceLineNo">3436</span>    AtomicInteger compactionsCount = mobCompactionStates.get(tableName);<a name="line.3436"></a>
-<span class="sourceLineNo">3437</span>    if (compactionsCount != null &amp;&amp; compactionsCount.get() != 0) {<a name="line.3437"></a>
-<span class="sourceLineNo">3438</span>      return CompactionState.MAJOR_AND_MINOR;<a name="line.3438"></a>
-<span class="sourceLineNo">3439</span>    }<a name="line.3439"></a>
-<span class="sourceLineNo">3440</span>    return CompactionState.NONE;<a name="line.3440"></a>
-<span class="sourceLineNo">3441</span>  }<a name="line.3441"></a>
-<span class="sourceLineNo">3442</span><a name="line.3442"></a>
-<span class="sourceLineNo">3443</span>  public void reportMobCompactionStart(TableName tableName) throws IOException {<a name="line.3443"></a>
-<span class="sourceLineNo">3444</span>    IdLock.Entry lockEntry = null;<a name="line.3444"></a>
-<span class="sourceLineNo">3445</span>    try {<a name="line.3445"></a>
-<span class="sourceLineNo">3446</span>      lockEntry = mobCompactionLock.getLockEntry(tableName.hashCode());<a name="line.3446"></a>
-<span class="sourceLineNo">3447</span>      AtomicInteger compactionsCount = mobCompactionStates.get(tableName);<a name="line.3447"></a>
-<span class="sourceLineNo">3448</span>      if (compactionsCount == null) {<a name="line.3448"></a>
-<span class="sourceLineNo">3449</span>        compactionsCount = new AtomicInteger(0);<a name="line.3449"></a>
-<span class="sourceLineNo">3450</span>        mobCompactionStates.put(tableName, compactionsCount);<a name="line.3450"></a>
-<span class="sourceLineNo">3451</span>      }<a name="line.3451"></a>
-<span class="sourceLineNo">3452</span>      compactionsCount.incrementAndGet();<a name="line.3452"></a>
-<span class="sourceLineNo">3453</span>    } finally {<a name="line.3453"></a>
-<span class="sourceLineNo">3454</span>      if (lockEntry != null) {<a name="line.3454"></a>
-<span class="sourceLineNo">3455</span>        mobCompactionLock.releaseLockEntry(lockEntry);<a name="line.3455"></a>
-<span class="sourceLineNo">3456</span>      }<a name="line.3456"></a>
-<span class="sourceLineNo">3457</span>    }<a name="line.3457"></a>
-<span class="sourceLineNo">3458</span>  }<a name="line.3458"></a>
-<span class="sourceLineNo">3459</span><a name="line.3459"></a>
-<span class="sourceLineNo">3460</span>  public void reportMobCompactionEnd(TableName tableName) throws IOException {<a name="line.3460"></a>
-<span class="sourceLineNo">3461</span>    IdLock.Entry lockEntry = null;<a name="line.3461"></a>
-<span class="sourceLineNo">3462</span>    try {<a name="line.3462"></a>
-<span class="sourceLineNo">3463</span>      lockEntry = mobCompactionLock.getLockEntry(tableName.hashCode());<a name="line.3463"></a>
-<span class="sourceLineNo">3464</span>      AtomicInteger compactionsCount = mobCompactionStates.get(tableName);<a name="line.3464"></a>
-<span class="sourceLineNo">3465</span>      if (compactionsCount != null) {<a name="line.3465"></a>
-<span class="sourceLineNo">3466</span>        int count = compactionsCount.decrementAndGet();<a name="line.3466"></a>
-<span class="sourceLineNo">3467</span>        // remove the entry if the count is 0.<a name="line.3467"></a>
-<span class="sourceLineNo">3468</span>        if (count == 0) {<a name="line.3468"></a>
-<span class="sourceLineNo">3469</span>          mobCompactionStates.remove(tableName);<a name="line.3469"></a>
-<span class="sourceLineNo">3470</span>        }<a name="line.3470"></a>
-<span class="sourceLineNo">3471</span>      }<a name="line.3471"></a>
-<span class="sourceLineNo">3472</span>    } finally {<a name="line.3472"></a>
-<span class="sourceLineNo">3473</span>      if (lockEntry != null) {<a name="line.3473"></a>
-<span class="sourceLineNo">3474</span>        mobCompactionLock.releaseLockEntry(lockEntry);<a name="line.3474"></a>
-<span class="sourceLineNo">3475</span>      }<a name="line.3475"></a>
-<span class="sourceLineNo">3476</span>    }<a name="line.3476"></a>
-<span class="sourceLineNo">3477</span>  }<a name="line.3477"></a>
-<span class="sourceLineNo">3478</span><a name="line.3478"></a>
-<span class="sourceLineNo">3479</span>  /**<a name="line.3479"></a>
-<span class="sourceLineNo">3480</span>   * Requests mob compaction.<a name="line.3480"></a>
-<span class="sourceLineNo">3481</span>   * @param tableName The table the compact.<a name="line.3481"></a>
-<span class="sourceLineNo">3482</span>   * @param columns The compacted columns.<a name="line.3482"></a>
-<span class="sourceLineNo">3483</span>   * @param allFiles Whether add all mob files into the compaction.<a name="line.3483"></a>
-<span class="sourceLineNo">3484</span>   */<a name="line.3484"></a>
-<span class="sourceLineNo">3485</span>  public void requestMobCompaction(TableName tableName,<a name="line.3485"></a>
-<span class="sourceLineNo">3486</span>                                   List&lt;ColumnFamilyDescriptor&gt; columns, boolean allFiles) throws IOException {<a name="line.3486"></a>
-<span class="sourceLineNo">3487</span>    mobCompactThread.requestMobCompaction(conf, getFileSystem(), tableName, columns, allFiles);<a name="line.3487"></a>
-<span class="sourceLineNo">3488</span>  }<a name="line.3488"></a>
-<span class="sourceLineNo">3489</span><a name="line.3489"></a>
-<span class="sourceLineNo">3490</span>  /**<a name="line.3490"></a>
-<span class="sourceLineNo">3491</span>   * Queries the state of the {@link LoadBalancerTracker}. If the balancer is not initialized,<a name="line.3491"></a>
-<span class="sourceLineNo">3492</span>   * false is returned.<a name="line.3492"></a>
-<span class="sourceLineNo">3493</span>   *<a name="line.3493"></a>
-<span class="sourceLineNo">3494</span>   * @return The state of the load balancer, or false if the load balancer isn't defined.<a name="line.3494"></a>
-<span class="sourceLineNo">3495</span>   */<a name="line.3495"></a>
-<span class="sourceLineNo">3496</span>  public boolean isBalancerOn() {<a name="line.3496"></a>
-<span class="sourceLineNo">3497</span>    return !isInMaintenanceMode()<a name="line.3497"></a>
-<span class="sourceLineNo">3498</span>        &amp;&amp; loadBalancerTracker != null<a name="line.3498"></a>
-<span class="sourceLineNo">3499</span>        &amp;&amp; loadBalancerTracker.isBalancerOn();<a name="line.3499"></a>
-<span class="sourceLineNo">3500</span>  }<a name="line.3500"></a>
-<span class="sourceLineNo">3501</span><a name="line.3501"></a>
-<span class="sourceLineNo">3502</span>  /**<a name="line.3502"></a>
-<span class="sourceLineNo">3503</span>   * Queries the state of the {@link RegionNormalizerTracker}. If it's not initialized,<a name="line.3503"></a>
-<span class="sourceLineNo">3504</span>   * false is returned.<a name="line.3504"></a>
-<span class="sourceLineNo">3505</span>   */<a name="line.3505"></a>
-<span class="sourceLineNo">3506</span>  public boolean isNormalizerOn() {<a name="line.3506"></a>
-<span class="sourceLineNo">3507</span>    return !isInMaintenanceMode()<a name="line.3507"></a>
-<span class="sourceLineNo">3508</span>        &amp;&amp; regionNormalizerTracker != null<a name="line.3508"></a>
-<span class="sourceLineNo">3509</span>        &amp;&amp; regionNormalizerTracker.isNormalizerOn();<a name="line.3509"></a>
-<span class="sourceLineNo">3510</span>  }<a name="line.3510"></a>
-<span class="sourceLineNo">3511</span><a name="line.3511"></a>
-<span class="sourceLineNo">3512</span>  /**<a name="line.3512"></a>
-<span class="sourceLineNo">3513</span>   * Queries the state of the {@link SplitOrMergeTracker}. If it is not initialized,<a name="line.3513"></a>
-<span class="sourceLineNo">3514</span>   * false is returned. If switchType is illegal, false will return.<a name="line.3514"></a>
-<span class="sourceLineNo">3515</span>   * @param switchType see {@link org.apache.hadoop.hbase.client.MasterSwitchType}<a name="line.3515"></a>
-<span class="sourceLineNo">3516</span>   * @return The state of the switch<a name="line.3516"></a>
-<span class="sourceLineNo">3517</span>   */<a name="line.3517"></a>
-<span class="sourceLineNo">3518</span>  @Override<a name="line.3518"></a>
-<span class="sourceLineNo">3519</span>  public boolean isSplitOrMergeEnabled(MasterSwitchType switchType) {<a name="line.3519"></a>
-<span class="sourceLineNo">3520</span>    return !isInMaintenanceMode()<a name="line.3520"></a>
-<span class="sourceLineNo">3521</span>        &amp;&amp; splitOrMergeTracker != null<a name="line.3521"></a>
-<span class="sourceLineNo">3522</span>        &amp;&amp; splitOrMergeTracker.isSplitOrMergeEnabled(switchType);<a name="line.3522"></a>
-<span class="sourceLineNo">3523</span>  }<a name="line.3523"></a>
-<span class="sourceLineNo">3524</span><a name="line.3524"></a>
-<span class="sourceLineNo">3525</span>  /**<a name="line.3525"></a>
-<span class="sourceLineNo">3526</span>   * Fetch the configured {@link LoadBalancer} class name. If none is set, a default is returned.<a name="line.3526"></a>
-<span class="sourceLineNo">3527</span>   *<a name="line.3527"></a>
-<span class="sourceLineNo">3528</span>   * @return The name of the {@link LoadBalancer} in use.<a name="line.3528"></a>
-<span class="sourceLineNo">3529</span>   */<a name="line.3529"></a>
-<span class="sourceLineNo">3530</span>  public String getLoadBalancerClassName() {<a name="line.3530"></a>
-<span class="sourceLineNo">3531</span>    return conf.get(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, LoadBalancerFactory<a name="line.3531"></a>
-<span class="sourceLineNo">3532</span>        .getDefaultLoadBalancerClass().getName());<a name="line.3532"></a>
-<span class="sourceLineNo">3533</span>  }<a name="line.3533"></a>
-<span class="sourceLineNo">3534</span><a name="line.3534"></a>
-<span class="sourceLineNo">3535</span>  /**<a name="line.3535"></a>
-<span class="sourceLineNo">3536</span>   * @return RegionNormalizerTracker instance<a name="line.3536"></a>
-<span class="sourceLineNo">3537</span>   */<a name="line.3537"></a>
-<span class="sourceLineNo">3538</span>  public RegionNormalizerTracker getRegionNormalizerTracker() {<a name="line.3538"></a>
-<span class="sourceLineNo">3539</span>    return regionNormalizerTracker;<a name="line.3539"></a>
-<span class="sourceLineNo">3540</span>  }<a name="line.3540"></a>
-<span class="sourceLineNo">3541</span><a name="line.3541"></a>
-<span class="sourceLineNo">3542</span>  public SplitOrMergeTracker getSplitOrMergeTracker() {<a name="line.3542"></a>
-<span class="sourceLineNo">3543</span>    return splitOrMergeTracker;<a name="line.3543"></a>
-<span class="sourceLineNo">3544</span>  }<a name="line.3544"></a>
-<span class="sourceLineNo">3545</span><a name="line.3545"></a>
-<span class="sourceLineNo">3546</span>  @Override<a name="line.3546"></a>
-<span class="sourceLineNo">3547</span>  public LoadBalancer getLoadBalancer() {<a name="line.3547"></a>
-<span class="sourceLineNo">3548</span>    return balancer;<a name="line.3548"></a>
-<span class="sourceLineNo">3549</span>  }<a name="line.3549"></a>
-<span class="sourceLineNo">3550</span><a name="line.3550"></a>
-<span class="sourceLineNo">3551</span>  @Override<a name="line.3551"></a>
-<span class="sourceLineNo">3552</span>  public FavoredNodesManager getFavoredNodesManager() {<a name="line.3552"></a>
-<span class="sourceLineNo">3553</span>    return favoredNodesManager;<a name="line.3553"></a>
-<span class="sourceLineNo">3554</span>  }<a name="line.3554"></a>
-<span class="sourceLineNo">3555</span><a name="line.3555"></a>
-<span class="sourceLineNo">3556</span>  private long executePeerProcedure(AbstractPeerProcedure&lt;?&gt; procedure) throws IOException {<a name="line.3556"></a>
-<span class="sourceLineNo">3557</span>    long procId = procedureExecutor.submitProcedure(procedure);<a name="line.3557"></a>
-<span class="sourceLineNo">3558</span>    procedure.getLatch().await();<a name="line.3558"></a>
-<span class="sourceLineNo">3559</span>    return procId;<a name="line.3559"></a>
-<span class="sourceLineNo">3560</span>  }<a name="line.3560"></a>
-<span class="sourceLineNo">3561</span><a name="line.3561"></a>
-<span class="sourceLineNo">3562</span>  @Override<a name="line.3562"></a>
-<span class="sourceLineNo">3563</span>  public long addReplicationPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled)<a name="line.3563"></a>
-<span class="sourceLineNo">3564</span>      throws ReplicationException, IOException {<a name="line.3564"></a>
-<span class="sourceLineNo">3565</span>    LOG.info(getClientIdAuditPrefix() + " creating replication peer, id=" + peerId + ", config=" +<a name="line.3565"></a>
-<span class="sourceLineNo">3566</span>      peerConfig + ", state=" + (enabled ? "ENABLED" : "DISABLED"));<a name="line.3566"></a>
-<span class="sourceLineNo">3567</span>    return executePeerProcedure(new AddPeerProcedure(peerId, peerConfig, enabled));<a name="line.3567"></a>
-<span class="sourceLineNo">3568</span>  }<a name="line.3568"></a>
-<span class="sourceLineNo">3569</span><a name="line.3569"></a>
-<span class="sourceLineNo">3570</span>  @Override<a name="line.3570"></a>
-<span class="sourceLineNo">3571</span>  public long removeReplicationPeer(String peerId) throws ReplicationException, IOException {<a name="line.3571"></a>
-<span class="sourceLineNo">3572</span>    LOG.info(getClientIdAuditPrefix() + " removing replication peer, id=" + peerId);<a name="line.3572"></a>
-<span class="sourceLineNo">3573</span>    return executePeerProcedure(new RemovePeerProcedure(peerId));<a name="line.3573"></a>
-<span class="sourceLineNo">3574</span>  }<a name="line.3574"></a>
-<span class="sourceLineNo">3575</span><a name="line.3575"></a>
-<span class="sourceLineNo">3576</span>  @Override<a name="line.3576"></a>
-<span class="sourceLineNo">3577</span>  public long enableReplicationPeer(String peerId) throws ReplicationException, IOException {<a name="line.3577"></a>
-<span class="sourceLineNo">3578</span>    LOG.info(getClientIdAuditPrefix() + " enable replication peer, id=" + peerId);<a name="line.3578"></a>
-<span class="sourceLineNo">3579</span>    return executePeerProcedure(new EnablePeerProcedure(peerId));<a name="line.3579"></a>
-<span class="sourceLineNo">3580</span>  }<a name="line.3580"></a>
-<span class="sourceLineNo">3581</span><a name="line.3581"></a>
-<span class="sourceLineNo">3582</span>  @Override<a name="line.3582"></a>
-<span class="sourceLineNo">3583</span>  public long disableReplicationPeer(String peerId) throws ReplicationException, IOException {<a name="line.3583"></a>
-<span class="sourceLineNo">3584</span>    LOG.info(getClientIdAuditPrefix() + " disable replication peer, id=" + peerId);<a name="line.3584"></a>
-<span class="sourceLineNo">3585</span>    return executePeerProcedure(new DisablePeerProcedure(peerId));<a name="line.3585"></a>
-<span class="sourceLineNo">3586</span>  }<a name="line.3586"></a>
-<span class="sourceLineNo">3587</span><a name="line.3587"></a>
-<span class="sourceLineNo">3588</span>  @Override<a name="line.3588"></a>
-<span class="sourceLineNo">3589</span>  public ReplicationPeerConfig getReplicationPeerConfig(String peerId)<a name="line.3589"></a>
-<span class="sourceLineNo">3590</span>      throws ReplicationException, IOException {<a name="line.3590"></a>
-<span class="sourceLineNo">3591</span>    if (cpHost != null) {<a name="line.3591"></a>
-<span class="sourceLineNo">3592</span>      cpHost.preGetReplicationPeerConfig(peerId);<a name="line.3592"></a>
-<span class="sourceLineNo">3593</span>    }<a name="line.3593"></a>
-<span class="sourceLineNo">3594</span>    LOG.info(getClientIdAuditPrefix() + " get replication peer config, id=" + peerId);<a name="line.3594"></a>
-<span class="sourceLineNo">3595</span>    ReplicationPeerConfig peerConfig = this.replicationPeerManager.getPeerConfig(peerId)<a name="line.3595"></a>
-<span class="sourceLineNo">3596</span>        .orElseThrow(() -&gt; new ReplicationPeerNotFoundException(peerId));<a name="line.3596"></a>
-<span class="sourceLineNo">3597</span>    if (cpHost != null) {<a name="line.3597"></a>
-<span class="sourceLineNo">3598</span>      cpHost.postGetReplicationPeerConfig(peerId);<a name="line.3598"></a>
-<span class="sourceLineNo">3599</span>    }<a name="line.3599"></a>
-<span class="sourceLineNo">3600</span>    return peerConfig;<a name="line.3600"></a>
-<span class="sourceLineNo">3601</span>  }<a name="line.3601"></a>
-<span class="sourceLineNo">3602</span><a name="line.3602"></a>
-<span class="sourceLineNo">3603</span>  @Override<a name="line.3603"></a>
-<span class="sourceLineNo">3604</span>  public long updateReplicationPeerConfig(String peerId, ReplicationPeerConfig peerConfig)<a name="line.3604"></a>
-<span class="sourceLineNo">3605</span>      throws ReplicationException, IOException {<a name="line.3605"></a>
-<span class="sourceLineNo">3606</span>    LOG.info(getClientIdAuditPrefix() + " update replication peer config, id=" + peerId +<a name="line.3606"></a>
-<span class="sourceLineNo">3607</span>      ", config=" + peerConfig);<a name="line.3607"></a>
-<span class="sourceLineNo">3608</span>    return executePeerProcedure(new UpdatePeerConfigProcedure(peerId, peerConfig));<a name="line.3608"></a>
-<span class="sourceLineNo">3609</span>  }<a name="line.3609"></a>
-<span class="sourceLineNo">3610</span><a name="line.3610"></a>
-<span class="sourceLineNo">3611</span>  @Override<a name="line.3611"></a>
-<span class="sourceLineNo">3612</span>  public List&lt;ReplicationPeerDescription&gt; listReplicationPeers(String regex)<a name="line.3612"></a>
-<span class="sourceLineNo">3613</span>      throws ReplicationException, IOException {<a name="line.3613"></a>
-<span class="sourceLineNo">3614</span>    if (cpHost != null) {<a name="line.3614"></a>
-<span class="sourceLineNo">3615</span>      cpHost.preListReplicationPeers(regex);<a name="line.3615"></a>
-<span class="sourceLineNo">3616</span>    }<a name="line.3616"></a>
-<span class="sourceLineNo">3617</span>    LOG.debug("{} list replication peers, regex={}", getClientIdAuditPrefix(), regex);<a name="line.3617"></a>
-<span class="sourceLineNo">3618</span>    Pattern pattern = regex == null ? null : Pattern.compile(regex);<a name="line.3618"></a>
-<span class="sourceLineNo">3619</span>    List&lt;ReplicationPeerDescription&gt; peers =<a name="line.3619"></a>
-<span class="sourceLineNo">3620</span>      this.replicationPeerManager.listPeers(pattern);<a name="line.3620"></a>
-<span class="sourceLineNo">3621</span>    if (cpHost != null) {<a name="line.3621"></a>
-<span class="sourceLineNo">3622</span>      cpHost.postListReplicationPeers(regex);<a name="line.3622"></a>
-<span class="sourceLineNo">3623</span>    }<a name="line.3623"></a>
-<span class="sourceLineNo">3624</span>    return peers;<a name="line.3624"></a>
-<span class="sourceLineNo">3625</span>  }<a name="line.3625"></a>
-<span class="sourceLineNo">3626</span><a name="line.3626"></a>
-<span class="sourceLineNo">3627</span>  @Override<a name="line.3627"></a>
-<span class="sourceLineNo">3628</span>  public long transitReplicationPeerSyncReplicationState(String peerId, SyncReplicationState state)<a name="line.3628"></a>
-<span class="sourceLineNo">3629</span>    throws ReplicationException, IOException {<a name="line.3629"></a>
-<span class="sourceLineNo">3630</span>    LOG.info(<a name="line.3630"></a>
-<span class="sourceLineNo">3631</span>      getClientIdAuditPrefix() +<a name="line.3631"></a>
-<span class="sourceLineNo">3632</span>        " transit current cluster state to {} in a synchronous replication peer id={}",<a name="line.3632"></a>
-<span class="sourceLineNo">3633</span>      state, peerId);<a name="line.3633"></a>
-<span class="sourceLineNo">3634</span>    return executePeerProcedure(new TransitPeerSyncReplicationStateProcedure(peerId, state));<a name="line.3634"></a>
-<span class="sourceLineNo">3635</span>  }<a name="line.3635"></a>
-<span class="sourceLineNo">3636</span><a name="line.3636"></a>
-<span class="sourceLineNo">3637</span>  /**<a name="line.3637"></a>
-<span class="sourceLineNo">3638</span>   * Mark region server(s) as decommissioned (previously called 'draining') to prevent additional<a name="line.3638"></a>
-<span class="sourceLineNo">3639</span>   * regions from getting assigned to them. Also unload the regions on the servers asynchronously.0<a name="line.3639"></a>
-<span class="sourceLineNo">3640</span>   * @param servers Region servers to decommission.<a name="line.3640"></a>
-<span class="sourceLineNo">3641</span>   */<a name="line.3641"></a>
-<span class="sourceLineNo">3642</span>  public void decommissionRegionServers(final List&lt;ServerName&gt; servers, final boolean offload)<a name="line.3642"></a>
-<span class="sourceLineNo">3643</span>      throws HBaseIOException {<a name="line.3643"></a>
-<span class="sourceLineNo">3644</span>    List&lt;ServerName&gt; serversAdded = new ArrayList&lt;&gt;(servers.size());<a name="line.3644"></a>
-<span class="sourceLineNo">3645</span>    // Place the decommission marker first.<a name="line.3645"></a>
-<span class="sourceLineNo">3646</span>    String parentZnode = getZooKeeper().getZNodePaths().drainingZNode;<a name="line.3646"></a>
-<span class="sourceLineNo">3647</span>    for (ServerName server : servers) {<a name="line.3647"></a>
-<span class="sourceLineNo">3648</span>      try {<a name="line.3648"></a>
-<span class="sourceLineNo">3649</span>        String node = ZNodePaths.joinZNode(parentZnode, server.getServerName());<a name="line.3649"></a>
-<span class="sourceLineNo">3650</span>        ZKUtil.createAndFailSilent(getZooKeeper(), node);<a name="line.3650"></a>
-<span class="sourceLineNo">3651</span>      } catch (KeeperException ke) {<a name="line.3651"></a>
-<span class="sourceLineNo">3652</span>        throw new HBaseIOException(<a name="line.3652"></a>
-<span class="sourceLineNo">3653</span>          this.zooKeeper.prefix("Unable to decommission '" + server.getServerName() + "'."), ke);<a name="line.3653"></a>
-<span class="sourceLineNo">3654</span>      }<a name="line.3654"></a>
-<span class="sourceLineNo">3655</span>      if (this.serverManager.addServerToDrainList(server)) {<a name="line.3655"></a>
-<span class="sourceLineNo">3656</span>        serversAdded.add(server);<a name="line.3656"></a>
-<span class="sourceLineNo">3657</span>      }<a name="line.3657"></a>
-<span class="sourceLineNo">3658</span>    }<a name="line.3658"></a>
-<span class="sourceLineNo">3659</span>    // Move the regions off the decommissioned servers.<a name="line.3659"></a>
-<span class="sourceLineNo">3660</span>    if (offload) {<a name="line.3660"></a>
-<span class="sourceLineNo">3661</span>      final List&lt;ServerName&gt; destServers = this.serverManager.createDestinationServersList();<a name="line.3661"></a>
-<span class="sourceLineNo">3662</span>      for (ServerName server : serversAdded) {<a name="line.3662"></a>
-<span class="sourceLineNo">3663</span>        final List&lt;RegionInfo&gt; regionsOnServer = this.assignmentManager.getRegionsOnServer(server);<a name="line.3663"></a>
-<span class="sourceLineNo">3664</span>        for (RegionInfo hri : regionsOnServer) {<a name="line.3664"></a>
-<span class="sourceLineNo">3665</span>          ServerName dest = balancer.randomAssignment(hri, destServers);<a name="line.3665"></a>
-<span class="sourceLineNo">3666</span>          if (dest == null) {<a name="line.3666"></a>
-<span class="sourceLineNo">3667</span>            throw new HBaseIOException("Unable to determine a plan to move " + hri);<a name="line.3667"></a>
-<span class="sourceLineNo">3668</span>          }<a name="line.3668"></a>
-<span class="sourceLineNo">3669</span>          RegionPlan rp = new RegionPlan(hri, server, dest);<a name="line.3669"></a>
-<span class="sourceLineNo">3670</span>          this.assignmentManager.moveAsync(rp);<a name="line.3670"></a>
-<span class="sourceLineNo">3671</span>        }<a name="line.3671"></a>
-<span class="sourceLineNo">3672</span>      }<a name="line.3672"></a>
-<span class="sourceLineNo">3673</span>    }<a name="line.3673"></a>
-<span class="sourceLineNo">3674</span>  }<a name="line.3674"></a>
-<span class="sourceLineNo">3675</span><a name="line.3675"></a>
-<span class="sourceLineNo">3676</span>  /**<a name="line.3676"></a>
-<span class="sourceLineNo">3677</span>   * List region servers marked as decommissioned (previously called 'draining') to not get regions<a name="line.3677"></a>
-<span class="sourceLineNo">3678</span>   * assigned to them.<a name="line.3678"></a>
-<span class="sourceLineNo">3679</span>   * @return List of decommissioned servers.<a name="line.3679"></a>
-<span class="sourceLineNo">3680</span>   */<a name="line.3680"></a>
-<span class="sourceLineNo">3681</span>  public List&lt;ServerName&gt; listDecommissionedRegionServers() {<a name="line.3681"></a>
-<span class="sourceLineNo">3682</span>    return this.serverManager.getDrainingServersList();<a name="line.3682"></a>
-<span class="sourceLineNo">3683</span>  }<a name="line.3683"></a>
-<span class="sourceLineNo">3684</span><a name="line.3684"></a>
-<span class="sourceLineNo">3685</span>  /**<a name="line.3685"></a>
-<span class="sourceLineNo">3686</span>   * Remove decommission marker (previously called 'draining') from a region server to allow regions<a name="line.3686"></a>
-<span class="sourceLineNo">3687</span>   * assignments. Load regions onto the server asynchronously if a list of regions is given<a name="line.3687"></a>
-<span class="sourceLineNo">3688</span>   * @param server Region server to remove decommission marker from.<a name="line.3688"></a>
-<span class="sourceLineNo">3689</span>   */<a name="line.3689"></a>
-<span class="sourceLineNo">3690</span>  public void recommissionRegionServer(final ServerName server,<a name="line.3690"></a>
-<span class="sourceLineNo">3691</span>      final List&lt;byte[]&gt; encodedRegionNames) throws IOException {<a name="line.3691"></a>
-<span class="sourceLineNo">3692</span>    // Remove the server from decommissioned (draining) server list.<a name="line.3692"></a>
-<span class="sourceLineNo">3693</span>    String parentZnode = getZooKeeper().getZNodePaths().drainingZNode;<a name="line.3693"></a>
-<span class="sourceLineNo">3694</span>    String node = ZNodePaths.joinZNo