You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by gi...@apache.org on 2020/01/09 14:43:24 UTC
[hbase-site] branch asf-site updated: Published site at
c8c7aecbee942284ccc54d72794de1ce48d48f05.
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 7561958 Published site at c8c7aecbee942284ccc54d72794de1ce48d48f05.
7561958 is described below
commit 75619580ee9f4ec6d9a021d1b55a796837c794af
Author: jenkins <bu...@apache.org>
AuthorDate: Thu Jan 9 14:43:10 2020 +0000
Published site at c8c7aecbee942284ccc54d72794de1ce48d48f05.
---
acid-semantics.html | 2 +-
apache_hbase_reference_guide.pdf | 4 +-
book.html | 2 +-
bulk-loads.html | 2 +-
checkstyle-aggregate.html | 4 +-
coc.html | 2 +-
dependencies.html | 2 +-
dependency-convergence.html | 2 +-
dependency-info.html | 2 +-
dependency-management.html | 2 +-
devapidocs/constant-values.html | 4 +-
.../src-html/org/apache/hadoop/hbase/Version.html | 4 +-
.../hadoop/hbase/http/ProfileOutputServlet.html | 4 +-
downloads.html | 2 +-
export_control.html | 2 +-
index.html | 2 +-
issue-tracking.html | 2 +-
mail-lists.html | 2 +-
metrics.html | 2 +-
old_news.html | 2 +-
plugin-management.html | 2 +-
plugins.html | 2 +-
poweredbyhbase.html | 2 +-
project-info.html | 2 +-
project-reports.html | 2 +-
project-summary.html | 2 +-
pseudo-distributed.html | 2 +-
replication.html | 2 +-
resources.html | 2 +-
source-repository.html | 2 +-
sponsors.html | 2 +-
supportingprojects.html | 2 +-
team-list.html | 2 +-
.../master/cleaner/TestSnapshotFromMaster.html | 62 +-
.../hadoop/hbase/rsgroup/TestRSGroupsKillRS.html | 24 +-
.../hbase/http/TestProfileOutputServlet.html | 33 +-
.../master/cleaner/TestSnapshotFromMaster.html | 1061 ++++++++++----------
.../hadoop/hbase/rsgroup/TestRSGroupsKillRS.html | 428 ++++----
38 files changed, 842 insertions(+), 842 deletions(-)
diff --git a/acid-semantics.html b/acid-semantics.html
index e4ff839..8ea0516 100644
--- a/acid-semantics.html
+++ b/acid-semantics.html
@@ -450,7 +450,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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 edaff49..8f9773e 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:20200108144036+00'00')
-/CreationDate (D:20200108144036+00'00')
+/ModDate (D:20200109143920+00'00')
+/CreationDate (D:20200109143920+00'00')
>>
endobj
2 0 obj
diff --git a/book.html b/book.html
index 5403fbe..c96e7ae 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-08 14:30:07 UTC
+Last updated 2020-01-09 14:30:12 UTC
</div>
</div>
</body>
diff --git a/bulk-loads.html b/bulk-loads.html
index 0e0d709..4807786 100644
--- a/bulk-loads.html
+++ b/bulk-loads.html
@@ -155,7 +155,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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 ba0cf65..1936cb0 100644
--- a/checkstyle-aggregate.html
+++ b/checkstyle-aggregate.html
@@ -49545,7 +49545,7 @@
<td>sizes</td>
<td>LineLength</td>
<td>Line is longer than 100 characters (found 111).</td>
-<td>503</td></tr></table></div>
+<td>502</td></tr></table></div>
<div class="section">
<h3 id="org.apache.hadoop.hbase.master.cleaner.TimeToLiveHFileCleaner.java">org/apache/hadoop/hbase/master/cleaner/TimeToLiveHFileCleaner.java</h3>
<table border="0" class="table table-striped">
@@ -88089,7 +88089,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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 4b8743c..62fadc9 100644
--- a/coc.html
+++ b/coc.html
@@ -224,7 +224,7 @@ email to <a class="externalLink" href="mailto:private@hbase.apache.org">the priv
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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 4082a15..afc4aa0 100644
--- a/dependencies.html
+++ b/dependencies.html
@@ -296,7 +296,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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 c7ce40a..339e5e9 100644
--- a/dependency-convergence.html
+++ b/dependency-convergence.html
@@ -541,7 +541,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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 4db501e..066b13a 100644
--- a/dependency-info.html
+++ b/dependency-info.html
@@ -177,7 +177,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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 dd466f2..0ced6b6 100644
--- a/dependency-management.html
+++ b/dependency-management.html
@@ -905,7 +905,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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 c3c758a..a8fb3ef 100644
--- a/devapidocs/constant-values.html
+++ b/devapidocs/constant-values.html
@@ -4102,14 +4102,14 @@
<!-- -->
</a><code>public static final <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>"Wed Jan 8 14:36:19 UTC 2020"</code></td>
+<td class="colLast"><code>"Thu Jan 9 14:35:13 UTC 2020"</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="org.apache.hadoop.hbase.Version.revision">
<!-- -->
</a><code>public static final <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>"66d1258aa3a8c48a6001f5ec9d8eaeb64415873e"</code></td>
+<td class="colLast"><code>"c8c7aecbee942284ccc54d72794de1ce48d48f05"</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="org.apache.hadoop.hbase.Version.srcChecksum">
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/Version.html b/devapidocs/src-html/org/apache/hadoop/hbase/Version.html
index 4e73c95..ec24f1f 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 = "66d1258aa3a8c48a6001f5ec9d8eaeb64415873e";<a name="line.13"></a>
+<span class="sourceLineNo">013</span> public static final String revision = "c8c7aecbee942284ccc54d72794de1ce48d48f05";<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 = "Wed Jan 8 14:36:19 UTC 2020";<a name="line.15"></a>
+<span class="sourceLineNo">015</span> public static final String date = "Thu Jan 9 14:35:13 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/http/ProfileOutputServlet.html b/devapidocs/src-html/org/apache/hadoop/hbase/http/ProfileOutputServlet.html
index f8e144e..9212a93 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/http/ProfileOutputServlet.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/http/ProfileOutputServlet.html
@@ -46,8 +46,8 @@
<span class="sourceLineNo">038</span> private static final long serialVersionUID = 1L;<a name="line.38"></a>
<span class="sourceLineNo">039</span> private static final Logger LOG = LoggerFactory.getLogger(ProfileOutputServlet.class);<a name="line.39"></a>
<span class="sourceLineNo">040</span> private static final int REFRESH_PERIOD = 2;<a name="line.40"></a>
-<span class="sourceLineNo">041</span> // Alphanumeric characters, plus percent (url-encoding), equals, and ampersand<a name="line.41"></a>
-<span class="sourceLineNo">042</span> private static final Pattern ALPHA_NUMERIC = Pattern.compile("[a-zA-Z0-9\\%\\=\\&]*");<a name="line.42"></a>
+<span class="sourceLineNo">041</span> // Alphanumeric characters, plus percent (url-encoding), equals, ampersand, dot and hyphen<a name="line.41"></a>
+<span class="sourceLineNo">042</span> private static final Pattern ALPHA_NUMERIC = Pattern.compile("[a-zA-Z0-9%=&.\\-]*");<a name="line.42"></a>
<span class="sourceLineNo">043</span><a name="line.43"></a>
<span class="sourceLineNo">044</span> @Override<a name="line.44"></a>
<span class="sourceLineNo">045</span> protected void doGet(final HttpServletRequest req, final HttpServletResponse resp)<a name="line.45"></a>
diff --git a/downloads.html b/downloads.html
index 48e900a..31554c2 100644
--- a/downloads.html
+++ b/downloads.html
@@ -418,7 +418,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/export_control.html b/export_control.html
index 217f7bf..39845d5 100644
--- a/export_control.html
+++ b/export_control.html
@@ -180,7 +180,7 @@ for more details.</p>
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/index.html b/index.html
index a7cbaf3..a4226e8 100644
--- a/index.html
+++ b/index.html
@@ -258,7 +258,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/issue-tracking.html b/issue-tracking.html
index dfdb81f..a593991 100644
--- a/issue-tracking.html
+++ b/issue-tracking.html
@@ -152,7 +152,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/mail-lists.html b/mail-lists.html
index ab9ba02..be2c30c 100644
--- a/mail-lists.html
+++ b/mail-lists.html
@@ -205,7 +205,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/metrics.html b/metrics.html
index 55b2d96..c330450 100644
--- a/metrics.html
+++ b/metrics.html
@@ -308,7 +308,7 @@ export HBASE_REGIONSERVER_OPTS="$HBASE_JMX_OPTS -Dcom.sun.management.jmxrem
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/old_news.html b/old_news.html
index f10830d..b5220b3 100644
--- a/old_news.html
+++ b/old_news.html
@@ -299,7 +299,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/plugin-management.html b/plugin-management.html
index 07bd093..240c687 100644
--- a/plugin-management.html
+++ b/plugin-management.html
@@ -304,7 +304,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/plugins.html b/plugins.html
index e7ce988..ea9a206 100644
--- a/plugins.html
+++ b/plugins.html
@@ -231,7 +231,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/poweredbyhbase.html b/poweredbyhbase.html
index 3d90517..04ed157 100644
--- a/poweredbyhbase.html
+++ b/poweredbyhbase.html
@@ -618,7 +618,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/project-info.html b/project-info.html
index bb4787c..d5ca0bc 100644
--- a/project-info.html
+++ b/project-info.html
@@ -193,7 +193,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/project-reports.html b/project-reports.html
index 234fa40..ca8d411 100644
--- a/project-reports.html
+++ b/project-reports.html
@@ -169,7 +169,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/project-summary.html b/project-summary.html
index ae6703f..d837912 100644
--- a/project-summary.html
+++ b/project-summary.html
@@ -195,7 +195,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/pseudo-distributed.html b/pseudo-distributed.html
index 38a9ea7..8fe90c4 100644
--- a/pseudo-distributed.html
+++ b/pseudo-distributed.html
@@ -157,7 +157,7 @@ Running Apache HBase (TM) in pseudo-distributed mode
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/replication.html b/replication.html
index 537fe99..ab8a28c 100644
--- a/replication.html
+++ b/replication.html
@@ -152,7 +152,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/resources.html b/resources.html
index 24a5ffb..9c80e05 100644
--- a/resources.html
+++ b/resources.html
@@ -180,7 +180,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/source-repository.html b/source-repository.html
index 5dd1461..a8387b0 100644
--- a/source-repository.html
+++ b/source-repository.html
@@ -163,7 +163,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/sponsors.html b/sponsors.html
index ef3d005..5769bcd 100644
--- a/sponsors.html
+++ b/sponsors.html
@@ -182,7 +182,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/supportingprojects.html b/supportingprojects.html
index 5b091c6..0f6ec3b 100644
--- a/supportingprojects.html
+++ b/supportingprojects.html
@@ -373,7 +373,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/team-list.html b/team-list.html
index 8e92078..3fe6978 100644
--- a/team-list.html
+++ b/team-list.html
@@ -672,7 +672,7 @@
<div class="row">
<p>Copyright ©2007–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-08</li>
+All rights reserved. <li id="publishDate" class="pull-right">Last Published: 2020-01-09</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/testdevapidocs/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html b/testdevapidocs/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html
index 5ef0b50..8b52058 100644
--- a/testdevapidocs/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html
+++ b/testdevapidocs/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html
@@ -109,7 +109,7 @@ var activeTableTab = "activeTableTab";
<li class="blockList">
<hr>
<br>
-<pre>public class <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.98">TestSnapshotFromMaster</a>
+<pre>public class <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.97">TestSnapshotFromMaster</a>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Test the master-related aspects of a snapshot</div>
</li>
@@ -317,7 +317,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>CLASS_RULE</h4>
-<pre>public static final <a href="../../../../../../org/apache/hadoop/hbase/HBaseClassTestRule.html" title="class in org.apache.hadoop.hbase">HBaseClassTestRule</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.101">CLASS_RULE</a></pre>
+<pre>public static final <a href="../../../../../../org/apache/hadoop/hbase/HBaseClassTestRule.html" title="class in org.apache.hadoop.hbase">HBaseClassTestRule</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.100">CLASS_RULE</a></pre>
</li>
</ul>
<a name="LOG">
@@ -326,7 +326,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>LOG</h4>
-<pre>private static final org.slf4j.Logger <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.104">LOG</a></pre>
+<pre>private static final org.slf4j.Logger <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.103">LOG</a></pre>
</li>
</ul>
<a name="UTIL">
@@ -335,7 +335,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>UTIL</h4>
-<pre>private static final <a href="../../../../../../org/apache/hadoop/hbase/HBaseTestingUtility.html" title="class in org.apache.hadoop.hbase">HBaseTestingUtility</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.105">UTIL</a></pre>
+<pre>private static final <a href="../../../../../../org/apache/hadoop/hbase/HBaseTestingUtility.html" title="class in org.apache.hadoop.hbase">HBaseTestingUtility</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.104">UTIL</a></pre>
</li>
</ul>
<a name="NUM_RS">
@@ -344,7 +344,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>NUM_RS</h4>
-<pre>private static final int <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.106">NUM_RS</a></pre>
+<pre>private static final int <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.105">NUM_RS</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.master.cleaner.TestSnapshotFromMaster.NUM_RS">Constant Field Values</a></dd>
@@ -357,7 +357,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>rootDir</h4>
-<pre>private static org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.107">rootDir</a></pre>
+<pre>private static org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.106">rootDir</a></pre>
</li>
</ul>
<a name="fs">
@@ -366,7 +366,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>fs</h4>
-<pre>private static org.apache.hadoop.fs.FileSystem <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.108">fs</a></pre>
+<pre>private static org.apache.hadoop.fs.FileSystem <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.107">fs</a></pre>
</li>
</ul>
<a name="master">
@@ -375,7 +375,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>master</h4>
-<pre>private static org.apache.hadoop.hbase.master.HMaster <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.109">master</a></pre>
+<pre>private static org.apache.hadoop.hbase.master.HMaster <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.108">master</a></pre>
</li>
</ul>
<a name="archiveDir">
@@ -384,7 +384,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>archiveDir</h4>
-<pre>private static org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.112">archiveDir</a></pre>
+<pre>private static org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.111">archiveDir</a></pre>
</li>
</ul>
<a name="TEST_FAM">
@@ -393,7 +393,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>TEST_FAM</h4>
-<pre>private static final byte[] <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.113">TEST_FAM</a></pre>
+<pre>private static final byte[] <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.112">TEST_FAM</a></pre>
</li>
</ul>
<a name="TABLE_NAME">
@@ -402,7 +402,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>TABLE_NAME</h4>
-<pre>private static final org.apache.hadoop.hbase.TableName <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.114">TABLE_NAME</a></pre>
+<pre>private static final org.apache.hadoop.hbase.TableName <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.113">TABLE_NAME</a></pre>
</li>
</ul>
<a name="cacheRefreshPeriod">
@@ -411,7 +411,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>cacheRefreshPeriod</h4>
-<pre>private static final long <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.117">cacheRefreshPeriod</a></pre>
+<pre>private static final long <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.116">cacheRefreshPeriod</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.master.cleaner.TestSnapshotFromMaster.cacheRefreshPeriod">Constant Field Values</a></dd>
@@ -424,7 +424,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockListLast">
<li class="blockList">
<h4>blockingStoreFiles</h4>
-<pre>private static final int <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.118">blockingStoreFiles</a></pre>
+<pre>private static final int <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.117">blockingStoreFiles</a></pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#org.apache.hadoop.hbase.master.cleaner.TestSnapshotFromMaster.blockingStoreFiles">Constant Field Values</a></dd>
@@ -445,7 +445,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockListLast">
<li class="blockList">
<h4>TestSnapshotFromMaster</h4>
-<pre>public <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.98">TestSnapshotFromMaster</a>()</pre>
+<pre>public <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.97">TestSnapshotFromMaster</a>()</pre>
</li>
</ul>
</li>
@@ -462,7 +462,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>setupCluster</h4>
-<pre>public static void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.124">setupCluster</a>()
+<pre>public static void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.123">setupCluster</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Setup the config for the cluster</div>
<dl>
@@ -477,7 +477,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>setupConf</h4>
-<pre>private static void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.133">setupConf</a>(org.apache.hadoop.conf.Configuration conf)</pre>
+<pre>private static void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.132">setupConf</a>(org.apache.hadoop.conf.Configuration conf)</pre>
</li>
</ul>
<a name="setup--">
@@ -486,7 +486,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>setup</h4>
-<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.158">setup</a>()
+<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.157">setup</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -500,7 +500,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>tearDown</h4>
-<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.164">tearDown</a>()
+<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.163">tearDown</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -514,7 +514,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>cleanupTest</h4>
-<pre>public static void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.171">cleanupTest</a>()
+<pre>public static void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.170">cleanupTest</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -528,7 +528,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>testIsDoneContract</h4>
-<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.189">testIsDoneContract</a>()
+<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.188">testIsDoneContract</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Test that the contract from the master for checking on a snapshot are valid.
<p>
@@ -549,7 +549,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>testGetCompletedSnapshots</h4>
-<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.243">testGetCompletedSnapshots</a>()
+<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.242">testGetCompletedSnapshots</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -563,7 +563,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>testDeleteSnapshot</h4>
-<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.274">testDeleteSnapshot</a>()
+<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.273">testDeleteSnapshot</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -577,7 +577,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>testGetCompletedSnapshotsWithCleanup</h4>
-<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.296">testGetCompletedSnapshotsWithCleanup</a>()
+<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.295">testGetCompletedSnapshotsWithCleanup</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -591,7 +591,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>testGetCompletedSnapshotsWithoutCleanup</h4>
-<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.323">testGetCompletedSnapshotsWithoutCleanup</a>()
+<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.322">testGetCompletedSnapshotsWithoutCleanup</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -605,7 +605,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>testSnapshotCleanupStatus</h4>
-<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.350">testSnapshotCleanupStatus</a>()
+<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.349">testSnapshotCleanupStatus</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -619,7 +619,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>testSnapshotHFileArchiving</h4>
-<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.384">testSnapshotHFileArchiving</a>()
+<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.383">testSnapshotHFileArchiving</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Test that the snapshot hfile archive cleaner works correctly. HFiles that are in snapshots
should be retained, while those that are not in a snapshot should be deleted.</div>
@@ -635,7 +635,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>getHFiles</h4>
-<pre>private final <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><<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="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.503">getHFiles</a>(org.apache.hadoop.fs.Path dir,
+<pre>private final <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><<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="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.502">getHFiles</a>(org.apache.hadoop.fs.Path dir,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.hbase.TableName 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>
@@ -653,7 +653,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>ensureHFileCleanersRun</h4>
-<pre>private static void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.511">ensureHFileCleanersRun</a>()</pre>
+<pre>private static void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.510">ensureHFileCleanersRun</a>()</pre>
<div class="block">Make sure the <code>HFileCleaners</code> run at least once</div>
</li>
</ul>
@@ -663,7 +663,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>createSnapshot</h4>
-<pre>private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.515">createSnapshot</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> snapshotName)
+<pre>private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.514">createSnapshot</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> snapshotName)
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>
@@ -677,7 +677,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockList">
<li class="blockList">
<h4>createSnapshotWithTtl</h4>
-<pre>private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.524">createSnapshotWithTtl</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> snapshotName,
+<pre>private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.523">createSnapshotWithTtl</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> snapshotName,
long ttl)
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>
@@ -692,7 +692,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
<ul class="blockListLast">
<li class="blockList">
<h4>testAsyncSnapshotWillNotBlockSnapshotHFileCleaner</h4>
-<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.535">testAsyncSnapshotWillNotBlockSnapshotHFileCleaner</a>()
+<pre>public void <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html#line.534">testAsyncSnapshotWillNotBlockSnapshotHFileCleaner</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
diff --git a/testdevapidocs/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html b/testdevapidocs/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html
index de5916c..fbc53cb 100644
--- a/testdevapidocs/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html
+++ b/testdevapidocs/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html
@@ -114,7 +114,7 @@ var activeTableTab = "activeTableTab";
<li class="blockList">
<hr>
<br>
-<pre>public class <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.60">TestRSGroupsKillRS</a>
+<pre>public class <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.61">TestRSGroupsKillRS</a>
extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.html" title="class in org.apache.hadoop.hbase.rsgroup">TestRSGroupsBase</a></pre>
</li>
</ul>
@@ -264,7 +264,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase
<ul class="blockList">
<li class="blockList">
<h4>CLASS_RULE</h4>
-<pre>public static final <a href="../../../../../org/apache/hadoop/hbase/HBaseClassTestRule.html" title="class in org.apache.hadoop.hbase">HBaseClassTestRule</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.63">CLASS_RULE</a></pre>
+<pre>public static final <a href="../../../../../org/apache/hadoop/hbase/HBaseClassTestRule.html" title="class in org.apache.hadoop.hbase">HBaseClassTestRule</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.64">CLASS_RULE</a></pre>
</li>
</ul>
<a name="LOG">
@@ -273,7 +273,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase
<ul class="blockListLast">
<li class="blockList">
<h4>LOG</h4>
-<pre>protected static final org.slf4j.Logger <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.66">LOG</a></pre>
+<pre>protected static final org.slf4j.Logger <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.67">LOG</a></pre>
</li>
</ul>
</li>
@@ -290,7 +290,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase
<ul class="blockListLast">
<li class="blockList">
<h4>TestRSGroupsKillRS</h4>
-<pre>public <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.60">TestRSGroupsKillRS</a>()</pre>
+<pre>public <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.61">TestRSGroupsKillRS</a>()</pre>
</li>
</ul>
</li>
@@ -307,7 +307,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase
<ul class="blockList">
<li class="blockList">
<h4>setUp</h4>
-<pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.69">setUp</a>()
+<pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.70">setUp</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -321,7 +321,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase
<ul class="blockList">
<li class="blockList">
<h4>tearDown</h4>
-<pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.74">tearDown</a>()
+<pre>public static void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.75">tearDown</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -335,7 +335,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase
<ul class="blockList">
<li class="blockList">
<h4>beforeMethod</h4>
-<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.79">beforeMethod</a>()
+<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.80">beforeMethod</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -349,7 +349,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase
<ul class="blockList">
<li class="blockList">
<h4>afterMethod</h4>
-<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.84">afterMethod</a>()
+<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.85">afterMethod</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -363,7 +363,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase
<ul class="blockList">
<li class="blockList">
<h4>testKillRS</h4>
-<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.89">testKillRS</a>()
+<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.90">testKillRS</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -377,7 +377,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase
<ul class="blockList">
<li class="blockList">
<h4>testKillAllRSInGroup</h4>
-<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.153">testKillAllRSInGroup</a>()
+<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.154">testKillAllRSInGroup</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -391,7 +391,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase
<ul class="blockList">
<li class="blockList">
<h4>testLowerMetaGroupVersion</h4>
-<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.233">testLowerMetaGroupVersion</a>()
+<pre>public void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.234">testLowerMetaGroupVersion</a>()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
@@ -405,7 +405,7 @@ extends <a href="../../../../../org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase
<ul class="blockListLast">
<li class="blockList">
<h4>setFinalStatic</h4>
-<pre>private static void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.274">setFinalStatic</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a> field,
+<pre>private static void <a href="../../../../../src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html#line.276">setFinalStatic</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</a> field,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> newValue)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<dl>
diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/http/TestProfileOutputServlet.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/http/TestProfileOutputServlet.html
index 7aa04d1..4983818 100644
--- a/testdevapidocs/src-html/org/apache/hadoop/hbase/http/TestProfileOutputServlet.html
+++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/http/TestProfileOutputServlet.html
@@ -45,22 +45,23 @@
<span class="sourceLineNo">037</span><a name="line.37"></a>
<span class="sourceLineNo">038</span> @Test<a name="line.38"></a>
<span class="sourceLineNo">039</span> public void testSanitization() {<a name="line.39"></a>
-<span class="sourceLineNo">040</span> List<String> good = Arrays.asList("abcd", "key=value", "key1=value&key2=value2", "");<a name="line.40"></a>
-<span class="sourceLineNo">041</span> for (String input : good) {<a name="line.41"></a>
-<span class="sourceLineNo">042</span> assertEquals(input, ProfileOutputServlet.sanitize(input));<a name="line.42"></a>
-<span class="sourceLineNo">043</span> }<a name="line.43"></a>
-<span class="sourceLineNo">044</span> List<String> bad = Arrays.asList("function(){console.log(\"oops\")}", "<strong>uhoh</strong>");<a name="line.44"></a>
-<span class="sourceLineNo">045</span> for (String input : bad) {<a name="line.45"></a>
-<span class="sourceLineNo">046</span> try {<a name="line.46"></a>
-<span class="sourceLineNo">047</span> ProfileOutputServlet.sanitize(input);<a name="line.47"></a>
-<span class="sourceLineNo">048</span> fail("Expected sanitization of \"" + input + "\" to fail");<a name="line.48"></a>
-<span class="sourceLineNo">049</span> } catch (RuntimeException e) {<a name="line.49"></a>
-<span class="sourceLineNo">050</span> // Pass<a name="line.50"></a>
-<span class="sourceLineNo">051</span> }<a name="line.51"></a>
-<span class="sourceLineNo">052</span> }<a name="line.52"></a>
-<span class="sourceLineNo">053</span> }<a name="line.53"></a>
-<span class="sourceLineNo">054</span><a name="line.54"></a>
-<span class="sourceLineNo">055</span>}<a name="line.55"></a>
+<span class="sourceLineNo">040</span> List<String> good = Arrays.asList("abcd", "key=value", "key1=value&key2=value2", "",<a name="line.40"></a>
+<span class="sourceLineNo">041</span> "host=host-1.example.com");<a name="line.41"></a>
+<span class="sourceLineNo">042</span> for (String input : good) {<a name="line.42"></a>
+<span class="sourceLineNo">043</span> assertEquals(input, ProfileOutputServlet.sanitize(input));<a name="line.43"></a>
+<span class="sourceLineNo">044</span> }<a name="line.44"></a>
+<span class="sourceLineNo">045</span> List<String> bad = Arrays.asList("function(){console.log(\"oops\")}", "<strong>uhoh</strong>");<a name="line.45"></a>
+<span class="sourceLineNo">046</span> for (String input : bad) {<a name="line.46"></a>
+<span class="sourceLineNo">047</span> try {<a name="line.47"></a>
+<span class="sourceLineNo">048</span> ProfileOutputServlet.sanitize(input);<a name="line.48"></a>
+<span class="sourceLineNo">049</span> fail("Expected sanitization of \"" + input + "\" to fail");<a name="line.49"></a>
+<span class="sourceLineNo">050</span> } catch (RuntimeException e) {<a name="line.50"></a>
+<span class="sourceLineNo">051</span> // Pass<a name="line.51"></a>
+<span class="sourceLineNo">052</span> }<a name="line.52"></a>
+<span class="sourceLineNo">053</span> }<a name="line.53"></a>
+<span class="sourceLineNo">054</span> }<a name="line.54"></a>
+<span class="sourceLineNo">055</span><a name="line.55"></a>
+<span class="sourceLineNo">056</span>}<a name="line.56"></a>
diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html
index d7e1cf0..5facb62 100644
--- a/testdevapidocs/src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html
+++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.html
@@ -26,538 +26,535 @@
<span class="sourceLineNo">018</span>package org.apache.hadoop.hbase.master.cleaner;<a name="line.18"></a>
<span class="sourceLineNo">019</span><a name="line.19"></a>
<span class="sourceLineNo">020</span>import static org.junit.Assert.assertEquals;<a name="line.20"></a>
-<span class="sourceLineNo">021</span>import static org.junit.Assert.assertFalse;<a name="line.21"></a>
-<span class="sourceLineNo">022</span>import static org.junit.Assert.assertTrue;<a name="line.22"></a>
-<span class="sourceLineNo">023</span>import static org.junit.Assert.fail;<a name="line.23"></a>
-<span class="sourceLineNo">024</span><a name="line.24"></a>
-<span class="sourceLineNo">025</span>import java.io.IOException;<a name="line.25"></a>
-<span class="sourceLineNo">026</span>import java.util.Collection;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import java.util.List;<a name="line.27"></a>
-<span class="sourceLineNo">028</span>import java.util.Set;<a name="line.28"></a>
-<span class="sourceLineNo">029</span>import java.util.concurrent.Future;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import java.util.concurrent.TimeUnit;<a name="line.30"></a>
-<span class="sourceLineNo">031</span>import java.util.regex.Pattern;<a name="line.31"></a>
-<span class="sourceLineNo">032</span><a name="line.32"></a>
-<span class="sourceLineNo">033</span>import org.apache.hadoop.conf.Configuration;<a name="line.33"></a>
-<span class="sourceLineNo">034</span>import org.apache.hadoop.fs.FileSystem;<a name="line.34"></a>
-<span class="sourceLineNo">035</span>import org.apache.hadoop.fs.Path;<a name="line.35"></a>
-<span class="sourceLineNo">036</span>import org.apache.hadoop.hbase.HBaseClassTestRule;<a name="line.36"></a>
-<span class="sourceLineNo">037</span>import org.apache.hadoop.hbase.HBaseTestingUtility;<a name="line.37"></a>
-<span class="sourceLineNo">038</span>import org.apache.hadoop.hbase.HConstants;<a name="line.38"></a>
-<span class="sourceLineNo">039</span>import org.apache.hadoop.hbase.TableName;<a name="line.39"></a>
-<span class="sourceLineNo">040</span>import org.apache.hadoop.hbase.Waiter;<a name="line.40"></a>
-<span class="sourceLineNo">041</span>import org.apache.hadoop.hbase.client.Admin;<a name="line.41"></a>
-<span class="sourceLineNo">042</span>import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;<a name="line.42"></a>
-<span class="sourceLineNo">043</span>import org.apache.hadoop.hbase.client.Put;<a name="line.43"></a>
-<span class="sourceLineNo">044</span>import org.apache.hadoop.hbase.client.SnapshotType;<a name="line.44"></a>
-<span class="sourceLineNo">045</span>import org.apache.hadoop.hbase.client.Table;<a name="line.45"></a>
-<span class="sourceLineNo">046</span>import org.apache.hadoop.hbase.client.TableDescriptor;<a name="line.46"></a>
-<span class="sourceLineNo">047</span>import org.apache.hadoop.hbase.client.TableDescriptorBuilder;<a name="line.47"></a>
-<span class="sourceLineNo">048</span>import org.apache.hadoop.hbase.master.HMaster;<a name="line.48"></a>
-<span class="sourceLineNo">049</span>import org.apache.hadoop.hbase.master.snapshot.DisabledTableSnapshotHandler;<a name="line.49"></a>
-<span class="sourceLineNo">050</span>import org.apache.hadoop.hbase.master.snapshot.SnapshotHFileCleaner;<a name="line.50"></a>
-<span class="sourceLineNo">051</span>import org.apache.hadoop.hbase.master.snapshot.SnapshotManager;<a name="line.51"></a>
-<span class="sourceLineNo">052</span>import org.apache.hadoop.hbase.regionserver.CompactedHFilesDischarger;<a name="line.52"></a>
-<span class="sourceLineNo">053</span>import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy;<a name="line.53"></a>
-<span class="sourceLineNo">054</span>import org.apache.hadoop.hbase.regionserver.HRegion;<a name="line.54"></a>
-<span class="sourceLineNo">055</span>import org.apache.hadoop.hbase.regionserver.HRegionServer;<a name="line.55"></a>
-<span class="sourceLineNo">056</span>import org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils;<a name="line.56"></a>
-<span class="sourceLineNo">057</span>import org.apache.hadoop.hbase.snapshot.SnapshotReferenceUtil;<a name="line.57"></a>
-<span class="sourceLineNo">058</span>import org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils;<a name="line.58"></a>
-<span class="sourceLineNo">059</span>import org.apache.hadoop.hbase.snapshot.UnknownSnapshotException;<a name="line.59"></a>
-<span class="sourceLineNo">060</span>import org.apache.hadoop.hbase.testclassification.MasterTests;<a name="line.60"></a>
-<span class="sourceLineNo">061</span>import org.apache.hadoop.hbase.testclassification.MediumTests;<a name="line.61"></a>
-<span class="sourceLineNo">062</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.62"></a>
-<span class="sourceLineNo">063</span>import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;<a name="line.63"></a>
-<span class="sourceLineNo">064</span>import org.apache.hadoop.hbase.util.FSUtils;<a name="line.64"></a>
-<span class="sourceLineNo">065</span>import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread;<a name="line.65"></a>
-<span class="sourceLineNo">066</span>import org.junit.After;<a name="line.66"></a>
-<span class="sourceLineNo">067</span>import org.junit.AfterClass;<a name="line.67"></a>
-<span class="sourceLineNo">068</span>import org.junit.Assert;<a name="line.68"></a>
-<span class="sourceLineNo">069</span>import org.junit.Before;<a name="line.69"></a>
-<span class="sourceLineNo">070</span>import org.junit.BeforeClass;<a name="line.70"></a>
-<span class="sourceLineNo">071</span>import org.junit.ClassRule;<a name="line.71"></a>
-<span class="sourceLineNo">072</span>import org.junit.Test;<a name="line.72"></a>
-<span class="sourceLineNo">073</span>import org.junit.experimental.categories.Category;<a name="line.73"></a>
-<span class="sourceLineNo">074</span>import org.mockito.Mockito;<a name="line.74"></a>
-<span class="sourceLineNo">075</span>import org.slf4j.Logger;<a name="line.75"></a>
-<span class="sourceLineNo">076</span>import org.slf4j.LoggerFactory;<a name="line.76"></a>
-<span class="sourceLineNo">077</span><a name="line.77"></a>
-<span class="sourceLineNo">078</span>import org.apache.hbase.thirdparty.com.google.common.collect.Lists;<a name="line.78"></a>
-<span class="sourceLineNo">079</span>import org.apache.hbase.thirdparty.com.google.common.util.concurrent.Uninterruptibles;<a name="line.79"></a>
-<span class="sourceLineNo">080</span><a name="line.80"></a>
-<span class="sourceLineNo">081</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.DeleteSnapshotRequest;<a name="line.81"></a>
-<span class="sourceLineNo">082</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetCompletedSnapshotsRequest;<a name="line.82"></a>
-<span class="sourceLineNo">083</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetCompletedSnapshotsResponse;<a name="line.83"></a>
-<span class="sourceLineNo">084</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos<a name="line.84"></a>
-<span class="sourceLineNo">085</span> .IsSnapshotCleanupEnabledRequest;<a name="line.85"></a>
-<span class="sourceLineNo">086</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos<a name="line.86"></a>
-<span class="sourceLineNo">087</span> .IsSnapshotCleanupEnabledResponse;<a name="line.87"></a>
-<span class="sourceLineNo">088</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsSnapshotDoneRequest;<a name="line.88"></a>
-<span class="sourceLineNo">089</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsSnapshotDoneResponse;<a name="line.89"></a>
-<span class="sourceLineNo">090</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos<a name="line.90"></a>
-<span class="sourceLineNo">091</span> .SetSnapshotCleanupRequest;<a name="line.91"></a>
-<span class="sourceLineNo">092</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription;<a name="line.92"></a>
-<span class="sourceLineNo">093</span><a name="line.93"></a>
-<span class="sourceLineNo">094</span>/**<a name="line.94"></a>
-<span class="sourceLineNo">095</span> * Test the master-related aspects of a snapshot<a name="line.95"></a>
-<span class="sourceLineNo">096</span> */<a name="line.96"></a>
-<span class="sourceLineNo">097</span>@Category({MasterTests.class, MediumTests.class})<a name="line.97"></a>
-<span class="sourceLineNo">098</span>public class TestSnapshotFromMaster {<a name="line.98"></a>
-<span class="sourceLineNo">099</span><a name="line.99"></a>
-<span class="sourceLineNo">100</span> @ClassRule<a name="line.100"></a>
-<span class="sourceLineNo">101</span> public static final HBaseClassTestRule CLASS_RULE =<a name="line.101"></a>
-<span class="sourceLineNo">102</span> HBaseClassTestRule.forClass(TestSnapshotFromMaster.class);<a name="line.102"></a>
-<span class="sourceLineNo">103</span><a name="line.103"></a>
-<span class="sourceLineNo">104</span> private static final Logger LOG = LoggerFactory.getLogger(TestSnapshotFromMaster.class);<a name="line.104"></a>
-<span class="sourceLineNo">105</span> private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();<a name="line.105"></a>
-<span class="sourceLineNo">106</span> private static final int NUM_RS = 2;<a name="line.106"></a>
-<span class="sourceLineNo">107</span> private static Path rootDir;<a name="line.107"></a>
-<span class="sourceLineNo">108</span> private static FileSystem fs;<a name="line.108"></a>
-<span class="sourceLineNo">109</span> private static HMaster master;<a name="line.109"></a>
-<span class="sourceLineNo">110</span><a name="line.110"></a>
-<span class="sourceLineNo">111</span> // for hfile archiving test.<a name="line.111"></a>
-<span class="sourceLineNo">112</span> private static Path archiveDir;<a name="line.112"></a>
-<span class="sourceLineNo">113</span> private static final byte[] TEST_FAM = Bytes.toBytes("fam");<a name="line.113"></a>
-<span class="sourceLineNo">114</span> private static final TableName TABLE_NAME =<a name="line.114"></a>
-<span class="sourceLineNo">115</span> TableName.valueOf("test");<a name="line.115"></a>
-<span class="sourceLineNo">116</span> // refresh the cache every 1/2 second<a name="line.116"></a>
-<span class="sourceLineNo">117</span> private static final long cacheRefreshPeriod = 500;<a name="line.117"></a>
-<span class="sourceLineNo">118</span> private static final int blockingStoreFiles = 12;<a name="line.118"></a>
-<span class="sourceLineNo">119</span><a name="line.119"></a>
-<span class="sourceLineNo">120</span> /**<a name="line.120"></a>
-<span class="sourceLineNo">121</span> * Setup the config for the cluster<a name="line.121"></a>
-<span class="sourceLineNo">122</span> */<a name="line.122"></a>
-<span class="sourceLineNo">123</span> @BeforeClass<a name="line.123"></a>
-<span class="sourceLineNo">124</span> public static void setupCluster() throws Exception {<a name="line.124"></a>
-<span class="sourceLineNo">125</span> setupConf(UTIL.getConfiguration());<a name="line.125"></a>
-<span class="sourceLineNo">126</span> UTIL.startMiniCluster(NUM_RS);<a name="line.126"></a>
-<span class="sourceLineNo">127</span> fs = UTIL.getDFSCluster().getFileSystem();<a name="line.127"></a>
-<span class="sourceLineNo">128</span> master = UTIL.getMiniHBaseCluster().getMaster();<a name="line.128"></a>
-<span class="sourceLineNo">129</span> rootDir = master.getMasterFileSystem().getRootDir();<a name="line.129"></a>
-<span class="sourceLineNo">130</span> archiveDir = new Path(rootDir, HConstants.HFILE_ARCHIVE_DIRECTORY);<a name="line.130"></a>
-<span class="sourceLineNo">131</span> }<a name="line.131"></a>
-<span class="sourceLineNo">132</span><a name="line.132"></a>
-<span class="sourceLineNo">133</span> private static void setupConf(Configuration conf) {<a name="line.133"></a>
-<span class="sourceLineNo">134</span> // disable the ui<a name="line.134"></a>
-<span class="sourceLineNo">135</span> conf.setInt("hbase.regionsever.info.port", -1);<a name="line.135"></a>
-<span class="sourceLineNo">136</span> // change the flush size to a small amount, regulating number of store files<a name="line.136"></a>
-<span class="sourceLineNo">137</span> conf.setInt("hbase.hregion.memstore.flush.size", 25000);<a name="line.137"></a>
-<span class="sourceLineNo">138</span> // so make sure we get a compaction when doing a load, but keep around some<a name="line.138"></a>
-<span class="sourceLineNo">139</span> // files in the store<a name="line.139"></a>
-<span class="sourceLineNo">140</span> conf.setInt("hbase.hstore.compaction.min", 2);<a name="line.140"></a>
-<span class="sourceLineNo">141</span> conf.setInt("hbase.hstore.compactionThreshold", 5);<a name="line.141"></a>
-<span class="sourceLineNo">142</span> // block writes if we get to 12 store files<a name="line.142"></a>
-<span class="sourceLineNo">143</span> conf.setInt("hbase.hstore.blockingStoreFiles", blockingStoreFiles);<a name="line.143"></a>
-<span class="sourceLineNo">144</span> // Ensure no extra cleaners on by default (e.g. TimeToLiveHFileCleaner)<a name="line.144"></a>
-<span class="sourceLineNo">145</span> conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS, "");<a name="line.145"></a>
-<span class="sourceLineNo">146</span> conf.set(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS, "");<a name="line.146"></a>
-<span class="sourceLineNo">147</span> // Enable snapshot<a name="line.147"></a>
-<span class="sourceLineNo">148</span> conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);<a name="line.148"></a>
-<span class="sourceLineNo">149</span> conf.setLong(SnapshotManager.HBASE_SNAPSHOT_SENTINELS_CLEANUP_TIMEOUT_MILLIS, 3 * 1000L);<a name="line.149"></a>
-<span class="sourceLineNo">150</span> conf.setLong(SnapshotHFileCleaner.HFILE_CACHE_REFRESH_PERIOD_CONF_KEY, cacheRefreshPeriod);<a name="line.150"></a>
-<span class="sourceLineNo">151</span> conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,<a name="line.151"></a>
-<span class="sourceLineNo">152</span> ConstantSizeRegionSplitPolicy.class.getName());<a name="line.152"></a>
-<span class="sourceLineNo">153</span> conf.setInt("hbase.hfile.compactions.cleaner.interval", 20 * 1000);<a name="line.153"></a>
-<span class="sourceLineNo">154</span> conf.setInt("hbase.master.cleaner.snapshot.interval", 500);<a name="line.154"></a>
-<span class="sourceLineNo">155</span> }<a name="line.155"></a>
-<span class="sourceLineNo">156</span><a name="line.156"></a>
-<span class="sourceLineNo">157</span> @Before<a name="line.157"></a>
-<span class="sourceLineNo">158</span> public void setup() throws Exception {<a name="line.158"></a>
-<span class="sourceLineNo">159</span> UTIL.createTable(TABLE_NAME, TEST_FAM);<a name="line.159"></a>
-<span class="sourceLineNo">160</span> master.getSnapshotManager().setSnapshotHandlerForTesting(TABLE_NAME, null);<a name="line.160"></a>
-<span class="sourceLineNo">161</span> }<a name="line.161"></a>
-<span class="sourceLineNo">162</span><a name="line.162"></a>
-<span class="sourceLineNo">163</span> @After<a name="line.163"></a>
-<span class="sourceLineNo">164</span> public void tearDown() throws Exception {<a name="line.164"></a>
-<span class="sourceLineNo">165</span> UTIL.deleteTable(TABLE_NAME);<a name="line.165"></a>
-<span class="sourceLineNo">166</span> SnapshotTestingUtils.deleteAllSnapshots(UTIL.getAdmin());<a name="line.166"></a>
-<span class="sourceLineNo">167</span> SnapshotTestingUtils.deleteArchiveDirectory(UTIL);<a name="line.167"></a>
-<span class="sourceLineNo">168</span> }<a name="line.168"></a>
-<span class="sourceLineNo">169</span><a name="line.169"></a>
-<span class="sourceLineNo">170</span> @AfterClass<a name="line.170"></a>
-<span class="sourceLineNo">171</span> public static void cleanupTest() throws Exception {<a name="line.171"></a>
-<span class="sourceLineNo">172</span> try {<a name="line.172"></a>
-<span class="sourceLineNo">173</span> UTIL.shutdownMiniCluster();<a name="line.173"></a>
-<span class="sourceLineNo">174</span> } catch (Exception e) {<a name="line.174"></a>
-<span class="sourceLineNo">175</span> // NOOP;<a name="line.175"></a>
-<span class="sourceLineNo">176</span> }<a name="line.176"></a>
-<span class="sourceLineNo">177</span> }<a name="line.177"></a>
-<span class="sourceLineNo">178</span><a name="line.178"></a>
-<span class="sourceLineNo">179</span> /**<a name="line.179"></a>
-<span class="sourceLineNo">180</span> * Test that the contract from the master for checking on a snapshot are valid.<a name="line.180"></a>
-<span class="sourceLineNo">181</span> * <p><a name="line.181"></a>
-<span class="sourceLineNo">182</span> * <ol><a name="line.182"></a>
-<span class="sourceLineNo">183</span> * <li>If a snapshot fails with an error, we expect to get the source error.</li><a name="line.183"></a>
-<span class="sourceLineNo">184</span> * <li>If there is no snapshot name supplied, we should get an error.</li><a name="line.184"></a>
-<span class="sourceLineNo">185</span> * <li>If asking about a snapshot has hasn't occurred, you should get an error.</li><a name="line.185"></a>
-<span class="sourceLineNo">186</span> * </ol><a name="line.186"></a>
-<span class="sourceLineNo">187</span> */<a name="line.187"></a>
-<span class="sourceLineNo">188</span> @Test<a name="line.188"></a>
-<span class="sourceLineNo">189</span> public void testIsDoneContract() throws Exception {<a name="line.189"></a>
-<span class="sourceLineNo">190</span><a name="line.190"></a>
-<span class="sourceLineNo">191</span> IsSnapshotDoneRequest.Builder builder = IsSnapshotDoneRequest.newBuilder();<a name="line.191"></a>
-<span class="sourceLineNo">192</span><a name="line.192"></a>
-<span class="sourceLineNo">193</span> String snapshotName = "asyncExpectedFailureTest";<a name="line.193"></a>
-<span class="sourceLineNo">194</span><a name="line.194"></a>
-<span class="sourceLineNo">195</span> // check that we get an exception when looking up snapshot where one hasn't happened<a name="line.195"></a>
-<span class="sourceLineNo">196</span> SnapshotTestingUtils.expectSnapshotDoneException(master, builder.build(),<a name="line.196"></a>
-<span class="sourceLineNo">197</span> UnknownSnapshotException.class);<a name="line.197"></a>
-<span class="sourceLineNo">198</span><a name="line.198"></a>
-<span class="sourceLineNo">199</span> // and that we get the same issue, even if we specify a name<a name="line.199"></a>
-<span class="sourceLineNo">200</span> SnapshotDescription desc = SnapshotDescription.newBuilder()<a name="line.200"></a>
-<span class="sourceLineNo">201</span> .setName(snapshotName).setTable(TABLE_NAME.getNameAsString()).build();<a name="line.201"></a>
-<span class="sourceLineNo">202</span> builder.setSnapshot(desc);<a name="line.202"></a>
-<span class="sourceLineNo">203</span> SnapshotTestingUtils.expectSnapshotDoneException(master, builder.build(),<a name="line.203"></a>
-<span class="sourceLineNo">204</span> UnknownSnapshotException.class);<a name="line.204"></a>
-<span class="sourceLineNo">205</span><a name="line.205"></a>
-<span class="sourceLineNo">206</span> // set a mock handler to simulate a snapshot<a name="line.206"></a>
-<span class="sourceLineNo">207</span> DisabledTableSnapshotHandler mockHandler = Mockito.mock(DisabledTableSnapshotHandler.class);<a name="line.207"></a>
-<span class="sourceLineNo">208</span> Mockito.when(mockHandler.getException()).thenReturn(null);<a name="line.208"></a>
-<span class="sourceLineNo">209</span> Mockito.when(mockHandler.getSnapshot()).thenReturn(desc);<a name="line.209"></a>
-<span class="sourceLineNo">210</span> Mockito.when(mockHandler.isFinished()).thenReturn(Boolean.TRUE);<a name="line.210"></a>
-<span class="sourceLineNo">211</span> Mockito.when(mockHandler.getCompletionTimestamp())<a name="line.211"></a>
-<span class="sourceLineNo">212</span> .thenReturn(EnvironmentEdgeManager.currentTime());<a name="line.212"></a>
-<span class="sourceLineNo">213</span><a name="line.213"></a>
-<span class="sourceLineNo">214</span> master.getSnapshotManager()<a name="line.214"></a>
-<span class="sourceLineNo">215</span> .setSnapshotHandlerForTesting(TABLE_NAME, mockHandler);<a name="line.215"></a>
-<span class="sourceLineNo">216</span><a name="line.216"></a>
-<span class="sourceLineNo">217</span> // if we do a lookup without a snapshot name, we should fail - you should always know your name<a name="line.217"></a>
-<span class="sourceLineNo">218</span> builder = IsSnapshotDoneRequest.newBuilder();<a name="line.218"></a>
-<span class="sourceLineNo">219</span> SnapshotTestingUtils.expectSnapshotDoneException(master, builder.build(),<a name="line.219"></a>
-<span class="sourceLineNo">220</span> UnknownSnapshotException.class);<a name="line.220"></a>
-<span class="sourceLineNo">221</span><a name="line.221"></a>
-<span class="sourceLineNo">222</span> // then do the lookup for the snapshot that it is done<a name="line.222"></a>
-<span class="sourceLineNo">223</span> builder.setSnapshot(desc);<a name="line.223"></a>
-<span class="sourceLineNo">224</span> IsSnapshotDoneResponse response =<a name="line.224"></a>
-<span class="sourceLineNo">225</span> master.getMasterRpcServices().isSnapshotDone(null, builder.build());<a name="line.225"></a>
-<span class="sourceLineNo">226</span> assertTrue("Snapshot didn't complete when it should have.", response.getDone());<a name="line.226"></a>
-<span class="sourceLineNo">227</span><a name="line.227"></a>
-<span class="sourceLineNo">228</span> // now try the case where we are looking for a snapshot we didn't take<a name="line.228"></a>
-<span class="sourceLineNo">229</span> builder.setSnapshot(SnapshotDescription.newBuilder().setName("Not A Snapshot").build());<a name="line.229"></a>
-<span class="sourceLineNo">230</span> SnapshotTestingUtils.expectSnapshotDoneException(master, builder.build(),<a name="line.230"></a>
-<span class="sourceLineNo">231</span> UnknownSnapshotException.class);<a name="line.231"></a>
-<span class="sourceLineNo">232</span><a name="line.232"></a>
-<span class="sourceLineNo">233</span> // then create a snapshot to the fs and make sure that we can find it when checking done<a name="line.233"></a>
-<span class="sourceLineNo">234</span> snapshotName = "completed";<a name="line.234"></a>
-<span class="sourceLineNo">235</span> desc = createSnapshot(snapshotName);<a name="line.235"></a>
-<span class="sourceLineNo">236</span><a name="line.236"></a>
-<span class="sourceLineNo">237</span> builder.setSnapshot(desc);<a name="line.237"></a>
-<span class="sourceLineNo">238</span> response = master.getMasterRpcServices().isSnapshotDone(null, builder.build());<a name="line.238"></a>
-<span class="sourceLineNo">239</span> assertTrue("Completed, on-disk snapshot not found", response.getDone());<a name="line.239"></a>
-<span class="sourceLineNo">240</span> }<a name="line.240"></a>
-<span class="sourceLineNo">241</span><a name="line.241"></a>
-<span class="sourceLineNo">242</span> @Test<a name="line.242"></a>
-<span class="sourceLineNo">243</span> public void testGetCompletedSnapshots() throws Exception {<a name="line.243"></a>
-<span class="sourceLineNo">244</span> // first check when there are no snapshots<a name="line.244"></a>
-<span class="sourceLineNo">245</span> GetCompletedSnapshotsRequest request = GetCompletedSnapshotsRequest.newBuilder().build();<a name="line.245"></a>
-<span class="sourceLineNo">246</span> GetCompletedSnapshotsResponse response =<a name="line.246"></a>
-<span class="sourceLineNo">247</span> master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.247"></a>
-<span class="sourceLineNo">248</span> assertEquals("Found unexpected number of snapshots", 0, response.getSnapshotsCount());<a name="line.248"></a>
-<span class="sourceLineNo">249</span><a name="line.249"></a>
-<span class="sourceLineNo">250</span> // write one snapshot to the fs<a name="line.250"></a>
-<span class="sourceLineNo">251</span> String snapshotName = "completed";<a name="line.251"></a>
-<span class="sourceLineNo">252</span> SnapshotDescription snapshot = createSnapshot(snapshotName);<a name="line.252"></a>
-<span class="sourceLineNo">253</span><a name="line.253"></a>
-<span class="sourceLineNo">254</span> // check that we get one snapshot<a name="line.254"></a>
-<span class="sourceLineNo">255</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.255"></a>
-<span class="sourceLineNo">256</span> assertEquals("Found unexpected number of snapshots", 1, response.getSnapshotsCount());<a name="line.256"></a>
-<span class="sourceLineNo">257</span> List<SnapshotDescription> snapshots = response.getSnapshotsList();<a name="line.257"></a>
-<span class="sourceLineNo">258</span> List<SnapshotDescription> expected = Lists.newArrayList(snapshot);<a name="line.258"></a>
-<span class="sourceLineNo">259</span> assertEquals("Returned snapshots don't match created snapshots", expected, snapshots);<a name="line.259"></a>
-<span class="sourceLineNo">260</span><a name="line.260"></a>
-<span class="sourceLineNo">261</span> // write a second snapshot<a name="line.261"></a>
-<span class="sourceLineNo">262</span> snapshotName = "completed_two";<a name="line.262"></a>
-<span class="sourceLineNo">263</span> snapshot = createSnapshot(snapshotName);<a name="line.263"></a>
-<span class="sourceLineNo">264</span> expected.add(snapshot);<a name="line.264"></a>
-<span class="sourceLineNo">265</span><a name="line.265"></a>
-<span class="sourceLineNo">266</span> // check that we get one snapshot<a name="line.266"></a>
-<span class="sourceLineNo">267</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.267"></a>
-<span class="sourceLineNo">268</span> assertEquals("Found unexpected number of snapshots", 2, response.getSnapshotsCount());<a name="line.268"></a>
-<span class="sourceLineNo">269</span> snapshots = response.getSnapshotsList();<a name="line.269"></a>
-<span class="sourceLineNo">270</span> assertEquals("Returned snapshots don't match created snapshots", expected, snapshots);<a name="line.270"></a>
-<span class="sourceLineNo">271</span> }<a name="line.271"></a>
-<span class="sourceLineNo">272</span><a name="line.272"></a>
-<span class="sourceLineNo">273</span> @Test<a name="line.273"></a>
-<span class="sourceLineNo">274</span> public void testDeleteSnapshot() throws Exception {<a name="line.274"></a>
-<span class="sourceLineNo">275</span><a name="line.275"></a>
-<span class="sourceLineNo">276</span> String snapshotName = "completed";<a name="line.276"></a>
-<span class="sourceLineNo">277</span> SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName(snapshotName).build();<a name="line.277"></a>
-<span class="sourceLineNo">278</span><a name="line.278"></a>
-<span class="sourceLineNo">279</span> DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder().setSnapshot(snapshot)<a name="line.279"></a>
-<span class="sourceLineNo">280</span> .build();<a name="line.280"></a>
-<span class="sourceLineNo">281</span> try {<a name="line.281"></a>
-<span class="sourceLineNo">282</span> master.getMasterRpcServices().deleteSnapshot(null, request);<a name="line.282"></a>
-<span class="sourceLineNo">283</span> fail("Master didn't throw exception when attempting to delete snapshot that doesn't exist");<a name="line.283"></a>
-<span class="sourceLineNo">284</span> } catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException e) {<a name="line.284"></a>
-<span class="sourceLineNo">285</span> // Expected<a name="line.285"></a>
-<span class="sourceLineNo">286</span> }<a name="line.286"></a>
-<span class="sourceLineNo">287</span><a name="line.287"></a>
-<span class="sourceLineNo">288</span> // write one snapshot to the fs<a name="line.288"></a>
-<span class="sourceLineNo">289</span> createSnapshot(snapshotName);<a name="line.289"></a>
-<span class="sourceLineNo">290</span><a name="line.290"></a>
-<span class="sourceLineNo">291</span> // then delete the existing snapshot,which shouldn't cause an exception to be thrown<a name="line.291"></a>
-<span class="sourceLineNo">292</span> master.getMasterRpcServices().deleteSnapshot(null, request);<a name="line.292"></a>
-<span class="sourceLineNo">293</span> }<a name="line.293"></a>
-<span class="sourceLineNo">294</span><a name="line.294"></a>
-<span class="sourceLineNo">295</span> @Test<a name="line.295"></a>
-<span class="sourceLineNo">296</span> public void testGetCompletedSnapshotsWithCleanup() throws Exception {<a name="line.296"></a>
-<span class="sourceLineNo">297</span> // Enable auto snapshot cleanup for the cluster<a name="line.297"></a>
-<span class="sourceLineNo">298</span> SetSnapshotCleanupRequest setSnapshotCleanupRequest =<a name="line.298"></a>
-<span class="sourceLineNo">299</span> SetSnapshotCleanupRequest.newBuilder().setEnabled(true).build();<a name="line.299"></a>
-<span class="sourceLineNo">300</span> master.getMasterRpcServices().switchSnapshotCleanup(null, setSnapshotCleanupRequest);<a name="line.300"></a>
-<span class="sourceLineNo">301</span><a name="line.301"></a>
-<span class="sourceLineNo">302</span> // first check when there are no snapshots<a name="line.302"></a>
-<span class="sourceLineNo">303</span> GetCompletedSnapshotsRequest request = GetCompletedSnapshotsRequest.newBuilder().build();<a name="line.303"></a>
-<span class="sourceLineNo">304</span> GetCompletedSnapshotsResponse response =<a name="line.304"></a>
-<span class="sourceLineNo">305</span> master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.305"></a>
-<span class="sourceLineNo">306</span> assertEquals("Found unexpected number of snapshots", 0, response.getSnapshotsCount());<a name="line.306"></a>
-<span class="sourceLineNo">307</span><a name="line.307"></a>
-<span class="sourceLineNo">308</span> // write one snapshot to the fs<a name="line.308"></a>
-<span class="sourceLineNo">309</span> createSnapshotWithTtl("snapshot_01", 1L);<a name="line.309"></a>
-<span class="sourceLineNo">310</span> createSnapshotWithTtl("snapshot_02", 10L);<a name="line.310"></a>
-<span class="sourceLineNo">311</span><a name="line.311"></a>
-<span class="sourceLineNo">312</span> // check that we get one snapshot<a name="line.312"></a>
-<span class="sourceLineNo">313</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.313"></a>
-<span class="sourceLineNo">314</span> assertEquals("Found unexpected number of snapshots", 2, response.getSnapshotsCount());<a name="line.314"></a>
-<span class="sourceLineNo">315</span><a name="line.315"></a>
-<span class="sourceLineNo">316</span> // check that 1 snapshot is auto cleaned after 1 sec of TTL expiration<a name="line.316"></a>
-<span class="sourceLineNo">317</span> Uninterruptibles.sleepUninterruptibly(2, TimeUnit.SECONDS);<a name="line.317"></a>
-<span class="sourceLineNo">318</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.318"></a>
-<span class="sourceLineNo">319</span> assertEquals("Found unexpected number of snapshots", 1, response.getSnapshotsCount());<a name="line.319"></a>
-<span class="sourceLineNo">320</span> }<a name="line.320"></a>
-<span class="sourceLineNo">321</span><a name="line.321"></a>
-<span class="sourceLineNo">322</span> @Test<a name="line.322"></a>
-<span class="sourceLineNo">323</span> public void testGetCompletedSnapshotsWithoutCleanup() throws Exception {<a name="line.323"></a>
-<span class="sourceLineNo">324</span> // Disable auto snapshot cleanup for the cluster<a name="line.324"></a>
-<span class="sourceLineNo">325</span> SetSnapshotCleanupRequest setSnapshotCleanupRequest =<a name="line.325"></a>
-<span class="sourceLineNo">326</span> SetSnapshotCleanupRequest.newBuilder().setEnabled(false).build();<a name="line.326"></a>
-<span class="sourceLineNo">327</span> master.getMasterRpcServices().switchSnapshotCleanup(null, setSnapshotCleanupRequest);<a name="line.327"></a>
-<span class="sourceLineNo">328</span><a name="line.328"></a>
-<span class="sourceLineNo">329</span> // first check when there are no snapshots<a name="line.329"></a>
-<span class="sourceLineNo">330</span> GetCompletedSnapshotsRequest request = GetCompletedSnapshotsRequest.newBuilder().build();<a name="line.330"></a>
-<span class="sourceLineNo">331</span> GetCompletedSnapshotsResponse response =<a name="line.331"></a>
-<span class="sourceLineNo">332</span> master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.332"></a>
-<span class="sourceLineNo">333</span> assertEquals("Found unexpected number of snapshots", 0, response.getSnapshotsCount());<a name="line.333"></a>
-<span class="sourceLineNo">334</span><a name="line.334"></a>
-<span class="sourceLineNo">335</span> // write one snapshot to the fs<a name="line.335"></a>
-<span class="sourceLineNo">336</span> createSnapshotWithTtl("snapshot_02", 1L);<a name="line.336"></a>
-<span class="sourceLineNo">337</span> createSnapshotWithTtl("snapshot_03", 1L);<a name="line.337"></a>
-<span class="sourceLineNo">338</span><a name="line.338"></a>
-<span class="sourceLineNo">339</span> // check that we get one snapshot<a name="line.339"></a>
-<span class="sourceLineNo">340</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.340"></a>
-<span class="sourceLineNo">341</span> assertEquals("Found unexpected number of snapshots", 2, response.getSnapshotsCount());<a name="line.341"></a>
-<span class="sourceLineNo">342</span><a name="line.342"></a>
-<span class="sourceLineNo">343</span> // check that no snapshot is auto cleaned even after 1 sec of TTL expiration<a name="line.343"></a>
-<span class="sourceLineNo">344</span> Uninterruptibles.sleepUninterruptibly(2, TimeUnit.SECONDS);<a name="line.344"></a>
-<span class="sourceLineNo">345</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.345"></a>
-<span class="sourceLineNo">346</span> assertEquals("Found unexpected number of snapshots", 2, response.getSnapshotsCount());<a name="line.346"></a>
-<span class="sourceLineNo">347</span> }<a name="line.347"></a>
-<span class="sourceLineNo">348</span><a name="line.348"></a>
-<span class="sourceLineNo">349</span> @Test<a name="line.349"></a>
-<span class="sourceLineNo">350</span> public void testSnapshotCleanupStatus() throws Exception {<a name="line.350"></a>
-<span class="sourceLineNo">351</span> // Enable auto snapshot cleanup for the cluster<a name="line.351"></a>
-<span class="sourceLineNo">352</span> SetSnapshotCleanupRequest setSnapshotCleanupRequest =<a name="line.352"></a>
-<span class="sourceLineNo">353</span> SetSnapshotCleanupRequest.newBuilder().setEnabled(true).build();<a name="line.353"></a>
-<span class="sourceLineNo">354</span> master.getMasterRpcServices().switchSnapshotCleanup(null, setSnapshotCleanupRequest);<a name="line.354"></a>
-<span class="sourceLineNo">355</span><a name="line.355"></a>
-<span class="sourceLineNo">356</span> // Check if auto snapshot cleanup is enabled<a name="line.356"></a>
-<span class="sourceLineNo">357</span> IsSnapshotCleanupEnabledRequest isSnapshotCleanupEnabledRequest =<a name="line.357"></a>
-<span class="sourceLineNo">358</span> IsSnapshotCleanupEnabledRequest.newBuilder().build();<a name="line.358"></a>
-<span class="sourceLineNo">359</span> IsSnapshotCleanupEnabledResponse isSnapshotCleanupEnabledResponse =<a name="line.359"></a>
-<span class="sourceLineNo">360</span> master.getMasterRpcServices().isSnapshotCleanupEnabled(null,<a name="line.360"></a>
-<span class="sourceLineNo">361</span> isSnapshotCleanupEnabledRequest);<a name="line.361"></a>
-<span class="sourceLineNo">362</span> Assert.assertTrue(isSnapshotCleanupEnabledResponse.getEnabled());<a name="line.362"></a>
-<span class="sourceLineNo">363</span><a name="line.363"></a>
-<span class="sourceLineNo">364</span> // Disable auto snapshot cleanup for the cluster<a name="line.364"></a>
-<span class="sourceLineNo">365</span> setSnapshotCleanupRequest = SetSnapshotCleanupRequest.newBuilder()<a name="line.365"></a>
-<span class="sourceLineNo">366</span> .setEnabled(false).build();<a name="line.366"></a>
-<span class="sourceLineNo">367</span> master.getMasterRpcServices().switchSnapshotCleanup(null, setSnapshotCleanupRequest);<a name="line.367"></a>
-<span class="sourceLineNo">368</span><a name="line.368"></a>
-<span class="sourceLineNo">369</span> // Check if auto snapshot cleanup is disabled<a name="line.369"></a>
-<span class="sourceLineNo">370</span> isSnapshotCleanupEnabledRequest = IsSnapshotCleanupEnabledRequest<a name="line.370"></a>
-<span class="sourceLineNo">371</span> .newBuilder().build();<a name="line.371"></a>
-<span class="sourceLineNo">372</span> isSnapshotCleanupEnabledResponse =<a name="line.372"></a>
-<span class="sourceLineNo">373</span> master.getMasterRpcServices().isSnapshotCleanupEnabled(null,<a name="line.373"></a>
-<span class="sourceLineNo">374</span> isSnapshotCleanupEnabledRequest);<a name="line.374"></a>
-<span class="sourceLineNo">375</span> Assert.assertFalse(isSnapshotCleanupEnabledResponse.getEnabled());<a name="line.375"></a>
-<span class="sourceLineNo">376</span> }<a name="line.376"></a>
-<span class="sourceLineNo">377</span><a name="line.377"></a>
-<span class="sourceLineNo">378</span> /**<a name="line.378"></a>
-<span class="sourceLineNo">379</span> * Test that the snapshot hfile archive cleaner works correctly. HFiles that are in snapshots<a name="line.379"></a>
-<span class="sourceLineNo">380</span> * should be retained, while those that are not in a snapshot should be deleted.<a name="line.380"></a>
-<span class="sourceLineNo">381</span> * @throws Exception on failure<a name="line.381"></a>
-<span class="sourceLineNo">382</span> */<a name="line.382"></a>
-<span class="sourceLineNo">383</span> @Test<a name="line.383"></a>
-<span class="sourceLineNo">384</span> public void testSnapshotHFileArchiving() throws Exception {<a name="line.384"></a>
-<span class="sourceLineNo">385</span> Admin admin = UTIL.getAdmin();<a name="line.385"></a>
-<span class="sourceLineNo">386</span> // make sure we don't fail on listing snapshots<a name="line.386"></a>
-<span class="sourceLineNo">387</span> SnapshotTestingUtils.assertNoSnapshots(admin);<a name="line.387"></a>
-<span class="sourceLineNo">388</span><a name="line.388"></a>
-<span class="sourceLineNo">389</span> // recreate test table with disabled compactions; otherwise compaction may happen before<a name="line.389"></a>
-<span class="sourceLineNo">390</span> // snapshot, the call after snapshot will be a no-op and checks will fail<a name="line.390"></a>
-<span class="sourceLineNo">391</span> UTIL.deleteTable(TABLE_NAME);<a name="line.391"></a>
-<span class="sourceLineNo">392</span> TableDescriptor td = TableDescriptorBuilder.newBuilder(TABLE_NAME)<a name="line.392"></a>
-<span class="sourceLineNo">393</span> .setColumnFamily(ColumnFamilyDescriptorBuilder.of(TEST_FAM))<a name="line.393"></a>
-<span class="sourceLineNo">394</span> .setCompactionEnabled(false)<a name="line.394"></a>
-<span class="sourceLineNo">395</span> .build();<a name="line.395"></a>
-<span class="sourceLineNo">396</span> UTIL.getAdmin().createTable(td);<a name="line.396"></a>
-<span class="sourceLineNo">397</span><a name="line.397"></a>
-<span class="sourceLineNo">398</span> // load the table<a name="line.398"></a>
-<span class="sourceLineNo">399</span> for (int i = 0; i < blockingStoreFiles / 2; i ++) {<a name="line.399"></a>
-<span class="sourceLineNo">400</span> UTIL.loadTable(UTIL.getConnection().getTable(TABLE_NAME), TEST_FAM);<a name="line.400"></a>
-<span class="sourceLineNo">401</span> UTIL.flush(TABLE_NAME);<a name="line.401"></a>
-<span class="sourceLineNo">402</span> }<a name="line.402"></a>
-<span class="sourceLineNo">403</span><a name="line.403"></a>
-<span class="sourceLineNo">404</span> // disable the table so we can take a snapshot<a name="line.404"></a>
-<span class="sourceLineNo">405</span> admin.disableTable(TABLE_NAME);<a name="line.405"></a>
-<span class="sourceLineNo">406</span><a name="line.406"></a>
-<span class="sourceLineNo">407</span> // take a snapshot of the table<a name="line.407"></a>
-<span class="sourceLineNo">408</span> String snapshotName = "snapshot";<a name="line.408"></a>
-<span class="sourceLineNo">409</span> String snapshotNameBytes = snapshotName;<a name="line.409"></a>
-<span class="sourceLineNo">410</span> admin.snapshot(snapshotName, TABLE_NAME);<a name="line.410"></a>
-<span class="sourceLineNo">411</span><a name="line.411"></a>
-<span class="sourceLineNo">412</span> LOG.info("After snapshot File-System state");<a name="line.412"></a>
-<span class="sourceLineNo">413</span> FSUtils.logFileSystemState(fs, rootDir, LOG);<a name="line.413"></a>
-<span class="sourceLineNo">414</span><a name="line.414"></a>
-<span class="sourceLineNo">415</span> // ensure we only have one snapshot<a name="line.415"></a>
-<span class="sourceLineNo">416</span> SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshotNameBytes, TABLE_NAME);<a name="line.416"></a>
-<span class="sourceLineNo">417</span><a name="line.417"></a>
-<span class="sourceLineNo">418</span> td = TableDescriptorBuilder.newBuilder(td)<a name="line.418"></a>
-<span class="sourceLineNo">419</span> .setCompactionEnabled(true)<a name="line.419"></a>
-<span class="sourceLineNo">420</span> .build();<a name="line.420"></a>
-<span class="sourceLineNo">421</span> // enable compactions now<a name="line.421"></a>
-<span class="sourceLineNo">422</span> admin.modifyTable(td);<a name="line.422"></a>
-<span class="sourceLineNo">423</span><a name="line.423"></a>
-<span class="sourceLineNo">424</span> // renable the table so we can compact the regions<a name="line.424"></a>
-<span class="sourceLineNo">425</span> admin.enableTable(TABLE_NAME);<a name="line.425"></a>
-<span class="sourceLineNo">426</span><a name="line.426"></a>
-<span class="sourceLineNo">427</span> // compact the files so we get some archived files for the table we just snapshotted<a name="line.427"></a>
-<span class="sourceLineNo">428</span> List<HRegion> regions = UTIL.getHBaseCluster().getRegions(TABLE_NAME);<a name="line.428"></a>
-<span class="sourceLineNo">429</span> for (HRegion region : regions) {<a name="line.429"></a>
-<span class="sourceLineNo">430</span> region.waitForFlushesAndCompactions(); // enable can trigger a compaction, wait for it.<a name="line.430"></a>
-<span class="sourceLineNo">431</span> region.compactStores(); // min is 2 so will compact and archive<a name="line.431"></a>
-<span class="sourceLineNo">432</span> }<a name="line.432"></a>
-<span class="sourceLineNo">433</span> List<RegionServerThread> regionServerThreads = UTIL.getMiniHBaseCluster()<a name="line.433"></a>
-<span class="sourceLineNo">434</span> .getRegionServerThreads();<a name="line.434"></a>
-<span class="sourceLineNo">435</span> HRegionServer hrs = null;<a name="line.435"></a>
-<span class="sourceLineNo">436</span> for (RegionServerThread rs : regionServerThreads) {<a name="line.436"></a>
-<span class="sourceLineNo">437</span> if (!rs.getRegionServer().getRegions(TABLE_NAME).isEmpty()) {<a name="line.437"></a>
-<span class="sourceLineNo">438</span> hrs = rs.getRegionServer();<a name="line.438"></a>
-<span class="sourceLineNo">439</span> break;<a name="line.439"></a>
-<span class="sourceLineNo">440</span> }<a name="line.440"></a>
-<span class="sourceLineNo">441</span> }<a name="line.441"></a>
-<span class="sourceLineNo">442</span> CompactedHFilesDischarger cleaner = new CompactedHFilesDischarger(100, null, hrs, false);<a name="line.442"></a>
-<span class="sourceLineNo">443</span> cleaner.chore();<a name="line.443"></a>
-<span class="sourceLineNo">444</span> LOG.info("After compaction File-System state");<a name="line.444"></a>
-<span class="sourceLineNo">445</span> FSUtils.logFileSystemState(fs, rootDir, LOG);<a name="line.445"></a>
-<span class="sourceLineNo">446</span><a name="line.446"></a>
-<span class="sourceLineNo">447</span> // make sure the cleaner has run<a name="line.447"></a>
-<span class="sourceLineNo">448</span> LOG.debug("Running hfile cleaners");<a name="line.448"></a>
-<span class="sourceLineNo">449</span> ensureHFileCleanersRun();<a name="line.449"></a>
-<span class="sourceLineNo">450</span> LOG.info("After cleaners File-System state: " + rootDir);<a name="line.450"></a>
-<span class="sourceLineNo">451</span> FSUtils.logFileSystemState(fs, rootDir, LOG);<a name="line.451"></a>
-<span class="sourceLineNo">452</span><a name="line.452"></a>
-<span class="sourceLineNo">453</span> // get the snapshot files for the table<a name="line.453"></a>
-<span class="sourceLineNo">454</span> Path snapshotTable = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshotName, rootDir);<a name="line.454"></a>
-<span class="sourceLineNo">455</span> Set<String> snapshotHFiles = SnapshotReferenceUtil.getHFileNames(<a name="line.455"></a>
-<span class="sourceLineNo">456</span> UTIL.getConfiguration(), fs, snapshotTable);<a name="line.456"></a>
-<span class="sourceLineNo">457</span> // check that the files in the archive contain the ones that we need for the snapshot<a name="line.457"></a>
-<span class="sourceLineNo">458</span> LOG.debug("Have snapshot hfiles:");<a name="line.458"></a>
-<span class="sourceLineNo">459</span> for (String fileName : snapshotHFiles) {<a name="line.459"></a>
-<span class="sourceLineNo">460</span> LOG.debug(fileName);<a name="line.460"></a>
-<span class="sourceLineNo">461</span> }<a name="line.461"></a>
-<span class="sourceLineNo">462</span> // get the archived files for the table<a name="line.462"></a>
-<span class="sourceLineNo">463</span> Collection<String> archives = getHFiles(archiveDir, fs, TABLE_NAME);<a name="line.463"></a>
-<span class="sourceLineNo">464</span><a name="line.464"></a>
-<span class="sourceLineNo">465</span> // get the hfiles for the table<a name="line.465"></a>
-<span class="sourceLineNo">466</span> Collection<String> hfiles = getHFiles(rootDir, fs, TABLE_NAME);<a name="line.466"></a>
-<span class="sourceLineNo">467</span><a name="line.467"></a>
-<span class="sourceLineNo">468</span> // and make sure that there is a proper subset<a name="line.468"></a>
-<span class="sourceLineNo">469</span> for (String fileName : snapshotHFiles) {<a name="line.469"></a>
-<span class="sourceLineNo">470</span> boolean exist = archives.contains(fileName) || hfiles.contains(fileName);<a name="line.470"></a>
-<span class="sourceLineNo">471</span> assertTrue("Archived hfiles " + archives<a name="line.471"></a>
-<span class="sourceLineNo">472</span> + " and table hfiles " + hfiles + " is missing snapshot file:" + fileName, exist);<a name="line.472"></a>
-<span class="sourceLineNo">473</span> }<a name="line.473"></a>
-<span class="sourceLineNo">474</span><a name="line.474"></a>
-<span class="sourceLineNo">475</span> // delete the existing snapshot<a name="line.475"></a>
-<span class="sourceLineNo">476</span> admin.deleteSnapshot(snapshotNameBytes);<a name="line.476"></a>
-<span class="sourceLineNo">477</span> SnapshotTestingUtils.assertNoSnapshots(admin);<a name="line.477"></a>
-<span class="sourceLineNo">478</span><a name="line.478"></a>
-<span class="sourceLineNo">479</span> // make sure that we don't keep around the hfiles that aren't in a snapshot<a name="line.479"></a>
-<span class="sourceLineNo">480</span> // make sure we wait long enough to refresh the snapshot hfile<a name="line.480"></a>
-<span class="sourceLineNo">481</span> List<BaseHFileCleanerDelegate> delegates = UTIL.getMiniHBaseCluster().getMaster()<a name="line.481"></a>
-<span class="sourceLineNo">482</span> .getHFileCleaner().cleanersChain;<a name="line.482"></a>
-<span class="sourceLineNo">483</span> for (BaseHFileCleanerDelegate delegate: delegates) {<a name="line.483"></a>
-<span class="sourceLineNo">484</span> if (delegate instanceof SnapshotHFileCleaner) {<a name="line.484"></a>
-<span class="sourceLineNo">485</span> ((SnapshotHFileCleaner)delegate).getFileCacheForTesting().triggerCacheRefreshForTesting();<a name="line.485"></a>
-<span class="sourceLineNo">486</span> }<a name="line.486"></a>
-<span class="sourceLineNo">487</span> }<a name="line.487"></a>
-<span class="sourceLineNo">488</span> // run the cleaner again<a name="line.488"></a>
-<span class="sourceLineNo">489</span> LOG.debug("Running hfile cleaners");<a name="line.489"></a>
-<span class="sourceLineNo">490</span> ensureHFileCleanersRun();<a name="line.490"></a>
-<span class="sourceLineNo">491</span> LOG.info("After delete snapshot cleaners run File-System state");<a name="line.491"></a>
-<span class="sourceLineNo">492</span> FSUtils.logFileSystemState(fs, rootDir, LOG);<a name="line.492"></a>
-<span class="sourceLineNo">493</span><a name="line.493"></a>
-<span class="sourceLineNo">494</span> archives = getHFiles(archiveDir, fs, TABLE_NAME);<a name="line.494"></a>
-<span class="sourceLineNo">495</span> assertEquals("Still have some hfiles in the archive, when their snapshot has been deleted.", 0,<a name="line.495"></a>
-<span class="sourceLineNo">496</span> archives.size());<a name="line.496"></a>
-<span class="sourceLineNo">497</span> }<a name="line.497"></a>
-<span class="sourceLineNo">498</span><a name="line.498"></a>
-<span class="sourceLineNo">499</span> /**<a name="line.499"></a>
-<span class="sourceLineNo">500</span> * @return all the HFiles for a given table in the specified dir<a name="line.500"></a>
-<span class="sourceLineNo">501</span> * @throws IOException on expected failure<a name="line.501"></a>
-<span class="sourceLineNo">502</span> */<a name="line.502"></a>
-<span class="sourceLineNo">503</span> private final Collection<String> getHFiles(Path dir, FileSystem fs, TableName tableName) throws IOException {<a name="line.503"></a>
-<span class="sourceLineNo">504</span> Path tableDir = FSUtils.getTableDir(dir, tableName);<a name="line.504"></a>
-<span class="sourceLineNo">505</span> return SnapshotTestingUtils.listHFileNames(fs, tableDir);<a name="line.505"></a>
-<span class="sourceLineNo">506</span> }<a name="line.506"></a>
-<span class="sourceLineNo">507</span><a name="line.507"></a>
-<span class="sourceLineNo">508</span> /**<a name="line.508"></a>
-<span class="sourceLineNo">509</span> * Make sure the {@link HFileCleaner HFileCleaners} run at least once<a name="line.509"></a>
-<span class="sourceLineNo">510</span> */<a name="line.510"></a>
-<span class="sourceLineNo">511</span> private static void ensureHFileCleanersRun() {<a name="line.511"></a>
-<span class="sourceLineNo">512</span> UTIL.getHBaseCluster().getMaster().getHFileCleaner().chore();<a name="line.512"></a>
-<span class="sourceLineNo">513</span> }<a name="line.513"></a>
-<span class="sourceLineNo">514</span><a name="line.514"></a>
-<span class="sourceLineNo">515</span> private SnapshotDescription createSnapshot(final String snapshotName) throws IOException {<a name="line.515"></a>
-<span class="sourceLineNo">516</span> SnapshotTestingUtils.SnapshotMock snapshotMock =<a name="line.516"></a>
-<span class="sourceLineNo">517</span> new SnapshotTestingUtils.SnapshotMock(UTIL.getConfiguration(), fs, rootDir);<a name="line.517"></a>
-<span class="sourceLineNo">518</span> SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder =<a name="line.518"></a>
-<span class="sourceLineNo">519</span> snapshotMock.createSnapshotV2(snapshotName, "test", 0);<a name="line.519"></a>
-<span class="sourceLineNo">520</span> builder.commit();<a name="line.520"></a>
-<span class="sourceLineNo">521</span> return builder.getSnapshotDescription();<a name="line.521"></a>
-<span class="sourceLineNo">522</span> }<a name="line.522"></a>
-<span class="sourceLineNo">523</span><a name="line.523"></a>
-<span class="sourceLineNo">524</span> private SnapshotDescription createSnapshotWithTtl(final String snapshotName, final long ttl)<a name="line.524"></a>
-<span class="sourceLineNo">525</span> throws IOException {<a name="line.525"></a>
-<span class="sourceLineNo">526</span> SnapshotTestingUtils.SnapshotMock snapshotMock =<a name="line.526"></a>
-<span class="sourceLineNo">527</span> new SnapshotTestingUtils.SnapshotMock(UTIL.getConfiguration(), fs, rootDir);<a name="line.527"></a>
-<span class="sourceLineNo">528</span> SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder =<a name="line.528"></a>
-<span class="sourceLineNo">529</span> snapshotMock.createSnapshotV2(snapshotName, "test", 0, ttl);<a name="line.529"></a>
-<span class="sourceLineNo">530</span> builder.commit();<a name="line.530"></a>
-<span class="sourceLineNo">531</span> return builder.getSnapshotDescription();<a name="line.531"></a>
-<span class="sourceLineNo">532</span> }<a name="line.532"></a>
-<span class="sourceLineNo">533</span><a name="line.533"></a>
-<span class="sourceLineNo">534</span> @Test<a name="line.534"></a>
-<span class="sourceLineNo">535</span> public void testAsyncSnapshotWillNotBlockSnapshotHFileCleaner() throws Exception {<a name="line.535"></a>
-<span class="sourceLineNo">536</span> // Write some data<a name="line.536"></a>
-<span class="sourceLineNo">537</span> Table table = UTIL.getConnection().getTable(TABLE_NAME);<a name="line.537"></a>
-<span class="sourceLineNo">538</span> for (int i = 0; i < 10; i++) {<a name="line.538"></a>
-<span class="sourceLineNo">539</span> Put put = new Put(Bytes.toBytes(i)).addColumn(TEST_FAM, Bytes.toBytes("q"), Bytes.toBytes(i));<a name="line.539"></a>
-<span class="sourceLineNo">540</span> table.put(put);<a name="line.540"></a>
-<span class="sourceLineNo">541</span> }<a name="line.541"></a>
-<span class="sourceLineNo">542</span> String snapshotName = "testAsyncSnapshotWillNotBlockSnapshotHFileCleaner01";<a name="line.542"></a>
-<span class="sourceLineNo">543</span> Future<Void> future =<a name="line.543"></a>
-<span class="sourceLineNo">544</span> UTIL.getAdmin().snapshotAsync(new org.apache.hadoop.hbase.client.SnapshotDescription(<a name="line.544"></a>
-<span class="sourceLineNo">545</span> snapshotName, TABLE_NAME, SnapshotType.FLUSH));<a name="line.545"></a>
-<span class="sourceLineNo">546</span> Waiter.waitFor(UTIL.getConfiguration(), 10 * 1000L, 200L,<a name="line.546"></a>
-<span class="sourceLineNo">547</span> () -> UTIL.getAdmin().listSnapshots(Pattern.compile(snapshotName)).size() == 1);<a name="line.547"></a>
-<span class="sourceLineNo">548</span> assertTrue(master.getSnapshotManager().isTakingAnySnapshot());<a name="line.548"></a>
-<span class="sourceLineNo">549</span> future.get();<a name="line.549"></a>
-<span class="sourceLineNo">550</span> assertFalse(master.getSnapshotManager().isTakingAnySnapshot());<a name="line.550"></a>
-<span class="sourceLineNo">551</span> }<a name="line.551"></a>
-<span class="sourceLineNo">552</span>}<a name="line.552"></a>
+<span class="sourceLineNo">021</span>import static org.junit.Assert.assertTrue;<a name="line.21"></a>
+<span class="sourceLineNo">022</span>import static org.junit.Assert.fail;<a name="line.22"></a>
+<span class="sourceLineNo">023</span><a name="line.23"></a>
+<span class="sourceLineNo">024</span>import java.io.IOException;<a name="line.24"></a>
+<span class="sourceLineNo">025</span>import java.util.Collection;<a name="line.25"></a>
+<span class="sourceLineNo">026</span>import java.util.List;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import java.util.Set;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import java.util.concurrent.Future;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import java.util.concurrent.TimeUnit;<a name="line.29"></a>
+<span class="sourceLineNo">030</span>import java.util.regex.Pattern;<a name="line.30"></a>
+<span class="sourceLineNo">031</span><a name="line.31"></a>
+<span class="sourceLineNo">032</span>import org.apache.hadoop.conf.Configuration;<a name="line.32"></a>
+<span class="sourceLineNo">033</span>import org.apache.hadoop.fs.FileSystem;<a name="line.33"></a>
+<span class="sourceLineNo">034</span>import org.apache.hadoop.fs.Path;<a name="line.34"></a>
+<span class="sourceLineNo">035</span>import org.apache.hadoop.hbase.HBaseClassTestRule;<a name="line.35"></a>
+<span class="sourceLineNo">036</span>import org.apache.hadoop.hbase.HBaseTestingUtility;<a name="line.36"></a>
+<span class="sourceLineNo">037</span>import org.apache.hadoop.hbase.HConstants;<a name="line.37"></a>
+<span class="sourceLineNo">038</span>import org.apache.hadoop.hbase.TableName;<a name="line.38"></a>
+<span class="sourceLineNo">039</span>import org.apache.hadoop.hbase.Waiter;<a name="line.39"></a>
+<span class="sourceLineNo">040</span>import org.apache.hadoop.hbase.client.Admin;<a name="line.40"></a>
+<span class="sourceLineNo">041</span>import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder;<a name="line.41"></a>
+<span class="sourceLineNo">042</span>import org.apache.hadoop.hbase.client.Put;<a name="line.42"></a>
+<span class="sourceLineNo">043</span>import org.apache.hadoop.hbase.client.SnapshotType;<a name="line.43"></a>
+<span class="sourceLineNo">044</span>import org.apache.hadoop.hbase.client.Table;<a name="line.44"></a>
+<span class="sourceLineNo">045</span>import org.apache.hadoop.hbase.client.TableDescriptor;<a name="line.45"></a>
+<span class="sourceLineNo">046</span>import org.apache.hadoop.hbase.client.TableDescriptorBuilder;<a name="line.46"></a>
+<span class="sourceLineNo">047</span>import org.apache.hadoop.hbase.master.HMaster;<a name="line.47"></a>
+<span class="sourceLineNo">048</span>import org.apache.hadoop.hbase.master.snapshot.DisabledTableSnapshotHandler;<a name="line.48"></a>
+<span class="sourceLineNo">049</span>import org.apache.hadoop.hbase.master.snapshot.SnapshotHFileCleaner;<a name="line.49"></a>
+<span class="sourceLineNo">050</span>import org.apache.hadoop.hbase.master.snapshot.SnapshotManager;<a name="line.50"></a>
+<span class="sourceLineNo">051</span>import org.apache.hadoop.hbase.regionserver.CompactedHFilesDischarger;<a name="line.51"></a>
+<span class="sourceLineNo">052</span>import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy;<a name="line.52"></a>
+<span class="sourceLineNo">053</span>import org.apache.hadoop.hbase.regionserver.HRegion;<a name="line.53"></a>
+<span class="sourceLineNo">054</span>import org.apache.hadoop.hbase.regionserver.HRegionServer;<a name="line.54"></a>
+<span class="sourceLineNo">055</span>import org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils;<a name="line.55"></a>
+<span class="sourceLineNo">056</span>import org.apache.hadoop.hbase.snapshot.SnapshotReferenceUtil;<a name="line.56"></a>
+<span class="sourceLineNo">057</span>import org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils;<a name="line.57"></a>
+<span class="sourceLineNo">058</span>import org.apache.hadoop.hbase.snapshot.UnknownSnapshotException;<a name="line.58"></a>
+<span class="sourceLineNo">059</span>import org.apache.hadoop.hbase.testclassification.MasterTests;<a name="line.59"></a>
+<span class="sourceLineNo">060</span>import org.apache.hadoop.hbase.testclassification.MediumTests;<a name="line.60"></a>
+<span class="sourceLineNo">061</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.61"></a>
+<span class="sourceLineNo">062</span>import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;<a name="line.62"></a>
+<span class="sourceLineNo">063</span>import org.apache.hadoop.hbase.util.FSUtils;<a name="line.63"></a>
+<span class="sourceLineNo">064</span>import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread;<a name="line.64"></a>
+<span class="sourceLineNo">065</span>import org.junit.After;<a name="line.65"></a>
+<span class="sourceLineNo">066</span>import org.junit.AfterClass;<a name="line.66"></a>
+<span class="sourceLineNo">067</span>import org.junit.Assert;<a name="line.67"></a>
+<span class="sourceLineNo">068</span>import org.junit.Before;<a name="line.68"></a>
+<span class="sourceLineNo">069</span>import org.junit.BeforeClass;<a name="line.69"></a>
+<span class="sourceLineNo">070</span>import org.junit.ClassRule;<a name="line.70"></a>
+<span class="sourceLineNo">071</span>import org.junit.Test;<a name="line.71"></a>
+<span class="sourceLineNo">072</span>import org.junit.experimental.categories.Category;<a name="line.72"></a>
+<span class="sourceLineNo">073</span>import org.mockito.Mockito;<a name="line.73"></a>
+<span class="sourceLineNo">074</span>import org.slf4j.Logger;<a name="line.74"></a>
+<span class="sourceLineNo">075</span>import org.slf4j.LoggerFactory;<a name="line.75"></a>
+<span class="sourceLineNo">076</span><a name="line.76"></a>
+<span class="sourceLineNo">077</span>import org.apache.hbase.thirdparty.com.google.common.collect.Lists;<a name="line.77"></a>
+<span class="sourceLineNo">078</span>import org.apache.hbase.thirdparty.com.google.common.util.concurrent.Uninterruptibles;<a name="line.78"></a>
+<span class="sourceLineNo">079</span><a name="line.79"></a>
+<span class="sourceLineNo">080</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.DeleteSnapshotRequest;<a name="line.80"></a>
+<span class="sourceLineNo">081</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetCompletedSnapshotsRequest;<a name="line.81"></a>
+<span class="sourceLineNo">082</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetCompletedSnapshotsResponse;<a name="line.82"></a>
+<span class="sourceLineNo">083</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos<a name="line.83"></a>
+<span class="sourceLineNo">084</span> .IsSnapshotCleanupEnabledRequest;<a name="line.84"></a>
+<span class="sourceLineNo">085</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos<a name="line.85"></a>
+<span class="sourceLineNo">086</span> .IsSnapshotCleanupEnabledResponse;<a name="line.86"></a>
+<span class="sourceLineNo">087</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsSnapshotDoneRequest;<a name="line.87"></a>
+<span class="sourceLineNo">088</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.IsSnapshotDoneResponse;<a name="line.88"></a>
+<span class="sourceLineNo">089</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos<a name="line.89"></a>
+<span class="sourceLineNo">090</span> .SetSnapshotCleanupRequest;<a name="line.90"></a>
+<span class="sourceLineNo">091</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription;<a name="line.91"></a>
+<span class="sourceLineNo">092</span><a name="line.92"></a>
+<span class="sourceLineNo">093</span>/**<a name="line.93"></a>
+<span class="sourceLineNo">094</span> * Test the master-related aspects of a snapshot<a name="line.94"></a>
+<span class="sourceLineNo">095</span> */<a name="line.95"></a>
+<span class="sourceLineNo">096</span>@Category({MasterTests.class, MediumTests.class})<a name="line.96"></a>
+<span class="sourceLineNo">097</span>public class TestSnapshotFromMaster {<a name="line.97"></a>
+<span class="sourceLineNo">098</span><a name="line.98"></a>
+<span class="sourceLineNo">099</span> @ClassRule<a name="line.99"></a>
+<span class="sourceLineNo">100</span> public static final HBaseClassTestRule CLASS_RULE =<a name="line.100"></a>
+<span class="sourceLineNo">101</span> HBaseClassTestRule.forClass(TestSnapshotFromMaster.class);<a name="line.101"></a>
+<span class="sourceLineNo">102</span><a name="line.102"></a>
+<span class="sourceLineNo">103</span> private static final Logger LOG = LoggerFactory.getLogger(TestSnapshotFromMaster.class);<a name="line.103"></a>
+<span class="sourceLineNo">104</span> private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();<a name="line.104"></a>
+<span class="sourceLineNo">105</span> private static final int NUM_RS = 2;<a name="line.105"></a>
+<span class="sourceLineNo">106</span> private static Path rootDir;<a name="line.106"></a>
+<span class="sourceLineNo">107</span> private static FileSystem fs;<a name="line.107"></a>
+<span class="sourceLineNo">108</span> private static HMaster master;<a name="line.108"></a>
+<span class="sourceLineNo">109</span><a name="line.109"></a>
+<span class="sourceLineNo">110</span> // for hfile archiving test.<a name="line.110"></a>
+<span class="sourceLineNo">111</span> private static Path archiveDir;<a name="line.111"></a>
+<span class="sourceLineNo">112</span> private static final byte[] TEST_FAM = Bytes.toBytes("fam");<a name="line.112"></a>
+<span class="sourceLineNo">113</span> private static final TableName TABLE_NAME =<a name="line.113"></a>
+<span class="sourceLineNo">114</span> TableName.valueOf("test");<a name="line.114"></a>
+<span class="sourceLineNo">115</span> // refresh the cache every 1/2 second<a name="line.115"></a>
+<span class="sourceLineNo">116</span> private static final long cacheRefreshPeriod = 500;<a name="line.116"></a>
+<span class="sourceLineNo">117</span> private static final int blockingStoreFiles = 12;<a name="line.117"></a>
+<span class="sourceLineNo">118</span><a name="line.118"></a>
+<span class="sourceLineNo">119</span> /**<a name="line.119"></a>
+<span class="sourceLineNo">120</span> * Setup the config for the cluster<a name="line.120"></a>
+<span class="sourceLineNo">121</span> */<a name="line.121"></a>
+<span class="sourceLineNo">122</span> @BeforeClass<a name="line.122"></a>
+<span class="sourceLineNo">123</span> public static void setupCluster() throws Exception {<a name="line.123"></a>
+<span class="sourceLineNo">124</span> setupConf(UTIL.getConfiguration());<a name="line.124"></a>
+<span class="sourceLineNo">125</span> UTIL.startMiniCluster(NUM_RS);<a name="line.125"></a>
+<span class="sourceLineNo">126</span> fs = UTIL.getDFSCluster().getFileSystem();<a name="line.126"></a>
+<span class="sourceLineNo">127</span> master = UTIL.getMiniHBaseCluster().getMaster();<a name="line.127"></a>
+<span class="sourceLineNo">128</span> rootDir = master.getMasterFileSystem().getRootDir();<a name="line.128"></a>
+<span class="sourceLineNo">129</span> archiveDir = new Path(rootDir, HConstants.HFILE_ARCHIVE_DIRECTORY);<a name="line.129"></a>
+<span class="sourceLineNo">130</span> }<a name="line.130"></a>
+<span class="sourceLineNo">131</span><a name="line.131"></a>
+<span class="sourceLineNo">132</span> private static void setupConf(Configuration conf) {<a name="line.132"></a>
+<span class="sourceLineNo">133</span> // disable the ui<a name="line.133"></a>
+<span class="sourceLineNo">134</span> conf.setInt("hbase.regionsever.info.port", -1);<a name="line.134"></a>
+<span class="sourceLineNo">135</span> // change the flush size to a small amount, regulating number of store files<a name="line.135"></a>
+<span class="sourceLineNo">136</span> conf.setInt("hbase.hregion.memstore.flush.size", 25000);<a name="line.136"></a>
+<span class="sourceLineNo">137</span> // so make sure we get a compaction when doing a load, but keep around some<a name="line.137"></a>
+<span class="sourceLineNo">138</span> // files in the store<a name="line.138"></a>
+<span class="sourceLineNo">139</span> conf.setInt("hbase.hstore.compaction.min", 2);<a name="line.139"></a>
+<span class="sourceLineNo">140</span> conf.setInt("hbase.hstore.compactionThreshold", 5);<a name="line.140"></a>
+<span class="sourceLineNo">141</span> // block writes if we get to 12 store files<a name="line.141"></a>
+<span class="sourceLineNo">142</span> conf.setInt("hbase.hstore.blockingStoreFiles", blockingStoreFiles);<a name="line.142"></a>
+<span class="sourceLineNo">143</span> // Ensure no extra cleaners on by default (e.g. TimeToLiveHFileCleaner)<a name="line.143"></a>
+<span class="sourceLineNo">144</span> conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS, "");<a name="line.144"></a>
+<span class="sourceLineNo">145</span> conf.set(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS, "");<a name="line.145"></a>
+<span class="sourceLineNo">146</span> // Enable snapshot<a name="line.146"></a>
+<span class="sourceLineNo">147</span> conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);<a name="line.147"></a>
+<span class="sourceLineNo">148</span> conf.setLong(SnapshotManager.HBASE_SNAPSHOT_SENTINELS_CLEANUP_TIMEOUT_MILLIS, 3 * 1000L);<a name="line.148"></a>
+<span class="sourceLineNo">149</span> conf.setLong(SnapshotHFileCleaner.HFILE_CACHE_REFRESH_PERIOD_CONF_KEY, cacheRefreshPeriod);<a name="line.149"></a>
+<span class="sourceLineNo">150</span> conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,<a name="line.150"></a>
+<span class="sourceLineNo">151</span> ConstantSizeRegionSplitPolicy.class.getName());<a name="line.151"></a>
+<span class="sourceLineNo">152</span> conf.setInt("hbase.hfile.compactions.cleaner.interval", 20 * 1000);<a name="line.152"></a>
+<span class="sourceLineNo">153</span> conf.setInt("hbase.master.cleaner.snapshot.interval", 500);<a name="line.153"></a>
+<span class="sourceLineNo">154</span> }<a name="line.154"></a>
+<span class="sourceLineNo">155</span><a name="line.155"></a>
+<span class="sourceLineNo">156</span> @Before<a name="line.156"></a>
+<span class="sourceLineNo">157</span> public void setup() throws Exception {<a name="line.157"></a>
+<span class="sourceLineNo">158</span> UTIL.createTable(TABLE_NAME, TEST_FAM);<a name="line.158"></a>
+<span class="sourceLineNo">159</span> master.getSnapshotManager().setSnapshotHandlerForTesting(TABLE_NAME, null);<a name="line.159"></a>
+<span class="sourceLineNo">160</span> }<a name="line.160"></a>
+<span class="sourceLineNo">161</span><a name="line.161"></a>
+<span class="sourceLineNo">162</span> @After<a name="line.162"></a>
+<span class="sourceLineNo">163</span> public void tearDown() throws Exception {<a name="line.163"></a>
+<span class="sourceLineNo">164</span> UTIL.deleteTable(TABLE_NAME);<a name="line.164"></a>
+<span class="sourceLineNo">165</span> SnapshotTestingUtils.deleteAllSnapshots(UTIL.getAdmin());<a name="line.165"></a>
+<span class="sourceLineNo">166</span> SnapshotTestingUtils.deleteArchiveDirectory(UTIL);<a name="line.166"></a>
+<span class="sourceLineNo">167</span> }<a name="line.167"></a>
+<span class="sourceLineNo">168</span><a name="line.168"></a>
+<span class="sourceLineNo">169</span> @AfterClass<a name="line.169"></a>
+<span class="sourceLineNo">170</span> public static void cleanupTest() throws Exception {<a name="line.170"></a>
+<span class="sourceLineNo">171</span> try {<a name="line.171"></a>
+<span class="sourceLineNo">172</span> UTIL.shutdownMiniCluster();<a name="line.172"></a>
+<span class="sourceLineNo">173</span> } catch (Exception e) {<a name="line.173"></a>
+<span class="sourceLineNo">174</span> // NOOP;<a name="line.174"></a>
+<span class="sourceLineNo">175</span> }<a name="line.175"></a>
+<span class="sourceLineNo">176</span> }<a name="line.176"></a>
+<span class="sourceLineNo">177</span><a name="line.177"></a>
+<span class="sourceLineNo">178</span> /**<a name="line.178"></a>
+<span class="sourceLineNo">179</span> * Test that the contract from the master for checking on a snapshot are valid.<a name="line.179"></a>
+<span class="sourceLineNo">180</span> * <p><a name="line.180"></a>
+<span class="sourceLineNo">181</span> * <ol><a name="line.181"></a>
+<span class="sourceLineNo">182</span> * <li>If a snapshot fails with an error, we expect to get the source error.</li><a name="line.182"></a>
+<span class="sourceLineNo">183</span> * <li>If there is no snapshot name supplied, we should get an error.</li><a name="line.183"></a>
+<span class="sourceLineNo">184</span> * <li>If asking about a snapshot has hasn't occurred, you should get an error.</li><a name="line.184"></a>
+<span class="sourceLineNo">185</span> * </ol><a name="line.185"></a>
+<span class="sourceLineNo">186</span> */<a name="line.186"></a>
+<span class="sourceLineNo">187</span> @Test<a name="line.187"></a>
+<span class="sourceLineNo">188</span> public void testIsDoneContract() throws Exception {<a name="line.188"></a>
+<span class="sourceLineNo">189</span><a name="line.189"></a>
+<span class="sourceLineNo">190</span> IsSnapshotDoneRequest.Builder builder = IsSnapshotDoneRequest.newBuilder();<a name="line.190"></a>
+<span class="sourceLineNo">191</span><a name="line.191"></a>
+<span class="sourceLineNo">192</span> String snapshotName = "asyncExpectedFailureTest";<a name="line.192"></a>
+<span class="sourceLineNo">193</span><a name="line.193"></a>
+<span class="sourceLineNo">194</span> // check that we get an exception when looking up snapshot where one hasn't happened<a name="line.194"></a>
+<span class="sourceLineNo">195</span> SnapshotTestingUtils.expectSnapshotDoneException(master, builder.build(),<a name="line.195"></a>
+<span class="sourceLineNo">196</span> UnknownSnapshotException.class);<a name="line.196"></a>
+<span class="sourceLineNo">197</span><a name="line.197"></a>
+<span class="sourceLineNo">198</span> // and that we get the same issue, even if we specify a name<a name="line.198"></a>
+<span class="sourceLineNo">199</span> SnapshotDescription desc = SnapshotDescription.newBuilder()<a name="line.199"></a>
+<span class="sourceLineNo">200</span> .setName(snapshotName).setTable(TABLE_NAME.getNameAsString()).build();<a name="line.200"></a>
+<span class="sourceLineNo">201</span> builder.setSnapshot(desc);<a name="line.201"></a>
+<span class="sourceLineNo">202</span> SnapshotTestingUtils.expectSnapshotDoneException(master, builder.build(),<a name="line.202"></a>
+<span class="sourceLineNo">203</span> UnknownSnapshotException.class);<a name="line.203"></a>
+<span class="sourceLineNo">204</span><a name="line.204"></a>
+<span class="sourceLineNo">205</span> // set a mock handler to simulate a snapshot<a name="line.205"></a>
+<span class="sourceLineNo">206</span> DisabledTableSnapshotHandler mockHandler = Mockito.mock(DisabledTableSnapshotHandler.class);<a name="line.206"></a>
+<span class="sourceLineNo">207</span> Mockito.when(mockHandler.getException()).thenReturn(null);<a name="line.207"></a>
+<span class="sourceLineNo">208</span> Mockito.when(mockHandler.getSnapshot()).thenReturn(desc);<a name="line.208"></a>
+<span class="sourceLineNo">209</span> Mockito.when(mockHandler.isFinished()).thenReturn(Boolean.TRUE);<a name="line.209"></a>
+<span class="sourceLineNo">210</span> Mockito.when(mockHandler.getCompletionTimestamp())<a name="line.210"></a>
+<span class="sourceLineNo">211</span> .thenReturn(EnvironmentEdgeManager.currentTime());<a name="line.211"></a>
+<span class="sourceLineNo">212</span><a name="line.212"></a>
+<span class="sourceLineNo">213</span> master.getSnapshotManager()<a name="line.213"></a>
+<span class="sourceLineNo">214</span> .setSnapshotHandlerForTesting(TABLE_NAME, mockHandler);<a name="line.214"></a>
+<span class="sourceLineNo">215</span><a name="line.215"></a>
+<span class="sourceLineNo">216</span> // if we do a lookup without a snapshot name, we should fail - you should always know your name<a name="line.216"></a>
+<span class="sourceLineNo">217</span> builder = IsSnapshotDoneRequest.newBuilder();<a name="line.217"></a>
+<span class="sourceLineNo">218</span> SnapshotTestingUtils.expectSnapshotDoneException(master, builder.build(),<a name="line.218"></a>
+<span class="sourceLineNo">219</span> UnknownSnapshotException.class);<a name="line.219"></a>
+<span class="sourceLineNo">220</span><a name="line.220"></a>
+<span class="sourceLineNo">221</span> // then do the lookup for the snapshot that it is done<a name="line.221"></a>
+<span class="sourceLineNo">222</span> builder.setSnapshot(desc);<a name="line.222"></a>
+<span class="sourceLineNo">223</span> IsSnapshotDoneResponse response =<a name="line.223"></a>
+<span class="sourceLineNo">224</span> master.getMasterRpcServices().isSnapshotDone(null, builder.build());<a name="line.224"></a>
+<span class="sourceLineNo">225</span> assertTrue("Snapshot didn't complete when it should have.", response.getDone());<a name="line.225"></a>
+<span class="sourceLineNo">226</span><a name="line.226"></a>
+<span class="sourceLineNo">227</span> // now try the case where we are looking for a snapshot we didn't take<a name="line.227"></a>
+<span class="sourceLineNo">228</span> builder.setSnapshot(SnapshotDescription.newBuilder().setName("Not A Snapshot").build());<a name="line.228"></a>
+<span class="sourceLineNo">229</span> SnapshotTestingUtils.expectSnapshotDoneException(master, builder.build(),<a name="line.229"></a>
+<span class="sourceLineNo">230</span> UnknownSnapshotException.class);<a name="line.230"></a>
+<span class="sourceLineNo">231</span><a name="line.231"></a>
+<span class="sourceLineNo">232</span> // then create a snapshot to the fs and make sure that we can find it when checking done<a name="line.232"></a>
+<span class="sourceLineNo">233</span> snapshotName = "completed";<a name="line.233"></a>
+<span class="sourceLineNo">234</span> desc = createSnapshot(snapshotName);<a name="line.234"></a>
+<span class="sourceLineNo">235</span><a name="line.235"></a>
+<span class="sourceLineNo">236</span> builder.setSnapshot(desc);<a name="line.236"></a>
+<span class="sourceLineNo">237</span> response = master.getMasterRpcServices().isSnapshotDone(null, builder.build());<a name="line.237"></a>
+<span class="sourceLineNo">238</span> assertTrue("Completed, on-disk snapshot not found", response.getDone());<a name="line.238"></a>
+<span class="sourceLineNo">239</span> }<a name="line.239"></a>
+<span class="sourceLineNo">240</span><a name="line.240"></a>
+<span class="sourceLineNo">241</span> @Test<a name="line.241"></a>
+<span class="sourceLineNo">242</span> public void testGetCompletedSnapshots() throws Exception {<a name="line.242"></a>
+<span class="sourceLineNo">243</span> // first check when there are no snapshots<a name="line.243"></a>
+<span class="sourceLineNo">244</span> GetCompletedSnapshotsRequest request = GetCompletedSnapshotsRequest.newBuilder().build();<a name="line.244"></a>
+<span class="sourceLineNo">245</span> GetCompletedSnapshotsResponse response =<a name="line.245"></a>
+<span class="sourceLineNo">246</span> master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.246"></a>
+<span class="sourceLineNo">247</span> assertEquals("Found unexpected number of snapshots", 0, response.getSnapshotsCount());<a name="line.247"></a>
+<span class="sourceLineNo">248</span><a name="line.248"></a>
+<span class="sourceLineNo">249</span> // write one snapshot to the fs<a name="line.249"></a>
+<span class="sourceLineNo">250</span> String snapshotName = "completed";<a name="line.250"></a>
+<span class="sourceLineNo">251</span> SnapshotDescription snapshot = createSnapshot(snapshotName);<a name="line.251"></a>
+<span class="sourceLineNo">252</span><a name="line.252"></a>
+<span class="sourceLineNo">253</span> // check that we get one snapshot<a name="line.253"></a>
+<span class="sourceLineNo">254</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.254"></a>
+<span class="sourceLineNo">255</span> assertEquals("Found unexpected number of snapshots", 1, response.getSnapshotsCount());<a name="line.255"></a>
+<span class="sourceLineNo">256</span> List<SnapshotDescription> snapshots = response.getSnapshotsList();<a name="line.256"></a>
+<span class="sourceLineNo">257</span> List<SnapshotDescription> expected = Lists.newArrayList(snapshot);<a name="line.257"></a>
+<span class="sourceLineNo">258</span> assertEquals("Returned snapshots don't match created snapshots", expected, snapshots);<a name="line.258"></a>
+<span class="sourceLineNo">259</span><a name="line.259"></a>
+<span class="sourceLineNo">260</span> // write a second snapshot<a name="line.260"></a>
+<span class="sourceLineNo">261</span> snapshotName = "completed_two";<a name="line.261"></a>
+<span class="sourceLineNo">262</span> snapshot = createSnapshot(snapshotName);<a name="line.262"></a>
+<span class="sourceLineNo">263</span> expected.add(snapshot);<a name="line.263"></a>
+<span class="sourceLineNo">264</span><a name="line.264"></a>
+<span class="sourceLineNo">265</span> // check that we get one snapshot<a name="line.265"></a>
+<span class="sourceLineNo">266</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.266"></a>
+<span class="sourceLineNo">267</span> assertEquals("Found unexpected number of snapshots", 2, response.getSnapshotsCount());<a name="line.267"></a>
+<span class="sourceLineNo">268</span> snapshots = response.getSnapshotsList();<a name="line.268"></a>
+<span class="sourceLineNo">269</span> assertEquals("Returned snapshots don't match created snapshots", expected, snapshots);<a name="line.269"></a>
+<span class="sourceLineNo">270</span> }<a name="line.270"></a>
+<span class="sourceLineNo">271</span><a name="line.271"></a>
+<span class="sourceLineNo">272</span> @Test<a name="line.272"></a>
+<span class="sourceLineNo">273</span> public void testDeleteSnapshot() throws Exception {<a name="line.273"></a>
+<span class="sourceLineNo">274</span><a name="line.274"></a>
+<span class="sourceLineNo">275</span> String snapshotName = "completed";<a name="line.275"></a>
+<span class="sourceLineNo">276</span> SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName(snapshotName).build();<a name="line.276"></a>
+<span class="sourceLineNo">277</span><a name="line.277"></a>
+<span class="sourceLineNo">278</span> DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder().setSnapshot(snapshot)<a name="line.278"></a>
+<span class="sourceLineNo">279</span> .build();<a name="line.279"></a>
+<span class="sourceLineNo">280</span> try {<a name="line.280"></a>
+<span class="sourceLineNo">281</span> master.getMasterRpcServices().deleteSnapshot(null, request);<a name="line.281"></a>
+<span class="sourceLineNo">282</span> fail("Master didn't throw exception when attempting to delete snapshot that doesn't exist");<a name="line.282"></a>
+<span class="sourceLineNo">283</span> } catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException e) {<a name="line.283"></a>
+<span class="sourceLineNo">284</span> // Expected<a name="line.284"></a>
+<span class="sourceLineNo">285</span> }<a name="line.285"></a>
+<span class="sourceLineNo">286</span><a name="line.286"></a>
+<span class="sourceLineNo">287</span> // write one snapshot to the fs<a name="line.287"></a>
+<span class="sourceLineNo">288</span> createSnapshot(snapshotName);<a name="line.288"></a>
+<span class="sourceLineNo">289</span><a name="line.289"></a>
+<span class="sourceLineNo">290</span> // then delete the existing snapshot,which shouldn't cause an exception to be thrown<a name="line.290"></a>
+<span class="sourceLineNo">291</span> master.getMasterRpcServices().deleteSnapshot(null, request);<a name="line.291"></a>
+<span class="sourceLineNo">292</span> }<a name="line.292"></a>
+<span class="sourceLineNo">293</span><a name="line.293"></a>
+<span class="sourceLineNo">294</span> @Test<a name="line.294"></a>
+<span class="sourceLineNo">295</span> public void testGetCompletedSnapshotsWithCleanup() throws Exception {<a name="line.295"></a>
+<span class="sourceLineNo">296</span> // Enable auto snapshot cleanup for the cluster<a name="line.296"></a>
+<span class="sourceLineNo">297</span> SetSnapshotCleanupRequest setSnapshotCleanupRequest =<a name="line.297"></a>
+<span class="sourceLineNo">298</span> SetSnapshotCleanupRequest.newBuilder().setEnabled(true).build();<a name="line.298"></a>
+<span class="sourceLineNo">299</span> master.getMasterRpcServices().switchSnapshotCleanup(null, setSnapshotCleanupRequest);<a name="line.299"></a>
+<span class="sourceLineNo">300</span><a name="line.300"></a>
+<span class="sourceLineNo">301</span> // first check when there are no snapshots<a name="line.301"></a>
+<span class="sourceLineNo">302</span> GetCompletedSnapshotsRequest request = GetCompletedSnapshotsRequest.newBuilder().build();<a name="line.302"></a>
+<span class="sourceLineNo">303</span> GetCompletedSnapshotsResponse response =<a name="line.303"></a>
+<span class="sourceLineNo">304</span> master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.304"></a>
+<span class="sourceLineNo">305</span> assertEquals("Found unexpected number of snapshots", 0, response.getSnapshotsCount());<a name="line.305"></a>
+<span class="sourceLineNo">306</span><a name="line.306"></a>
+<span class="sourceLineNo">307</span> // write one snapshot to the fs<a name="line.307"></a>
+<span class="sourceLineNo">308</span> createSnapshotWithTtl("snapshot_01", 1L);<a name="line.308"></a>
+<span class="sourceLineNo">309</span> createSnapshotWithTtl("snapshot_02", 10L);<a name="line.309"></a>
+<span class="sourceLineNo">310</span><a name="line.310"></a>
+<span class="sourceLineNo">311</span> // check that we get one snapshot<a name="line.311"></a>
+<span class="sourceLineNo">312</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.312"></a>
+<span class="sourceLineNo">313</span> assertEquals("Found unexpected number of snapshots", 2, response.getSnapshotsCount());<a name="line.313"></a>
+<span class="sourceLineNo">314</span><a name="line.314"></a>
+<span class="sourceLineNo">315</span> // check that 1 snapshot is auto cleaned after 1 sec of TTL expiration<a name="line.315"></a>
+<span class="sourceLineNo">316</span> Uninterruptibles.sleepUninterruptibly(2, TimeUnit.SECONDS);<a name="line.316"></a>
+<span class="sourceLineNo">317</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.317"></a>
+<span class="sourceLineNo">318</span> assertEquals("Found unexpected number of snapshots", 1, response.getSnapshotsCount());<a name="line.318"></a>
+<span class="sourceLineNo">319</span> }<a name="line.319"></a>
+<span class="sourceLineNo">320</span><a name="line.320"></a>
+<span class="sourceLineNo">321</span> @Test<a name="line.321"></a>
+<span class="sourceLineNo">322</span> public void testGetCompletedSnapshotsWithoutCleanup() throws Exception {<a name="line.322"></a>
+<span class="sourceLineNo">323</span> // Disable auto snapshot cleanup for the cluster<a name="line.323"></a>
+<span class="sourceLineNo">324</span> SetSnapshotCleanupRequest setSnapshotCleanupRequest =<a name="line.324"></a>
+<span class="sourceLineNo">325</span> SetSnapshotCleanupRequest.newBuilder().setEnabled(false).build();<a name="line.325"></a>
+<span class="sourceLineNo">326</span> master.getMasterRpcServices().switchSnapshotCleanup(null, setSnapshotCleanupRequest);<a name="line.326"></a>
+<span class="sourceLineNo">327</span><a name="line.327"></a>
+<span class="sourceLineNo">328</span> // first check when there are no snapshots<a name="line.328"></a>
+<span class="sourceLineNo">329</span> GetCompletedSnapshotsRequest request = GetCompletedSnapshotsRequest.newBuilder().build();<a name="line.329"></a>
+<span class="sourceLineNo">330</span> GetCompletedSnapshotsResponse response =<a name="line.330"></a>
+<span class="sourceLineNo">331</span> master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.331"></a>
+<span class="sourceLineNo">332</span> assertEquals("Found unexpected number of snapshots", 0, response.getSnapshotsCount());<a name="line.332"></a>
+<span class="sourceLineNo">333</span><a name="line.333"></a>
+<span class="sourceLineNo">334</span> // write one snapshot to the fs<a name="line.334"></a>
+<span class="sourceLineNo">335</span> createSnapshotWithTtl("snapshot_02", 1L);<a name="line.335"></a>
+<span class="sourceLineNo">336</span> createSnapshotWithTtl("snapshot_03", 1L);<a name="line.336"></a>
+<span class="sourceLineNo">337</span><a name="line.337"></a>
+<span class="sourceLineNo">338</span> // check that we get one snapshot<a name="line.338"></a>
+<span class="sourceLineNo">339</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.339"></a>
+<span class="sourceLineNo">340</span> assertEquals("Found unexpected number of snapshots", 2, response.getSnapshotsCount());<a name="line.340"></a>
+<span class="sourceLineNo">341</span><a name="line.341"></a>
+<span class="sourceLineNo">342</span> // check that no snapshot is auto cleaned even after 1 sec of TTL expiration<a name="line.342"></a>
+<span class="sourceLineNo">343</span> Uninterruptibles.sleepUninterruptibly(2, TimeUnit.SECONDS);<a name="line.343"></a>
+<span class="sourceLineNo">344</span> response = master.getMasterRpcServices().getCompletedSnapshots(null, request);<a name="line.344"></a>
+<span class="sourceLineNo">345</span> assertEquals("Found unexpected number of snapshots", 2, response.getSnapshotsCount());<a name="line.345"></a>
+<span class="sourceLineNo">346</span> }<a name="line.346"></a>
+<span class="sourceLineNo">347</span><a name="line.347"></a>
+<span class="sourceLineNo">348</span> @Test<a name="line.348"></a>
+<span class="sourceLineNo">349</span> public void testSnapshotCleanupStatus() throws Exception {<a name="line.349"></a>
+<span class="sourceLineNo">350</span> // Enable auto snapshot cleanup for the cluster<a name="line.350"></a>
+<span class="sourceLineNo">351</span> SetSnapshotCleanupRequest setSnapshotCleanupRequest =<a name="line.351"></a>
+<span class="sourceLineNo">352</span> SetSnapshotCleanupRequest.newBuilder().setEnabled(true).build();<a name="line.352"></a>
+<span class="sourceLineNo">353</span> master.getMasterRpcServices().switchSnapshotCleanup(null, setSnapshotCleanupRequest);<a name="line.353"></a>
+<span class="sourceLineNo">354</span><a name="line.354"></a>
+<span class="sourceLineNo">355</span> // Check if auto snapshot cleanup is enabled<a name="line.355"></a>
+<span class="sourceLineNo">356</span> IsSnapshotCleanupEnabledRequest isSnapshotCleanupEnabledRequest =<a name="line.356"></a>
+<span class="sourceLineNo">357</span> IsSnapshotCleanupEnabledRequest.newBuilder().build();<a name="line.357"></a>
+<span class="sourceLineNo">358</span> IsSnapshotCleanupEnabledResponse isSnapshotCleanupEnabledResponse =<a name="line.358"></a>
+<span class="sourceLineNo">359</span> master.getMasterRpcServices().isSnapshotCleanupEnabled(null,<a name="line.359"></a>
+<span class="sourceLineNo">360</span> isSnapshotCleanupEnabledRequest);<a name="line.360"></a>
+<span class="sourceLineNo">361</span> Assert.assertTrue(isSnapshotCleanupEnabledResponse.getEnabled());<a name="line.361"></a>
+<span class="sourceLineNo">362</span><a name="line.362"></a>
+<span class="sourceLineNo">363</span> // Disable auto snapshot cleanup for the cluster<a name="line.363"></a>
+<span class="sourceLineNo">364</span> setSnapshotCleanupRequest = SetSnapshotCleanupRequest.newBuilder()<a name="line.364"></a>
+<span class="sourceLineNo">365</span> .setEnabled(false).build();<a name="line.365"></a>
+<span class="sourceLineNo">366</span> master.getMasterRpcServices().switchSnapshotCleanup(null, setSnapshotCleanupRequest);<a name="line.366"></a>
+<span class="sourceLineNo">367</span><a name="line.367"></a>
+<span class="sourceLineNo">368</span> // Check if auto snapshot cleanup is disabled<a name="line.368"></a>
+<span class="sourceLineNo">369</span> isSnapshotCleanupEnabledRequest = IsSnapshotCleanupEnabledRequest<a name="line.369"></a>
+<span class="sourceLineNo">370</span> .newBuilder().build();<a name="line.370"></a>
+<span class="sourceLineNo">371</span> isSnapshotCleanupEnabledResponse =<a name="line.371"></a>
+<span class="sourceLineNo">372</span> master.getMasterRpcServices().isSnapshotCleanupEnabled(null,<a name="line.372"></a>
+<span class="sourceLineNo">373</span> isSnapshotCleanupEnabledRequest);<a name="line.373"></a>
+<span class="sourceLineNo">374</span> Assert.assertFalse(isSnapshotCleanupEnabledResponse.getEnabled());<a name="line.374"></a>
+<span class="sourceLineNo">375</span> }<a name="line.375"></a>
+<span class="sourceLineNo">376</span><a name="line.376"></a>
+<span class="sourceLineNo">377</span> /**<a name="line.377"></a>
+<span class="sourceLineNo">378</span> * Test that the snapshot hfile archive cleaner works correctly. HFiles that are in snapshots<a name="line.378"></a>
+<span class="sourceLineNo">379</span> * should be retained, while those that are not in a snapshot should be deleted.<a name="line.379"></a>
+<span class="sourceLineNo">380</span> * @throws Exception on failure<a name="line.380"></a>
+<span class="sourceLineNo">381</span> */<a name="line.381"></a>
+<span class="sourceLineNo">382</span> @Test<a name="line.382"></a>
+<span class="sourceLineNo">383</span> public void testSnapshotHFileArchiving() throws Exception {<a name="line.383"></a>
+<span class="sourceLineNo">384</span> Admin admin = UTIL.getAdmin();<a name="line.384"></a>
+<span class="sourceLineNo">385</span> // make sure we don't fail on listing snapshots<a name="line.385"></a>
+<span class="sourceLineNo">386</span> SnapshotTestingUtils.assertNoSnapshots(admin);<a name="line.386"></a>
+<span class="sourceLineNo">387</span><a name="line.387"></a>
+<span class="sourceLineNo">388</span> // recreate test table with disabled compactions; otherwise compaction may happen before<a name="line.388"></a>
+<span class="sourceLineNo">389</span> // snapshot, the call after snapshot will be a no-op and checks will fail<a name="line.389"></a>
+<span class="sourceLineNo">390</span> UTIL.deleteTable(TABLE_NAME);<a name="line.390"></a>
+<span class="sourceLineNo">391</span> TableDescriptor td = TableDescriptorBuilder.newBuilder(TABLE_NAME)<a name="line.391"></a>
+<span class="sourceLineNo">392</span> .setColumnFamily(ColumnFamilyDescriptorBuilder.of(TEST_FAM))<a name="line.392"></a>
+<span class="sourceLineNo">393</span> .setCompactionEnabled(false)<a name="line.393"></a>
+<span class="sourceLineNo">394</span> .build();<a name="line.394"></a>
+<span class="sourceLineNo">395</span> UTIL.getAdmin().createTable(td);<a name="line.395"></a>
+<span class="sourceLineNo">396</span><a name="line.396"></a>
+<span class="sourceLineNo">397</span> // load the table<a name="line.397"></a>
+<span class="sourceLineNo">398</span> for (int i = 0; i < blockingStoreFiles / 2; i ++) {<a name="line.398"></a>
+<span class="sourceLineNo">399</span> UTIL.loadTable(UTIL.getConnection().getTable(TABLE_NAME), TEST_FAM);<a name="line.399"></a>
+<span class="sourceLineNo">400</span> UTIL.flush(TABLE_NAME);<a name="line.400"></a>
+<span class="sourceLineNo">401</span> }<a name="line.401"></a>
+<span class="sourceLineNo">402</span><a name="line.402"></a>
+<span class="sourceLineNo">403</span> // disable the table so we can take a snapshot<a name="line.403"></a>
+<span class="sourceLineNo">404</span> admin.disableTable(TABLE_NAME);<a name="line.404"></a>
+<span class="sourceLineNo">405</span><a name="line.405"></a>
+<span class="sourceLineNo">406</span> // take a snapshot of the table<a name="line.406"></a>
+<span class="sourceLineNo">407</span> String snapshotName = "snapshot";<a name="line.407"></a>
+<span class="sourceLineNo">408</span> String snapshotNameBytes = snapshotName;<a name="line.408"></a>
+<span class="sourceLineNo">409</span> admin.snapshot(snapshotName, TABLE_NAME);<a name="line.409"></a>
+<span class="sourceLineNo">410</span><a name="line.410"></a>
+<span class="sourceLineNo">411</span> LOG.info("After snapshot File-System state");<a name="line.411"></a>
+<span class="sourceLineNo">412</span> FSUtils.logFileSystemState(fs, rootDir, LOG);<a name="line.412"></a>
+<span class="sourceLineNo">413</span><a name="line.413"></a>
+<span class="sourceLineNo">414</span> // ensure we only have one snapshot<a name="line.414"></a>
+<span class="sourceLineNo">415</span> SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshotNameBytes, TABLE_NAME);<a name="line.415"></a>
+<span class="sourceLineNo">416</span><a name="line.416"></a>
+<span class="sourceLineNo">417</span> td = TableDescriptorBuilder.newBuilder(td)<a name="line.417"></a>
+<span class="sourceLineNo">418</span> .setCompactionEnabled(true)<a name="line.418"></a>
+<span class="sourceLineNo">419</span> .build();<a name="line.419"></a>
+<span class="sourceLineNo">420</span> // enable compactions now<a name="line.420"></a>
+<span class="sourceLineNo">421</span> admin.modifyTable(td);<a name="line.421"></a>
+<span class="sourceLineNo">422</span><a name="line.422"></a>
+<span class="sourceLineNo">423</span> // renable the table so we can compact the regions<a name="line.423"></a>
+<span class="sourceLineNo">424</span> admin.enableTable(TABLE_NAME);<a name="line.424"></a>
+<span class="sourceLineNo">425</span><a name="line.425"></a>
+<span class="sourceLineNo">426</span> // compact the files so we get some archived files for the table we just snapshotted<a name="line.426"></a>
+<span class="sourceLineNo">427</span> List<HRegion> regions = UTIL.getHBaseCluster().getRegions(TABLE_NAME);<a name="line.427"></a>
+<span class="sourceLineNo">428</span> for (HRegion region : regions) {<a name="line.428"></a>
+<span class="sourceLineNo">429</span> region.waitForFlushesAndCompactions(); // enable can trigger a compaction, wait for it.<a name="line.429"></a>
+<span class="sourceLineNo">430</span> region.compactStores(); // min is 2 so will compact and archive<a name="line.430"></a>
+<span class="sourceLineNo">431</span> }<a name="line.431"></a>
+<span class="sourceLineNo">432</span> List<RegionServerThread> regionServerThreads = UTIL.getMiniHBaseCluster()<a name="line.432"></a>
+<span class="sourceLineNo">433</span> .getRegionServerThreads();<a name="line.433"></a>
+<span class="sourceLineNo">434</span> HRegionServer hrs = null;<a name="line.434"></a>
+<span class="sourceLineNo">435</span> for (RegionServerThread rs : regionServerThreads) {<a name="line.435"></a>
+<span class="sourceLineNo">436</span> if (!rs.getRegionServer().getRegions(TABLE_NAME).isEmpty()) {<a name="line.436"></a>
+<span class="sourceLineNo">437</span> hrs = rs.getRegionServer();<a name="line.437"></a>
+<span class="sourceLineNo">438</span> break;<a name="line.438"></a>
+<span class="sourceLineNo">439</span> }<a name="line.439"></a>
+<span class="sourceLineNo">440</span> }<a name="line.440"></a>
+<span class="sourceLineNo">441</span> CompactedHFilesDischarger cleaner = new CompactedHFilesDischarger(100, null, hrs, false);<a name="line.441"></a>
+<span class="sourceLineNo">442</span> cleaner.chore();<a name="line.442"></a>
+<span class="sourceLineNo">443</span> LOG.info("After compaction File-System state");<a name="line.443"></a>
+<span class="sourceLineNo">444</span> FSUtils.logFileSystemState(fs, rootDir, LOG);<a name="line.444"></a>
+<span class="sourceLineNo">445</span><a name="line.445"></a>
+<span class="sourceLineNo">446</span> // make sure the cleaner has run<a name="line.446"></a>
+<span class="sourceLineNo">447</span> LOG.debug("Running hfile cleaners");<a name="line.447"></a>
+<span class="sourceLineNo">448</span> ensureHFileCleanersRun();<a name="line.448"></a>
+<span class="sourceLineNo">449</span> LOG.info("After cleaners File-System state: " + rootDir);<a name="line.449"></a>
+<span class="sourceLineNo">450</span> FSUtils.logFileSystemState(fs, rootDir, LOG);<a name="line.450"></a>
+<span class="sourceLineNo">451</span><a name="line.451"></a>
+<span class="sourceLineNo">452</span> // get the snapshot files for the table<a name="line.452"></a>
+<span class="sourceLineNo">453</span> Path snapshotTable = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshotName, rootDir);<a name="line.453"></a>
+<span class="sourceLineNo">454</span> Set<String> snapshotHFiles = SnapshotReferenceUtil.getHFileNames(<a name="line.454"></a>
+<span class="sourceLineNo">455</span> UTIL.getConfiguration(), fs, snapshotTable);<a name="line.455"></a>
+<span class="sourceLineNo">456</span> // check that the files in the archive contain the ones that we need for the snapshot<a name="line.456"></a>
+<span class="sourceLineNo">457</span> LOG.debug("Have snapshot hfiles:");<a name="line.457"></a>
+<span class="sourceLineNo">458</span> for (String fileName : snapshotHFiles) {<a name="line.458"></a>
+<span class="sourceLineNo">459</span> LOG.debug(fileName);<a name="line.459"></a>
+<span class="sourceLineNo">460</span> }<a name="line.460"></a>
+<span class="sourceLineNo">461</span> // get the archived files for the table<a name="line.461"></a>
+<span class="sourceLineNo">462</span> Collection<String> archives = getHFiles(archiveDir, fs, TABLE_NAME);<a name="line.462"></a>
+<span class="sourceLineNo">463</span><a name="line.463"></a>
+<span class="sourceLineNo">464</span> // get the hfiles for the table<a name="line.464"></a>
+<span class="sourceLineNo">465</span> Collection<String> hfiles = getHFiles(rootDir, fs, TABLE_NAME);<a name="line.465"></a>
+<span class="sourceLineNo">466</span><a name="line.466"></a>
+<span class="sourceLineNo">467</span> // and make sure that there is a proper subset<a name="line.467"></a>
+<span class="sourceLineNo">468</span> for (String fileName : snapshotHFiles) {<a name="line.468"></a>
+<span class="sourceLineNo">469</span> boolean exist = archives.contains(fileName) || hfiles.contains(fileName);<a name="line.469"></a>
+<span class="sourceLineNo">470</span> assertTrue("Archived hfiles " + archives<a name="line.470"></a>
+<span class="sourceLineNo">471</span> + " and table hfiles " + hfiles + " is missing snapshot file:" + fileName, exist);<a name="line.471"></a>
+<span class="sourceLineNo">472</span> }<a name="line.472"></a>
+<span class="sourceLineNo">473</span><a name="line.473"></a>
+<span class="sourceLineNo">474</span> // delete the existing snapshot<a name="line.474"></a>
+<span class="sourceLineNo">475</span> admin.deleteSnapshot(snapshotNameBytes);<a name="line.475"></a>
+<span class="sourceLineNo">476</span> SnapshotTestingUtils.assertNoSnapshots(admin);<a name="line.476"></a>
+<span class="sourceLineNo">477</span><a name="line.477"></a>
+<span class="sourceLineNo">478</span> // make sure that we don't keep around the hfiles that aren't in a snapshot<a name="line.478"></a>
+<span class="sourceLineNo">479</span> // make sure we wait long enough to refresh the snapshot hfile<a name="line.479"></a>
+<span class="sourceLineNo">480</span> List<BaseHFileCleanerDelegate> delegates = UTIL.getMiniHBaseCluster().getMaster()<a name="line.480"></a>
+<span class="sourceLineNo">481</span> .getHFileCleaner().cleanersChain;<a name="line.481"></a>
+<span class="sourceLineNo">482</span> for (BaseHFileCleanerDelegate delegate: delegates) {<a name="line.482"></a>
+<span class="sourceLineNo">483</span> if (delegate instanceof SnapshotHFileCleaner) {<a name="line.483"></a>
+<span class="sourceLineNo">484</span> ((SnapshotHFileCleaner)delegate).getFileCacheForTesting().triggerCacheRefreshForTesting();<a name="line.484"></a>
+<span class="sourceLineNo">485</span> }<a name="line.485"></a>
+<span class="sourceLineNo">486</span> }<a name="line.486"></a>
+<span class="sourceLineNo">487</span> // run the cleaner again<a name="line.487"></a>
+<span class="sourceLineNo">488</span> LOG.debug("Running hfile cleaners");<a name="line.488"></a>
+<span class="sourceLineNo">489</span> ensureHFileCleanersRun();<a name="line.489"></a>
+<span class="sourceLineNo">490</span> LOG.info("After delete snapshot cleaners run File-System state");<a name="line.490"></a>
+<span class="sourceLineNo">491</span> FSUtils.logFileSystemState(fs, rootDir, LOG);<a name="line.491"></a>
+<span class="sourceLineNo">492</span><a name="line.492"></a>
+<span class="sourceLineNo">493</span> archives = getHFiles(archiveDir, fs, TABLE_NAME);<a name="line.493"></a>
+<span class="sourceLineNo">494</span> assertEquals("Still have some hfiles in the archive, when their snapshot has been deleted.", 0,<a name="line.494"></a>
+<span class="sourceLineNo">495</span> archives.size());<a name="line.495"></a>
+<span class="sourceLineNo">496</span> }<a name="line.496"></a>
+<span class="sourceLineNo">497</span><a name="line.497"></a>
+<span class="sourceLineNo">498</span> /**<a name="line.498"></a>
+<span class="sourceLineNo">499</span> * @return all the HFiles for a given table in the specified dir<a name="line.499"></a>
+<span class="sourceLineNo">500</span> * @throws IOException on expected failure<a name="line.500"></a>
+<span class="sourceLineNo">501</span> */<a name="line.501"></a>
+<span class="sourceLineNo">502</span> private final Collection<String> getHFiles(Path dir, FileSystem fs, TableName tableName) throws IOException {<a name="line.502"></a>
+<span class="sourceLineNo">503</span> Path tableDir = FSUtils.getTableDir(dir, tableName);<a name="line.503"></a>
+<span class="sourceLineNo">504</span> return SnapshotTestingUtils.listHFileNames(fs, tableDir);<a name="line.504"></a>
+<span class="sourceLineNo">505</span> }<a name="line.505"></a>
+<span class="sourceLineNo">506</span><a name="line.506"></a>
+<span class="sourceLineNo">507</span> /**<a name="line.507"></a>
+<span class="sourceLineNo">508</span> * Make sure the {@link HFileCleaner HFileCleaners} run at least once<a name="line.508"></a>
+<span class="sourceLineNo">509</span> */<a name="line.509"></a>
+<span class="sourceLineNo">510</span> private static void ensureHFileCleanersRun() {<a name="line.510"></a>
+<span class="sourceLineNo">511</span> UTIL.getHBaseCluster().getMaster().getHFileCleaner().chore();<a name="line.511"></a>
+<span class="sourceLineNo">512</span> }<a name="line.512"></a>
+<span class="sourceLineNo">513</span><a name="line.513"></a>
+<span class="sourceLineNo">514</span> private SnapshotDescription createSnapshot(final String snapshotName) throws IOException {<a name="line.514"></a>
+<span class="sourceLineNo">515</span> SnapshotTestingUtils.SnapshotMock snapshotMock =<a name="line.515"></a>
+<span class="sourceLineNo">516</span> new SnapshotTestingUtils.SnapshotMock(UTIL.getConfiguration(), fs, rootDir);<a name="line.516"></a>
+<span class="sourceLineNo">517</span> SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder =<a name="line.517"></a>
+<span class="sourceLineNo">518</span> snapshotMock.createSnapshotV2(snapshotName, "test", 0);<a name="line.518"></a>
+<span class="sourceLineNo">519</span> builder.commit();<a name="line.519"></a>
+<span class="sourceLineNo">520</span> return builder.getSnapshotDescription();<a name="line.520"></a>
+<span class="sourceLineNo">521</span> }<a name="line.521"></a>
+<span class="sourceLineNo">522</span><a name="line.522"></a>
+<span class="sourceLineNo">523</span> private SnapshotDescription createSnapshotWithTtl(final String snapshotName, final long ttl)<a name="line.523"></a>
+<span class="sourceLineNo">524</span> throws IOException {<a name="line.524"></a>
+<span class="sourceLineNo">525</span> SnapshotTestingUtils.SnapshotMock snapshotMock =<a name="line.525"></a>
+<span class="sourceLineNo">526</span> new SnapshotTestingUtils.SnapshotMock(UTIL.getConfiguration(), fs, rootDir);<a name="line.526"></a>
+<span class="sourceLineNo">527</span> SnapshotTestingUtils.SnapshotMock.SnapshotBuilder builder =<a name="line.527"></a>
+<span class="sourceLineNo">528</span> snapshotMock.createSnapshotV2(snapshotName, "test", 0, ttl);<a name="line.528"></a>
+<span class="sourceLineNo">529</span> builder.commit();<a name="line.529"></a>
+<span class="sourceLineNo">530</span> return builder.getSnapshotDescription();<a name="line.530"></a>
+<span class="sourceLineNo">531</span> }<a name="line.531"></a>
+<span class="sourceLineNo">532</span><a name="line.532"></a>
+<span class="sourceLineNo">533</span> @Test<a name="line.533"></a>
+<span class="sourceLineNo">534</span> public void testAsyncSnapshotWillNotBlockSnapshotHFileCleaner() throws Exception {<a name="line.534"></a>
+<span class="sourceLineNo">535</span> // Write some data<a name="line.535"></a>
+<span class="sourceLineNo">536</span> Table table = UTIL.getConnection().getTable(TABLE_NAME);<a name="line.536"></a>
+<span class="sourceLineNo">537</span> for (int i = 0; i < 10; i++) {<a name="line.537"></a>
+<span class="sourceLineNo">538</span> Put put = new Put(Bytes.toBytes(i)).addColumn(TEST_FAM, Bytes.toBytes("q"), Bytes.toBytes(i));<a name="line.538"></a>
+<span class="sourceLineNo">539</span> table.put(put);<a name="line.539"></a>
+<span class="sourceLineNo">540</span> }<a name="line.540"></a>
+<span class="sourceLineNo">541</span> String snapshotName = "testAsyncSnapshotWillNotBlockSnapshotHFileCleaner01";<a name="line.541"></a>
+<span class="sourceLineNo">542</span> Future<Void> future =<a name="line.542"></a>
+<span class="sourceLineNo">543</span> UTIL.getAdmin().snapshotAsync(new org.apache.hadoop.hbase.client.SnapshotDescription(<a name="line.543"></a>
+<span class="sourceLineNo">544</span> snapshotName, TABLE_NAME, SnapshotType.FLUSH));<a name="line.544"></a>
+<span class="sourceLineNo">545</span> Waiter.waitFor(UTIL.getConfiguration(), 10 * 1000L, 200L,<a name="line.545"></a>
+<span class="sourceLineNo">546</span> () -> UTIL.getAdmin().listSnapshots(Pattern.compile(snapshotName)).size() == 1);<a name="line.546"></a>
+<span class="sourceLineNo">547</span> UTIL.waitFor(30000, () -> !master.getSnapshotManager().isTakingAnySnapshot());<a name="line.547"></a>
+<span class="sourceLineNo">548</span> }<a name="line.548"></a>
+<span class="sourceLineNo">549</span>}<a name="line.549"></a>
diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html
index 29e1086..650b834 100644
--- a/testdevapidocs/src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html
+++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroupsKillRS.html
@@ -47,210 +47,210 @@
<span class="sourceLineNo">039</span>import org.apache.hadoop.hbase.client.Table;<a name="line.39"></a>
<span class="sourceLineNo">040</span>import org.apache.hadoop.hbase.client.TableDescriptor;<a name="line.40"></a>
<span class="sourceLineNo">041</span>import org.apache.hadoop.hbase.client.TableDescriptorBuilder;<a name="line.41"></a>
-<span class="sourceLineNo">042</span>import org.apache.hadoop.hbase.net.Address;<a name="line.42"></a>
-<span class="sourceLineNo">043</span>import org.apache.hadoop.hbase.testclassification.MediumTests;<a name="line.43"></a>
-<span class="sourceLineNo">044</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.44"></a>
-<span class="sourceLineNo">045</span>import org.apache.hadoop.hbase.util.JVMClusterUtil;<a name="line.45"></a>
-<span class="sourceLineNo">046</span>import org.apache.hadoop.hbase.util.VersionInfo;<a name="line.46"></a>
-<span class="sourceLineNo">047</span>import org.junit.After;<a name="line.47"></a>
-<span class="sourceLineNo">048</span>import org.junit.AfterClass;<a name="line.48"></a>
-<span class="sourceLineNo">049</span>import org.junit.Before;<a name="line.49"></a>
-<span class="sourceLineNo">050</span>import org.junit.BeforeClass;<a name="line.50"></a>
-<span class="sourceLineNo">051</span>import org.junit.ClassRule;<a name="line.51"></a>
-<span class="sourceLineNo">052</span>import org.junit.Test;<a name="line.52"></a>
-<span class="sourceLineNo">053</span>import org.junit.experimental.categories.Category;<a name="line.53"></a>
-<span class="sourceLineNo">054</span>import org.slf4j.Logger;<a name="line.54"></a>
-<span class="sourceLineNo">055</span>import org.slf4j.LoggerFactory;<a name="line.55"></a>
-<span class="sourceLineNo">056</span><a name="line.56"></a>
-<span class="sourceLineNo">057</span>import org.apache.hbase.thirdparty.com.google.common.collect.Sets;<a name="line.57"></a>
-<span class="sourceLineNo">058</span><a name="line.58"></a>
-<span class="sourceLineNo">059</span>@Category({ MediumTests.class })<a name="line.59"></a>
-<span class="sourceLineNo">060</span>public class TestRSGroupsKillRS extends TestRSGroupsBase {<a name="line.60"></a>
-<span class="sourceLineNo">061</span><a name="line.61"></a>
-<span class="sourceLineNo">062</span> @ClassRule<a name="line.62"></a>
-<span class="sourceLineNo">063</span> public static final HBaseClassTestRule CLASS_RULE =<a name="line.63"></a>
-<span class="sourceLineNo">064</span> HBaseClassTestRule.forClass(TestRSGroupsKillRS.class);<a name="line.64"></a>
-<span class="sourceLineNo">065</span><a name="line.65"></a>
-<span class="sourceLineNo">066</span> protected static final Logger LOG = LoggerFactory.getLogger(TestRSGroupsKillRS.class);<a name="line.66"></a>
-<span class="sourceLineNo">067</span><a name="line.67"></a>
-<span class="sourceLineNo">068</span> @BeforeClass<a name="line.68"></a>
-<span class="sourceLineNo">069</span> public static void setUp() throws Exception {<a name="line.69"></a>
-<span class="sourceLineNo">070</span> setUpTestBeforeClass();<a name="line.70"></a>
-<span class="sourceLineNo">071</span> }<a name="line.71"></a>
-<span class="sourceLineNo">072</span><a name="line.72"></a>
-<span class="sourceLineNo">073</span> @AfterClass<a name="line.73"></a>
-<span class="sourceLineNo">074</span> public static void tearDown() throws Exception {<a name="line.74"></a>
-<span class="sourceLineNo">075</span> tearDownAfterClass();<a name="line.75"></a>
-<span class="sourceLineNo">076</span> }<a name="line.76"></a>
-<span class="sourceLineNo">077</span><a name="line.77"></a>
-<span class="sourceLineNo">078</span> @Before<a name="line.78"></a>
-<span class="sourceLineNo">079</span> public void beforeMethod() throws Exception {<a name="line.79"></a>
-<span class="sourceLineNo">080</span> setUpBeforeMethod();<a name="line.80"></a>
-<span class="sourceLineNo">081</span> }<a name="line.81"></a>
-<span class="sourceLineNo">082</span><a name="line.82"></a>
-<span class="sourceLineNo">083</span> @After<a name="line.83"></a>
-<span class="sourceLineNo">084</span> public void afterMethod() throws Exception {<a name="line.84"></a>
-<span class="sourceLineNo">085</span> tearDownAfterMethod();<a name="line.85"></a>
-<span class="sourceLineNo">086</span> }<a name="line.86"></a>
-<span class="sourceLineNo">087</span><a name="line.87"></a>
-<span class="sourceLineNo">088</span> @Test<a name="line.88"></a>
-<span class="sourceLineNo">089</span> public void testKillRS() throws Exception {<a name="line.89"></a>
-<span class="sourceLineNo">090</span> RSGroupInfo appInfo = addGroup("appInfo", 1);<a name="line.90"></a>
-<span class="sourceLineNo">091</span> final TableName tableName = TableName.valueOf(tablePrefix + "_ns", name.getMethodName());<a name="line.91"></a>
-<span class="sourceLineNo">092</span> admin.createNamespace(NamespaceDescriptor.create(tableName.getNamespaceAsString())<a name="line.92"></a>
-<span class="sourceLineNo">093</span> .addConfiguration(RSGroupInfo.NAMESPACE_DESC_PROP_GROUP, appInfo.getName()).build());<a name="line.93"></a>
-<span class="sourceLineNo">094</span> final TableDescriptor desc = TableDescriptorBuilder.newBuilder(tableName)<a name="line.94"></a>
-<span class="sourceLineNo">095</span> .setColumnFamily(ColumnFamilyDescriptorBuilder.of("f")).build();<a name="line.95"></a>
-<span class="sourceLineNo">096</span> admin.createTable(desc);<a name="line.96"></a>
-<span class="sourceLineNo">097</span> // wait for created table to be assigned<a name="line.97"></a>
-<span class="sourceLineNo">098</span> TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() {<a name="line.98"></a>
-<span class="sourceLineNo">099</span> @Override<a name="line.99"></a>
-<span class="sourceLineNo">100</span> public boolean evaluate() throws Exception {<a name="line.100"></a>
-<span class="sourceLineNo">101</span> return getTableRegionMap().get(desc.getTableName()) != null;<a name="line.101"></a>
-<span class="sourceLineNo">102</span> }<a name="line.102"></a>
-<span class="sourceLineNo">103</span> });<a name="line.103"></a>
-<span class="sourceLineNo">104</span><a name="line.104"></a>
-<span class="sourceLineNo">105</span> ServerName targetServer = getServerName(appInfo.getServers().iterator().next());<a name="line.105"></a>
-<span class="sourceLineNo">106</span> assertEquals(1, admin.getRegions(targetServer).size());<a name="line.106"></a>
-<span class="sourceLineNo">107</span><a name="line.107"></a>
-<span class="sourceLineNo">108</span> try {<a name="line.108"></a>
-<span class="sourceLineNo">109</span> // stopping may cause an exception<a name="line.109"></a>
-<span class="sourceLineNo">110</span> // due to the connection loss<a name="line.110"></a>
-<span class="sourceLineNo">111</span> admin.stopRegionServer(targetServer.getAddress().toString());<a name="line.111"></a>
-<span class="sourceLineNo">112</span> } catch (Exception e) {<a name="line.112"></a>
-<span class="sourceLineNo">113</span> }<a name="line.113"></a>
-<span class="sourceLineNo">114</span> // wait until the server is actually down<a name="line.114"></a>
-<span class="sourceLineNo">115</span> TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() {<a name="line.115"></a>
-<span class="sourceLineNo">116</span> @Override<a name="line.116"></a>
-<span class="sourceLineNo">117</span> public boolean evaluate() throws Exception {<a name="line.117"></a>
-<span class="sourceLineNo">118</span> return !cluster.getClusterMetrics().getLiveServerMetrics().containsKey(targetServer);<a name="line.118"></a>
-<span class="sourceLineNo">119</span> }<a name="line.119"></a>
-<span class="sourceLineNo">120</span> });<a name="line.120"></a>
-<span class="sourceLineNo">121</span> // there is only one rs in the group and we killed it, so the region can not be online, until<a name="line.121"></a>
-<span class="sourceLineNo">122</span> // later we add new servers to it.<a name="line.122"></a>
-<span class="sourceLineNo">123</span> TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() {<a name="line.123"></a>
-<span class="sourceLineNo">124</span> @Override<a name="line.124"></a>
-<span class="sourceLineNo">125</span> public boolean evaluate() throws Exception {<a name="line.125"></a>
-<span class="sourceLineNo">126</span> return !cluster.getClusterMetrics().getRegionStatesInTransition().isEmpty();<a name="line.126"></a>
-<span class="sourceLineNo">127</span> }<a name="line.127"></a>
-<span class="sourceLineNo">128</span> });<a name="line.128"></a>
-<span class="sourceLineNo">129</span> Set<Address> newServers = Sets.newHashSet();<a name="line.129"></a>
-<span class="sourceLineNo">130</span> newServers<a name="line.130"></a>
-<span class="sourceLineNo">131</span> .add(rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP).getServers().iterator().next());<a name="line.131"></a>
-<span class="sourceLineNo">132</span> rsGroupAdmin.moveServers(newServers, appInfo.getName());<a name="line.132"></a>
-<span class="sourceLineNo">133</span><a name="line.133"></a>
-<span class="sourceLineNo">134</span> // Make sure all the table's regions get reassigned<a name="line.134"></a>
-<span class="sourceLineNo">135</span> // disabling the table guarantees no conflicting assign/unassign (ie SSH) happens<a name="line.135"></a>
-<span class="sourceLineNo">136</span> admin.disableTable(tableName);<a name="line.136"></a>
-<span class="sourceLineNo">137</span> admin.enableTable(tableName);<a name="line.137"></a>
-<span class="sourceLineNo">138</span><a name="line.138"></a>
-<span class="sourceLineNo">139</span> // wait for region to be assigned<a name="line.139"></a>
-<span class="sourceLineNo">140</span> TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() {<a name="line.140"></a>
-<span class="sourceLineNo">141</span> @Override<a name="line.141"></a>
-<span class="sourceLineNo">142</span> public boolean evaluate() throws Exception {<a name="line.142"></a>
-<span class="sourceLineNo">143</span> return cluster.getClusterMetrics().getRegionStatesInTransition().isEmpty();<a name="line.143"></a>
-<span class="sourceLineNo">144</span> }<a name="line.144"></a>
-<span class="sourceLineNo">145</span> });<a name="line.145"></a>
-<span class="sourceLineNo">146</span><a name="line.146"></a>
-<span class="sourceLineNo">147</span> ServerName targetServer1 = getServerName(newServers.iterator().next());<a name="line.147"></a>
-<span class="sourceLineNo">148</span> assertEquals(1, admin.getRegions(targetServer1).size());<a name="line.148"></a>
-<span class="sourceLineNo">149</span> assertEquals(tableName, admin.getRegions(targetServer1).get(0).getTable());<a name="line.149"></a>
-<span class="sourceLineNo">150</span> }<a name="line.150"></a>
-<span class="sourceLineNo">151</span><a name="line.151"></a>
-<span class="sourceLineNo">152</span> @Test<a name="line.152"></a>
-<span class="sourceLineNo">153</span> public void testKillAllRSInGroup() throws Exception {<a name="line.153"></a>
-<span class="sourceLineNo">154</span> // create a rsgroup and move two regionservers to it<a name="line.154"></a>
-<span class="sourceLineNo">155</span> String groupName = "my_group";<a name="line.155"></a>
-<span class="sourceLineNo">156</span> int groupRSCount = 2;<a name="line.156"></a>
-<span class="sourceLineNo">157</span> addGroup(groupName, groupRSCount);<a name="line.157"></a>
-<span class="sourceLineNo">158</span><a name="line.158"></a>
-<span class="sourceLineNo">159</span> // create a table, and move it to my_group<a name="line.159"></a>
-<span class="sourceLineNo">160</span> Table t = TEST_UTIL.createMultiRegionTable(tableName, Bytes.toBytes("f"), 5);<a name="line.160"></a>
-<span class="sourceLineNo">161</span> TEST_UTIL.loadTable(t, Bytes.toBytes("f"));<a name="line.161"></a>
-<span class="sourceLineNo">162</span> Set<TableName> toAddTables = new HashSet<>();<a name="line.162"></a>
-<span class="sourceLineNo">163</span> toAddTables.add(tableName);<a name="line.163"></a>
-<span class="sourceLineNo">164</span> rsGroupAdmin.moveTables(toAddTables, groupName);<a name="line.164"></a>
-<span class="sourceLineNo">165</span> assertTrue(rsGroupAdmin.getRSGroupInfo(groupName).getTables().contains(tableName));<a name="line.165"></a>
-<span class="sourceLineNo">166</span> TEST_UTIL.waitTableAvailable(tableName, 30000);<a name="line.166"></a>
-<span class="sourceLineNo">167</span><a name="line.167"></a>
-<span class="sourceLineNo">168</span> // check my_group servers and table regions<a name="line.168"></a>
-<span class="sourceLineNo">169</span> Set<Address> servers = rsGroupAdmin.getRSGroupInfo(groupName).getServers();<a name="line.169"></a>
-<span class="sourceLineNo">170</span> assertEquals(2, servers.size());<a name="line.170"></a>
-<span class="sourceLineNo">171</span> LOG.debug("group servers {}", servers);<a name="line.171"></a>
-<span class="sourceLineNo">172</span> for (RegionInfo tr :<a name="line.172"></a>
-<span class="sourceLineNo">173</span> master.getAssignmentManager().getRegionStates().getRegionsOfTable(tableName)) {<a name="line.173"></a>
-<span class="sourceLineNo">174</span> assertTrue(servers.contains(<a name="line.174"></a>
-<span class="sourceLineNo">175</span> master.getAssignmentManager().getRegionStates().getRegionAssignments()<a name="line.175"></a>
-<span class="sourceLineNo">176</span> .get(tr).getAddress()));<a name="line.176"></a>
-<span class="sourceLineNo">177</span> }<a name="line.177"></a>
-<span class="sourceLineNo">178</span><a name="line.178"></a>
-<span class="sourceLineNo">179</span> // Move a region, to ensure there exists a region whose 'lastHost' is in my_group<a name="line.179"></a>
-<span class="sourceLineNo">180</span> // ('lastHost' of other regions are in 'default' group)<a name="line.180"></a>
-<span class="sourceLineNo">181</span> // and check if all table regions are online<a name="line.181"></a>
-<span class="sourceLineNo">182</span> List<ServerName> gsn = new ArrayList<>();<a name="line.182"></a>
-<span class="sourceLineNo">183</span> for(Address addr : servers){<a name="line.183"></a>
-<span class="sourceLineNo">184</span> gsn.add(getServerName(addr));<a name="line.184"></a>
-<span class="sourceLineNo">185</span> }<a name="line.185"></a>
-<span class="sourceLineNo">186</span> assertEquals(2, gsn.size());<a name="line.186"></a>
-<span class="sourceLineNo">187</span> for(Map.Entry<RegionInfo, ServerName> entry :<a name="line.187"></a>
-<span class="sourceLineNo">188</span> master.getAssignmentManager().getRegionStates().getRegionAssignments().entrySet()){<a name="line.188"></a>
-<span class="sourceLineNo">189</span> if(entry.getKey().getTable().equals(tableName)){<a name="line.189"></a>
-<span class="sourceLineNo">190</span> LOG.debug("move region {} from {} to {}", entry.getKey().getRegionNameAsString(),<a name="line.190"></a>
-<span class="sourceLineNo">191</span> entry.getValue(), gsn.get(1 - gsn.indexOf(entry.getValue())));<a name="line.191"></a>
-<span class="sourceLineNo">192</span> TEST_UTIL.moveRegionAndWait(entry.getKey(), gsn.get(1 - gsn.indexOf(entry.getValue())));<a name="line.192"></a>
-<span class="sourceLineNo">193</span> break;<a name="line.193"></a>
-<span class="sourceLineNo">194</span> }<a name="line.194"></a>
-<span class="sourceLineNo">195</span> }<a name="line.195"></a>
-<span class="sourceLineNo">196</span> TEST_UTIL.waitTableAvailable(tableName, 30000);<a name="line.196"></a>
-<span class="sourceLineNo">197</span><a name="line.197"></a>
-<span class="sourceLineNo">198</span> // case 1: stop all the regionservers in my_group, and restart a regionserver in my_group,<a name="line.198"></a>
-<span class="sourceLineNo">199</span> // and then check if all table regions are online<a name="line.199"></a>
-<span class="sourceLineNo">200</span> for(Address addr : rsGroupAdmin.getRSGroupInfo(groupName).getServers()) {<a name="line.200"></a>
-<span class="sourceLineNo">201</span> TEST_UTIL.getMiniHBaseCluster().stopRegionServer(getServerName(addr));<a name="line.201"></a>
-<span class="sourceLineNo">202</span> }<a name="line.202"></a>
-<span class="sourceLineNo">203</span> // better wait for a while for region reassign<a name="line.203"></a>
-<span class="sourceLineNo">204</span> sleep(10000);<a name="line.204"></a>
-<span class="sourceLineNo">205</span> assertEquals(NUM_SLAVES_BASE - gsn.size(),<a name="line.205"></a>
-<span class="sourceLineNo">206</span> TEST_UTIL.getMiniHBaseCluster().getLiveRegionServerThreads().size());<a name="line.206"></a>
-<span class="sourceLineNo">207</span> TEST_UTIL.getMiniHBaseCluster().startRegionServer(gsn.get(0).getHostname(),<a name="line.207"></a>
-<span class="sourceLineNo">208</span> gsn.get(0).getPort());<a name="line.208"></a>
-<span class="sourceLineNo">209</span> assertEquals(NUM_SLAVES_BASE - gsn.size() + 1,<a name="line.209"></a>
-<span class="sourceLineNo">210</span> TEST_UTIL.getMiniHBaseCluster().getLiveRegionServerThreads().size());<a name="line.210"></a>
-<span class="sourceLineNo">211</span> TEST_UTIL.waitTableAvailable(tableName, 30000);<a name="line.211"></a>
-<span class="sourceLineNo">212</span><a name="line.212"></a>
-<span class="sourceLineNo">213</span> // case 2: stop all the regionservers in my_group, and move another<a name="line.213"></a>
-<span class="sourceLineNo">214</span> // regionserver(from the 'default' group) to my_group,<a name="line.214"></a>
-<span class="sourceLineNo">215</span> // and then check if all table regions are online<a name="line.215"></a>
-<span class="sourceLineNo">216</span> for(JVMClusterUtil.RegionServerThread rst :<a name="line.216"></a>
-<span class="sourceLineNo">217</span> TEST_UTIL.getMiniHBaseCluster().getLiveRegionServerThreads()){<a name="line.217"></a>
-<span class="sourceLineNo">218</span> if(rst.getRegionServer().getServerName().getAddress().equals(gsn.get(0).getAddress())){<a name="line.218"></a>
-<span class="sourceLineNo">219</span> TEST_UTIL.getMiniHBaseCluster().stopRegionServer(rst.getRegionServer().getServerName());<a name="line.219"></a>
-<span class="sourceLineNo">220</span> break;<a name="line.220"></a>
-<span class="sourceLineNo">221</span> }<a name="line.221"></a>
-<span class="sourceLineNo">222</span> }<a name="line.222"></a>
-<span class="sourceLineNo">223</span> sleep(10000);<a name="line.223"></a>
-<span class="sourceLineNo">224</span> assertEquals(NUM_SLAVES_BASE - gsn.size(),<a name="line.224"></a>
-<span class="sourceLineNo">225</span> TEST_UTIL.getMiniHBaseCluster().getLiveRegionServerThreads().size());<a name="line.225"></a>
-<span class="sourceLineNo">226</span> ServerName newServer = master.getServerManager().getOnlineServersList().get(0);<a name="line.226"></a>
-<span class="sourceLineNo">227</span> rsGroupAdmin.moveServers(Sets.newHashSet(newServer.getAddress()), groupName);<a name="line.227"></a>
-<span class="sourceLineNo">228</span> // wait and check if table regions are online<a name="line.228"></a>
-<span class="sourceLineNo">229</span> TEST_UTIL.waitTableAvailable(tableName, 30000);<a name="line.229"></a>
-<span class="sourceLineNo">230</span> }<a name="line.230"></a>
-<span class="sourceLineNo">231</span><a name="line.231"></a>
-<span class="sourceLineNo">232</span> @Test<a name="line.232"></a>
-<span class="sourceLineNo">233</span> public void testLowerMetaGroupVersion() throws Exception{<a name="line.233"></a>
-<span class="sourceLineNo">234</span> // create a rsgroup and move one regionserver to it<a name="line.234"></a>
-<span class="sourceLineNo">235</span> String groupName = "meta_group";<a name="line.235"></a>
-<span class="sourceLineNo">236</span> int groupRSCount = 1;<a name="line.236"></a>
-<span class="sourceLineNo">237</span> addGroup(groupName, groupRSCount);<a name="line.237"></a>
-<span class="sourceLineNo">238</span><a name="line.238"></a>
-<span class="sourceLineNo">239</span> // move hbase:meta to meta_group<a name="line.239"></a>
-<span class="sourceLineNo">240</span> tableName = TableName.META_TABLE_NAME;<a name="line.240"></a>
+<span class="sourceLineNo">042</span>import org.apache.hadoop.hbase.master.procedure.ServerCrashProcedure;<a name="line.42"></a>
+<span class="sourceLineNo">043</span>import org.apache.hadoop.hbase.net.Address;<a name="line.43"></a>
+<span class="sourceLineNo">044</span>import org.apache.hadoop.hbase.testclassification.LargeTests;<a name="line.44"></a>
+<span class="sourceLineNo">045</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.45"></a>
+<span class="sourceLineNo">046</span>import org.apache.hadoop.hbase.util.JVMClusterUtil;<a name="line.46"></a>
+<span class="sourceLineNo">047</span>import org.apache.hadoop.hbase.util.VersionInfo;<a name="line.47"></a>
+<span class="sourceLineNo">048</span>import org.junit.After;<a name="line.48"></a>
+<span class="sourceLineNo">049</span>import org.junit.AfterClass;<a name="line.49"></a>
+<span class="sourceLineNo">050</span>import org.junit.Before;<a name="line.50"></a>
+<span class="sourceLineNo">051</span>import org.junit.BeforeClass;<a name="line.51"></a>
+<span class="sourceLineNo">052</span>import org.junit.ClassRule;<a name="line.52"></a>
+<span class="sourceLineNo">053</span>import org.junit.Test;<a name="line.53"></a>
+<span class="sourceLineNo">054</span>import org.junit.experimental.categories.Category;<a name="line.54"></a>
+<span class="sourceLineNo">055</span>import org.slf4j.Logger;<a name="line.55"></a>
+<span class="sourceLineNo">056</span>import org.slf4j.LoggerFactory;<a name="line.56"></a>
+<span class="sourceLineNo">057</span><a name="line.57"></a>
+<span class="sourceLineNo">058</span>import org.apache.hbase.thirdparty.com.google.common.collect.Sets;<a name="line.58"></a>
+<span class="sourceLineNo">059</span><a name="line.59"></a>
+<span class="sourceLineNo">060</span>@Category({ LargeTests.class })<a name="line.60"></a>
+<span class="sourceLineNo">061</span>public class TestRSGroupsKillRS extends TestRSGroupsBase {<a name="line.61"></a>
+<span class="sourceLineNo">062</span><a name="line.62"></a>
+<span class="sourceLineNo">063</span> @ClassRule<a name="line.63"></a>
+<span class="sourceLineNo">064</span> public static final HBaseClassTestRule CLASS_RULE =<a name="line.64"></a>
+<span class="sourceLineNo">065</span> HBaseClassTestRule.forClass(TestRSGroupsKillRS.class);<a name="line.65"></a>
+<span class="sourceLineNo">066</span><a name="line.66"></a>
+<span class="sourceLineNo">067</span> protected static final Logger LOG = LoggerFactory.getLogger(TestRSGroupsKillRS.class);<a name="line.67"></a>
+<span class="sourceLineNo">068</span><a name="line.68"></a>
+<span class="sourceLineNo">069</span> @BeforeClass<a name="line.69"></a>
+<span class="sourceLineNo">070</span> public static void setUp() throws Exception {<a name="line.70"></a>
+<span class="sourceLineNo">071</span> setUpTestBeforeClass();<a name="line.71"></a>
+<span class="sourceLineNo">072</span> }<a name="line.72"></a>
+<span class="sourceLineNo">073</span><a name="line.73"></a>
+<span class="sourceLineNo">074</span> @AfterClass<a name="line.74"></a>
+<span class="sourceLineNo">075</span> public static void tearDown() throws Exception {<a name="line.75"></a>
+<span class="sourceLineNo">076</span> tearDownAfterClass();<a name="line.76"></a>
+<span class="sourceLineNo">077</span> }<a name="line.77"></a>
+<span class="sourceLineNo">078</span><a name="line.78"></a>
+<span class="sourceLineNo">079</span> @Before<a name="line.79"></a>
+<span class="sourceLineNo">080</span> public void beforeMethod() throws Exception {<a name="line.80"></a>
+<span class="sourceLineNo">081</span> setUpBeforeMethod();<a name="line.81"></a>
+<span class="sourceLineNo">082</span> }<a name="line.82"></a>
+<span class="sourceLineNo">083</span><a name="line.83"></a>
+<span class="sourceLineNo">084</span> @After<a name="line.84"></a>
+<span class="sourceLineNo">085</span> public void afterMethod() throws Exception {<a name="line.85"></a>
+<span class="sourceLineNo">086</span> tearDownAfterMethod();<a name="line.86"></a>
+<span class="sourceLineNo">087</span> }<a name="line.87"></a>
+<span class="sourceLineNo">088</span><a name="line.88"></a>
+<span class="sourceLineNo">089</span> @Test<a name="line.89"></a>
+<span class="sourceLineNo">090</span> public void testKillRS() throws Exception {<a name="line.90"></a>
+<span class="sourceLineNo">091</span> RSGroupInfo appInfo = addGroup("appInfo", 1);<a name="line.91"></a>
+<span class="sourceLineNo">092</span> final TableName tableName = TableName.valueOf(tablePrefix + "_ns", name.getMethodName());<a name="line.92"></a>
+<span class="sourceLineNo">093</span> admin.createNamespace(NamespaceDescriptor.create(tableName.getNamespaceAsString())<a name="line.93"></a>
+<span class="sourceLineNo">094</span> .addConfiguration(RSGroupInfo.NAMESPACE_DESC_PROP_GROUP, appInfo.getName()).build());<a name="line.94"></a>
+<span class="sourceLineNo">095</span> final TableDescriptor desc = TableDescriptorBuilder.newBuilder(tableName)<a name="line.95"></a>
+<span class="sourceLineNo">096</span> .setColumnFamily(ColumnFamilyDescriptorBuilder.of("f")).build();<a name="line.96"></a>
+<span class="sourceLineNo">097</span> admin.createTable(desc);<a name="line.97"></a>
+<span class="sourceLineNo">098</span> // wait for created table to be assigned<a name="line.98"></a>
+<span class="sourceLineNo">099</span> TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() {<a name="line.99"></a>
+<span class="sourceLineNo">100</span> @Override<a name="line.100"></a>
+<span class="sourceLineNo">101</span> public boolean evaluate() throws Exception {<a name="line.101"></a>
+<span class="sourceLineNo">102</span> return getTableRegionMap().get(desc.getTableName()) != null;<a name="line.102"></a>
+<span class="sourceLineNo">103</span> }<a name="line.103"></a>
+<span class="sourceLineNo">104</span> });<a name="line.104"></a>
+<span class="sourceLineNo">105</span><a name="line.105"></a>
+<span class="sourceLineNo">106</span> ServerName targetServer = getServerName(appInfo.getServers().iterator().next());<a name="line.106"></a>
+<span class="sourceLineNo">107</span> assertEquals(1, admin.getRegions(targetServer).size());<a name="line.107"></a>
+<span class="sourceLineNo">108</span><a name="line.108"></a>
+<span class="sourceLineNo">109</span> try {<a name="line.109"></a>
+<span class="sourceLineNo">110</span> // stopping may cause an exception<a name="line.110"></a>
+<span class="sourceLineNo">111</span> // due to the connection loss<a name="line.111"></a>
+<span class="sourceLineNo">112</span> admin.stopRegionServer(targetServer.getAddress().toString());<a name="line.112"></a>
+<span class="sourceLineNo">113</span> } catch (Exception e) {<a name="line.113"></a>
+<span class="sourceLineNo">114</span> }<a name="line.114"></a>
+<span class="sourceLineNo">115</span> // wait until the server is actually down<a name="line.115"></a>
+<span class="sourceLineNo">116</span> TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() {<a name="line.116"></a>
+<span class="sourceLineNo">117</span> @Override<a name="line.117"></a>
+<span class="sourceLineNo">118</span> public boolean evaluate() throws Exception {<a name="line.118"></a>
+<span class="sourceLineNo">119</span> return !cluster.getClusterMetrics().getLiveServerMetrics().containsKey(targetServer);<a name="line.119"></a>
+<span class="sourceLineNo">120</span> }<a name="line.120"></a>
+<span class="sourceLineNo">121</span> });<a name="line.121"></a>
+<span class="sourceLineNo">122</span> // there is only one rs in the group and we killed it, so the region can not be online, until<a name="line.122"></a>
+<span class="sourceLineNo">123</span> // later we add new servers to it.<a name="line.123"></a>
+<span class="sourceLineNo">124</span> TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() {<a name="line.124"></a>
+<span class="sourceLineNo">125</span> @Override<a name="line.125"></a>
+<span class="sourceLineNo">126</span> public boolean evaluate() throws Exception {<a name="line.126"></a>
+<span class="sourceLineNo">127</span> return !cluster.getClusterMetrics().getRegionStatesInTransition().isEmpty();<a name="line.127"></a>
+<span class="sourceLineNo">128</span> }<a name="line.128"></a>
+<span class="sourceLineNo">129</span> });<a name="line.129"></a>
+<span class="sourceLineNo">130</span> Set<Address> newServers = Sets.newHashSet();<a name="line.130"></a>
+<span class="sourceLineNo">131</span> newServers<a name="line.131"></a>
+<span class="sourceLineNo">132</span> .add(rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP).getServers().iterator().next());<a name="line.132"></a>
+<span class="sourceLineNo">133</span> rsGroupAdmin.moveServers(newServers, appInfo.getName());<a name="line.133"></a>
+<span class="sourceLineNo">134</span><a name="line.134"></a>
+<span class="sourceLineNo">135</span> // Make sure all the table's regions get reassigned<a name="line.135"></a>
+<span class="sourceLineNo">136</span> // disabling the table guarantees no conflicting assign/unassign (ie SSH) happens<a name="line.136"></a>
+<span class="sourceLineNo">137</span> admin.disableTable(tableName);<a name="line.137"></a>
+<span class="sourceLineNo">138</span> admin.enableTable(tableName);<a name="line.138"></a>
+<span class="sourceLineNo">139</span><a name="line.139"></a>
+<span class="sourceLineNo">140</span> // wait for region to be assigned<a name="line.140"></a>
+<span class="sourceLineNo">141</span> TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() {<a name="line.141"></a>
+<span class="sourceLineNo">142</span> @Override<a name="line.142"></a>
+<span class="sourceLineNo">143</span> public boolean evaluate() throws Exception {<a name="line.143"></a>
+<span class="sourceLineNo">144</span> return cluster.getClusterMetrics().getRegionStatesInTransition().isEmpty();<a name="line.144"></a>
+<span class="sourceLineNo">145</span> }<a name="line.145"></a>
+<span class="sourceLineNo">146</span> });<a name="line.146"></a>
+<span class="sourceLineNo">147</span><a name="line.147"></a>
+<span class="sourceLineNo">148</span> ServerName targetServer1 = getServerName(newServers.iterator().next());<a name="line.148"></a>
+<span class="sourceLineNo">149</span> assertEquals(1, admin.getRegions(targetServer1).size());<a name="line.149"></a>
+<span class="sourceLineNo">150</span> assertEquals(tableName, admin.getRegions(targetServer1).get(0).getTable());<a name="line.150"></a>
+<span class="sourceLineNo">151</span> }<a name="line.151"></a>
+<span class="sourceLineNo">152</span><a name="line.152"></a>
+<span class="sourceLineNo">153</span> @Test<a name="line.153"></a>
+<span class="sourceLineNo">154</span> public void testKillAllRSInGroup() throws Exception {<a name="line.154"></a>
+<span class="sourceLineNo">155</span> // create a rsgroup and move two regionservers to it<a name="line.155"></a>
+<span class="sourceLineNo">156</span> String groupName = "my_group";<a name="line.156"></a>
+<span class="sourceLineNo">157</span> int groupRSCount = 2;<a name="line.157"></a>
+<span class="sourceLineNo">158</span> addGroup(groupName, groupRSCount);<a name="line.158"></a>
+<span class="sourceLineNo">159</span><a name="line.159"></a>
+<span class="sourceLineNo">160</span> // create a table, and move it to my_group<a name="line.160"></a>
+<span class="sourceLineNo">161</span> Table t = TEST_UTIL.createMultiRegionTable(tableName, Bytes.toBytes("f"), 5);<a name="line.161"></a>
+<span class="sourceLineNo">162</span> TEST_UTIL.loadTable(t, Bytes.toBytes("f"));<a name="line.162"></a>
+<span class="sourceLineNo">163</span> Set<TableName> toAddTables = new HashSet<>();<a name="line.163"></a>
+<span class="sourceLineNo">164</span> toAddTables.add(tableName);<a name="line.164"></a>
+<span class="sourceLineNo">165</span> rsGroupAdmin.moveTables(toAddTables, groupName);<a name="line.165"></a>
+<span class="sourceLineNo">166</span> assertTrue(rsGroupAdmin.getRSGroupInfo(groupName).getTables().contains(tableName));<a name="line.166"></a>
+<span class="sourceLineNo">167</span> TEST_UTIL.waitTableAvailable(tableName, 30000);<a name="line.167"></a>
+<span class="sourceLineNo">168</span><a name="line.168"></a>
+<span class="sourceLineNo">169</span> // check my_group servers and table regions<a name="line.169"></a>
+<span class="sourceLineNo">170</span> Set<Address> servers = rsGroupAdmin.getRSGroupInfo(groupName).getServers();<a name="line.170"></a>
+<span class="sourceLineNo">171</span> assertEquals(2, servers.size());<a name="line.171"></a>
+<span class="sourceLineNo">172</span> LOG.debug("group servers {}", servers);<a name="line.172"></a>
+<span class="sourceLineNo">173</span> for (RegionInfo tr :<a name="line.173"></a>
+<span class="sourceLineNo">174</span> master.getAssignmentManager().getRegionStates().getRegionsOfTable(tableName)) {<a name="line.174"></a>
+<span class="sourceLineNo">175</span> assertTrue(servers.contains(<a name="line.175"></a>
+<span class="sourceLineNo">176</span> master.getAssignmentManager().getRegionStates().getRegionAssignments()<a name="line.176"></a>
+<span class="sourceLineNo">177</span> .get(tr).getAddress()));<a name="line.177"></a>
+<span class="sourceLineNo">178</span> }<a name="line.178"></a>
+<span class="sourceLineNo">179</span><a name="line.179"></a>
+<span class="sourceLineNo">180</span> // Move a region, to ensure there exists a region whose 'lastHost' is in my_group<a name="line.180"></a>
+<span class="sourceLineNo">181</span> // ('lastHost' of other regions are in 'default' group)<a name="line.181"></a>
+<span class="sourceLineNo">182</span> // and check if all table regions are online<a name="line.182"></a>
+<span class="sourceLineNo">183</span> List<ServerName> gsn = new ArrayList<>();<a name="line.183"></a>
+<span class="sourceLineNo">184</span> for(Address addr : servers){<a name="line.184"></a>
+<span class="sourceLineNo">185</span> gsn.add(getServerName(addr));<a name="line.185"></a>
+<span class="sourceLineNo">186</span> }<a name="line.186"></a>
+<span class="sourceLineNo">187</span> assertEquals(2, gsn.size());<a name="line.187"></a>
+<span class="sourceLineNo">188</span> for(Map.Entry<RegionInfo, ServerName> entry :<a name="line.188"></a>
+<span class="sourceLineNo">189</span> master.getAssignmentManager().getRegionStates().getRegionAssignments().entrySet()){<a name="line.189"></a>
+<span class="sourceLineNo">190</span> if(entry.getKey().getTable().equals(tableName)){<a name="line.190"></a>
+<span class="sourceLineNo">191</span> LOG.debug("move region {} from {} to {}", entry.getKey().getRegionNameAsString(),<a name="line.191"></a>
+<span class="sourceLineNo">192</span> entry.getValue(), gsn.get(1 - gsn.indexOf(entry.getValue())));<a name="line.192"></a>
+<span class="sourceLineNo">193</span> TEST_UTIL.moveRegionAndWait(entry.getKey(), gsn.get(1 - gsn.indexOf(entry.getValue())));<a name="line.193"></a>
+<span class="sourceLineNo">194</span> break;<a name="line.194"></a>
+<span class="sourceLineNo">195</span> }<a name="line.195"></a>
+<span class="sourceLineNo">196</span> }<a name="line.196"></a>
+<span class="sourceLineNo">197</span> TEST_UTIL.waitTableAvailable(tableName, 30000);<a name="line.197"></a>
+<span class="sourceLineNo">198</span><a name="line.198"></a>
+<span class="sourceLineNo">199</span> // case 1: stop all the regionservers in my_group, and restart a regionserver in my_group,<a name="line.199"></a>
+<span class="sourceLineNo">200</span> // and then check if all table regions are online<a name="line.200"></a>
+<span class="sourceLineNo">201</span> for(Address addr : rsGroupAdmin.getRSGroupInfo(groupName).getServers()) {<a name="line.201"></a>
+<span class="sourceLineNo">202</span> TEST_UTIL.getMiniHBaseCluster().stopRegionServer(getServerName(addr));<a name="line.202"></a>
+<span class="sourceLineNo">203</span> }<a name="line.203"></a>
+<span class="sourceLineNo">204</span> // better wait for a while for region reassign<a name="line.204"></a>
+<span class="sourceLineNo">205</span> sleep(10000);<a name="line.205"></a>
+<span class="sourceLineNo">206</span> assertEquals(NUM_SLAVES_BASE - gsn.size(),<a name="line.206"></a>
+<span class="sourceLineNo">207</span> TEST_UTIL.getMiniHBaseCluster().getLiveRegionServerThreads().size());<a name="line.207"></a>
+<span class="sourceLineNo">208</span> TEST_UTIL.getMiniHBaseCluster().startRegionServer(gsn.get(0).getHostname(),<a name="line.208"></a>
+<span class="sourceLineNo">209</span> gsn.get(0).getPort());<a name="line.209"></a>
+<span class="sourceLineNo">210</span> assertEquals(NUM_SLAVES_BASE - gsn.size() + 1,<a name="line.210"></a>
+<span class="sourceLineNo">211</span> TEST_UTIL.getMiniHBaseCluster().getLiveRegionServerThreads().size());<a name="line.211"></a>
+<span class="sourceLineNo">212</span> TEST_UTIL.waitTableAvailable(tableName, 30000);<a name="line.212"></a>
+<span class="sourceLineNo">213</span><a name="line.213"></a>
+<span class="sourceLineNo">214</span> // case 2: stop all the regionservers in my_group, and move another<a name="line.214"></a>
+<span class="sourceLineNo">215</span> // regionserver(from the 'default' group) to my_group,<a name="line.215"></a>
+<span class="sourceLineNo">216</span> // and then check if all table regions are online<a name="line.216"></a>
+<span class="sourceLineNo">217</span> for(JVMClusterUtil.RegionServerThread rst :<a name="line.217"></a>
+<span class="sourceLineNo">218</span> TEST_UTIL.getMiniHBaseCluster().getLiveRegionServerThreads()){<a name="line.218"></a>
+<span class="sourceLineNo">219</span> if(rst.getRegionServer().getServerName().getAddress().equals(gsn.get(0).getAddress())){<a name="line.219"></a>
+<span class="sourceLineNo">220</span> TEST_UTIL.getMiniHBaseCluster().stopRegionServer(rst.getRegionServer().getServerName());<a name="line.220"></a>
+<span class="sourceLineNo">221</span> break;<a name="line.221"></a>
+<span class="sourceLineNo">222</span> }<a name="line.222"></a>
+<span class="sourceLineNo">223</span> }<a name="line.223"></a>
+<span class="sourceLineNo">224</span> sleep(10000);<a name="line.224"></a>
+<span class="sourceLineNo">225</span> assertEquals(NUM_SLAVES_BASE - gsn.size(),<a name="line.225"></a>
+<span class="sourceLineNo">226</span> TEST_UTIL.getMiniHBaseCluster().getLiveRegionServerThreads().size());<a name="line.226"></a>
+<span class="sourceLineNo">227</span> ServerName newServer = master.getServerManager().getOnlineServersList().get(0);<a name="line.227"></a>
+<span class="sourceLineNo">228</span> rsGroupAdmin.moveServers(Sets.newHashSet(newServer.getAddress()), groupName);<a name="line.228"></a>
+<span class="sourceLineNo">229</span> // wait and check if table regions are online<a name="line.229"></a>
+<span class="sourceLineNo">230</span> TEST_UTIL.waitTableAvailable(tableName, 30000);<a name="line.230"></a>
+<span class="sourceLineNo">231</span> }<a name="line.231"></a>
+<span class="sourceLineNo">232</span><a name="line.232"></a>
+<span class="sourceLineNo">233</span> @Test<a name="line.233"></a>
+<span class="sourceLineNo">234</span> public void testLowerMetaGroupVersion() throws Exception{<a name="line.234"></a>
+<span class="sourceLineNo">235</span> // create a rsgroup and move one regionserver to it<a name="line.235"></a>
+<span class="sourceLineNo">236</span> String groupName = "meta_group";<a name="line.236"></a>
+<span class="sourceLineNo">237</span> int groupRSCount = 1;<a name="line.237"></a>
+<span class="sourceLineNo">238</span> addGroup(groupName, groupRSCount);<a name="line.238"></a>
+<span class="sourceLineNo">239</span><a name="line.239"></a>
+<span class="sourceLineNo">240</span> // move hbase:meta to meta_group<a name="line.240"></a>
<span class="sourceLineNo">241</span> Set<TableName> toAddTables = new HashSet<>();<a name="line.241"></a>
-<span class="sourceLineNo">242</span> toAddTables.add(tableName);<a name="line.242"></a>
+<span class="sourceLineNo">242</span> toAddTables.add(TableName.META_TABLE_NAME);<a name="line.242"></a>
<span class="sourceLineNo">243</span> rsGroupAdmin.moveTables(toAddTables, groupName);<a name="line.243"></a>
-<span class="sourceLineNo">244</span> assertTrue(rsGroupAdmin.getRSGroupInfo(groupName).getTables().contains(tableName));<a name="line.244"></a>
-<span class="sourceLineNo">245</span> TEST_UTIL.waitTableAvailable(tableName, 30000);<a name="line.245"></a>
+<span class="sourceLineNo">244</span> assertTrue(<a name="line.244"></a>
+<span class="sourceLineNo">245</span> rsGroupAdmin.getRSGroupInfo(groupName).getTables().contains(TableName.META_TABLE_NAME));<a name="line.245"></a>
<span class="sourceLineNo">246</span><a name="line.246"></a>
<span class="sourceLineNo">247</span> // restart the regionserver in meta_group, and lower its version<a name="line.247"></a>
<span class="sourceLineNo">248</span> String originVersion = "";<a name="line.248"></a>
@@ -276,17 +276,19 @@
<span class="sourceLineNo">268</span> assertTrue(VersionInfo.compareVersion(originVersion,<a name="line.268"></a>
<span class="sourceLineNo">269</span> master.getRegionServerVersion(getServerName(servers.iterator().next()))) > 0);<a name="line.269"></a>
<span class="sourceLineNo">270</span> LOG.debug("wait for META assigned...");<a name="line.270"></a>
-<span class="sourceLineNo">271</span> TEST_UTIL.waitTableAvailable(tableName, 30000);<a name="line.271"></a>
-<span class="sourceLineNo">272</span> }<a name="line.272"></a>
-<span class="sourceLineNo">273</span><a name="line.273"></a>
-<span class="sourceLineNo">274</span> private static void setFinalStatic(Field field, Object newValue) throws Exception {<a name="line.274"></a>
-<span class="sourceLineNo">275</span> field.setAccessible(true);<a name="line.275"></a>
-<span class="sourceLineNo">276</span> Field modifiersField = Field.class.getDeclaredField("modifiers");<a name="line.276"></a>
-<span class="sourceLineNo">277</span> modifiersField.setAccessible(true);<a name="line.277"></a>
-<span class="sourceLineNo">278</span> modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);<a name="line.278"></a>
-<span class="sourceLineNo">279</span> field.set(null, newValue);<a name="line.279"></a>
-<span class="sourceLineNo">280</span> }<a name="line.280"></a>
-<span class="sourceLineNo">281</span>}<a name="line.281"></a>
+<span class="sourceLineNo">271</span> // SCP finished, which means all regions assigned too.<a name="line.271"></a>
+<span class="sourceLineNo">272</span> TEST_UTIL.waitFor(60000, () -> !TEST_UTIL.getHBaseCluster().getMaster().getProcedures().stream()<a name="line.272"></a>
+<span class="sourceLineNo">273</span> .filter(p -> (p instanceof ServerCrashProcedure)).findAny().isPresent());<a name="line.273"></a>
+<span class="sourceLineNo">274</span> }<a name="line.274"></a>
+<span class="sourceLineNo">275</span><a name="line.275"></a>
+<span class="sourceLineNo">276</span> private static void setFinalStatic(Field field, Object newValue) throws Exception {<a name="line.276"></a>
+<span class="sourceLineNo">277</span> field.setAccessible(true);<a name="line.277"></a>
+<span class="sourceLineNo">278</span> Field modifiersField = Field.class.getDeclaredField("modifiers");<a name="line.278"></a>
+<span class="sourceLineNo">279</span> modifiersField.setAccessible(true);<a name="line.279"></a>
+<span class="sourceLineNo">280</span> modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);<a name="line.280"></a>
+<span class="sourceLineNo">281</span> field.set(null, newValue);<a name="line.281"></a>
+<span class="sourceLineNo">282</span> }<a name="line.282"></a>
+<span class="sourceLineNo">283</span>}<a name="line.283"></a>