Published site at 6d0dc960e6a937b0c1ad1a1dfc0597382aa11221.
authorjenkins <builds@apache.org>
Fri, 23 Nov 2018 14:51:57 +0000 (14:51 +0000)
committerjenkins <builds@apache.org>
Fri, 23 Nov 2018 14:51:57 +0000 (14:51 +0000)
78 files changed:
acid-semantics.html
apache_hbase_reference_guide.pdf
book.html
bulk-loads.html
checkstyle-aggregate.html
checkstyle.rss
coc.html
dependencies.html
dependency-convergence.html
dependency-info.html
dependency-management.html
devapidocs/constant-values.html
devapidocs/index-all.html
devapidocs/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.RefreshCacheTask.html
devapidocs/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html
devapidocs/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html
devapidocs/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html
devapidocs/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html
devapidocs/org/apache/hadoop/hbase/master/snapshot/class-use/SnapshotManager.html
devapidocs/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html
devapidocs/org/apache/hadoop/hbase/util/class-use/KeyLocker.html
devapidocs/org/apache/hadoop/hbase/util/package-use.html
devapidocs/src-html/org/apache/hadoop/hbase/Version.html
devapidocs/src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.RefreshCacheTask.html
devapidocs/src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html
devapidocs/src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotFileInspector.html
devapidocs/src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html
devapidocs/src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html
devapidocs/src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html
devapidocs/src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.CompletedSnaphotDirectoriesFilter.html
devapidocs/src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html
downloads.html
export_control.html
index.html
integration.html
issue-tracking.html
license.html
mail-lists.html
metrics.html
old_news.html
plugin-management.html
plugins.html
poweredbyhbase.html
project-info.html
project-reports.html
project-summary.html
pseudo-distributed.html
replication.html
resources.html
source-repository.html
sponsors.html
supportingprojects.html
team-list.html
testdevapidocs/allclasses-frame.html
testdevapidocs/allclasses-noframe.html
testdevapidocs/constant-values.html
testdevapidocs/index-all.html
testdevapidocs/org/apache/hadoop/hbase/class-use/HBaseClassTestRule.html
testdevapidocs/org/apache/hadoop/hbase/class-use/HBaseTestingUtility.html
testdevapidocs/org/apache/hadoop/hbase/class-use/TestTableName.html
testdevapidocs/org/apache/hadoop/hbase/io/hfile/package-tree.html
testdevapidocs/org/apache/hadoop/hbase/package-tree.html
testdevapidocs/org/apache/hadoop/hbase/procedure2/package-tree.html
testdevapidocs/org/apache/hadoop/hbase/regionserver/package-tree.html
testdevapidocs/org/apache/hadoop/hbase/snapshot/TestSnapshotManifest.html
testdevapidocs/org/apache/hadoop/hbase/snapshot/TestSnapshotWhenChoreCleaning.html [new file with mode: 0644]
testdevapidocs/org/apache/hadoop/hbase/snapshot/class-use/TestSnapshotWhenChoreCleaning.html [new file with mode: 0644]
testdevapidocs/org/apache/hadoop/hbase/snapshot/package-frame.html
testdevapidocs/org/apache/hadoop/hbase/snapshot/package-summary.html
testdevapidocs/org/apache/hadoop/hbase/snapshot/package-tree.html
testdevapidocs/org/apache/hadoop/hbase/test/package-tree.html
testdevapidocs/org/apache/hadoop/hbase/wal/package-tree.html
testdevapidocs/overview-tree.html
testdevapidocs/src-html/org/apache/hadoop/hbase/master/snapshot/TestSnapshotFileCache.SnapshotFiles.html
testdevapidocs/src-html/org/apache/hadoop/hbase/master/snapshot/TestSnapshotFileCache.html
testdevapidocs/src-html/org/apache/hadoop/hbase/master/snapshot/TestSnapshotHFileCleaner.SnapshotFiles.html
testdevapidocs/src-html/org/apache/hadoop/hbase/master/snapshot/TestSnapshotHFileCleaner.html
testdevapidocs/src-html/org/apache/hadoop/hbase/snapshot/TestSnapshotWhenChoreCleaning.html [new file with mode: 0644]

index 09e024c..e49e5be 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181121" />
+    <meta name="Date-Revision-yyyymmdd" content="20181123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013;  
       Apache HBase (TM) ACID Properties
@@ -611,7 +611,7 @@ under the License. -->
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li>
             </p>
                 </div>
 
index 9d56cd7..6c5ce42 100644 (file)
@@ -5,8 +5,8 @@
 /Author (Apache HBase Team)
 /Creator (Asciidoctor PDF 1.5.0.alpha.15, based on Prawn 2.2.2)
 /Producer (Apache HBase Team)
-/ModDate (D:20181121143253+00'00')
-/CreationDate (D:20181121144917+00'00')
+/ModDate (D:20181123143244+00'00')
+/CreationDate (D:20181123144827+00'00')
 >>
 endobj
 2 0 obj
index 58b2425..9c6668f 100644 (file)
--- a/book.html
+++ b/book.html
@@ -41318,7 +41318,7 @@ org/apache/hadoop/hbase/security/access/AccessControlClient.revoke:(Lorg/apache/
 <div id="footer">
 <div id="footer-text">
 Version 3.0.0-SNAPSHOT<br>
-Last updated 2018-11-21 14:32:53 UTC
+Last updated 2018-11-23 14:32:44 UTC
 </div>
 </div>
 </body>
index 45d6cc9..d8a6bab 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181121" />
+    <meta name="Date-Revision-yyyymmdd" content="20181123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013;  
       Bulk Loads in Apache HBase (TM)
@@ -316,7 +316,7 @@ under the License. -->
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li>
             </p>
                 </div>
 
index a14f98b..83bca84 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181121" />
+    <meta name="Date-Revision-yyyymmdd" content="20181123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Checkstyle Results</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" />
 <th><img src="images/icon_warning_sml.gif" alt="" />&#160;Warnings</th>
 <th><img src="images/icon_error_sml.gif" alt="" />&#160;Errors</th></tr>
 <tr class="b">
-<td>3813</td>
+<td>3814</td>
 <td>0</td>
 <td>0</td>
 <td>14984</td></tr></table></div>
 <td><a class="externalLink" href="http://checkstyle.sourceforge.net/config_javadoc.html#JavadocTagContinuationIndentation">JavadocTagContinuationIndentation</a>
 <ul>
 <li>offset: <tt>&quot;2&quot;</tt></li></ul></td>
-<td>731</td>
+<td>730</td>
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td></tr>
 <tr class="a">
 <td></td>
 <td><a class="externalLink" href="http://checkstyle.sourceforge.net/config_javadoc.html#NonEmptyAtclauseDescription">NonEmptyAtclauseDescription</a></td>
-<td>3452</td>
+<td>3453</td>
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td></tr>
 <tr class="b">
 <td>misc</td>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
-<td>JavadocTagContinuationIndentation</td>
+<td>NonEmptyAtclauseDescription</td>
 <td>Javadoc comment at column 0 has parse error. Details: no viable alternative at input '   *' while parsing JAVADOC_TAG</td>
 <td>117</td></tr>
 <tr class="b">
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>220</td></tr></table></div>
+<td>237</td></tr></table></div>
 <div class="section">
 <h3 id="org.apache.hadoop.hbase.master.snapshot.SnapshotHFileCleaner.java">org/apache/hadoop/hbase/master/snapshot/SnapshotHFileCleaner.java</h3>
 <table border="0" class="table table-striped">
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>218</td></tr>
+<td>217</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>NonEmptyAtclauseDescription</td>
 <td>At-clause should have a non-empty description.</td>
-<td>289</td></tr>
+<td>288</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>sizes</td>
 <td>LineLength</td>
 <td>Line is longer than 100 characters (found 110).</td>
-<td>293</td></tr>
+<td>292</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>NonEmptyAtclauseDescription</td>
 <td>At-clause should have a non-empty description.</td>
-<td>331</td></tr>
+<td>330</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>sizes</td>
 <td>LineLength</td>
 <td>Line is longer than 100 characters (found 102).</td>
-<td>406</td></tr>
+<td>405</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>NonEmptyAtclauseDescription</td>
 <td>At-clause should have a non-empty description.</td>
-<td>553</td></tr>
+<td>567</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>NonEmptyAtclauseDescription</td>
 <td>At-clause should have a non-empty description.</td>
-<td>642</td></tr>
+<td>665</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>JavadocTagContinuationIndentation</td>
 <td>Line continuation have incorrect indentation level, expected level should be 2.</td>
-<td>645</td></tr>
+<td>668</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>NonEmptyAtclauseDescription</td>
 <td>At-clause should have a non-empty description.</td>
-<td>695</td></tr>
+<td>718</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>NonEmptyAtclauseDescription</td>
 <td>At-clause should have a non-empty description.</td>
-<td>764</td></tr>
+<td>787</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>NonEmptyAtclauseDescription</td>
 <td>At-clause should have a non-empty description.</td>
-<td>766</td></tr>
+<td>789</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>NonEmptyAtclauseDescription</td>
 <td>At-clause should have a non-empty description.</td>
-<td>817</td></tr>
+<td>840</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>LeftCurly</td>
 <td>'{' at column 7 should be on the previous line.</td>
-<td>975</td></tr>
+<td>998</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>1003</td></tr>
+<td>1026</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>1058</td></tr>
+<td>1081</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>1062</td></tr></table></div>
+<td>1085</td></tr></table></div>
 <div class="section">
 <h3 id="org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler.java">org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.java</h3>
 <table border="0" class="table table-striped">
 <td>sizes</td>
 <td>LineLength</td>
 <td>Line is longer than 100 characters (found 103).</td>
-<td>69</td></tr>
+<td>68</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>214</td></tr>
+<td>212</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>323</td></tr></table></div>
+<td>320</td></tr></table></div>
 <div class="section">
 <h3 id="org.apache.hadoop.hbase.master.snapshot.TestSnapshotHFileCleaner.java">org/apache/hadoop/hbase/master/snapshot/TestSnapshotHFileCleaner.java</h3>
 <table border="0" class="table table-striped">
 <td>sizes</td>
 <td>LineLength</td>
 <td>Line is longer than 100 characters (found 101).</td>
-<td>130</td></tr>
+<td>128</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'case' child has incorrect indentation level 4, expected level should be 6.</td>
-<td>165</td></tr>
+<td>163</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'case' child has incorrect indentation level 4, expected level should be 6.</td>
-<td>166</td></tr>
+<td>164</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>indentation</td>
 <td>Indentation</td>
 <td>'block' child has incorrect indentation level 6, expected level should be 8.</td>
-<td>167</td></tr>
+<td>165</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>sizes</td>
 <td>LineLength</td>
 <td>Line is longer than 100 characters (found 102).</td>
-<td>190</td></tr>
+<td>188</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>JavadocTagContinuationIndentation</td>
 <td>Line continuation have incorrect indentation level, expected level should be 2.</td>
-<td>373</td></tr>
+<td>361</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>385</td></tr>
+<td>373</td></tr>
 <tr class="a">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>javadoc</td>
 <td>JavadocTagContinuationIndentation</td>
 <td>Line continuation have incorrect indentation level, expected level should be 2.</td>
-<td>400</td></tr>
+<td>388</td></tr>
 <tr class="b">
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td>
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>424</td></tr></table></div>
+<td>412</td></tr></table></div>
 <div class="section">
 <h3 id="org.apache.hadoop.hbase.snapshot.SnapshotDoesNotExistException.java">org/apache/hadoop/hbase/snapshot/SnapshotDoesNotExistException.java</h3>
 <table border="0" class="table table-striped">
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li>
             </p>
                 </div>
 
index 3281d20..4d67fa0 100644 (file)
@@ -25,7 +25,7 @@ under the License.
     <language>en-us</language>
     <copyright>&#169;2007 - 2018 The Apache Software Foundation</copyright>
     <item>
-      <title>File: 3813,
+      <title>File: 3814,
              Errors: 14984,
              Warnings: 0,
              Infos: 0
@@ -21802,6 +21802,20 @@ under the License.
               </tr>
                           <tr>
                 <td>
+                  <a href="http://hbase.apache.org/checkstyle.html#org.apache.hadoop.hbase.snapshot.TestSnapshotWhenChoreCleaning.java">org/apache/hadoop/hbase/snapshot/TestSnapshotWhenChoreCleaning.java</a>
+                </td>
+                <td>
+                  0
+                </td>
+                <td>
+                  0
+                </td>
+                <td>
+                  0
+                </td>
+              </tr>
+                          <tr>
+                <td>
                   <a href="http://hbase.apache.org/checkstyle.html#org.apache.hadoop.hbase.procedure2.ProcedureUtil.java">org/apache/hadoop/hbase/procedure2/ProcedureUtil.java</a>
                 </td>
                 <td>
index c16dea3..53b981f 100644 (file)
--- a/coc.html
+++ b/coc.html
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181121" />
+    <meta name="Date-Revision-yyyymmdd" content="20181123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; 
       Code of Conduct Policy
@@ -385,7 +385,7 @@ email to <a class="externalLink" href="mailto:private@hbase.apache.org">the priv
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li>
             </p>
                 </div>
 
index 6113d23..ee46353 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181121" />
+    <meta name="Date-Revision-yyyymmdd" content="20181123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Project Dependencies</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" />
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li>
             </p>
                 </div>
 
index 801c3c0..af9d999 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181121" />
+    <meta name="Date-Revision-yyyymmdd" content="20181123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Reactor Dependency Convergence</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" />
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li>
             </p>
                 </div>
 
index ab50b95..5dec44d 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181121" />
+    <meta name="Date-Revision-yyyymmdd" content="20181123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Dependency Information</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" />
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li>
             </p>
                 </div>
 
index 04a76b6..2c5fe22 100644 (file)
@@ -7,7 +7,7 @@
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20181121" />
+    <meta name="Date-Revision-yyyymmdd" content="20181123" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Project Dependency Management</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.4-HBase.min.css" />
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2018-11-21</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2018-11-23</li>
             </p>
                 </div>
 
index bc36bfa..a9a7cb7 100644 (file)
 <!--   -->
 </a><code>public&nbsp;static&nbsp;final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
 <td><code><a href="org/apache/hadoop/hbase/Version.html#date">date</a></code></td>
-<td class="colLast"><code>"Wed Nov 21 14:44:11 UTC 2018"</code></td>
+<td class="colLast"><code>"Fri Nov 23 14:43:16 UTC 2018"</code></td>
 </tr>
 <tr class="rowColor">
 <td class="colFirst"><a name="org.apache.hadoop.hbase.Version.revision">
 <!--   -->
 </a><code>public&nbsp;static&nbsp;final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
 <td><code><a href="org/apache/hadoop/hbase/Version.html#srcChecksum">srcChecksum</a></code></td>
-<td class="colLast"><code>"1f80a990a945d9efd6b2cf79bf4adb13"</code></td>
+<td class="colLast"><code>"bddc9576b24e37ec437e3194453db580"</code></td>
 </tr>
 <tr class="rowColor">
 <td class="colFirst"><a name="org.apache.hadoop.hbase.Version.url">
 <td class="colLast"><code>0L</code></td>
 </tr>
 <tr class="rowColor">
-<td class="colFirst"><a name="org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils.SNAPSHOT_IN_PROGRESS">
-<!--   -->
-</a><code>public&nbsp;static&nbsp;final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
-<td><code><a href="org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_IN_PROGRESS">SNAPSHOT_IN_PROGRESS</a></code></td>
-<td class="colLast"><code>".inprogress"</code></td>
-</tr>
-<tr class="altColor">
 <td class="colFirst"><a name="org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils.SNAPSHOT_LAYOUT_VERSION">
 <!--   -->
 </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
 <td><code><a href="org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_LAYOUT_VERSION">SNAPSHOT_LAYOUT_VERSION</a></code></td>
 <td class="colLast"><code>2</code></td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><a name="org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT">
 <!--   -->
 </a><code>public&nbsp;static&nbsp;final&nbsp;int</code></td>
 <td><code><a href="org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_TIMEOUT_MILLIS_DEFAULT">SNAPSHOT_TIMEOUT_MILLIS_DEFAULT</a></code></td>
 <td class="colLast"><code>300000</code></td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><a name="org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils.SNAPSHOT_TIMEOUT_MILLIS_KEY">
 <!--   -->
 </a><code>public&nbsp;static&nbsp;final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
 <td><code><a href="org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_TIMEOUT_MILLIS_KEY">SNAPSHOT_TIMEOUT_MILLIS_KEY</a></code></td>
 <td class="colLast"><code>"hbase.snapshot.master.timeoutMillis"</code></td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><a name="org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME">
 <!--   -->
 </a><code>public&nbsp;static&nbsp;final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
 <td><code><a href="org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_TMP_DIR_NAME">SNAPSHOT_TMP_DIR_NAME</a></code></td>
 <td class="colLast"><code>".tmp"</code></td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><a name="org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR">
 <!--   -->
 </a><code>public&nbsp;static&nbsp;final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
 <td><code><a href="org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_WORKING_DIR">SNAPSHOT_WORKING_DIR</a></code></td>
 <td class="colLast"><code>"hbase.snapshot.working.dir"</code></td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><a name="org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils.SNAPSHOTINFO_FILE">
 <!--   -->
 </a><code>public&nbsp;static&nbsp;final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
index 11dc849..21876de 100644 (file)
 <dd>
 <div class="block">Create initial layout in filesystem.</div>
 </dd>
-<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#createInProgressTag-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.FileSystem-">createInProgressTag(Path, FileSystem)</a></span> - Static method in class org.apache.hadoop.hbase.snapshot.<a href="org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html" title="class in org.apache.hadoop.hbase.snapshot">SnapshotDescriptionUtils</a></dt>
-<dd>
-<div class="block">Create in-progress tag under .tmp of in-progress snapshot</div>
-</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/regionserver/CompactionTool.CompactionInputFormat.html#createInputFile-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-java.util.Set-">createInputFile(FileSystem, Path, Set&lt;Path&gt;)</a></span> - Static method in class org.apache.hadoop.hbase.regionserver.<a href="org/apache/hadoop/hbase/regionserver/CompactionTool.CompactionInputFormat.html" title="class in org.apache.hadoop.hbase.regionserver">CompactionTool.CompactionInputFormat</a></dt>
 <dd>
 <div class="block">Create the input file for the given directories to compact.</div>
 <dd>
 <div class="block">List lock queues.</div>
 </dd>
-<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#getLocks--">getLocks()</a></span> - Method in class org.apache.hadoop.hbase.master.snapshot.<a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a></dt>
-<dd>&nbsp;</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/procedure2/ProcedureScheduler.html#getLocks--">getLocks()</a></span> - Method in interface org.apache.hadoop.hbase.procedure2.<a href="org/apache/hadoop/hbase/procedure2/ProcedureScheduler.html" title="interface in org.apache.hadoop.hbase.procedure2">ProcedureScheduler</a></dt>
 <dd>
 <div class="block">List lock queues.</div>
 <div class="block">Computes a mapping of originating <code>TableName</code> to snapshots, when the <code>TableName</code>
  exists in the provided <code>Set</code>.</div>
 </dd>
-<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#getSnapshotsInProgress-org.apache.hadoop.hbase.master.snapshot.SnapshotManager-">getSnapshotsInProgress(SnapshotManager)</a></span> - Method in class org.apache.hadoop.hbase.master.snapshot.<a href="org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotFileCache</a></dt>
+<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#getSnapshotsInProgress--">getSnapshotsInProgress()</a></span> - Method in class org.apache.hadoop.hbase.master.snapshot.<a href="org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotFileCache</a></dt>
 <dd>&nbsp;</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/regionserver/AbstractMemStore.html#getSnapshotSize--">getSnapshotSize()</a></span> - Method in class org.apache.hadoop.hbase.regionserver.<a href="org/apache/hadoop/hbase/regionserver/AbstractMemStore.html" title="class in org.apache.hadoop.hbase.regionserver">AbstractMemStore</a></dt>
 <dd>&nbsp;</dd>
 <dd>&nbsp;</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/regionserver/CompactionPipeline.html#getTailSize--">getTailSize()</a></span> - Method in class org.apache.hadoop.hbase.regionserver.<a href="org/apache/hadoop/hbase/regionserver/CompactionPipeline.html" title="class in org.apache.hadoop.hbase.regionserver">CompactionPipeline</a></dt>
 <dd>&nbsp;</dd>
+<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#getTakingSnapshotLock--">getTakingSnapshotLock()</a></span> - Method in class org.apache.hadoop.hbase.master.snapshot.<a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a></dt>
+<dd>&nbsp;</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/backup/BackupRequest.html#getTargetRootDir--">getTargetRootDir()</a></span> - Method in class org.apache.hadoop.hbase.backup.<a href="org/apache/hadoop/hbase/backup/BackupRequest.html" title="class in org.apache.hadoop.hbase.backup">BackupRequest</a></dt>
 <dd>&nbsp;</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/util/RegionMover.html#getTargetServer--">getTargetServer()</a></span> - Method in class org.apache.hadoop.hbase.util.<a href="org/apache/hadoop/hbase/util/RegionMover.html" title="class in org.apache.hadoop.hbase.util">RegionMover</a></dt>
 <dd>&nbsp;</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/regionserver/Segment.html#isTagsPresent--">isTagsPresent()</a></span> - Method in class org.apache.hadoop.hbase.regionserver.<a href="org/apache/hadoop/hbase/regionserver/Segment.html" title="class in org.apache.hadoop.hbase.regionserver">Segment</a></dt>
 <dd>&nbsp;</dd>
+<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#isTakingAnySnapshot--">isTakingAnySnapshot()</a></span> - Method in class org.apache.hadoop.hbase.master.snapshot.<a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a></dt>
+<dd>
+<div class="block">The snapshot operation processing as following: <br>
+ 1.</div>
+</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#isTakingSnapshot-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-">isTakingSnapshot(SnapshotProtos.SnapshotDescription)</a></span> - Method in class org.apache.hadoop.hbase.master.snapshot.<a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a></dt>
 <dd>
 <div class="block">Check to see if there is a snapshot in progress with the same name or on the same table.</div>
 <div class="block">Creates Mini-batch of all operations [nextIndexToProcess, lastIndexExclusive) for which
  a row lock can be acquired.</div>
 </dd>
-<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#locks">locks</a></span> - Variable in class org.apache.hadoop.hbase.master.snapshot.<a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a></dt>
-<dd>
-<div class="block">Locks for snapshot operations
-  key is snapshot's filename in progress, value is the related lock
-    - create snapshot
-    - SnapshotCleaner</div>
-</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/quotas/MasterQuotaManager.NamedLock.html#locks">locks</a></span> - Variable in class org.apache.hadoop.hbase.quotas.<a href="org/apache/hadoop/hbase/quotas/MasterQuotaManager.NamedLock.html" title="class in org.apache.hadoop.hbase.quotas">MasterQuotaManager.NamedLock</a></dt>
 <dd>&nbsp;</dd>
 <dt><a href="org/apache/hadoop/hbase/client/locking/LockServiceClient.html" title="class in org.apache.hadoop.hbase.client.locking"><span class="typeNameLink">LockServiceClient</span></a> - Class in <a href="org/apache/hadoop/hbase/client/locking/package-summary.html">org.apache.hadoop.hbase.client.locking</a></dt>
@@ -108260,10 +108254,6 @@ service.</div>
 <dd>
 <div class="block">Name of the directory to store all snapshots.</div>
 </dd>
-<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_IN_PROGRESS">SNAPSHOT_IN_PROGRESS</a></span> - Static variable in class org.apache.hadoop.hbase.snapshot.<a href="org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html" title="class in org.apache.hadoop.hbase.snapshot">SnapshotDescriptionUtils</a></dt>
-<dd>
-<div class="block">This tag will be created in in-progess snapshots</div>
-</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.html#SNAPSHOT_INPUTFORMAT_LOCALITY_ENABLED_DEFAULT">SNAPSHOT_INPUTFORMAT_LOCALITY_ENABLED_DEFAULT</a></span> - Static variable in class org.apache.hadoop.hbase.mapreduce.<a href="org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.html" title="class in org.apache.hadoop.hbase.mapreduce">TableSnapshotInputFormatImpl</a></dt>
 <dd>&nbsp;</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.html#SNAPSHOT_INPUTFORMAT_LOCALITY_ENABLED_KEY">SNAPSHOT_INPUTFORMAT_LOCALITY_ENABLED_KEY</a></span> - Static variable in class org.apache.hadoop.hbase.mapreduce.<a href="org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.html" title="class in org.apache.hadoop.hbase.mapreduce">TableSnapshotInputFormatImpl</a></dt>
@@ -114026,10 +114016,16 @@ service.</div>
 </dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#TakeSnapshotHandler-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-org.apache.hadoop.hbase.master.MasterServices-org.apache.hadoop.hbase.master.snapshot.SnapshotManager-">TakeSnapshotHandler(SnapshotProtos.SnapshotDescription, MasterServices, SnapshotManager)</a></span> - Constructor for class org.apache.hadoop.hbase.master.snapshot.<a href="org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html" title="class in org.apache.hadoop.hbase.master.snapshot">TakeSnapshotHandler</a></dt>
 <dd>&nbsp;</dd>
+<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#takeSnapshotInternal-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-">takeSnapshotInternal(SnapshotProtos.SnapshotDescription)</a></span> - Method in class org.apache.hadoop.hbase.master.snapshot.<a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a></dt>
+<dd>&nbsp;</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/regionserver/wal/FSHLog.SyncRunner.html#takeSyncFuture">takeSyncFuture</a></span> - Variable in class org.apache.hadoop.hbase.regionserver.wal.<a href="org/apache/hadoop/hbase/regionserver/wal/FSHLog.SyncRunner.html" title="class in org.apache.hadoop.hbase.regionserver.wal">FSHLog.SyncRunner</a></dt>
 <dd>&nbsp;</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/procedure2/util/DelayedUtil.html#takeWithoutInterrupt-java.util.concurrent.DelayQueue-">takeWithoutInterrupt(DelayQueue&lt;E&gt;)</a></span> - Static method in class org.apache.hadoop.hbase.procedure2.util.<a href="org/apache/hadoop/hbase/procedure2/util/DelayedUtil.html" title="class in org.apache.hadoop.hbase.procedure2.util">DelayedUtil</a></dt>
 <dd>&nbsp;</dd>
+<dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#takingSnapshotLock">takingSnapshotLock</a></span> - Variable in class org.apache.hadoop.hbase.master.snapshot.<a href="org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a></dt>
+<dd>
+<div class="block">Read write lock between taking snapshot and snapshot HFile cleaner.</div>
+</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/master/cleaner/LogCleaner.CleanerContext.html#target">target</a></span> - Variable in class org.apache.hadoop.hbase.master.cleaner.<a href="org/apache/hadoop/hbase/master/cleaner/LogCleaner.CleanerContext.html" title="class in org.apache.hadoop.hbase.master.cleaner">LogCleaner.CleanerContext</a></dt>
 <dd>&nbsp;</dd>
 <dt><span class="memberNameLink"><a href="org/apache/hadoop/hbase/snapshot/ExportSnapshot.Options.html#TARGET_NAME">TARGET_NAME</a></span> - Static variable in class org.apache.hadoop.hbase.snapshot.<a href="org/apache/hadoop/hbase/snapshot/ExportSnapshot.Options.html" title="class in org.apache.hadoop.hbase.snapshot">ExportSnapshot.Options</a></dt>
index 39e3f09..8923097 100644 (file)
@@ -122,7 +122,7 @@ var activeTableTab = "activeTableTab";
 </dl>
 <hr>
 <br>
-<pre>public class <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.309">SnapshotFileCache.RefreshCacheTask</a>
+<pre>public class <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.317">SnapshotFileCache.RefreshCacheTask</a>
 extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimerTask.html?is-external=true" title="class or interface in java.util">TimerTask</a></pre>
 <div class="block">Simple helper task that just periodically attempts to refresh the cache</div>
 </li>
@@ -199,7 +199,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimerTask.h
 <ul class="blockListLast">
 <li class="blockList">
 <h4>RefreshCacheTask</h4>
-<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.RefreshCacheTask.html#line.309">RefreshCacheTask</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.RefreshCacheTask.html#line.317">RefreshCacheTask</a>()</pre>
 </li>
 </ul>
 </li>
@@ -216,7 +216,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimerTask.h
 <ul class="blockListLast">
 <li class="blockList">
 <h4>run</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.RefreshCacheTask.html#line.311">run</a>()</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.RefreshCacheTask.html#line.319">run</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true#run--" title="class or interface in java.lang">run</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></dd>
index cc62208..af18761 100644 (file)
@@ -113,7 +113,7 @@ var activeTableTab = "activeTableTab";
 </dl>
 <hr>
 <br>
-<pre>private static class <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.337">SnapshotFileCache.SnapshotDirectoryInfo</a>
+<pre>private static class <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.345">SnapshotFileCache.SnapshotDirectoryInfo</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">Information about a snapshot directory</div>
 </li>
@@ -213,7 +213,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 <ul class="blockList">
 <li class="blockList">
 <h4>lastModified</h4>
-<pre>long <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html#line.338">lastModified</a></pre>
+<pre>long <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html#line.346">lastModified</a></pre>
 </li>
 </ul>
 <a name="files">
@@ -222,7 +222,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 <ul class="blockListLast">
 <li class="blockList">
 <h4>files</h4>
-<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt; <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html#line.339">files</a></pre>
+<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt; <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html#line.347">files</a></pre>
 </li>
 </ul>
 </li>
@@ -239,7 +239,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 <ul class="blockListLast">
 <li class="blockList">
 <h4>SnapshotDirectoryInfo</h4>
-<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html#line.341">SnapshotDirectoryInfo</a>(long&nbsp;mtime,
+<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html#line.349">SnapshotDirectoryInfo</a>(long&nbsp;mtime,
                              <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;files)</pre>
 </li>
 </ul>
@@ -257,7 +257,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 <ul class="blockList">
 <li class="blockList">
 <h4>getFiles</h4>
-<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html#line.349">getFiles</a>()</pre>
+<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html#line.357">getFiles</a>()</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>the hfiles in the snapshot when <tt>this</tt> was made.</dd>
@@ -270,7 +270,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 <ul class="blockListLast">
 <li class="blockList">
 <h4>hasBeenModified</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html#line.359">hasBeenModified</a>(long&nbsp;mtime)</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.SnapshotDirectoryInfo.html#line.367">hasBeenModified</a>(long&nbsp;mtime)</pre>
 <div class="block">Check if the snapshot directory has been modified</div>
 <dl>
 <dt><span class="paramLabel">Parameters:</span></dt>
index 999763f..c2e0454 100644 (file)
@@ -284,7 +284,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 </tr>
 <tr id="i0" class="altColor">
 <td class="colFirst"><code>(package private) <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
-<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#getSnapshotsInProgress-org.apache.hadoop.hbase.master.snapshot.SnapshotManager-">getSnapshotsInProgress</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a>&nbsp;snapshotManager)</code>&nbsp;</td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#getSnapshotsInProgress--">getSnapshotsInProgress</a></span>()</code>&nbsp;</td>
 </tr>
 <tr id="i1" class="rowColor">
 <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;org.apache.hadoop.fs.FileStatus&gt;</code></td>
@@ -539,7 +539,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>refreshCache</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.207">refreshCache</a>()
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.224">refreshCache</a>()
                    throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -547,13 +547,13 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 </dl>
 </li>
 </ul>
-<a name="getSnapshotsInProgress-org.apache.hadoop.hbase.master.snapshot.SnapshotManager-">
+<a name="getSnapshotsInProgress--">
 <!--   -->
 </a>
 <ul class="blockList">
 <li class="blockList">
 <h4>getSnapshotsInProgress</h4>
-<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.272">getSnapshotsInProgress</a>(<a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a>&nbsp;snapshotManager)
+<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.290">getSnapshotsInProgress</a>()
                              throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <dl>
 <dt><span class="throwsLabel">Throws:</span></dt>
@@ -567,7 +567,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>stop</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.321">stop</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;why)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.329">stop</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;why)</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html#stop-java.lang.String-">Stoppable</a></code></span></div>
 <div class="block">Stop this service.
  Implementers should favor logging errors over throwing RuntimeExceptions.</div>
@@ -585,7 +585,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockListLast">
 <li class="blockList">
 <h4>isStopped</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.330">isStopped</a>()</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#line.338">isStopped</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html#isStopped--">isStopped</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a></code></dd>
index b3b924c..8b4d7eb 100644 (file)
@@ -18,7 +18,7 @@
     catch(err) {
     }
 //-->
-var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10};
+var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10};
 var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
 var altColor = "altColor";
 var rowColor = "rowColor";
@@ -125,7 +125,7 @@ var activeTableTab = "activeTableTab";
 <br>
 <pre>@InterfaceAudience.LimitedPrivate(value="Configuration")
  @InterfaceStability.Unstable
-public class <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.104">SnapshotManager</a>
+public class <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.105">SnapshotManager</a>
 extends <a href="../../../../../../org/apache/hadoop/hbase/procedure/MasterProcedureManager.html" title="class in org.apache.hadoop.hbase.procedure">MasterProcedureManager</a>
 implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a></pre>
 <div class="block">This class manages the procedure of taking and restoring snapshots. There is only one
@@ -172,49 +172,40 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#isSnapshotSupported">isSnapshotSupported</a></span></code>&nbsp;</td>
 </tr>
 <tr class="altColor">
-<td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/util/KeyLocker.html" title="class in org.apache.hadoop.hbase.util">KeyLocker</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
-<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#locks">locks</a></span></code>
-<div class="block">Locks for snapshot operations
-  key is snapshot's filename in progress, value is the related lock
-    - create snapshot
-    - SnapshotCleaner</div>
-</td>
-</tr>
-<tr class="rowColor">
 <td class="colFirst"><code>private static org.slf4j.Logger</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#LOG">LOG</a></span></code>&nbsp;</td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a></code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#master">master</a></span></code>&nbsp;</td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>static <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 class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION">ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION</a></span></code>
 <div class="block">Name of the operation to use in the controller</div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#restoreTableToProcIdMap">restoreTableToProcIdMap</a></span></code>&nbsp;</td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>private org.apache.hadoop.fs.Path</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#rootDir">rootDir</a></span></code>&nbsp;</td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>private static int</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#SNAPSHOT_POOL_THREADS_DEFAULT">SNAPSHOT_POOL_THREADS_DEFAULT</a></span></code>
 <div class="block">number of current operations running on the master</div>
 </td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>private static <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 class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#SNAPSHOT_POOL_THREADS_KEY">SNAPSHOT_POOL_THREADS_KEY</a></span></code>
 <div class="block">Conf key for # of threads used by the SnapshotManager thread pool</div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>private static int</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#SNAPSHOT_SENTINELS_CLEANUP_TIMEOUT">SNAPSHOT_SENTINELS_CLEANUP_TIMEOUT</a></span></code>
 <div class="block">Wait time before removing a finished sentinel from the in-progress map
@@ -222,27 +213,33 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
  NOTE: This is used as a safety auto cleanup.</div>
 </td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>private static int</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#SNAPSHOT_WAKE_MILLIS_DEFAULT">SNAPSHOT_WAKE_MILLIS_DEFAULT</a></span></code>
 <div class="block">By default, check to see if the snapshot is complete every WAKE MILLIS (ms)</div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>private static <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 class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#SNAPSHOT_WAKE_MILLIS_KEY">SNAPSHOT_WAKE_MILLIS_KEY</a></span></code>
 <div class="block">Conf key for # of ms elapsed between checks for snapshot errors while waiting for
  completion.</div>
 </td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>,<a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&gt;</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#snapshotHandlers">snapshotHandlers</a></span></code>&nbsp;</td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>private boolean</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#stopped">stopped</a></span></code>&nbsp;</td>
 </tr>
+<tr class="altColor">
+<td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html?is-external=true" title="class or interface in java.util.concurrent.locks">ReentrantReadWriteLock</a></code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#takingSnapshotLock">takingSnapshotLock</a></span></code>
+<div class="block">Read write lock between taking snapshot and snapshot HFile cleaner.</div>
+</td>
+</tr>
 </table>
 </li>
 </ul>
@@ -374,15 +371,15 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#getCoordinator--">getCoordinator</a></span>()</code>&nbsp;</td>
 </tr>
 <tr id="i13" class="rowColor">
-<td class="colFirst"><code><a href="../../../../../../org/apache/hadoop/hbase/util/KeyLocker.html" title="class in org.apache.hadoop.hbase.util">KeyLocker</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
-<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#getLocks--">getLocks</a></span>()</code>&nbsp;</td>
-</tr>
-<tr id="i14" class="altColor">
 <td class="colFirst"><code><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 class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#getProcedureSignature--">getProcedureSignature</a></span>()</code>
 <div class="block">Return the unique signature of the procedure.</div>
 </td>
 </tr>
+<tr id="i14" class="altColor">
+<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/ReadWriteLock.html?is-external=true" title="class or interface in java.util.concurrent.locks">ReadWriteLock</a></code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#getTakingSnapshotLock--">getTakingSnapshotLock</a></span>()</code>&nbsp;</td>
+</tr>
 <tr id="i15" class="rowColor">
 <td class="colFirst"><code>void</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#initialize-org.apache.hadoop.hbase.master.MasterServices-org.apache.hadoop.hbase.master.MetricsMaster-">initialize</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a>&nbsp;master,
@@ -420,38 +417,45 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#isStopped--">isStopped</a></span>()</code>&nbsp;</td>
 </tr>
 <tr id="i21" class="rowColor">
+<td class="colFirst"><code>boolean</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#isTakingAnySnapshot--">isTakingAnySnapshot</a></span>()</code>
+<div class="block">The snapshot operation processing as following: <br>
+ 1.</div>
+</td>
+</tr>
+<tr id="i22" class="altColor">
 <td class="colFirst"><code>(package private) boolean</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#isTakingSnapshot-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-">isTakingSnapshot</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)</code>
 <div class="block">Check to see if there is a snapshot in progress with the same name or on the same table.</div>
 </td>
 </tr>
-<tr id="i22" class="altColor">
+<tr id="i23" class="rowColor">
 <td class="colFirst"><code>boolean</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#isTakingSnapshot-org.apache.hadoop.hbase.TableName-">isTakingSnapshot</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)</code>
 <div class="block">Check to see if the specified table has a snapshot in progress.</div>
 </td>
 </tr>
-<tr id="i23" class="rowColor">
+<tr id="i24" class="altColor">
 <td class="colFirst"><code>private void</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#prepareToTakeSnapshot-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-">prepareToTakeSnapshot</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)</code>
 <div class="block">Check to make sure that we are OK to run the passed snapshot.</div>
 </td>
 </tr>
-<tr id="i24" class="altColor">
+<tr id="i25" class="rowColor">
 <td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a></code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#removeSentinelIfFinished-java.util.Map-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-">removeSentinelIfFinished</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>,<a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&gt;&nbsp;sentinels,
                         org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)</code>
 <div class="block">Return the handler if it is currently live and has the same snapshot target name.</div>
 </td>
 </tr>
-<tr id="i25" class="rowColor">
+<tr id="i26" class="altColor">
 <td class="colFirst"><code>(package private) void</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#resetTempDir--">resetTempDir</a></span>()</code>
 <div class="block">Cleans up any snapshots in the snapshot/.tmp directory that were left from failed
  snapshot attempts.</div>
 </td>
 </tr>
-<tr id="i26" class="altColor">
+<tr id="i27" class="rowColor">
 <td class="colFirst"><code>long</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#restoreOrCloneSnapshot-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-org.apache.hadoop.hbase.util.NonceKey-boolean-">restoreOrCloneSnapshot</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;reqSnapshot,
                       <a href="../../../../../../org/apache/hadoop/hbase/util/NonceKey.html" title="class in org.apache.hadoop.hbase.util">NonceKey</a>&nbsp;nonceKey,
@@ -459,7 +463,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <div class="block">Restore or Clone the specified snapshot</div>
 </td>
 </tr>
-<tr id="i27" class="rowColor">
+<tr id="i28" class="altColor">
 <td class="colFirst"><code>private long</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#restoreSnapshot-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-org.apache.hadoop.hbase.client.TableDescriptor-org.apache.hadoop.hbase.util.NonceKey-boolean-">restoreSnapshot</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                <a href="../../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;tableDescriptor,
@@ -468,7 +472,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <div class="block">Restore the specified snapshot.</div>
 </td>
 </tr>
-<tr id="i28" class="altColor">
+<tr id="i29" class="rowColor">
 <td class="colFirst"><code>private long</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#restoreSnapshot-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-org.apache.hadoop.hbase.TableName-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-org.apache.hadoop.hbase.client.TableDescriptor-org.apache.hadoop.hbase.util.NonceKey-boolean-">restoreSnapshot</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;reqSnapshot,
                <a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
@@ -479,45 +483,49 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <div class="block">Restore the specified snapshot.</div>
 </td>
 </tr>
-<tr id="i29" class="rowColor">
+<tr id="i30" class="altColor">
 <td class="colFirst"><code>void</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#setSnapshotHandlerForTesting-org.apache.hadoop.hbase.TableName-org.apache.hadoop.hbase.master.SnapshotSentinel-">setSnapshotHandlerForTesting</a></span>(<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                             <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&nbsp;handler)</code>
 <div class="block">Set the handler for the current snapshot</div>
 </td>
 </tr>
-<tr id="i30" class="altColor">
+<tr id="i31" class="rowColor">
 <td class="colFirst"><code>private void</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#snapshotDisabledTable-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-">snapshotDisabledTable</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)</code>
 <div class="block">Take a snapshot of a disabled table.</div>
 </td>
 </tr>
-<tr id="i31" class="rowColor">
+<tr id="i32" class="altColor">
 <td class="colFirst"><code>private void</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#snapshotEnabledTable-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-">snapshotEnabledTable</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)</code>
 <div class="block">Take a snapshot of an enabled table.</div>
 </td>
 </tr>
-<tr id="i32" class="altColor">
+<tr id="i33" class="rowColor">
 <td class="colFirst"><code>private void</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#snapshotTable-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler-">snapshotTable</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
              <a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html" title="class in org.apache.hadoop.hbase.master.snapshot">TakeSnapshotHandler</a>&nbsp;handler)</code>
 <div class="block">Take a snapshot using the specified handler.</div>
 </td>
 </tr>
-<tr id="i33" class="rowColor">
+<tr id="i34" class="altColor">
 <td class="colFirst"><code>void</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#stop-java.lang.String-">stop</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;why)</code>
 <div class="block">Stop this service.</div>
 </td>
 </tr>
-<tr id="i34" class="altColor">
+<tr id="i35" class="rowColor">
 <td class="colFirst"><code>void</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#takeSnapshot-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-">takeSnapshot</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)</code>
 <div class="block">Take a snapshot based on the enabled/disabled state of the table.</div>
 </td>
 </tr>
-<tr id="i35" class="rowColor">
+<tr id="i36" class="altColor">
+<td class="colFirst"><code>private void</code></td>
+<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#takeSnapshotInternal-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-">takeSnapshotInternal</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)</code>&nbsp;</td>
+</tr>
+<tr id="i37" class="rowColor">
 <td class="colFirst"><code>private org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#toSnapshotDescription-org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription-">toSnapshotDescription</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription&nbsp;desc)</code>&nbsp;</td>
 </tr>
@@ -563,7 +571,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>LOG</h4>
-<pre>private static final&nbsp;org.slf4j.Logger <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.105">LOG</a></pre>
+<pre>private static final&nbsp;org.slf4j.Logger <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.106">LOG</a></pre>
 </li>
 </ul>
 <a name="SNAPSHOT_WAKE_MILLIS_DEFAULT">
@@ -572,7 +580,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>SNAPSHOT_WAKE_MILLIS_DEFAULT</h4>
-<pre>private static final&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.108">SNAPSHOT_WAKE_MILLIS_DEFAULT</a></pre>
+<pre>private static final&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.109">SNAPSHOT_WAKE_MILLIS_DEFAULT</a></pre>
 <div class="block">By default, check to see if the snapshot is complete every WAKE MILLIS (ms)</div>
 <dl>
 <dt><span class="seeLabel">See Also:</span></dt>
@@ -586,7 +594,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>SNAPSHOT_SENTINELS_CLEANUP_TIMEOUT</h4>
-<pre>private static final&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.121">SNAPSHOT_SENTINELS_CLEANUP_TIMEOUT</a></pre>
+<pre>private static final&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.122">SNAPSHOT_SENTINELS_CLEANUP_TIMEOUT</a></pre>
 <div class="block">Wait time before removing a finished sentinel from the in-progress map
 
  NOTE: This is used as a safety auto cleanup.
@@ -608,7 +616,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>HBASE_SNAPSHOT_ENABLED</h4>
-<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.124">HBASE_SNAPSHOT_ENABLED</a></pre>
+<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.125">HBASE_SNAPSHOT_ENABLED</a></pre>
 <div class="block">Enable or disable snapshot support</div>
 <dl>
 <dt><span class="seeLabel">See Also:</span></dt>
@@ -622,7 +630,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>SNAPSHOT_WAKE_MILLIS_KEY</h4>
-<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.130">SNAPSHOT_WAKE_MILLIS_KEY</a></pre>
+<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.131">SNAPSHOT_WAKE_MILLIS_KEY</a></pre>
 <div class="block">Conf key for # of ms elapsed between checks for snapshot errors while waiting for
  completion.</div>
 <dl>
@@ -637,7 +645,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION</h4>
-<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.133">ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION</a></pre>
+<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.134">ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION</a></pre>
 <div class="block">Name of the operation to use in the controller</div>
 <dl>
 <dt><span class="seeLabel">See Also:</span></dt>
@@ -651,7 +659,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>SNAPSHOT_POOL_THREADS_KEY</h4>
-<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.136">SNAPSHOT_POOL_THREADS_KEY</a></pre>
+<pre>private static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.137">SNAPSHOT_POOL_THREADS_KEY</a></pre>
 <div class="block">Conf key for # of threads used by the SnapshotManager thread pool</div>
 <dl>
 <dt><span class="seeLabel">See Also:</span></dt>
@@ -665,7 +673,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>SNAPSHOT_POOL_THREADS_DEFAULT</h4>
-<pre>private static final&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.139">SNAPSHOT_POOL_THREADS_DEFAULT</a></pre>
+<pre>private static final&nbsp;int <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.140">SNAPSHOT_POOL_THREADS_DEFAULT</a></pre>
 <div class="block">number of current operations running on the master</div>
 <dl>
 <dt><span class="seeLabel">See Also:</span></dt>
@@ -679,7 +687,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>stopped</h4>
-<pre>private&nbsp;boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.141">stopped</a></pre>
+<pre>private&nbsp;boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.142">stopped</a></pre>
 </li>
 </ul>
 <a name="master">
@@ -688,7 +696,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>master</h4>
-<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.142">master</a></pre>
+<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.143">master</a></pre>
 </li>
 </ul>
 <a name="coordinator">
@@ -697,7 +705,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>coordinator</h4>
-<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/procedure/ProcedureCoordinator.html" title="class in org.apache.hadoop.hbase.procedure">ProcedureCoordinator</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.143">coordinator</a></pre>
+<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/procedure/ProcedureCoordinator.html" title="class in org.apache.hadoop.hbase.procedure">ProcedureCoordinator</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.144">coordinator</a></pre>
 </li>
 </ul>
 <a name="isSnapshotSupported">
@@ -706,7 +714,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>isSnapshotSupported</h4>
-<pre>private&nbsp;boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.146">isSnapshotSupported</a></pre>
+<pre>private&nbsp;boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.147">isSnapshotSupported</a></pre>
 </li>
 </ul>
 <a name="snapshotHandlers">
@@ -715,7 +723,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>snapshotHandlers</h4>
-<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>,<a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&gt; <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.152">snapshotHandlers</a></pre>
+<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>,<a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&gt; <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.153">snapshotHandlers</a></pre>
 </li>
 </ul>
 <a name="restoreTableToProcIdMap">
@@ -724,7 +732,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>restoreTableToProcIdMap</h4>
-<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt; <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.161">restoreTableToProcIdMap</a></pre>
+<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt; <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.162">restoreTableToProcIdMap</a></pre>
 </li>
 </ul>
 <a name="rootDir">
@@ -733,7 +741,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>rootDir</h4>
-<pre>private&nbsp;org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.163">rootDir</a></pre>
+<pre>private&nbsp;org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.164">rootDir</a></pre>
 </li>
 </ul>
 <a name="executorService">
@@ -742,20 +750,20 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>executorService</h4>
-<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/executor/ExecutorService.html" title="class in org.apache.hadoop.hbase.executor">ExecutorService</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.164">executorService</a></pre>
+<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/executor/ExecutorService.html" title="class in org.apache.hadoop.hbase.executor">ExecutorService</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.165">executorService</a></pre>
 </li>
 </ul>
-<a name="locks">
+<a name="takingSnapshotLock">
 <!--   -->
 </a>
 <ul class="blockListLast">
 <li class="blockList">
-<h4>locks</h4>
-<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/util/KeyLocker.html" title="class in org.apache.hadoop.hbase.util">KeyLocker</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt; <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.172">locks</a></pre>
-<div class="block">Locks for snapshot operations
-  key is snapshot's filename in progress, value is the related lock
-    - create snapshot
   - SnapshotCleaner</div>
+<h4>takingSnapshotLock</h4>
+<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html?is-external=true" title="class or interface in java.util.concurrent.locks">ReentrantReadWriteLock</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.173">takingSnapshotLock</a></pre>
+<div class="block">Read write lock between taking snapshot and snapshot HFile cleaner. The cleaner should skip to
+ check the HFiles if any snapshot is in progress, otherwise it may clean a HFile which would
+ belongs to the newly creating snapshot. So we should grab the write lock first when cleaner
start to work. (See HBASE-21387)</div>
 </li>
 </ul>
 </li>
@@ -772,7 +780,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>SnapshotManager</h4>
-<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.176">SnapshotManager</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.175">SnapshotManager</a>()</pre>
 </li>
 </ul>
 <a name="SnapshotManager-org.apache.hadoop.hbase.master.MasterServices-org.apache.hadoop.hbase.master.MetricsMaster-org.apache.hadoop.hbase.procedure.ProcedureCoordinator-org.apache.hadoop.hbase.executor.ExecutorService-">
@@ -781,7 +789,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockListLast">
 <li class="blockList">
 <h4>SnapshotManager</h4>
-<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.184">SnapshotManager</a>(<a href="../../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a>&nbsp;master,
+<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.183">SnapshotManager</a>(<a href="../../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a>&nbsp;master,
                        <a href="../../../../../../org/apache/hadoop/hbase/master/MetricsMaster.html" title="class in org.apache.hadoop.hbase.master">MetricsMaster</a>&nbsp;metricsMaster,
                        <a href="../../../../../../org/apache/hadoop/hbase/procedure/ProcedureCoordinator.html" title="class in org.apache.hadoop.hbase.procedure">ProcedureCoordinator</a>&nbsp;coordinator,
                        <a href="../../../../../../org/apache/hadoop/hbase/executor/ExecutorService.html" title="class in org.apache.hadoop.hbase.executor">ExecutorService</a>&nbsp;pool)
@@ -813,7 +821,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>getCompletedSnapshots</h4>
-<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.202">getCompletedSnapshots</a>()
+<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.201">getCompletedSnapshots</a>()
                                                                                                                  throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Gets the list of all completed snapshots.</div>
 <dl>
@@ -830,7 +838,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>getCompletedSnapshots</h4>
-<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.213">getCompletedSnapshots</a>(org.apache.hadoop.fs.Path&nbsp;snapshotDir,
+<pre>private&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.212">getCompletedSnapshots</a>(org.apache.hadoop.fs.Path&nbsp;snapshotDir,
                                                                                                                          boolean&nbsp;withCpCall)
                                                                                                                   throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Gets the list of all completed snapshots.</div>
@@ -851,7 +859,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>resetTempDir</h4>
-<pre>void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.277">resetTempDir</a>()
+<pre>void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.276">resetTempDir</a>()
            throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Cleans up any snapshots in the snapshot/.tmp directory that were left from failed
  snapshot attempts.</div>
@@ -867,7 +875,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>deleteSnapshot</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.293">deleteSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.292">deleteSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
                     throws <a href="../../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDoesNotExistException.html" title="class in org.apache.hadoop.hbase.snapshot">SnapshotDoesNotExistException</a>,
                            <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Delete the specified snapshot</div>
@@ -886,7 +894,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>isSnapshotDone</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.336">isSnapshotDone</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;expected)
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.335">isSnapshotDone</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;expected)
                        throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Check if the specified snapshot is done</div>
 <dl>
@@ -906,7 +914,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>isTakingSnapshot</h4>
-<pre>boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.401">isTakingSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)</pre>
+<pre>boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.400">isTakingSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)</pre>
 <div class="block">Check to see if there is a snapshot in progress with the same name or on the same table.
  Currently we have a limitation only allowing a single snapshot per table at a time. Also we
  don't allow snapshot with the same name.</div>
@@ -925,7 +933,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>isTakingSnapshot</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.423">isTakingSnapshot</a>(<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.422">isTakingSnapshot</a>(<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)</pre>
 <div class="block">Check to see if the specified table has a snapshot in progress.  Currently we have a
  limitation only allowing a single snapshot per table at a time.</div>
 <dl>
@@ -942,7 +950,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>prepareToTakeSnapshot</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.434">prepareToTakeSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.433">prepareToTakeSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
                             throws <a href="../../../../../../org/apache/hadoop/hbase/snapshot/HBaseSnapshotException.html" title="class in org.apache.hadoop.hbase.snapshot">HBaseSnapshotException</a></pre>
 <div class="block">Check to make sure that we are OK to run the passed snapshot. Checks to make sure that we
  aren't already running a snapshot or restore on the requested table.</div>
@@ -960,7 +968,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>snapshotDisabledTable</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.485">snapshotDisabledTable</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.484">snapshotDisabledTable</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
                             throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Take a snapshot of a disabled table.</div>
 <dl>
@@ -978,7 +986,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>snapshotEnabledTable</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.505">snapshotEnabledTable</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.504">snapshotEnabledTable</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
                            throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Take a snapshot of an enabled table.</div>
 <dl>
@@ -996,7 +1004,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>snapshotTable</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.524">snapshotTable</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.523">snapshotTable</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                            <a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html" title="class in org.apache.hadoop.hbase.master.snapshot">TakeSnapshotHandler</a>&nbsp;handler)
                     throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Take a snapshot using the specified handler.
@@ -1012,13 +1020,40 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 </dl>
 </li>
 </ul>
+<a name="getTakingSnapshotLock--">
+<!--   -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>getTakingSnapshotLock</h4>
+<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/ReadWriteLock.html?is-external=true" title="class or interface in java.util.concurrent.locks">ReadWriteLock</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.549">getTakingSnapshotLock</a>()</pre>
+</li>
+</ul>
+<a name="isTakingAnySnapshot--">
+<!--   -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>isTakingAnySnapshot</h4>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.561">isTakingAnySnapshot</a>()</pre>
+<div class="block">The snapshot operation processing as following: <br>
+ 1. Create a Snapshot Handler, and do some initialization; <br>
+ 2. Put the handler into snapshotHandlers <br>
+ So when we consider if any snapshot is taking, we should consider both the takingSnapshotLock
+ and snapshotHandlers;</div>
+<dl>
+<dt><span class="returnLabel">Returns:</span></dt>
+<dd>true to indicate that there're some running snapshots.</dd>
+</dl>
+</li>
+</ul>
 <a name="takeSnapshot-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-">
 <!--   -->
 </a>
 <ul class="blockList">
 <li class="blockList">
 <h4>takeSnapshot</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.557">takeSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.571">takeSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
                   throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Take a snapshot based on the enabled/disabled state of the table.</div>
 <dl>
@@ -1030,13 +1065,27 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 </dl>
 </li>
 </ul>
+<a name="takeSnapshotInternal-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-">
+<!--   -->
+</a>
+<ul class="blockList">
+<li class="blockList">
+<h4>takeSnapshotInternal</h4>
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.580">takeSnapshotInternal</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
+                           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>
+<dd><code><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></code></dd>
+</dl>
+</li>
+</ul>
 <a name="setSnapshotHandlerForTesting-org.apache.hadoop.hbase.TableName-org.apache.hadoop.hbase.master.SnapshotSentinel-">
 <!--   -->
 </a>
 <ul class="blockList">
 <li class="blockList">
 <h4>setSnapshotHandlerForTesting</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.647">setSnapshotHandlerForTesting</a>(<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.670">setSnapshotHandlerForTesting</a>(<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                                          <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&nbsp;handler)</pre>
 <div class="block">Set the handler for the current snapshot
  <p>
@@ -1056,7 +1105,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>getCoordinator</h4>
-<pre><a href="../../../../../../org/apache/hadoop/hbase/procedure/ProcedureCoordinator.html" title="class in org.apache.hadoop.hbase.procedure">ProcedureCoordinator</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.660">getCoordinator</a>()</pre>
+<pre><a href="../../../../../../org/apache/hadoop/hbase/procedure/ProcedureCoordinator.html" title="class in org.apache.hadoop.hbase.procedure">ProcedureCoordinator</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.683">getCoordinator</a>()</pre>
 <dl>
 <dt><span class="returnLabel">Returns:</span></dt>
 <dd>distributed commit coordinator for all running snapshots</dd>
@@ -1069,7 +1118,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>isSnapshotCompleted</h4>
-<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.674">isSnapshotCompleted</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
+<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.697">isSnapshotCompleted</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)
                              throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Check to see if the snapshot is one of the currently completed snapshots
  Returns true if the snapshot exists in the "completed snapshots folder".</div>
@@ -1091,7 +1140,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>cloneSnapshot</h4>
-<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.697">cloneSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;reqSnapshot,
+<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.720">cloneSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;reqSnapshot,
                            <a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                            org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                            <a href="../../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;snapshotTableDesc,
@@ -1120,7 +1169,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>cloneSnapshot</h4>
-<pre>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.732">cloneSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
+<pre>long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.755">cloneSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                    <a href="../../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;tableDescriptor,
                    <a href="../../../../../../org/apache/hadoop/hbase/util/NonceKey.html" title="class in org.apache.hadoop.hbase.util">NonceKey</a>&nbsp;nonceKey,
                    boolean&nbsp;restoreAcl)
@@ -1145,7 +1194,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>restoreOrCloneSnapshot</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.768">restoreOrCloneSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;reqSnapshot,
+<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.791">restoreOrCloneSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;reqSnapshot,
                                    <a href="../../../../../../org/apache/hadoop/hbase/util/NonceKey.html" title="class in org.apache.hadoop.hbase.util">NonceKey</a>&nbsp;nonceKey,
                                    boolean&nbsp;restoreAcl)
                             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>
@@ -1165,7 +1214,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>restoreSnapshot</h4>
-<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.819">restoreSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;reqSnapshot,
+<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.842">restoreSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;reqSnapshot,
                              <a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName,
                              org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                              <a href="../../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;snapshotTableDesc,
@@ -1195,7 +1244,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>restoreSnapshot</h4>
-<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.864">restoreSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
+<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.887">restoreSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                              <a href="../../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;tableDescriptor,
                              <a href="../../../../../../org/apache/hadoop/hbase/util/NonceKey.html" title="class in org.apache.hadoop.hbase.util">NonceKey</a>&nbsp;nonceKey,
                              boolean&nbsp;restoreAcl)
@@ -1221,7 +1270,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>isRestoringTable</h4>
-<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.901">isRestoringTable</a>(<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)</pre>
+<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.924">isRestoringTable</a>(<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>&nbsp;tableName)</pre>
 <div class="block">Verify if the restore of the specified table is in progress.</div>
 <dl>
 <dt><span class="paramLabel">Parameters:</span></dt>
@@ -1237,7 +1286,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>removeSentinelIfFinished</h4>
-<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.923">removeSentinelIfFinished</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>,<a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&gt;&nbsp;sentinels,
+<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.946">removeSentinelIfFinished</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>,<a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&gt;&nbsp;sentinels,
                                                   org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot)</pre>
 <div class="block">Return the handler if it is currently live and has the same snapshot target name.
  The handler is removed from the sentinels map if completed.</div>
@@ -1256,7 +1305,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>cleanupSentinels</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.956">cleanupSentinels</a>()</pre>
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.979">cleanupSentinels</a>()</pre>
 <div class="block">Removes "abandoned" snapshot/restore requests.
  As part of the HBaseAdmin snapshot/restore API the operation status is checked until completed,
  and the in-progress maps are cleaned up when the status of a completed task is requested.
@@ -1270,7 +1319,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>cleanupSentinels</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.966">cleanupSentinels</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>,<a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&gt;&nbsp;sentinels)</pre>
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.989">cleanupSentinels</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a>,<a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>&gt;&nbsp;sentinels)</pre>
 <div class="block">Remove the sentinels that are marked as finished and the completion time
  has exceeded the removal timeout.</div>
 <dl>
@@ -1285,7 +1334,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>cleanupCompletedRestoreInMap</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.984">cleanupCompletedRestoreInMap</a>()</pre>
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1007">cleanupCompletedRestoreInMap</a>()</pre>
 <div class="block">Remove the procedures that are marked as finished</div>
 </li>
 </ul>
@@ -1295,7 +1344,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>stop</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1001">stop</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;why)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1024">stop</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;why)</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html#stop-java.lang.String-">Stoppable</a></code></span></div>
 <div class="block">Stop this service.
  Implementers should favor logging errors over throwing RuntimeExceptions.</div>
@@ -1313,7 +1362,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>isStopped</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1021">isStopped</a>()</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1044">isStopped</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html#isStopped--">isStopped</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a></code></dd>
@@ -1328,7 +1377,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>checkSnapshotSupport</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1030">checkSnapshotSupport</a>()
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1053">checkSnapshotSupport</a>()
                           throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></pre>
 <div class="block">Throws an exception if snapshot operations (take a snapshot, restore, clone) are not supported.
  Called at the beginning of snapshot() and restoreSnapshot() methods.</div>
@@ -1344,7 +1393,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>checkSnapshotSupport</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1048">checkSnapshotSupport</a>(org.apache.hadoop.conf.Configuration&nbsp;conf,
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1071">checkSnapshotSupport</a>(org.apache.hadoop.conf.Configuration&nbsp;conf,
                                   <a href="../../../../../../org/apache/hadoop/hbase/master/MasterFileSystem.html" title="class in org.apache.hadoop.hbase.master">MasterFileSystem</a>&nbsp;mfs)
                            throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
                                   <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></pre>
@@ -1368,7 +1417,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>initialize</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1120">initialize</a>(<a href="../../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a>&nbsp;master,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1143">initialize</a>(<a href="../../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a>&nbsp;master,
                        <a href="../../../../../../org/apache/hadoop/hbase/master/MetricsMaster.html" title="class in org.apache.hadoop.hbase.master">MetricsMaster</a>&nbsp;metricsMaster)
                 throws org.apache.zookeeper.KeeperException,
                        <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>,
@@ -1393,7 +1442,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>getProcedureSignature</h4>
-<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1148">getProcedureSignature</a>()</pre>
+<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1171">getProcedureSignature</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/procedure/ProcedureManager.html#getProcedureSignature--">ProcedureManager</a></code></span></div>
 <div class="block">Return the unique signature of the procedure. This signature uniquely
  identifies the procedure. By default, this signature is the string used in
@@ -1410,7 +1459,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>execProcedure</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1153">execProcedure</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription&nbsp;desc)
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1176">execProcedure</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription&nbsp;desc)
                    throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/procedure/MasterProcedureManager.html#execProcedure-org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription-">MasterProcedureManager</a></code></span></div>
 <div class="block">Execute a distributed procedure on cluster</div>
@@ -1430,7 +1479,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>checkPermissions</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1158">checkPermissions</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription&nbsp;desc,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1181">checkPermissions</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription&nbsp;desc,
                              <a href="../../../../../../org/apache/hadoop/hbase/security/access/AccessChecker.html" title="class in org.apache.hadoop.hbase.security.access">AccessChecker</a>&nbsp;accessChecker,
                              <a href="../../../../../../org/apache/hadoop/hbase/security/User.html" title="class in org.apache.hadoop.hbase.security">User</a>&nbsp;user)
                       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>
@@ -1450,7 +1499,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <ul class="blockList">
 <li class="blockList">
 <h4>isProcedureDone</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1165">isProcedureDone</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription&nbsp;desc)
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1188">isProcedureDone</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription&nbsp;desc)
                         throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/procedure/MasterProcedureManager.html#isProcedureDone-org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription-">MasterProcedureManager</a></code></span></div>
 <div class="block">Check if the procedure is finished successfully</div>
@@ -1469,10 +1518,10 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 <a name="toSnapshotDescription-org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription-">
 <!--   -->
 </a>
-<ul class="blockList">
+<ul class="blockListLast">
 <li class="blockList">
 <h4>toSnapshotDescription</h4>
-<pre>private&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1169">toSnapshotDescription</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription&nbsp;desc)
+<pre>private&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1192">toSnapshotDescription</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription&nbsp;desc)
                                                                                                             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>
@@ -1480,15 +1529,6 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/Stoppable.html" ti
 </dl>
 </li>
 </ul>
-<a name="getLocks--">
-<!--   -->
-</a>
-<ul class="blockListLast">
-<li class="blockList">
-<h4>getLocks</h4>
-<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/util/KeyLocker.html" title="class in org.apache.hadoop.hbase.util">KeyLocker</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#line.1193">getLocks</a>()</pre>
-</li>
-</ul>
 </li>
 </ul>
 </li>
index c5c92da..343d45d 100644 (file)
@@ -123,7 +123,7 @@ var activeTableTab = "activeTableTab";
 <hr>
 <br>
 <pre>@InterfaceAudience.Private
-public abstract class <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.74">TakeSnapshotHandler</a>
+public abstract class <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.73">TakeSnapshotHandler</a>
 extends <a href="../../../../../../org/apache/hadoop/hbase/executor/EventHandler.html" title="class in org.apache.hadoop.hbase.executor">EventHandler</a>
 implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a>, <a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignExceptionSnare.html" title="interface in org.apache.hadoop.hbase.errorhandling">ForeignExceptionSnare</a></pre>
 <div class="block">A handler for taking snapshots from the master.
@@ -397,7 +397,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>LOG</h4>
-<pre>private static final&nbsp;org.slf4j.Logger <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.76">LOG</a></pre>
+<pre>private static final&nbsp;org.slf4j.Logger <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.75">LOG</a></pre>
 </li>
 </ul>
 <a name="finished">
@@ -406,7 +406,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>finished</h4>
-<pre>private volatile&nbsp;boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.78">finished</a></pre>
+<pre>private volatile&nbsp;boolean <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.77">finished</a></pre>
 </li>
 </ul>
 <a name="master">
@@ -415,7 +415,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>master</h4>
-<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.81">master</a></pre>
+<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.80">master</a></pre>
 </li>
 </ul>
 <a name="metricsSnapshot">
@@ -424,7 +424,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>metricsSnapshot</h4>
-<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/MetricsSnapshot.html" title="class in org.apache.hadoop.hbase.master">MetricsSnapshot</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.82">metricsSnapshot</a></pre>
+<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/MetricsSnapshot.html" title="class in org.apache.hadoop.hbase.master">MetricsSnapshot</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.81">metricsSnapshot</a></pre>
 </li>
 </ul>
 <a name="snapshot">
@@ -433,7 +433,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>snapshot</h4>
-<pre>protected final&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.83">snapshot</a></pre>
+<pre>protected final&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.82">snapshot</a></pre>
 </li>
 </ul>
 <a name="conf">
@@ -442,7 +442,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>conf</h4>
-<pre>protected final&nbsp;org.apache.hadoop.conf.Configuration <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.84">conf</a></pre>
+<pre>protected final&nbsp;org.apache.hadoop.conf.Configuration <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.83">conf</a></pre>
 </li>
 </ul>
 <a name="rootFs">
@@ -451,7 +451,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>rootFs</h4>
-<pre>protected final&nbsp;org.apache.hadoop.fs.FileSystem <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.85">rootFs</a></pre>
+<pre>protected final&nbsp;org.apache.hadoop.fs.FileSystem <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.84">rootFs</a></pre>
 </li>
 </ul>
 <a name="workingDirFs">
@@ -460,7 +460,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>workingDirFs</h4>
-<pre>protected final&nbsp;org.apache.hadoop.fs.FileSystem <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.86">workingDirFs</a></pre>
+<pre>protected final&nbsp;org.apache.hadoop.fs.FileSystem <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.85">workingDirFs</a></pre>
 </li>
 </ul>
 <a name="rootDir">
@@ -469,7 +469,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>rootDir</h4>
-<pre>protected final&nbsp;org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.87">rootDir</a></pre>
+<pre>protected final&nbsp;org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.86">rootDir</a></pre>
 </li>
 </ul>
 <a name="snapshotDir">
@@ -478,7 +478,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>snapshotDir</h4>
-<pre>private final&nbsp;org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.88">snapshotDir</a></pre>
+<pre>private final&nbsp;org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.87">snapshotDir</a></pre>
 </li>
 </ul>
 <a name="workingDir">
@@ -487,7 +487,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>workingDir</h4>
-<pre>protected final&nbsp;org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.89">workingDir</a></pre>
+<pre>protected final&nbsp;org.apache.hadoop.fs.Path <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.88">workingDir</a></pre>
 </li>
 </ul>
 <a name="verifier">
@@ -496,7 +496,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>verifier</h4>
-<pre>private final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/MasterSnapshotVerifier.html" title="class in org.apache.hadoop.hbase.master.snapshot">MasterSnapshotVerifier</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.90">verifier</a></pre>
+<pre>private final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/MasterSnapshotVerifier.html" title="class in org.apache.hadoop.hbase.master.snapshot">MasterSnapshotVerifier</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.89">verifier</a></pre>
 </li>
 </ul>
 <a name="monitor">
@@ -505,7 +505,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>monitor</h4>
-<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.html" title="class in org.apache.hadoop.hbase.errorhandling">ForeignExceptionDispatcher</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.91">monitor</a></pre>
+<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignExceptionDispatcher.html" title="class in org.apache.hadoop.hbase.errorhandling">ForeignExceptionDispatcher</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.90">monitor</a></pre>
 </li>
 </ul>
 <a name="tableLock">
@@ -514,7 +514,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>tableLock</h4>
-<pre>private final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/locking/LockManager.MasterLock.html" title="class in org.apache.hadoop.hbase.master.locking">LockManager.MasterLock</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.92">tableLock</a></pre>
+<pre>private final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/locking/LockManager.MasterLock.html" title="class in org.apache.hadoop.hbase.master.locking">LockManager.MasterLock</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.91">tableLock</a></pre>
 </li>
 </ul>
 <a name="status">
@@ -523,7 +523,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>status</h4>
-<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/monitoring/MonitoredTask.html" title="interface in org.apache.hadoop.hbase.monitoring">MonitoredTask</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.93">status</a></pre>
+<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/monitoring/MonitoredTask.html" title="interface in org.apache.hadoop.hbase.monitoring">MonitoredTask</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.92">status</a></pre>
 </li>
 </ul>
 <a name="snapshotTable">
@@ -532,7 +532,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>snapshotTable</h4>
-<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.94">snapshotTable</a></pre>
+<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/TableName.html" title="class in org.apache.hadoop.hbase">TableName</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.93">snapshotTable</a></pre>
 </li>
 </ul>
 <a name="snapshotManifest">
@@ -541,7 +541,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>snapshotManifest</h4>
-<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/snapshot/SnapshotManifest.html" title="class in org.apache.hadoop.hbase.snapshot">SnapshotManifest</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.95">snapshotManifest</a></pre>
+<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/snapshot/SnapshotManifest.html" title="class in org.apache.hadoop.hbase.snapshot">SnapshotManifest</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.94">snapshotManifest</a></pre>
 </li>
 </ul>
 <a name="snapshotManager">
@@ -550,7 +550,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>snapshotManager</h4>
-<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.96">snapshotManager</a></pre>
+<pre>protected final&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.95">snapshotManager</a></pre>
 </li>
 </ul>
 <a name="htd">
@@ -559,7 +559,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockListLast">
 <li class="blockList">
 <h4>htd</h4>
-<pre>protected&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.98">htd</a></pre>
+<pre>protected&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a> <a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.97">htd</a></pre>
 </li>
 </ul>
 </li>
@@ -576,7 +576,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockListLast">
 <li class="blockList">
 <h4>TakeSnapshotHandler</h4>
-<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.108">TakeSnapshotHandler</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
+<pre>public&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.107">TakeSnapshotHandler</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                            <a href="../../../../../../org/apache/hadoop/hbase/master/MasterServices.html" title="interface in org.apache.hadoop.hbase.master">MasterServices</a>&nbsp;masterServices,
                            <a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a>&nbsp;snapshotManager)
                     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>
@@ -606,7 +606,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>loadTableDescriptor</h4>
-<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.142">loadTableDescriptor</a>()
+<pre>private&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/client/TableDescriptor.html" title="interface in org.apache.hadoop.hbase.client">TableDescriptor</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.141">loadTableDescriptor</a>()
                                      throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</a>,
                                             <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <dl>
@@ -622,7 +622,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>prepare</h4>
-<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html" title="class in org.apache.hadoop.hbase.master.snapshot">TakeSnapshotHandler</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.153">prepare</a>()
+<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html" title="class in org.apache.hadoop.hbase.master.snapshot">TakeSnapshotHandler</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.152">prepare</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"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/executor/EventHandler.html#prepare--">EventHandler</a></code></span></div>
 <div class="block">Event handlers should do all the necessary checks in this method (rather than
@@ -646,7 +646,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>process</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.173">process</a>()</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.172">process</a>()</pre>
 <div class="block">Execute the core common portions of taking a snapshot. The <a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#snapshotRegions-java.util.List-"><code>snapshotRegions(List)</code></a>
  call should get implemented for each snapshot flavor.</div>
 <dl>
@@ -661,7 +661,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>completeSnapshot</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.272">completeSnapshot</a>(org.apache.hadoop.fs.Path&nbsp;snapshotDir,
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.269">completeSnapshot</a>(org.apache.hadoop.fs.Path&nbsp;snapshotDir,
                              org.apache.hadoop.fs.Path&nbsp;workingDir,
                              org.apache.hadoop.fs.FileSystem&nbsp;fs,
                              org.apache.hadoop.fs.FileSystem&nbsp;workingDirFs)
@@ -688,7 +688,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>downgradeToSharedTableLock</h4>
-<pre>protected abstract&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.302">downgradeToSharedTableLock</a>()</pre>
+<pre>protected abstract&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.299">downgradeToSharedTableLock</a>()</pre>
 <div class="block">When taking snapshot, first we must acquire the exclusive table lock to confirm that there are
  no ongoing merge/split procedures. But later, we should try our best to release the exclusive
  lock as this may hurt the availability, because we need to hold the shared lock when assigning
@@ -703,7 +703,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>snapshotRegions</h4>
-<pre>protected abstract&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.307">snapshotRegions</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a>,<a href="../../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&gt;&gt;&nbsp;regions)
+<pre>protected abstract&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.304">snapshotRegions</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/util/Pair.html" title="class in org.apache.hadoop.hbase.util">Pair</a>&lt;<a href="../../../../../../org/apache/hadoop/hbase/client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a>,<a href="../../../../../../org/apache/hadoop/hbase/ServerName.html" title="class in org.apache.hadoop.hbase">ServerName</a>&gt;&gt;&nbsp;regions)
                                  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>,
                                         org.apache.zookeeper.KeeperException</pre>
 <div class="block">Snapshot the specified regions</div>
@@ -720,7 +720,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>snapshotDisabledRegion</h4>
-<pre>protected&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.313">snapshotDisabledRegion</a>(<a href="../../../../../../org/apache/hadoop/hbase/client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a>&nbsp;regionInfo)
+<pre>protected&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.310">snapshotDisabledRegion</a>(<a href="../../../../../../org/apache/hadoop/hbase/client/RegionInfo.html" title="interface in org.apache.hadoop.hbase.client">RegionInfo</a>&nbsp;regionInfo)
                                throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
 <div class="block">Take a snapshot of the specified disabled region</div>
 <dl>
@@ -735,7 +735,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>cancel</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.322">cancel</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;why)</pre>
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.319">cancel</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;why)</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html#cancel-java.lang.String-">SnapshotSentinel</a></code></span></div>
 <div class="block">Actively cancel a running snapshot.</div>
 <dl>
@@ -752,7 +752,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>isFinished</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.333">isFinished</a>()</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.330">isFinished</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html#isFinished--">SnapshotSentinel</a></code></span></div>
 <div class="block">Check to see if the snapshot is finished, where finished may be success or failure.</div>
 <dl>
@@ -770,7 +770,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>getCompletionTimestamp</h4>
-<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.338">getCompletionTimestamp</a>()</pre>
+<pre>public&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.335">getCompletionTimestamp</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html#getCompletionTimestamp--">getCompletionTimestamp</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a></code></dd>
@@ -785,7 +785,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>getSnapshot</h4>
-<pre>public&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.343">getSnapshot</a>()</pre>
+<pre>public&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.340">getSnapshot</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 <dd><code><a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html#getSnapshot--">getSnapshot</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html" title="interface in org.apache.hadoop.hbase.master">SnapshotSentinel</a></code></dd>
@@ -800,7 +800,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>getExceptionIfFailed</h4>
-<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignException.html" title="class in org.apache.hadoop.hbase.errorhandling">ForeignException</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.348">getExceptionIfFailed</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignException.html" title="class in org.apache.hadoop.hbase.errorhandling">ForeignException</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.345">getExceptionIfFailed</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html#getExceptionIfFailed--">SnapshotSentinel</a></code></span></div>
 <div class="block">Get the exception that caused the snapshot to fail, if the snapshot has failed.</div>
 <dl>
@@ -818,7 +818,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>rethrowExceptionIfFailed</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.353">rethrowExceptionIfFailed</a>()
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.350">rethrowExceptionIfFailed</a>()
                               throws <a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignException.html" title="class in org.apache.hadoop.hbase.errorhandling">ForeignException</a></pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html#rethrowExceptionIfFailed--">SnapshotSentinel</a></code></span></div>
 <div class="block">Rethrow the exception returned by <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSentinel.html#getExceptionIfFailed--"><code>SnapshotSentinel.getExceptionIfFailed()</code></a>.
@@ -837,7 +837,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>rethrowException</h4>
-<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.358">rethrowException</a>()
+<pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.355">rethrowException</a>()
                       throws <a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignException.html" title="class in org.apache.hadoop.hbase.errorhandling">ForeignException</a></pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignExceptionSnare.html#rethrowException--">ForeignExceptionSnare</a></code></span></div>
 <div class="block">Rethrow an exception currently held by the <a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignExceptionSnare.html" title="interface in org.apache.hadoop.hbase.errorhandling"><code>ForeignExceptionSnare</code></a>. If there is
@@ -856,7 +856,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockList">
 <li class="blockList">
 <h4>hasException</h4>
-<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.363">hasException</a>()</pre>
+<pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.360">hasException</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignExceptionSnare.html#hasException--">ForeignExceptionSnare</a></code></span></div>
 <div class="block">Non-exceptional form of <a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignExceptionSnare.html#rethrowException--"><code>ForeignExceptionSnare.rethrowException()</code></a>. Checks to see if any
  process to which the exception checkers is bound has created an error that
@@ -875,7 +875,7 @@ implements <a href="../../../../../../org/apache/hadoop/hbase/master/SnapshotSen
 <ul class="blockListLast">
 <li class="blockList">
 <h4>getException</h4>
-<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignException.html" title="class in org.apache.hadoop.hbase.errorhandling">ForeignException</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.368">getException</a>()</pre>
+<pre>public&nbsp;<a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignException.html" title="class in org.apache.hadoop.hbase.errorhandling">ForeignException</a>&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/master/snapshot/TakeSnapshotHandler.html#line.365">getException</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../../../org/apache/hadoop/hbase/errorhandling/ForeignExceptionSnare.html#getException--">ForeignExceptionSnare</a></code></span></div>
 <div class="block">Get the value of the captured exception.</div>
 <dl>
index e93ddaa..e436af1 100644 (file)
 </tr>
 <tbody>
 <tr class="altColor">
-<td class="colFirst"><code>(package private) <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
-<td class="colLast"><span class="typeNameLabel">SnapshotFileCache.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#getSnapshotsInProgress-org.apache.hadoop.hbase.master.snapshot.SnapshotManager-">getSnapshotsInProgress</a></span>(<a href="../../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a>&nbsp;snapshotManager)</code>&nbsp;</td>
-</tr>
-<tr class="rowColor">
 <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;org.apache.hadoop.fs.FileStatus&gt;</code></td>
 <td class="colLast"><span class="typeNameLabel">SnapshotFileCache.</span><code><span class="memberNameLink"><a href="../../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotFileCache.html#getUnreferencedFiles-java.lang.Iterable-org.apache.hadoop.hbase.master.snapshot.SnapshotManager-">getUnreferencedFiles</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;org.apache.hadoop.fs.FileStatus&gt;&nbsp;files,
                     <a href="../../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html" title="class in org.apache.hadoop.hbase.master.snapshot">SnapshotManager</a>&nbsp;snapshotManager)</code>
index a3022c8..21bc697 100644 (file)
@@ -18,7 +18,7 @@
     catch(err) {
     }
 //-->
-var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9};
+var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9};
 var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
 var altColor = "altColor";
 var rowColor = "rowColor";
@@ -206,18 +206,12 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 </td>
 </tr>
 <tr class="altColor">
-<td class="colFirst"><code>static <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 class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_IN_PROGRESS">SNAPSHOT_IN_PROGRESS</a></span></code>
-<div class="block">This tag will be created in in-progess snapshots</div>
-</td>
-</tr>
-<tr class="rowColor">
 <td class="colFirst"><code>static int</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_LAYOUT_VERSION">SNAPSHOT_LAYOUT_VERSION</a></span></code>
 <div class="block">Version of the fs layout for a snapshot.</div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>static int</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_TIMEOUT_MILLIS_DEFAULT">SNAPSHOT_TIMEOUT_MILLIS_DEFAULT</a></span></code>
 <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
@@ -225,7 +219,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 </div>
 </td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>static <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 class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_TIMEOUT_MILLIS_KEY">SNAPSHOT_TIMEOUT_MILLIS_KEY</a></span></code>
 <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
@@ -233,20 +227,20 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 </div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>static <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 class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_TMP_DIR_NAME">SNAPSHOT_TMP_DIR_NAME</a></span></code>
 <div class="block">Temporary directory under the snapshot directory to store in-progress snapshots</div>
 </td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><code>static <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 class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOT_WORKING_DIR">SNAPSHOT_WORKING_DIR</a></span></code>
 <div class="block">The configuration property that determines the filepath of the snapshot
  base working directory</div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><code>static <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 class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#SNAPSHOTINFO_FILE">SNAPSHOTINFO_FILE</a></span></code>
 <div class="block">The file contains the snapshot basic information and it is under the directory of a snapshot.</div>
@@ -297,57 +291,50 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 </td>
 </tr>
 <tr id="i1" class="rowColor">
-<td class="colFirst"><code>static void</code></td>
-<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#createInProgressTag-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.FileSystem-">createInProgressTag</a></span>(org.apache.hadoop.fs.Path&nbsp;workingDir,
-                   org.apache.hadoop.fs.FileSystem&nbsp;fs)</code>
-<div class="block">Create in-progress tag under .tmp of in-progress snapshot</div>
-</td>
-</tr>
-<tr id="i2" class="altColor">
 <td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#getCompletedSnapshotDir-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-org.apache.hadoop.fs.Path-">getCompletedSnapshotDir</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                        org.apache.hadoop.fs.Path&nbsp;rootDir)</code>
 <div class="block">Get the directory for a specified snapshot.</div>
 </td>
 </tr>
-<tr id="i3" class="rowColor">
+<tr id="i2" class="altColor">
 <td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#getCompletedSnapshotDir-java.lang.String-org.apache.hadoop.fs.Path-">getCompletedSnapshotDir</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;snapshotName,
                        org.apache.hadoop.fs.Path&nbsp;rootDir)</code>
 <div class="block">Get the directory for a completed snapshot.</div>
 </td>
 </tr>
-<tr id="i4" class="altColor">
+<tr id="i3" class="rowColor">
 <td class="colFirst"><code>private static org.apache.hadoop.fs.Path</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#getDefaultWorkingSnapshotDir-org.apache.hadoop.fs.Path-">getDefaultWorkingSnapshotDir</a></span>(org.apache.hadoop.fs.Path&nbsp;rootDir)</code>
 <div class="block">Get the default working directory for snapshots - where they are built, where they are
  temporarily copied on export, etc.</div>
 </td>
 </tr>
-<tr id="i5" class="rowColor">
+<tr id="i4" class="altColor">
 <td class="colFirst"><code>static long</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#getMaxMasterTimeout-org.apache.hadoop.conf.Configuration-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription.Type-long-">getMaxMasterTimeout</a></span>(org.apache.hadoop.conf.Configuration&nbsp;conf,
                    org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription.Type&nbsp;type,
                    long&nbsp;defaultMaxWaitTime)</code>&nbsp;</td>
 </tr>
-<tr id="i6" class="altColor">
+<tr id="i5" class="rowColor">
 <td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#getSnapshotRootDir-org.apache.hadoop.fs.Path-">getSnapshotRootDir</a></span>(org.apache.hadoop.fs.Path&nbsp;rootDir)</code>
 <div class="block">Get the snapshot root directory.</div>
 </td>
 </tr>
-<tr id="i7" class="rowColor">
+<tr id="i6" class="altColor">
 <td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#getSnapshotsDir-org.apache.hadoop.fs.Path-">getSnapshotsDir</a></span>(org.apache.hadoop.fs.Path&nbsp;rootDir)</code>&nbsp;</td>
 </tr>
-<tr id="i8" class="altColor">
+<tr id="i7" class="rowColor">
 <td class="colFirst"><code>private static org.apache.hadoop.fs.Path</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#getSpecifiedSnapshotDir-org.apache.hadoop.fs.Path-java.lang.String-">getSpecifiedSnapshotDir</a></span>(org.apache.hadoop.fs.Path&nbsp;snapshotsDir,
                        <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;snapshotName)</code>
 <div class="block">Get the directory within the given filepath to store the snapshot instance</div>
 </td>
 </tr>
-<tr id="i9" class="rowColor">
+<tr id="i8" class="altColor">
 <td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#getWorkingSnapshotDir-org.apache.hadoop.fs.Path-org.apache.hadoop.conf.Configuration-">getWorkingSnapshotDir</a></span>(org.apache.hadoop.fs.Path&nbsp;rootDir,
                      org.apache.hadoop.conf.Configuration&nbsp;conf)</code>
@@ -355,7 +342,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
  temporarily copied on export, etc.</div>
 </td>
 </tr>
-<tr id="i10" class="altColor">
+<tr id="i9" class="rowColor">
 <td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#getWorkingSnapshotDir-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-org.apache.hadoop.fs.Path-org.apache.hadoop.conf.Configuration-">getWorkingSnapshotDir</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                      org.apache.hadoop.fs.Path&nbsp;rootDir,
@@ -363,7 +350,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 <div class="block">Get the directory to build a snapshot, before it is finalized</div>
 </td>
 </tr>
-<tr id="i11" class="rowColor">
+<tr id="i10" class="altColor">
 <td class="colFirst"><code>static org.apache.hadoop.fs.Path</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#getWorkingSnapshotDir-java.lang.String-org.apache.hadoop.fs.Path-org.apache.hadoop.conf.Configuration-">getWorkingSnapshotDir</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;snapshotName,
                      org.apache.hadoop.fs.Path&nbsp;rootDir,
@@ -371,39 +358,39 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 <div class="block">Get the directory to build a snapshot, before it is finalized</div>
 </td>
 </tr>
-<tr id="i12" class="altColor">
+<tr id="i11" class="rowColor">
 <td class="colFirst"><code>static boolean</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#isSecurityAvailable-org.apache.hadoop.conf.Configuration-">isSecurityAvailable</a></span>(org.apache.hadoop.conf.Configuration&nbsp;conf)</code>&nbsp;</td>
 </tr>
-<tr id="i13" class="rowColor">
+<tr id="i12" class="altColor">
 <td class="colFirst"><code>static boolean</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#isSnapshotOwner-org.apache.hadoop.hbase.client.SnapshotDescription-org.apache.hadoop.hbase.security.User-">isSnapshotOwner</a></span>(<a href="../../../../../org/apache/hadoop/hbase/client/SnapshotDescription.html" title="class in org.apache.hadoop.hbase.client">SnapshotDescription</a>&nbsp;snapshot,
                <a href="../../../../../org/apache/hadoop/hbase/security/User.html" title="class in org.apache.hadoop.hbase.security">User</a>&nbsp;user)</code>
 <div class="block">Check if the user is this table snapshot's owner</div>
 </td>
 </tr>
-<tr id="i14" class="altColor">
+<tr id="i13" class="rowColor">
 <td class="colFirst"><code>static boolean</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#isSubDirectoryOf-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.Path-">isSubDirectoryOf</a></span>(org.apache.hadoop.fs.Path&nbsp;workingDir,
                 org.apache.hadoop.fs.Path&nbsp;rootDir)</code>
 <div class="block">Determines if the given workingDir is a subdirectory of the given "root directory"</div>
 </td>
 </tr>
-<tr id="i15" class="rowColor">
+<tr id="i14" class="altColor">
 <td class="colFirst"><code>static boolean</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#isWithinDefaultWorkingDir-org.apache.hadoop.fs.Path-org.apache.hadoop.conf.Configuration-">isWithinDefaultWorkingDir</a></span>(org.apache.hadoop.fs.Path&nbsp;workingDir,
                          org.apache.hadoop.conf.Configuration&nbsp;conf)</code>
 <div class="block">Determines if the given workingDir is a subdirectory of the default working snapshot directory</div>
 </td>
 </tr>
-<tr id="i16" class="altColor">
+<tr id="i15" class="rowColor">
 <td class="colFirst"><code>static org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#readSnapshotInfo-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">readSnapshotInfo</a></span>(org.apache.hadoop.fs.FileSystem&nbsp;fs,
                 org.apache.hadoop.fs.Path&nbsp;snapshotDir)</code>
 <div class="block">Read in the <code>HBaseProtos.SnapshotDescription</code> stored for the snapshot in the passed directory</div>
 </td>
 </tr>
-<tr id="i17" class="rowColor">
+<tr id="i16" class="altColor">
 <td class="colFirst"><code>static org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#validate-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-org.apache.hadoop.conf.Configuration-">validate</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
         org.apache.hadoop.conf.Configuration&nbsp;conf)</code>
@@ -411,12 +398,12 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
  parameters, if none have been supplied.</div>
 </td>
 </tr>
-<tr id="i18" class="altColor">
+<tr id="i17" class="rowColor">
 <td class="colFirst"><code>private static org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#writeAclToSnapshotDescription-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-org.apache.hadoop.conf.Configuration-">writeAclToSnapshotDescription</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                              org.apache.hadoop.conf.Configuration&nbsp;conf)</code>&nbsp;</td>
 </tr>
-<tr id="i19" class="rowColor">
+<tr id="i18" class="altColor">
 <td class="colFirst"><code>static void</code></td>
 <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#writeSnapshotInfo-org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.FileSystem-">writeSnapshotInfo</a></span>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                  org.apache.hadoop.fs.Path&nbsp;workingDir,
@@ -513,27 +500,13 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 </dl>
 </li>
 </ul>
-<a name="SNAPSHOT_IN_PROGRESS">
-<!--   -->
-</a>
-<ul class="blockList">
-<li class="blockList">
-<h4>SNAPSHOT_IN_PROGRESS</h4>
-<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.124">SNAPSHOT_IN_PROGRESS</a></pre>
-<div class="block">This tag will be created in in-progess snapshots</div>
-<dl>
-<dt><span class="seeLabel">See Also:</span></dt>
-<dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils.SNAPSHOT_IN_PROGRESS">Constant Field Values</a></dd>
-</dl>
-</li>
-</ul>
 <a name="NO_SNAPSHOT_START_TIME_SPECIFIED">
 <!--   -->
 </a>
 <ul class="blockList">
 <li class="blockList">
 <h4>NO_SNAPSHOT_START_TIME_SPECIFIED</h4>
-<pre>public static final&nbsp;long <a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.127">NO_SNAPSHOT_START_TIME_SPECIFIED</a></pre>
+<pre>public static final&nbsp;long <a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.125">NO_SNAPSHOT_START_TIME_SPECIFIED</a></pre>
 <div class="block">Default value if no start time is specified</div>
 <dl>
 <dt><span class="seeLabel">See Also:</span></dt>
@@ -547,7 +520,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 <ul class="blockList">
 <li class="blockList">
 <h4>MASTER_SNAPSHOT_TIMEOUT_MILLIS</h4>
-<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.130">MASTER_SNAPSHOT_TIMEOUT_MILLIS</a></pre>
+<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.128">MASTER_SNAPSHOT_TIMEOUT_MILLIS</a></pre>
 <dl>
 <dt><span class="seeLabel">See Also:</span></dt>
 <dd><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils.MASTER_SNAPSHOT_TIMEOUT_MILLIS">Constant Field Values</a></dd>
@@ -560,7 +533,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 <ul class="blockList">
 <li class="blockList">
 <h4>DEFAULT_MAX_WAIT_TIME</h4>
-<pre>public static final&nbsp;long <a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.133">DEFAULT_MAX_WAIT_TIME</a></pre>
+<pre>public static final&nbsp;long <a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.131">DEFAULT_MAX_WAIT_TIME</a></pre>
 <div class="block">By default, wait 300 seconds for a snapshot to complete</div>
 <dl>
 <dt><span class="seeLabel">See Also:</span></dt>
@@ -575,7 +548,7 @@ extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html
 <li class="blockList">
 <h4>SNAPSHOT_TIMEOUT_MILLIS_DEFAULT</h4>
 <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
-public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.141">SNAPSHOT_TIMEOUT_MILLIS_DEFAULT</a></pre>
+public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.139">SNAPSHOT_TIMEOUT_MILLIS_DEFAULT</a></pre>
 <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">Use <a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#DEFAULT_MAX_WAIT_TIME"><code>DEFAULT_MAX_WAIT_TIME</code></a> instead.</span></div>
 <div class="block">By default, check to see if the snapshot is complete (ms)</div>
 <dl>
@@ -591,7 +564,7 @@ public static final&nbsp;int <a href="../../../../../src-html/org/apache/hadoop/
 <li class="blockList">
 <h4>SNAPSHOT_TIMEOUT_MILLIS_KEY</h4>
 <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
-public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.149">SNAPSHOT_TIMEOUT_MILLIS_KEY</a></pre>
+public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.147">SNAPSHOT_TIMEOUT_MILLIS_KEY</a></pre>
 <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">Use <a href="../../../../../org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#MASTER_SNAPSHOT_TIMEOUT_MILLIS"><code>MASTER_SNAPSHOT_TIMEOUT_MILLIS</code></a> instead.</span></div>
 <div class="block">Conf key for # of ms elapsed before injecting a snapshot timeout error when waiting for
  completion.</div>
@@ -615,7 +588,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockListLast">
 <li class="blockList">
 <h4>SnapshotDescriptionUtils</h4>
-<pre>private&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.151">SnapshotDescriptionUtils</a>()</pre>
+<pre>private&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.149">SnapshotDescriptionUtils</a>()</pre>
 </li>
 </ul>
 </li>
@@ -632,7 +605,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>getMaxMasterTimeout</h4>
-<pre>public static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.161">getMaxMasterTimeout</a>(org.apache.hadoop.conf.Configuration&nbsp;conf,
+<pre>public static&nbsp;long&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.159">getMaxMasterTimeout</a>(org.apache.hadoop.conf.Configuration&nbsp;conf,
                                        org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription.Type&nbsp;type,
                                        long&nbsp;defaultMaxWaitTime)</pre>
 <dl>
@@ -651,7 +624,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>getSnapshotRootDir</h4>
-<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.179">getSnapshotRootDir</a>(org.apache.hadoop.fs.Path&nbsp;rootDir)</pre>
+<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.177">getSnapshotRootDir</a>(org.apache.hadoop.fs.Path&nbsp;rootDir)</pre>
 <div class="block">Get the snapshot root directory. All the snapshots are kept under this directory, i.e.
  ${hbase.rootdir}/.snapshot</div>
 <dl>
@@ -668,7 +641,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>getCompletedSnapshotDir</h4>
-<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.190">getCompletedSnapshotDir</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
+<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.188">getCompletedSnapshotDir</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                                                                 org.apache.hadoop.fs.Path&nbsp;rootDir)</pre>
 <div class="block">Get the directory for a specified snapshot. This directory is a sub-directory of snapshot root
  directory and all the data files for a snapshot are kept under this directory.</div>
@@ -687,7 +660,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>getCompletedSnapshotDir</h4>
-<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.201">getCompletedSnapshotDir</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;snapshotName,
+<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.199">getCompletedSnapshotDir</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;snapshotName,
                                                                 org.apache.hadoop.fs.Path&nbsp;rootDir)</pre>
 <div class="block">Get the directory for a completed snapshot. This directory is a sub-directory of snapshot root
  directory and all the data files for a snapshot are kept under this directory.</div>
@@ -706,7 +679,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>getWorkingSnapshotDir</h4>
-<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.212">getWorkingSnapshotDir</a>(org.apache.hadoop.fs.Path&nbsp;rootDir,
+<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.210">getWorkingSnapshotDir</a>(org.apache.hadoop.fs.Path&nbsp;rootDir,
                                                               org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
 <div class="block">Get the general working directory for snapshots - where they are built, where they are
  temporarily copied on export, etc.</div>
@@ -725,7 +698,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>getWorkingSnapshotDir</h4>
-<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.224">getWorkingSnapshotDir</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
+<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.222">getWorkingSnapshotDir</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                                                               org.apache.hadoop.fs.Path&nbsp;rootDir,
                                                               org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
 <div class="block">Get the directory to build a snapshot, before it is finalized</div>
@@ -745,7 +718,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>getWorkingSnapshotDir</h4>
-<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.236">getWorkingSnapshotDir</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;snapshotName,
+<pre>public static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.234">getWorkingSnapshotDir</a>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;snapshotName,
                                                               org.apache.hadoop.fs.Path&nbsp;rootDir,
                                                               org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
 <div class="block">Get the directory to build a snapshot, before it is finalized</div>
@@ -765,7 +738,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>getSpecifiedSnapshotDir</h4>
-<pre>private static final&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.247">getSpecifiedSnapshotDir</a>(org.apache.hadoop.fs.Path&nbsp;snapshotsDir,
+<pre>private static final&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.245">getSpecifiedSnapshotDir</a>(org.apache.hadoop.fs.Path&nbsp;snapshotsDir,
                                                                        <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;snapshotName)</pre>
 <div class="block">Get the directory within the given filepath to store the snapshot instance</div>
 <dl>
@@ -783,7 +756,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>getSnapshotsDir</h4>
-<pre>public static final&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.255">getSnapshotsDir</a>(org.apache.hadoop.fs.Path&nbsp;rootDir)</pre>
+<pre>public static final&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.253">getSnapshotsDir</a>(org.apache.hadoop.fs.Path&nbsp;rootDir)</pre>
 <dl>
 <dt><span class="paramLabel">Parameters:</span></dt>
 <dd><code>rootDir</code> - hbase root directory</dd>
@@ -798,7 +771,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>isSubDirectoryOf</h4>
-<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.266">isSubDirectoryOf</a>(org.apache.hadoop.fs.Path&nbsp;workingDir,
+<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.264">isSubDirectoryOf</a>(org.apache.hadoop.fs.Path&nbsp;workingDir,
                                        org.apache.hadoop.fs.Path&nbsp;rootDir)</pre>
 <div class="block">Determines if the given workingDir is a subdirectory of the given "root directory"</div>
 <dl>
@@ -817,7 +790,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>isWithinDefaultWorkingDir</h4>
-<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.277">isWithinDefaultWorkingDir</a>(org.apache.hadoop.fs.Path&nbsp;workingDir,
+<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.275">isWithinDefaultWorkingDir</a>(org.apache.hadoop.fs.Path&nbsp;workingDir,
                                                 org.apache.hadoop.conf.Configuration&nbsp;conf)</pre>
 <div class="block">Determines if the given workingDir is a subdirectory of the default working snapshot directory</div>
 <dl>
@@ -836,7 +809,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>getDefaultWorkingSnapshotDir</h4>
-<pre>private static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.288">getDefaultWorkingSnapshotDir</a>(org.apache.hadoop.fs.Path&nbsp;rootDir)</pre>
+<pre>private static&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.286">getDefaultWorkingSnapshotDir</a>(org.apache.hadoop.fs.Path&nbsp;rootDir)</pre>
 <div class="block">Get the default working directory for snapshots - where they are built, where they are
  temporarily copied on export, etc.</div>
 <dl>
@@ -853,7 +826,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>validate</h4>
-<pre>public static&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.302">validate</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
+<pre>public static&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.300">validate</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                                                                                                             org.apache.hadoop.conf.Configuration&nbsp;conf)
                                                                                                      throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a>,
                                                                                                             <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
@@ -879,7 +852,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>writeSnapshotInfo</h4>
-<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.335">writeSnapshotInfo</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
+<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.333">writeSnapshotInfo</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                                      org.apache.hadoop.fs.Path&nbsp;workingDir,
                                      org.apache.hadoop.fs.FileSystem&nbsp;fs)
                               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>
@@ -895,29 +868,13 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 </dl>
 </li>
 </ul>
-<a name="createInProgressTag-org.apache.hadoop.fs.Path-org.apache.hadoop.fs.FileSystem-">
-<!--   -->
-</a>
-<ul class="blockList">
-<li class="blockList">
-<h4>createInProgressTag</h4>
-<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.360">createInProgressTag</a>(org.apache.hadoop.fs.Path&nbsp;workingDir,
-                                       org.apache.hadoop.fs.FileSystem&nbsp;fs)
-                                throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
-<div class="block">Create in-progress tag under .tmp of in-progress snapshot</div>
-<dl>
-<dt><span class="throwsLabel">Throws:</span></dt>
-<dd><code><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></code></dd>
-</dl>
-</li>
-</ul>
 <a name="readSnapshotInfo-org.apache.hadoop.fs.FileSystem-org.apache.hadoop.fs.Path-">
 <!--   -->
 </a>
 <ul class="blockList">
 <li class="blockList">
 <h4>readSnapshotInfo</h4>
-<pre>public static&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.375">readSnapshotInfo</a>(org.apache.hadoop.fs.FileSystem&nbsp;fs,
+<pre>public static&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.363">readSnapshotInfo</a>(org.apache.hadoop.fs.FileSystem&nbsp;fs,
                                                                                                                     org.apache.hadoop.fs.Path&nbsp;snapshotDir)
                                                                                                              throws <a href="../../../../../org/apache/hadoop/hbase/snapshot/CorruptedSnapshotException.html" title="class in org.apache.hadoop.hbase.snapshot">CorruptedSnapshotException</a></pre>
 <div class="block">Read in the <code>HBaseProtos.SnapshotDescription</code> stored for the snapshot in the passed directory</div>
@@ -939,7 +896,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>completeSnapshot</h4>
-<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.403">completeSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
+<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.391">completeSnapshot</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                                     org.apache.hadoop.fs.Path&nbsp;rootdir,
                                     org.apache.hadoop.fs.Path&nbsp;workingDir,
                                     org.apache.hadoop.fs.FileSystem&nbsp;fs)
@@ -966,7 +923,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>isSnapshotOwner</h4>
-<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.422">isSnapshotOwner</a>(<a href="../../../../../org/apache/hadoop/hbase/client/SnapshotDescription.html" title="class in org.apache.hadoop.hbase.client">SnapshotDescription</a>&nbsp;snapshot,
+<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.410">isSnapshotOwner</a>(<a href="../../../../../org/apache/hadoop/hbase/client/SnapshotDescription.html" title="class in org.apache.hadoop.hbase.client">SnapshotDescription</a>&nbsp;snapshot,
                                       <a href="../../../../../org/apache/hadoop/hbase/security/User.html" title="class in org.apache.hadoop.hbase.security">User</a>&nbsp;user)</pre>
 <div class="block">Check if the user is this table snapshot's owner</div>
 <dl>
@@ -985,7 +942,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockList">
 <li class="blockList">
 <h4>isSecurityAvailable</h4>
-<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.428">isSecurityAvailable</a>(org.apache.hadoop.conf.Configuration&nbsp;conf)
+<pre>public static&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.416">isSecurityAvailable</a>(org.apache.hadoop.conf.Configuration&nbsp;conf)
                                    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>
@@ -999,7 +956,7 @@ public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java
 <ul class="blockListLast">
 <li class="blockList">
 <h4>writeAclToSnapshotDescription</h4>
-<pre>private static&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.436">writeAclToSnapshotDescription</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
+<pre>private static&nbsp;org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.html#line.424">writeAclToSnapshotDescription</a>(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription&nbsp;snapshot,
                                                                                                                                   org.apache.hadoop.conf.Configuration&nbsp;conf)
                                                                                                                            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>
index 0cdfab7..eb60f10 100644 (file)
 </tr>
 <tbody>
 <tr class="altColor">
-<td class="colFirst"><a href="#org.apache.hadoop.hbase.master.snapshot">org.apache.hadoop.hbase.master.snapshot</a></td>
-<td class="colLast">&nbsp;</td>
-</tr>
-<tr class="rowColor">
 <td class="colFirst"><a href="#org.apache.hadoop.hbase.replication.regionserver">org.apache.hadoop.hbase.replication.regionserver</a></td>
 <td class="colLast">&nbsp;</td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colFirst"><a href="#org.apache.hadoop.hbase.util">org.apache.hadoop.hbase.util</a></td>
 <td class="colLast">&nbsp;</td>
 </tr>
-<tr class="rowColor">
+<tr class="altColor">
 <td class="colFirst"><a href="#org.apache.hadoop.hbase.wal">org.apache.hadoop.hbase.wal</a></td>
 <td class="colLast">&nbsp;</td>
 </tr>
 </li>
 <li class="blockList">
 <ul class="blockList">
-<li class="blockList"><a name="org.apache.hadoop.hbase.master.snapshot">
-<!--   -->
-</a>
-<h3>Uses of <a href="../../../../../../org/apache/hadoop/hbase/util/KeyLocker.html" title="class in org.apache.hadoop.hbase.util">KeyLocker</a> in <a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/package-summary.html">org.apache.hadoop.hbase.master.snapshot</a></h3>
-<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation">
-<caption><span>Fields in <a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/package-summary.html">org.apache.hadoop.hbase.master.snapshot</a> declared as <a href="../../../../../../org/apache/hadoop/hbase/util/KeyLocker.html" title="class in org.apache.hadoop.hbase.util">KeyLocker</a></span><span class="tabEnd">&nbsp;</span></caption>
-<tr>
-<th class="colFirst" scope="col">Modifier and Type</th>
-<th class="colLast" scope="col">Field and Description</th>
-</tr>
-<tbody>
-<tr class="altColor">
-<td class="colFirst"><code>private <a href="../../../../../../org/apache/hadoop/hbase/util/KeyLocker.html" title="class in org.apache.hadoop.hbase.util">KeyLocker</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
-<td class="colLast"><span class="typeNameLabel">SnapshotManager.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#locks">locks</a></span></code>
-<div class="block">Locks for snapshot operations
-  key is snapshot's filename in progress, value is the related lock
-    - create snapshot
-    - SnapshotCleaner</div>
-</td>
-</tr>
-</tbody>
-</table>
-<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
-<caption><span>Methods in <a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/package-summary.html">org.apache.hadoop.hbase.master.snapshot</a> that return <a href="../../../../../../org/apache/hadoop/hbase/util/KeyLocker.html" title="class in org.apache.hadoop.hbase.util">KeyLocker</a></span><span class="tabEnd">&nbsp;</span></caption>
-<tr>
-<th class="colFirst" scope="col">Modifier and Type</th>
-<th class="colLast" scope="col">Method and Description</th>
-</tr>
-<tbody>
-<tr class="altColor">
-<td class="colFirst"><code><a href="../../../../../../org/apache/hadoop/hbase/util/KeyLocker.html" title="class in org.apache.hadoop.hbase.util">KeyLocker</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
-<td class="colLast"><span class="typeNameLabel">SnapshotManager.</span><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.html#getLocks--">getLocks</a></span>()</code>&nbsp;</td>
-</tr>
-</tbody>
-</table>
-</li>
 <li class="blockList"><a name="org.apache.hadoop.hbase.replication.regionserver">
 <!--   -->
 </a>
index f0dcd16..412d3e4 100644 (file)
@@ -1074,16 +1074,11 @@ service.</div>
 </tr>
 <tbody>
 <tr class="altColor">
-<td class="colOne"><a href="../../../../../org/apache/hadoop/hbase/util/class-use/KeyLocker.html#org.apache.hadoop.hbase.master.snapshot">KeyLocker</a>
-<div class="block">A utility class to manage a set of locks.</div>
-</td>
-</tr>
-<tr class="rowColor">
 <td class="colOne"><a href="../../../../../org/apache/hadoop/hbase/util/class-use/NonceKey.html#org.apache.hadoop.hbase.master.snapshot">NonceKey</a>
 <div class="block">This implementation is not smart and just treats nonce group and nonce as random bits.</div>
 </td>
 </tr>
-<tr class="altColor">
+<tr class="rowColor">
 <td class="colOne"><a href="../../../../../org/apache/hadoop/hbase/util/class-use/Pair.html#org.apache.hadoop.hbase.master.snapshot">Pair</a>
 <div class="block">A generic class for pairs.</div>
 </td>
index 564c848..6933215 100644 (file)
@@ -18,9 +18,9 @@
 <span class="sourceLineNo">010</span>  public static final String version = "3.0.0-SNAPSHOT";<a name="line.10"></a>
 <span class="sourceLineNo">011</span>  public static final String revision = "";<a name="line.11"></a>
 <span class="sourceLineNo">012</span>  public static final String user = "jenkins";<a name="line.12"></a>
-<span class="sourceLineNo">013</span>  public static final String date = "Wed Nov 21 14:44:11 UTC 2018";<a name="line.13"></a>
+<span class="sourceLineNo">013</span>  public static final String date = "Fri Nov 23 14:43:16 UTC 2018";<a name="line.13"></a>
 <span class="sourceLineNo">014</span>  public static final String url = "git://jenkins-websites1.apache.org/home/jenkins/jenkins-slave/workspace/hbase_generate_website/hbase";<a name="line.14"></a>
-<span class="sourceLineNo">015</span>  public static final String srcChecksum = "1f80a990a945d9efd6b2cf79bf4adb13";<a name="line.15"></a>
+<span class="sourceLineNo">015</span>  public static final String srcChecksum = "bddc9576b24e37ec437e3194453db580";<a name="line.15"></a>
 <span class="sourceLineNo">016</span>}<a name="line.16"></a>
 
 
index 206b623..796ddc1 100644 (file)
@@ -35,7 +35,7 @@
 <span class="sourceLineNo">027</span>import java.util.Set;<a name="line.27"></a>
 <span class="sourceLineNo">028</span>import java.util.Timer;<a name="line.28"></a>
 <span class="sourceLineNo">029</span>import java.util.TimerTask;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import java.util.concurrent.locks.ReentrantLock;<a name="line.30"></a>
+<span class="sourceLineNo">030</span>import java.util.concurrent.locks.Lock;<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.FileStatus;<a name="line.33"></a>
 <span class="sourceLineNo">184</span>    List&lt;FileStatus&gt; unReferencedFiles = Lists.newArrayList();<a name="line.184"></a>
 <span class="sourceLineNo">185</span>    List&lt;String&gt; snapshotsInProgress = null;<a name="line.185"></a>
 <span class="sourceLineNo">186</span>    boolean refreshed = false;<a name="line.186"></a>
-<span class="sourceLineNo">187</span>    for (FileStatus file : files) {<a name="line.187"></a>
-<span class="sourceLineNo">188</span>      String fileName = file.getPath().getName();<a name="line.188"></a>
-<span class="sourceLineNo">189</span>      if (!refreshed &amp;&amp; !cache.contains(fileName)) {<a name="line.189"></a>
-<span class="sourceLineNo">190</span>        refreshCache();<a name="line.190"></a>
-<span class="sourceLineNo">191</span>        refreshed = true;<a name="line.191"></a>
-<span class="sourceLineNo">192</span>      }<a name="line.192"></a>
-<span class="sourceLineNo">193</span>      if (cache.contains(fileName)) {<a name="line.193"></a>
-<span class="sourceLineNo">194</span>        continue;<a name="line.194"></a>
-<span class="sourceLineNo">195</span>      }<a name="line.195"></a>
-<span class="sourceLineNo">196</span>      if (snapshotsInProgress == null) {<a name="line.196"></a>
-<span class="sourceLineNo">197</span>        snapshotsInProgress = getSnapshotsInProgress(snapshotManager);<a name="line.197"></a>
-<span class="sourceLineNo">198</span>      }<a name="line.198"></a>
-<span class="sourceLineNo">199</span>      if (snapshotsInProgress.contains(fileName)) {<a name="line.199"></a>
-<span class="sourceLineNo">200</span>        continue;<a name="line.200"></a>
-<span class="sourceLineNo">201</span>      }<a name="line.201"></a>
-<span class="sourceLineNo">202</span>      unReferencedFiles.add(file);<a name="line.202"></a>
-<span class="sourceLineNo">203</span>    }<a name="line.203"></a>
-<span class="sourceLineNo">204</span>    return unReferencedFiles;<a name="line.204"></a>
-<span class="sourceLineNo">205</span>  }<a name="line.205"></a>
-<span class="sourceLineNo">206</span><a name="line.206"></a>
-<span class="sourceLineNo">207</span>  private synchronized void refreshCache() throws IOException {<a name="line.207"></a>
-<span class="sourceLineNo">208</span>    // get the status of the snapshots directory and check if it is has changes<a name="line.208"></a>
-<span class="sourceLineNo">209</span>    FileStatus dirStatus;<a name="line.209"></a>
-<span class="sourceLineNo">210</span>    try {<a name="line.210"></a>
-<span class="sourceLineNo">211</span>      dirStatus = fs.getFileStatus(snapshotDir);<a name="line.211"></a>
-<span class="sourceLineNo">212</span>    } catch (FileNotFoundException e) {<a name="line.212"></a>
-<span class="sourceLineNo">213</span>      if (this.cache.size() &gt; 0) {<a name="line.213"></a>
-<span class="sourceLineNo">214</span>        LOG.error("Snapshot directory: " + snapshotDir + " doesn't exist");<a name="line.214"></a>
-<span class="sourceLineNo">215</span>      }<a name="line.215"></a>
-<span class="sourceLineNo">216</span>      return;<a name="line.216"></a>
-<span class="sourceLineNo">217</span>    }<a name="line.217"></a>
-<span class="sourceLineNo">218</span><a name="line.218"></a>
-<span class="sourceLineNo">219</span>    // if the snapshot directory wasn't modified since we last check, we are done<a name="line.219"></a>
-<span class="sourceLineNo">220</span>    if (dirStatus.getModificationTime() &lt;= this.lastModifiedTime) return;<a name="line.220"></a>
-<span class="sourceLineNo">221</span><a name="line.221"></a>
-<span class="sourceLineNo">222</span>    // directory was modified, so we need to reload our cache<a name="line.222"></a>
-<span class="sourceLineNo">223</span>    // there could be a slight race here where we miss the cache, check the directory modification<a name="line.223"></a>
-<span class="sourceLineNo">224</span>    // time, then someone updates the directory, causing us to not scan the directory again.<a name="line.224"></a>
-<span class="sourceLineNo">225</span>    // However, snapshot directories are only created once, so this isn't an issue.<a name="line.225"></a>
-<span class="sourceLineNo">226</span><a name="line.226"></a>
-<span class="sourceLineNo">227</span>    // 1. update the modified time<a name="line.227"></a>
-<span class="sourceLineNo">228</span>    this.lastModifiedTime = dirStatus.getModificationTime();<a name="line.228"></a>
-<span class="sourceLineNo">229</span><a name="line.229"></a>
-<span class="sourceLineNo">230</span>    // 2.clear the cache<a name="line.230"></a>
-<span class="sourceLineNo">231</span>    this.cache.clear();<a name="line.231"></a>
-<span class="sourceLineNo">232</span>    Map&lt;String, SnapshotDirectoryInfo&gt; known = new HashMap&lt;&gt;();<a name="line.232"></a>
-<span class="sourceLineNo">233</span><a name="line.233"></a>
-<span class="sourceLineNo">234</span>    // 3. check each of the snapshot directories<a name="line.234"></a>
-<span class="sourceLineNo">235</span>    FileStatus[] snapshots = FSUtils.listStatus(fs, snapshotDir);<a name="line.235"></a>
-<span class="sourceLineNo">236</span>    if (snapshots == null) {<a name="line.236"></a>
-<span class="sourceLineNo">237</span>      // remove all the remembered snapshots because we don't have any left<a name="line.237"></a>
-<span class="sourceLineNo">238</span>      if (LOG.isDebugEnabled() &amp;&amp; this.snapshots.size() &gt; 0) {<a name="line.238"></a>
-<span class="sourceLineNo">239</span>        LOG.debug("No snapshots on-disk, cache empty");<a name="line.239"></a>
-<span class="sourceLineNo">240</span>      }<a name="line.240"></a>
-<span class="sourceLineNo">241</span>      this.snapshots.clear();<a name="line.241"></a>
-<span class="sourceLineNo">242</span>      return;<a name="line.242"></a>
-<span class="sourceLineNo">243</span>    }<a name="line.243"></a>
-<span class="sourceLineNo">244</span><a name="line.244"></a>
-<span class="sourceLineNo">245</span>    // 3.1 iterate through the on-disk snapshots<a name="line.245"></a>
-<span class="sourceLineNo">246</span>    for (FileStatus snapshot : snapshots) {<a name="line.246"></a>
-<span class="sourceLineNo">247</span>      String name = snapshot.getPath().getName();<a name="line.247"></a>
-<span class="sourceLineNo">248</span>      // its not the tmp dir,<a name="line.248"></a>
-<span class="sourceLineNo">249</span>      if (!name.equals(SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME)) {<a name="line.249"></a>
-<span class="sourceLineNo">250</span>        SnapshotDirectoryInfo files = this.snapshots.remove(name);<a name="line.250"></a>
-<span class="sourceLineNo">251</span>        // 3.1.1 if we don't know about the snapshot or its been modified, we need to update the<a name="line.251"></a>
-<span class="sourceLineNo">252</span>        // files the latter could occur where I create a snapshot, then delete it, and then make a<a name="line.252"></a>
-<span class="sourceLineNo">253</span>        // new snapshot with the same name. We will need to update the cache the information from<a name="line.253"></a>
-<span class="sourceLineNo">254</span>        // that new snapshot, even though it has the same name as the files referenced have<a name="line.254"></a>
-<span class="sourceLineNo">255</span>        // probably changed.<a name="line.255"></a>
-<span class="sourceLineNo">256</span>        if (files == null || files.hasBeenModified(snapshot.getModificationTime())) {<a name="line.256"></a>
-<span class="sourceLineNo">257</span>          // get all files for the snapshot and create a new info<a name="line.257"></a>
-<span class="sourceLineNo">258</span>          Collection&lt;String&gt; storedFiles = fileInspector.filesUnderSnapshot(snapshot.getPath());<a name="line.258"></a>
-<span class="sourceLineNo">259</span>          files = new SnapshotDirectoryInfo(snapshot.getModificationTime(), storedFiles);<a name="line.259"></a>
-<span class="sourceLineNo">260</span>        }<a name="line.260"></a>
-<span class="sourceLineNo">261</span>        // 3.2 add all the files to cache<a name="line.261"></a>
-<span class="sourceLineNo">262</span>        this.cache.addAll(files.getFiles());<a name="line.262"></a>
-<span class="sourceLineNo">263</span>        known.put(name, files);<a name="line.263"></a>
-<span class="sourceLineNo">264</span>      }<a name="line.264"></a>
-<span class="sourceLineNo">265</span>    }<a name="line.265"></a>
-<span class="sourceLineNo">266</span><a name="line.266"></a>
-<span class="sourceLineNo">267</span>    // 4. set the snapshots we are tracking<a name="line.267"></a>
-<span class="sourceLineNo">268</span>    this.snapshots.clear();<a name="line.268"></a>
-<span class="sourceLineNo">269</span>    this.snapshots.putAll(known);<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>  @VisibleForTesting List&lt;String&gt; getSnapshotsInProgress(<a name="line.272"></a>
-<span class="sourceLineNo">273</span>    final SnapshotManager snapshotManager) throws IOException {<a name="line.273"></a>
-<span class="sourceLineNo">274</span>    List&lt;String&gt; snapshotInProgress = Lists.newArrayList();<a name="line.274"></a>
-<span class="sourceLineNo">275</span>    // only add those files to the cache, but not to the known snapshots<a name="line.275"></a>
-<span class="sourceLineNo">276</span>    Path snapshotTmpDir = new Path(snapshotDir, SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME);<a name="line.276"></a>
-<span class="sourceLineNo">277</span>    // only add those files to the cache, but not to the known snapshots<a name="line.277"></a>
-<span class="sourceLineNo">278</span>    FileStatus[] running = FSUtils.listStatus(fs, snapshotTmpDir);<a name="line.278"></a>
-<span class="sourceLineNo">279</span>    if (running != null) {<a name="line.279"></a>
-<span class="sourceLineNo">280</span>      for (FileStatus run : running) {<a name="line.280"></a>
-<span class="sourceLineNo">281</span>        ReentrantLock lock = null;<a name="line.281"></a>
-<span class="sourceLineNo">282</span>        if (snapshotManager != null) {<a name="line.282"></a>
-<span class="sourceLineNo">283</span>          lock = snapshotManager.getLocks().acquireLock(run.getPath().getName());<a name="line.283"></a>
-<span class="sourceLineNo">284</span>        }<a name="line.284"></a>
-<span class="sourceLineNo">285</span>        try {<a name="line.285"></a>
-<span class="sourceLineNo">286</span>          snapshotInProgress.addAll(fileInspector.filesUnderSnapshot(run.getPath()));<a name="line.286"></a>
-<span class="sourceLineNo">287</span>        } catch (CorruptedSnapshotException e) {<a name="line.287"></a>
-<span class="sourceLineNo">288</span>          // See HBASE-16464<a name="line.288"></a>
-<span class="sourceLineNo">289</span>          if (e.getCause() instanceof FileNotFoundException) {<a name="line.289"></a>
-<span class="sourceLineNo">290</span>            // If the snapshot is corrupt, we will delete it<a name="line.290"></a>
-<span class="sourceLineNo">291</span>            fs.delete(run.getPath(), true);<a name="line.291"></a>
-<span class="sourceLineNo">292</span>            LOG.warn("delete the " + run.getPath() + " due to exception:", e.getCause());<a name="line.292"></a>
-<span class="sourceLineNo">293</span>          } else {<a name="line.293"></a>
-<span class="sourceLineNo">294</span>            throw e;<a name="line.294"></a>
-<span class="sourceLineNo">295</span>          }<a name="line.295"></a>
-<span class="sourceLineNo">296</span>        } finally {<a name="line.296"></a>
-<span class="sourceLineNo">297</span>          if (lock != null) {<a name="line.297"></a>
-<span class="sourceLineNo">298</span>            lock.unlock();<a name="line.298"></a>
-<span class="sourceLineNo">299</span>          }<a name="line.299"></a>
-<span class="sourceLineNo">300</span>        }<a name="line.300"></a>
-<span class="sourceLineNo">301</span>      }<a name="line.301"></a>
-<span class="sourceLineNo">302</span>    }<a name="line.302"></a>
-<span class="sourceLineNo">303</span>    return snapshotInProgress;<a name="line.303"></a>
-<span class="sourceLineNo">304</span>  }<a name="line.304"></a>
-<span class="sourceLineNo">305</span><a name="line.305"></a>
-<span class="sourceLineNo">306</span>  /**<a name="line.306"></a>
-<span class="sourceLineNo">307</span>   * Simple helper task that just periodically attempts to refresh the cache<a name="line.307"></a>
-<span class="sourceLineNo">308</span>   */<a name="line.308"></a>
-<span class="sourceLineNo">309</span>  public class RefreshCacheTask extends TimerTask {<a name="line.309"></a>
-<span class="sourceLineNo">310</span>    @Override<a name="line.310"></a>
-<span class="sourceLineNo">311</span>    public void run() {<a name="line.311"></a>
-<span class="sourceLineNo">312</span>      try {<a name="line.312"></a>
-<span class="sourceLineNo">313</span>        SnapshotFileCache.this.refreshCache();<a name="line.313"></a>
-<span class="sourceLineNo">314</span>      } catch (IOException e) {<a name="line.314"></a>
-<span class="sourceLineNo">315</span>        LOG.warn("Failed to refresh snapshot hfile cache!", e);<a name="line.315"></a>
-<span class="sourceLineNo">316</span>      }<a name="line.316"></a>
-<span class="sourceLineNo">317</span>    }<a name="line.317"></a>
-<span class="sourceLineNo">318</span>  }<a name="line.318"></a>
-<span class="sourceLineNo">319</span><a name="line.319"></a>
-<span class="sourceLineNo">320</span>  @Override<a name="line.320"></a>
-<span class="sourceLineNo">321</span>  public void stop(String why) {<a name="line.321"></a>
-<span class="sourceLineNo">322</span>    if (!this.stop) {<a name="line.322"></a>
-<span class="sourceLineNo">323</span>      this.stop = true;<a name="line.323"></a>
-<span class="sourceLineNo">324</span>      this.refreshTimer.cancel();<a name="line.324"></a>
+<span class="sourceLineNo">187</span>    Lock lock = null;<a name="line.187"></a>
+<span class="sourceLineNo">188</span>    if (snapshotManager != null) {<a name="line.188"></a>
+<span class="sourceLineNo">189</span>      lock = snapshotManager.getTakingSnapshotLock().writeLock();<a name="line.189"></a>
+<span class="sourceLineNo">190</span>    }<a name="line.190"></a>
+<span class="sourceLineNo">191</span>    if (lock == null || lock.tryLock()) {<a name="line.191"></a>
+<span class="sourceLineNo">192</span>      try {<a name="line.192"></a>
+<span class="sourceLineNo">193</span>        if (snapshotManager == null || snapshotManager.isTakingAnySnapshot()) {<a name="line.193"></a>
+<span class="sourceLineNo">194</span>          LOG.warn("Not checking unreferenced files since snapshot is running, it will "<a name="line.194"></a>
+<span class="sourceLineNo">195</span>              + "skip to clean the HFiles this time");<a name="line.195"></a>
+<span class="sourceLineNo">196</span>          return unReferencedFiles;<a name="line.196"></a>
+<span class="sourceLineNo">197</span>        }<a name="line.197"></a>
+<span class="sourceLineNo">198</span>        for (FileStatus file : files) {<a name="line.198"></a>
+<span class="sourceLineNo">199</span>          String fileName = file.getPath().getName();<a name="line.199"></a>
+<span class="sourceLineNo">200</span>          if (!refreshed &amp;&amp; !cache.contains(fileName)) {<a name="line.200"></a>
+<span class="sourceLineNo">201</span>            refreshCache();<a name="line.201"></a>
+<span class="sourceLineNo">202</span>            refreshed = true;<a name="line.202"></a>
+<span class="sourceLineNo">203</span>          }<a name="line.203"></a>
+<span class="sourceLineNo">204</span>          if (cache.contains(fileName)) {<a name="line.204"></a>
+<span class="sourceLineNo">205</span>            continue;<a name="line.205"></a>
+<span class="sourceLineNo">206</span>          }<a name="line.206"></a>
+<span class="sourceLineNo">207</span>          if (snapshotsInProgress == null) {<a name="line.207"></a>
+<span class="sourceLineNo">208</span>            snapshotsInProgress = getSnapshotsInProgress();<a name="line.208"></a>
+<span class="sourceLineNo">209</span>          }<a name="line.209"></a>
+<span class="sourceLineNo">210</span>          if (snapshotsInProgress.contains(fileName)) {<a name="line.210"></a>
+<span class="sourceLineNo">211</span>            continue;<a name="line.211"></a>
+<span class="sourceLineNo">212</span>          }<a name="line.212"></a>
+<span class="sourceLineNo">213</span>          unReferencedFiles.add(file);<a name="line.213"></a>
+<span class="sourceLineNo">214</span>        }<a name="line.214"></a>
+<span class="sourceLineNo">215</span>      } finally {<a name="line.215"></a>
+<span class="sourceLineNo">216</span>        if (lock != null) {<a name="line.216"></a>
+<span class="sourceLineNo">217</span>          lock.unlock();<a name="line.217"></a>
+<span class="sourceLineNo">218</span>        }<a name="line.218"></a>
+<span class="sourceLineNo">219</span>      }<a name="line.219"></a>
+<span class="sourceLineNo">220</span>    }<a name="line.220"></a>
+<span class="sourceLineNo">221</span>    return unReferencedFiles;<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>  private synchronized void refreshCache() throws IOException {<a name="line.224"></a>
+<span class="sourceLineNo">225</span>    // get the status of the snapshots directory and check if it is has changes<a name="line.225"></a>
+<span class="sourceLineNo">226</span>    FileStatus dirStatus;<a name="line.226"></a>
+<span class="sourceLineNo">227</span>    try {<a name="line.227"></a>
+<span class="sourceLineNo">228</span>      dirStatus = fs.getFileStatus(snapshotDir);<a name="line.228"></a>
+<span class="sourceLineNo">229</span>    } catch (FileNotFoundException e) {<a name="line.229"></a>
+<span class="sourceLineNo">230</span>      if (this.cache.size() &gt; 0) {<a name="line.230"></a>
+<span class="sourceLineNo">231</span>        LOG.error("Snapshot directory: " + snapshotDir + " doesn't exist");<a name="line.231"></a>
+<span class="sourceLineNo">232</span>      }<a name="line.232"></a>
+<span class="sourceLineNo">233</span>      return;<a name="line.233"></a>
+<span class="sourceLineNo">234</span>    }<a name="line.234"></a>
+<span class="sourceLineNo">235</span><a name="line.235"></a>
+<span class="sourceLineNo">236</span>    // if the snapshot directory wasn't modified since we last check, we are done<a name="line.236"></a>
+<span class="sourceLineNo">237</span>    if (dirStatus.getModificationTime() &lt;= this.lastModifiedTime) return;<a name="line.237"></a>
+<span class="sourceLineNo">238</span><a name="line.238"></a>
+<span class="sourceLineNo">239</span>    // directory was modified, so we need to reload our cache<a name="line.239"></a>
+<span class="sourceLineNo">240</span>    // there could be a slight race here where we miss the cache, check the directory modification<a name="line.240"></a>
+<span class="sourceLineNo">241</span>    // time, then someone updates the directory, causing us to not scan the directory again.<a name="line.241"></a>
+<span class="sourceLineNo">242</span>    // However, snapshot directories are only created once, so this isn't an issue.<a name="line.242"></a>
+<span class="sourceLineNo">243</span><a name="line.243"></a>
+<span class="sourceLineNo">244</span>    // 1. update the modified time<a name="line.244"></a>
+<span class="sourceLineNo">245</span>    this.lastModifiedTime = dirStatus.getModificationTime();<a name="line.245"></a>
+<span class="sourceLineNo">246</span><a name="line.246"></a>
+<span class="sourceLineNo">247</span>    // 2.clear the cache<a name="line.247"></a>
+<span class="sourceLineNo">248</span>    this.cache.clear();<a name="line.248"></a>
+<span class="sourceLineNo">249</span>    Map&lt;String, SnapshotDirectoryInfo&gt; known = new HashMap&lt;&gt;();<a name="line.249"></a>
+<span class="sourceLineNo">250</span><a name="line.250"></a>
+<span class="sourceLineNo">251</span>    // 3. check each of the snapshot directories<a name="line.251"></a>
+<span class="sourceLineNo">252</span>    FileStatus[] snapshots = FSUtils.listStatus(fs, snapshotDir);<a name="line.252"></a>
+<span class="sourceLineNo">253</span>    if (snapshots == null) {<a name="line.253"></a>
+<span class="sourceLineNo">254</span>      // remove all the remembered snapshots because we don't have any left<a name="line.254"></a>
+<span class="sourceLineNo">255</span>      if (LOG.isDebugEnabled() &amp;&amp; this.snapshots.size() &gt; 0) {<a name="line.255"></a>
+<span class="sourceLineNo">256</span>        LOG.debug("No snapshots on-disk, cache empty");<a name="line.256"></a>
+<span class="sourceLineNo">257</span>      }<a name="line.257"></a>
+<span class="sourceLineNo">258</span>      this.snapshots.clear();<a name="line.258"></a>
+<span class="sourceLineNo">259</span>      return;<a name="line.259"></a>
+<span class="sourceLineNo">260</span>    }<a name="line.260"></a>
+<span class="sourceLineNo">261</span><a name="line.261"></a>
+<span class="sourceLineNo">262</span>    // 3.1 iterate through the on-disk snapshots<a name="line.262"></a>
+<span class="sourceLineNo">263</span>    for (FileStatus snapshot : snapshots) {<a name="line.263"></a>
+<span class="sourceLineNo">264</span>      String name = snapshot.getPath().getName();<a name="line.264"></a>
+<span class="sourceLineNo">265</span>      // its not the tmp dir,<a name="line.265"></a>
+<span class="sourceLineNo">266</span>      if (!name.equals(SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME)) {<a name="line.266"></a>
+<span class="sourceLineNo">267</span>        SnapshotDirectoryInfo files = this.snapshots.remove(name);<a name="line.267"></a>
+<span class="sourceLineNo">268</span>        // 3.1.1 if we don't know about the snapshot or its been modified, we need to update the<a name="line.268"></a>
+<span class="sourceLineNo">269</span>        // files the latter could occur where I create a snapshot, then delete it, and then make a<a name="line.269"></a>
+<span class="sourceLineNo">270</span>        // new snapshot with the same name. We will need to update the cache the information from<a name="line.270"></a>
+<span class="sourceLineNo">271</span>        // that new snapshot, even though it has the same name as the files referenced have<a name="line.271"></a>
+<span class="sourceLineNo">272</span>        // probably changed.<a name="line.272"></a>
+<span class="sourceLineNo">273</span>        if (files == null || files.hasBeenModified(snapshot.getModificationTime())) {<a name="line.273"></a>
+<span class="sourceLineNo">274</span>          // get all files for the snapshot and create a new info<a name="line.274"></a>
+<span class="sourceLineNo">275</span>          Collection&lt;String&gt; storedFiles = fileInspector.filesUnderSnapshot(snapshot.getPath());<a name="line.275"></a>
+<span class="sourceLineNo">276</span>          files = new SnapshotDirectoryInfo(snapshot.getModificationTime(), storedFiles);<a name="line.276"></a>
+<span class="sourceLineNo">277</span>        }<a name="line.277"></a>
+<span class="sourceLineNo">278</span>        // 3.2 add all the files to cache<a name="line.278"></a>
+<span class="sourceLineNo">279</span>        this.cache.addAll(files.getFiles());<a name="line.279"></a>
+<span class="sourceLineNo">280</span>        known.put(name, files);<a name="line.280"></a>
+<span class="sourceLineNo">281</span>      }<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>
+<span class="sourceLineNo">284</span>    // 4. set the snapshots we are tracking<a name="line.284"></a>
+<span class="sourceLineNo">285</span>    this.snapshots.clear();<a name="line.285"></a>
+<span class="sourceLineNo">286</span>    this.snapshots.putAll(known);<a name="line.286"></a>
+<span class="sourceLineNo">287</span>  }<a name="line.287"></a>
+<span class="sourceLineNo">288</span><a name="line.288"></a>
+<span class="sourceLineNo">289</span>  @VisibleForTesting<a name="line.289"></a>
+<span class="sourceLineNo">290</span>  List&lt;String&gt; getSnapshotsInProgress() throws IOException {<a name="line.290"></a>
+<span class="sourceLineNo">291</span>    List&lt;String&gt; snapshotInProgress = Lists.newArrayList();<a name="line.291"></a>
+<span class="sourceLineNo">292</span>    // only add those files to the cache, but not to the known snapshots<a name="line.292"></a>
+<span class="sourceLineNo">293</span>    Path snapshotTmpDir = new Path(snapshotDir, SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME);<a name="line.293"></a>
+<span class="sourceLineNo">294</span>    FileStatus[] running = FSUtils.listStatus(fs, snapshotTmpDir);<a name="line.294"></a>
+<span class="sourceLineNo">295</span>    if (running != null) {<a name="line.295"></a>
+<span class="sourceLineNo">296</span>      for (FileStatus run : running) {<a name="line.296"></a>
+<span class="sourceLineNo">297</span>        try {<a name="line.297"></a>
+<span class="sourceLineNo">298</span>          snapshotInProgress.addAll(fileInspector.filesUnderSnapshot(run.getPath()));<a name="line.298"></a>
+<span class="sourceLineNo">299</span>        } catch (CorruptedSnapshotException e) {<a name="line.299"></a>
+<span class="sourceLineNo">300</span>          // See HBASE-16464<a name="line.300"></a>
+<span class="sourceLineNo">301</span>          if (e.getCause() instanceof FileNotFoundException) {<a name="line.301"></a>
+<span class="sourceLineNo">302</span>            // If the snapshot is corrupt, we will delete it<a name="line.302"></a>
+<span class="sourceLineNo">303</span>            fs.delete(run.getPath(), true);<a name="line.303"></a>
+<span class="sourceLineNo">304</span>            LOG.warn("delete the " + run.getPath() + " due to exception:", e.getCause());<a name="line.304"></a>
+<span class="sourceLineNo">305</span>          } else {<a name="line.305"></a>
+<span class="sourceLineNo">306</span>            throw e;<a name="line.306"></a>
+<span class="sourceLineNo">307</span>          }<a name="line.307"></a>
+<span class="sourceLineNo">308</span>        }<a name="line.308"></a>
+<span class="sourceLineNo">309</span>      }<a name="line.309"></a>
+<span class="sourceLineNo">310</span>    }<a name="line.310"></a>
+<span class="sourceLineNo">311</span>    return snapshotInProgress;<a name="line.311"></a>
+<span class="sourceLineNo">312</span>  }<a name="line.312"></a>
+<span class="sourceLineNo">313</span><a name="line.313"></a>
+<span class="sourceLineNo">314</span>  /**<a name="line.314"></a>
+<span class="sourceLineNo">315</span>   * Simple helper task that just periodically attempts to refresh the cache<a name="line.315"></a>
+<span class="sourceLineNo">316</span>   */<a name="line.316"></a>
+<span class="sourceLineNo">317</span>  public class RefreshCacheTask extends TimerTask {<a name="line.317"></a>
+<span class="sourceLineNo">318</span>    @Override<a name="line.318"></a>
+<span class="sourceLineNo">319</span>    public void run() {<a name="line.319"></a>
+<span class="sourceLineNo">320</span>      try {<a name="line.320"></a>
+<span class="sourceLineNo">321</span>        SnapshotFileCache.this.refreshCache();<a name="line.321"></a>
+<span class="sourceLineNo">322</span>      } catch (IOException e) {<a name="line.322"></a>
+<span class="sourceLineNo">323</span>        LOG.warn("Failed to refresh snapshot hfile cache!", e);<a name="line.323"></a>
+<span class="sourceLineNo">324</span>      }<a name="line.324"></a>
 <span class="sourceLineNo">325</span>    }<a name="line.325"></a>
-<span class="sourceLineNo">326</span><a name="line.326"></a>
-<span class="sourceLineNo">327</span>  }<a name="line.327"></a>
-<span class="sourceLineNo">328</span><a name="line.328"></a>
-<span class="sourceLineNo">329</span>  @Override<a name="line.329"></a>
-<span class="sourceLineNo">330</span>  public boolean isStopped() {<a name="line.330"></a>
-<span class="sourceLineNo">331</span>    return this.stop;<a name="line.331"></a>
-<span class="sourceLineNo">332</span>  }<a name="line.332"></a>
-<span class="sourceLineNo">333</span><a name="line.333"></a>
-<span class="sourceLineNo">334</span>  /**<a name="line.334"></a>
-<span class="sourceLineNo">335</span>   * Information about a snapshot directory<a name="line.335"></a>
-<span class="sourceLineNo">336</span>   */<a name="line.336"></a>
-<span class="sourceLineNo">337</span>  private static class SnapshotDirectoryInfo {<a name="line.337"></a>
-<span class="sourceLineNo">338</span>    long lastModified;<a name="line.338"></a>
-<span class="sourceLineNo">339</span>    Collection&lt;String&gt; files;<a name="line.339"></a>
-<span class="sourceLineNo">340</span><a name="line.340"></a>
-<span class="sourceLineNo">341</span>    public SnapshotDirectoryInfo(long mtime, Collection&lt;String&gt; files) {<a name="line.341"></a>
-<span class="sourceLineNo">342</span>      this.lastModified = mtime;<a name="line.342"></a>
-<span class="sourceLineNo">343</span>      this.files = files;<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    }<a name="line.344"></a>
-<span class="sourceLineNo">345</span><a name="line.345"></a>
-<span class="sourceLineNo">346</span>    /**<a name="line.346"></a>
-<span class="sourceLineNo">347</span>     * @return the hfiles in the snapshot when &lt;tt&gt;this&lt;/tt&gt; was made.<a name="line.347"></a>
-<span class="sourceLineNo">348</span>     */<a name="line.348"></a>
-<span class="sourceLineNo">349</span>    public Collection&lt;String&gt; getFiles() {<a name="line.349"></a>
-<span class="sourceLineNo">350</span>      return this.files;<a name="line.350"></a>
-<span class="sourceLineNo">351</span>    }<a name="line.351"></a>
-<span class="sourceLineNo">352</span><a name="line.352"></a>
-<span class="sourceLineNo">353</span>    /**<a name="line.353"></a>
-<span class="sourceLineNo">354</span>     * Check if the snapshot directory has been modified<a name="line.354"></a>
-<span class="sourceLineNo">355</span>     * @param mtime current modification time of the directory<a name="line.355"></a>
-<span class="sourceLineNo">356</span>     * @return &lt;tt&gt;true&lt;/tt&gt; if it the modification time of the directory is newer time when we<a name="line.356"></a>
-<span class="sourceLineNo">357</span>     *         created &lt;tt&gt;this&lt;/tt&gt;<a name="line.357"></a>
-<span class="sourceLineNo">358</span>     */<a name="line.358"></a>
-<span class="sourceLineNo">359</span>    public boolean hasBeenModified(long mtime) {<a name="line.359"></a>
-<span class="sourceLineNo">360</span>      return this.lastModified &lt; mtime;<a name="line.360"></a>
-<span class="sourceLineNo">361</span>    }<a name="line.361"></a>
-<span class="sourceLineNo">362</span>  }<a name="line.362"></a>
-<span class="sourceLineNo">363</span>}<a name="line.363"></a>
+<span class="sourceLineNo">326</span>  }<a name="line.326"></a>
+<span class="sourceLineNo">327</span><a name="line.327"></a>
+<span class="sourceLineNo">328</span>  @Override<a name="line.328"></a>
+<span class="sourceLineNo">329</span>  public void stop(String why) {<a name="line.329"></a>
+<span class="sourceLineNo">330</span>    if (!this.stop) {<a name="line.330"></a>
+<span class="sourceLineNo">331</span>      this.stop = true;<a name="line.331"></a>
+<span class="sourceLineNo">332</span>      this.refreshTimer.cancel();<a name="line.332"></a>
+<span class="sourceLineNo">333</span>    }<a name="line.333"></a>
+<span class="sourceLineNo">334</span><a name="line.334"></a>
+<span class="sourceLineNo">335</span>  }<a name="line.335"></a>
+<span class="sourceLineNo">336</span><a name="line.336"></a>
+<span class="sourceLineNo">337</span>  @Override<a name="line.337"></a>
+<span class="sourceLineNo">338</span>  public boolean isStopped() {<a name="line.338"></a>
+<span class="sourceLineNo">339</span>    return this.stop;<a name="line.339"></a>
+<span class="sourceLineNo">340</span>  }<a name="line.340"></a>
+<span class="sourceLineNo">341</span><a name="line.341"></a>
+<span class="sourceLineNo">342</span>  /**<a name="line.342"></a>
+<span class="sourceLineNo">343</span>   * Information about a snapshot directory<a name="line.343"></a>
+<span class="sourceLineNo">344</span>   */<a name="line.344"></a>
+<span class="sourceLineNo">345</span>  private static class SnapshotDirectoryInfo {<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    long lastModified;<a name="line.346"></a>
+<span class="sourceLineNo">347</span>    Collection&lt;String&gt; files;<a name="line.347"></a>
+<span class="sourceLineNo">348</span><a name="line.348"></a>
+<span class="sourceLineNo">349</span>    public SnapshotDirectoryInfo(long mtime, Collection&lt;String&gt; files) {<a name="line.349"></a>
+<span class="sourceLineNo">350</span>      this.lastModified = mtime;<a name="line.350"></a>
+<span class="sourceLineNo">351</span>      this.files = files;<a name="line.351"></a>
+<span class="sourceLineNo">352</span>    }<a name="line.352"></a>
+<span class="sourceLineNo">353</span><a name="line.353"></a>
+<span class="sourceLineNo">354</span>    /**<a name="line.354"></a>
+<span class="sourceLineNo">355</span>     * @return the hfiles in the snapshot when &lt;tt&gt;this&lt;/tt&gt; was made.<a name="line.355"></a>
+<span class="sourceLineNo">356</span>     */<a name="line.356"></a>
+<span class="sourceLineNo">357</span>    public Collection&lt;String&gt; getFiles() {<a name="line.357"></a>
+<span class="sourceLineNo">358</span>      return this.files;<a name="line.358"></a>
+<span class="sourceLineNo">359</span>    }<a name="line.359"></a>
+<span class="sourceLineNo">360</span><a name="line.360"></a>
+<span class="sourceLineNo">361</span>    /**<a name="line.361"></a>
+<span class="sourceLineNo">362</span>     * Check if the snapshot directory has been modified<a name="line.362"></a>
+<span class="sourceLineNo">363</span>     * @param mtime current modification time of the directory<a name="line.363"></a>
+<span class="sourceLineNo">364</span>     * @return &lt;tt&gt;true&lt;/tt&gt; if it the modification time of the directory is newer time when we<a name="line.364"></a>
+<span class="sourceLineNo">365</span>     *         created &lt;tt&gt;this&lt;/tt&gt;<a name="line.365"></a>
+<span class="sourceLineNo">366</span>     */<a name="line.366"></a>
+<span class="sourceLineNo">367</span>    public boolean hasBeenModified(long mtime) {<a name="line.367"></a>
+<span class="sourceLineNo">368</span>      return this.lastModified &lt; mtime;<a name="line.368"></a>
+<span class="sourceLineNo">369</span>    }<a name="line.369"></a>
+<span class="sourceLineNo">370</span>  }<a name="line.370"></a>
+<span class="sourceLineNo">371</span>}<a name="line.371"></a>
 
 
 
index 206b623..796ddc1 100644 (file)
@@ -35,7 +35,7 @@
 <span class="sourceLineNo">027</span>import java.util.Set;<a name="line.27"></a>
 <span class="sourceLineNo">028</span>import java.util.Timer;<a name="line.28"></a>
 <span class="sourceLineNo">029</span>import java.util.TimerTask;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import java.util.concurrent.locks.ReentrantLock;<a name="line.30"></a>
+<span class="sourceLineNo">030</span>import java.util.concurrent.locks.Lock;<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.FileStatus;<a name="line.33"></a>
 <span class="sourceLineNo">184</span>    List&lt;FileStatus&gt; unReferencedFiles = Lists.newArrayList();<a name="line.184"></a>
 <span class="sourceLineNo">185</span>    List&lt;String&gt; snapshotsInProgress = null;<a name="line.185"></a>
 <span class="sourceLineNo">186</span>    boolean refreshed = false;<a name="line.186"></a>
-<span class="sourceLineNo">187</span>    for (FileStatus file : files) {<a name="line.187"></a>
-<span class="sourceLineNo">188</span>      String fileName = file.getPath().getName();<a name="line.188"></a>
-<span class="sourceLineNo">189</span>      if (!refreshed &amp;&amp; !cache.contains(fileName)) {<a name="line.189"></a>
-<span class="sourceLineNo">190</span>        refreshCache();<a name="line.190"></a>
-<span class="sourceLineNo">191</span>        refreshed = true;<a name="line.191"></a>
-<span class="sourceLineNo">192</span>      }<a name="line.192"></a>
-<span class="sourceLineNo">193</span>      if (cache.contains(fileName)) {<a name="line.193"></a>
-<span class="sourceLineNo">194</span>        continue;<a name="line.194"></a>
-<span class="sourceLineNo">195</span>      }<a name="line.195"></a>
-<span class="sourceLineNo">196</span>      if (snapshotsInProgress == null) {<a name="line.196"></a>
-<span class="sourceLineNo">197</span>        snapshotsInProgress = getSnapshotsInProgress(snapshotManager);<a name="line.197"></a>
-<span class="sourceLineNo">198</span>      }<a name="line.198"></a>
-<span class="sourceLineNo">199</span>      if (snapshotsInProgress.contains(fileName)) {<a name="line.199"></a>
-<span class="sourceLineNo">200</span>        continue;<a name="line.200"></a>
-<span class="sourceLineNo">201</span>      }<a name="line.201"></a>
-<span class="sourceLineNo">202</span>      unReferencedFiles.add(file);<a name="line.202"></a>
-<span class="sourceLineNo">203</span>    }<a name="line.203"></a>
-<span class="sourceLineNo">204</span>    return unReferencedFiles;<a name="line.204"></a>
-<span class="sourceLineNo">205</span>  }<a name="line.205"></a>
-<span class="sourceLineNo">206</span><a name="line.206"></a>
-<span class="sourceLineNo">207</span>  private synchronized void refreshCache() throws IOException {<a name="line.207"></a>
-<span class="sourceLineNo">208</span>    // get the status of the snapshots directory and check if it is has changes<a name="line.208"></a>
-<span class="sourceLineNo">209</span>    FileStatus dirStatus;<a name="line.209"></a>
-<span class="sourceLineNo">210</span>    try {<a name="line.210"></a>
-<span class="sourceLineNo">211</span>      dirStatus = fs.getFileStatus(snapshotDir);<a name="line.211"></a>
-<span class="sourceLineNo">212</span>    } catch (FileNotFoundException e) {<a name="line.212"></a>
-<span class="sourceLineNo">213</span>      if (this.cache.size() &gt; 0) {<a name="line.213"></a>
-<span class="sourceLineNo">214</span>        LOG.error("Snapshot directory: " + snapshotDir + " doesn't exist");<a name="line.214"></a>
-<span class="sourceLineNo">215</span>      }<a name="line.215"></a>
-<span class="sourceLineNo">216</span>      return;<a name="line.216"></a>
-<span class="sourceLineNo">217</span>    }<a name="line.217"></a>
-<span class="sourceLineNo">218</span><a name="line.218"></a>
-<span class="sourceLineNo">219</span>    // if the snapshot directory wasn't modified since we last check, we are done<a name="line.219"></a>
-<span class="sourceLineNo">220</span>    if (dirStatus.getModificationTime() &lt;= this.lastModifiedTime) return;<a name="line.220"></a>
-<span class="sourceLineNo">221</span><a name="line.221"></a>
-<span class="sourceLineNo">222</span>    // directory was modified, so we need to reload our cache<a name="line.222"></a>
-<span class="sourceLineNo">223</span>    // there could be a slight race here where we miss the cache, check the directory modification<a name="line.223"></a>
-<span class="sourceLineNo">224</span>    // time, then someone updates the directory, causing us to not scan the directory again.<a name="line.224"></a>
-<span class="sourceLineNo">225</span>    // However, snapshot directories are only created once, so this isn't an issue.<a name="line.225"></a>
-<span class="sourceLineNo">226</span><a name="line.226"></a>
-<span class="sourceLineNo">227</span>    // 1. update the modified time<a name="line.227"></a>
-<span class="sourceLineNo">228</span>    this.lastModifiedTime = dirStatus.getModificationTime();<a name="line.228"></a>
-<span class="sourceLineNo">229</span><a name="line.229"></a>
-<span class="sourceLineNo">230</span>    // 2.clear the cache<a name="line.230"></a>
-<span class="sourceLineNo">231</span>    this.cache.clear();<a name="line.231"></a>
-<span class="sourceLineNo">232</span>    Map&lt;String, SnapshotDirectoryInfo&gt; known = new HashMap&lt;&gt;();<a name="line.232"></a>
-<span class="sourceLineNo">233</span><a name="line.233"></a>
-<span class="sourceLineNo">234</span>    // 3. check each of the snapshot directories<a name="line.234"></a>
-<span class="sourceLineNo">235</span>    FileStatus[] snapshots = FSUtils.listStatus(fs, snapshotDir);<a name="line.235"></a>
-<span class="sourceLineNo">236</span>    if (snapshots == null) {<a name="line.236"></a>
-<span class="sourceLineNo">237</span>      // remove all the remembered snapshots because we don't have any left<a name="line.237"></a>
-<span class="sourceLineNo">238</span>      if (LOG.isDebugEnabled() &amp;&amp; this.snapshots.size() &gt; 0) {<a name="line.238"></a>
-<span class="sourceLineNo">239</span>        LOG.debug("No snapshots on-disk, cache empty");<a name="line.239"></a>
-<span class="sourceLineNo">240</span>      }<a name="line.240"></a>
-<span class="sourceLineNo">241</span>      this.snapshots.clear();<a name="line.241"></a>
-<span class="sourceLineNo">242</span>      return;<a name="line.242"></a>
-<span class="sourceLineNo">243</span>    }<a name="line.243"></a>
-<span class="sourceLineNo">244</span><a name="line.244"></a>
-<span class="sourceLineNo">245</span>    // 3.1 iterate through the on-disk snapshots<a name="line.245"></a>
-<span class="sourceLineNo">246</span>    for (FileStatus snapshot : snapshots) {<a name="line.246"></a>
-<span class="sourceLineNo">247</span>      String name = snapshot.getPath().getName();<a name="line.247"></a>
-<span class="sourceLineNo">248</span>      // its not the tmp dir,<a name="line.248"></a>
-<span class="sourceLineNo">249</span>      if (!name.equals(SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME)) {<a name="line.249"></a>
-<span class="sourceLineNo">250</span>        SnapshotDirectoryInfo files = this.snapshots.remove(name);<a name="line.250"></a>
-<span class="sourceLineNo">251</span>        // 3.1.1 if we don't know about the snapshot or its been modified, we need to update the<a name="line.251"></a>
-<span class="sourceLineNo">252</span>        // files the latter could occur where I create a snapshot, then delete it, and then make a<a name="line.252"></a>
-<span class="sourceLineNo">253</span>        // new snapshot with the same name. We will need to update the cache the information from<a name="line.253"></a>
-<span class="sourceLineNo">254</span>        // that new snapshot, even though it has the same name as the files referenced have<a name="line.254"></a>
-<span class="sourceLineNo">255</span>        // probably changed.<a name="line.255"></a>
-<span class="sourceLineNo">256</span>        if (files == null || files.hasBeenModified(snapshot.getModificationTime())) {<a name="line.256"></a>
-<span class="sourceLineNo">257</span>          // get all files for the snapshot and create a new info<a name="line.257"></a>
-<span class="sourceLineNo">258</span>          Collection&lt;String&gt; storedFiles = fileInspector.filesUnderSnapshot(snapshot.getPath());<a name="line.258"></a>
-<span class="sourceLineNo">259</span>          files = new SnapshotDirectoryInfo(snapshot.getModificationTime(), storedFiles);<a name="line.259"></a>
-<span class="sourceLineNo">260</span>        }<a name="line.260"></a>
-<span class="sourceLineNo">261</span>        // 3.2 add all the files to cache<a name="line.261"></a>
-<span class="sourceLineNo">262</span>        this.cache.addAll(files.getFiles());<a name="line.262"></a>
-<span class="sourceLineNo">263</span>        known.put(name, files);<a name="line.263"></a>
-<span class="sourceLineNo">264</span>      }<a name="line.264"></a>
-<span class="sourceLineNo">265</span>    }<a name="line.265"></a>
-<span class="sourceLineNo">266</span><a name="line.266"></a>
-<span class="sourceLineNo">267</span>    // 4. set the snapshots we are tracking<a name="line.267"></a>
-<span class="sourceLineNo">268</span>    this.snapshots.clear();<a name="line.268"></a>
-<span class="sourceLineNo">269</span>    this.snapshots.putAll(known);<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>  @VisibleForTesting List&lt;String&gt; getSnapshotsInProgress(<a name="line.272"></a>
-<span class="sourceLineNo">273</span>    final SnapshotManager snapshotManager) throws IOException {<a name="line.273"></a>
-<span class="sourceLineNo">274</span>    List&lt;String&gt; snapshotInProgress = Lists.newArrayList();<a name="line.274"></a>
-<span class="sourceLineNo">275</span>    // only add those files to the cache, but not to the known snapshots<a name="line.275"></a>
-<span class="sourceLineNo">276</span>    Path snapshotTmpDir = new Path(snapshotDir, SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME);<a name="line.276"></a>
-<span class="sourceLineNo">277</span>    // only add those files to the cache, but not to the known snapshots<a name="line.277"></a>
-<span class="sourceLineNo">278</span>    FileStatus[] running = FSUtils.listStatus(fs, snapshotTmpDir);<a name="line.278"></a>
-<span class="sourceLineNo">279</span>    if (running != null) {<a name="line.279"></a>
-<span class="sourceLineNo">280</span>      for (FileStatus run : running) {<a name="line.280"></a>
-<span class="sourceLineNo">281</span>        ReentrantLock lock = null;<a name="line.281"></a>
-<span class="sourceLineNo">282</span>        if (snapshotManager != null) {<a name="line.282"></a>
-<span class="sourceLineNo">283</span>          lock = snapshotManager.getLocks().acquireLock(run.getPath().getName());<a name="line.283"></a>
-<span class="sourceLineNo">284</span>        }<a name="line.284"></a>
-<span class="sourceLineNo">285</span>        try {<a name="line.285"></a>
-<span class="sourceLineNo">286</span>          snapshotInProgress.addAll(fileInspector.filesUnderSnapshot(run.getPath()));<a name="line.286"></a>
-<span class="sourceLineNo">287</span>        } catch (CorruptedSnapshotException e) {<a name="line.287"></a>
-<span class="sourceLineNo">288</span>          // See HBASE-16464<a name="line.288"></a>
-<span class="sourceLineNo">289</span>          if (e.getCause() instanceof FileNotFoundException) {<a name="line.289"></a>
-<span class="sourceLineNo">290</span>            // If the snapshot is corrupt, we will delete it<a name="line.290"></a>
-<span class="sourceLineNo">291</span>            fs.delete(run.getPath(), true);<a name="line.291"></a>
-<span class="sourceLineNo">292</span>            LOG.warn("delete the " + run.getPath() + " due to exception:", e.getCause());<a name="line.292"></a>
-<span class="sourceLineNo">293</span>          } else {<a name="line.293"></a>
-<span class="sourceLineNo">294</span>            throw e;<a name="line.294"></a>
-<span class="sourceLineNo">295</span>          }<a name="line.295"></a>
-<span class="sourceLineNo">296</span>        } finally {<a name="line.296"></a>
-<span class="sourceLineNo">297</span>          if (lock != null) {<a name="line.297"></a>
-<span class="sourceLineNo">298</span>            lock.unlock();<a name="line.298"></a>
-<span class="sourceLineNo">299</span>          }<a name="line.299"></a>
-<span class="sourceLineNo">300</span>        }<a name="line.300"></a>
-<span class="sourceLineNo">301</span>      }<a name="line.301"></a>
-<span class="sourceLineNo">302</span>    }<a name="line.302"></a>
-<span class="sourceLineNo">303</span>    return snapshotInProgress;<a name="line.303"></a>
-<span class="sourceLineNo">304</span>  }<a name="line.304"></a>
-<span class="sourceLineNo">305</span><a name="line.305"></a>
-<span class="sourceLineNo">306</span>  /**<a name="line.306"></a>
-<span class="sourceLineNo">307</span>   * Simple helper task that just periodically attempts to refresh the cache<a name="line.307"></a>
-<span class="sourceLineNo">308</span>   */<a name="line.308"></a>
-<span class="sourceLineNo">309</span>  public class RefreshCacheTask extends TimerTask {<a name="line.309"></a>
-<span class="sourceLineNo">310</span>    @Override<a name="line.310"></a>
-<span class="sourceLineNo">311</span>    public void run() {<a name="line.311"></a>
-<span class="sourceLineNo">312</span>      try {<a name="line.312"></a>
-<span class="sourceLineNo">313</span>        SnapshotFileCache.this.refreshCache();<a name="line.313"></a>
-<span class="sourceLineNo">314</span>      } catch (IOException e) {<a name="line.314"></a>
-<span class="sourceLineNo">315</span>        LOG.warn("Failed to refresh snapshot hfile cache!", e);<a name="line.315"></a>
-<span class="sourceLineNo">316</span>      }<a name="line.316"></a>
-<span class="sourceLineNo">317</span>    }<a name="line.317"></a>
-<span class="sourceLineNo">318</span>  }<a name="line.318"></a>
-<span class="sourceLineNo">319</span><a name="line.319"></a>
-<span class="sourceLineNo">320</span>  @Override<a name="line.320"></a>
-<span class="sourceLineNo">321</span>  public void stop(String why) {<a name="line.321"></a>
-<span class="sourceLineNo">322</span>    if (!this.stop) {<a name="line.322"></a>
-<span class="sourceLineNo">323</span>      this.stop = true;<a name="line.323"></a>
-<span class="sourceLineNo">324</span>      this.refreshTimer.cancel();<a name="line.324"></a>
+<span class="sourceLineNo">187</span>    Lock lock = null;<a name="line.187"></a>
+<span class="sourceLineNo">188</span>    if (snapshotManager != null) {<a name="line.188"></a>
+<span class="sourceLineNo">189</span>      lock = snapshotManager.getTakingSnapshotLock().writeLock();<a name="line.189"></a>
+<span class="sourceLineNo">190</span>    }<a name="line.190"></a>
+<span class="sourceLineNo">191</span>    if (lock == null || lock.tryLock()) {<a name="line.191"></a>
+<span class="sourceLineNo">192</span>      try {<a name="line.192"></a>
+<span class="sourceLineNo">193</span>        if (snapshotManager == null || snapshotManager.isTakingAnySnapshot()) {<a name="line.193"></a>
+<span class="sourceLineNo">194</span>          LOG.warn("Not checking unreferenced files since snapshot is running, it will "<a name="line.194"></a>
+<span class="sourceLineNo">195</span>              + "skip to clean the HFiles this time");<a name="line.195"></a>
+<span class="sourceLineNo">196</span>          return unReferencedFiles;<a name="line.196"></a>
+<span class="sourceLineNo">197</span>        }<a name="line.197"></a>
+<span class="sourceLineNo">198</span>        for (FileStatus file : files) {<a name="line.198"></a>
+<span class="sourceLineNo">199</span>          String fileName = file.getPath().getName();<a name="line.199"></a>
+<span class="sourceLineNo">200</span>          if (!refreshed &amp;&amp; !cache.contains(fileName)) {<a name="line.200"></a>
+<span class="sourceLineNo">201</span>            refreshCache();<a name="line.201"></a>
+<span class="sourceLineNo">202</span>            refreshed = true;<a name="line.202"></a>
+<span class="sourceLineNo">203</span>          }<a name="line.203"></a>
+<span class="sourceLineNo">204</span>          if (cache.contains(fileName)) {<a name="line.204"></a>
+<span class="sourceLineNo">205</span>            continue;<a name="line.205"></a>
+<span class="sourceLineNo">206</span>          }<a name="line.206"></a>
+<span class="sourceLineNo">207</span>          if (snapshotsInProgress == null) {<a name="line.207"></a>
+<span class="sourceLineNo">208</span>            snapshotsInProgress = getSnapshotsInProgress();<a name="line.208"></a>
+<span class="sourceLineNo">209</span>          }<a name="line.209"></a>
+<span class="sourceLineNo">210</span>          if (snapshotsInProgress.contains(fileName)) {<a name="line.210"></a>
+<span class="sourceLineNo">211</span>            continue;<a name="line.211"></a>
+<span class="sourceLineNo">212</span>          }<a name="line.212"></a>
+<span class="sourceLineNo">213</span>          unReferencedFiles.add(file);<a name="line.213"></a>
+<span class="sourceLineNo">214</span>        }<a name="line.214"></a>
+<span class="sourceLineNo">215</span>      } finally {<a name="line.215"></a>
+<span class="sourceLineNo">216</span>        if (lock != null) {<a name="line.216"></a>
+<span class="sourceLineNo">217</span>          lock.unlock();<a name="line.217"></a>
+<span class="sourceLineNo">218</span>        }<a name="line.218"></a>
+<span class="sourceLineNo">219</span>      }<a name="line.219"></a>
+<span class="sourceLineNo">220</span>    }<a name="line.220"></a>
+<span class="sourceLineNo">221</span>    return unReferencedFiles;<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>  private synchronized void refreshCache() throws IOException {<a name="line.224"></a>
+<span class="sourceLineNo">225</span>    // get the status of the snapshots directory and check if it is has changes<a name="line.225"></a>
+<span class="sourceLineNo">226</span>    FileStatus dirStatus;<a name="line.226"></a>
+<span class="sourceLineNo">227</span>    try {<a name="line.227"></a>
+<span class="sourceLineNo">228</span>      dirStatus = fs.getFileStatus(snapshotDir);<a name="line.228"></a>
+<span class="sourceLineNo">229</span>    } catch (FileNotFoundException e) {<a name="line.229"></a>
+<span class="sourceLineNo">230</span>      if (this.cache.size() &gt; 0) {<a name="line.230"></a>
+<span class="sourceLineNo">231</span>        LOG.error("Snapshot directory: " + snapshotDir + " doesn't exist");<a name="line.231"></a>
+<span class="sourceLineNo">232</span>      }<a name="line.232"></a>
+<span class="sourceLineNo">233</span>      return;<a name="line.233"></a>
+<span class="sourceLineNo">234</span>    }<a name="line.234"></a>
+<span class="sourceLineNo">235</span><a name="line.235"></a>
+<span class="sourceLineNo">236</span>    // if the snapshot directory wasn't modified since we last check, we are done<a name="line.236"></a>
+<span class="sourceLineNo">237</span>    if (dirStatus.getModificationTime() &lt;= this.lastModifiedTime) return;<a name="line.237"></a>
+<span class="sourceLineNo">238</span><a name="line.238"></a>
+<span class="sourceLineNo">239</span>    // directory was modified, so we need to reload our cache<a name="line.239"></a>
+<span class="sourceLineNo">240</span>    // there could be a slight race here where we miss the cache, check the directory modification<a name="line.240"></a>
+<span class="sourceLineNo">241</span>    // time, then someone updates the directory, causing us to not scan the directory again.<a name="line.241"></a>
+<span class="sourceLineNo">242</span>    // However, snapshot directories are only created once, so this isn't an issue.<a name="line.242"></a>
+<span class="sourceLineNo">243</span><a name="line.243"></a>
+<span class="sourceLineNo">244</span>    // 1. update the modified time<a name="line.244"></a>
+<span class="sourceLineNo">245</span>    this.lastModifiedTime = dirStatus.getModificationTime();<a name="line.245"></a>
+<span class="sourceLineNo">246</span><a name="line.246"></a>
+<span class="sourceLineNo">247</span>    // 2.clear the cache<a name="line.247"></a>
+<span class="sourceLineNo">248</span>    this.cache.clear();<a name="line.248"></a>
+<span class="sourceLineNo">249</span>    Map&lt;String, SnapshotDirectoryInfo&gt; known = new HashMap&lt;&gt;();<a name="line.249"></a>
+<span class="sourceLineNo">250</span><a name="line.250"></a>
+<span class="sourceLineNo">251</span>    // 3. check each of the snapshot directories<a name="line.251"></a>
+<span class="sourceLineNo">252</span>    FileStatus[] snapshots = FSUtils.listStatus(fs, snapshotDir);<a name="line.252"></a>
+<span class="sourceLineNo">253</span>    if (snapshots == null) {<a name="line.253"></a>
+<span class="sourceLineNo">254</span>      // remove all the remembered snapshots because we don't have any left<a name="line.254"></a>
+<span class="sourceLineNo">255</span>      if (LOG.isDebugEnabled() &amp;&amp; this.snapshots.size() &gt; 0) {<a name="line.255"></a>
+<span class="sourceLineNo">256</span>        LOG.debug("No snapshots on-disk, cache empty");<a name="line.256"></a>
+<span class="sourceLineNo">257</span>      }<a name="line.257"></a>
+<span class="sourceLineNo">258</span>      this.snapshots.clear();<a name="line.258"></a>
+<span class="sourceLineNo">259</span>      return;<a name="line.259"></a>
+<span class="sourceLineNo">260</span>    }<a name="line.260"></a>
+<span class="sourceLineNo">261</span><a name="line.261"></a>
+<span class="sourceLineNo">262</span>    // 3.1 iterate through the on-disk snapshots<a name="line.262"></a>
+<span class="sourceLineNo">263</span>    for (FileStatus snapshot : snapshots) {<a name="line.263"></a>
+<span class="sourceLineNo">264</span>      String name = snapshot.getPath().getName();<a name="line.264"></a>
+<span class="sourceLineNo">265</span>      // its not the tmp dir,<a name="line.265"></a>
+<span class="sourceLineNo">266</span>      if (!name.equals(SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME)) {<a name="line.266"></a>
+<span class="sourceLineNo">267</span>        SnapshotDirectoryInfo files = this.snapshots.remove(name);<a name="line.267"></a>
+<span class="sourceLineNo">268</span>        // 3.1.1 if we don't know about the snapshot or its been modified, we need to update the<a name="line.268"></a>
+<span class="sourceLineNo">269</span>        // files the latter could occur where I create a snapshot, then delete it, and then make a<a name="line.269"></a>
+<span class="sourceLineNo">270</span>        // new snapshot with the same name. We will need to update the cache the information from<a name="line.270"></a>
+<span class="sourceLineNo">271</span>        // that new snapshot, even though it has the same name as the files referenced have<a name="line.271"></a>
+<span class="sourceLineNo">272</span>        // probably changed.<a name="line.272"></a>
+<span class="sourceLineNo">273</span>        if (files == null || files.hasBeenModified(snapshot.getModificationTime())) {<a name="line.273"></a>
+<span class="sourceLineNo">274</span>          // get all files for the snapshot and create a new info<a name="line.274"></a>
+<span class="sourceLineNo">275</span>          Collection&lt;String&gt; storedFiles = fileInspector.filesUnderSnapshot(snapshot.getPath());<a name="line.275"></a>
+<span class="sourceLineNo">276</span>          files = new SnapshotDirectoryInfo(snapshot.getModificationTime(), storedFiles);<a name="line.276"></a>
+<span class="sourceLineNo">277</span>        }<a name="line.277"></a>
+<span class="sourceLineNo">278</span>        // 3.2 add all the files to cache<a name="line.278"></a>
+<span class="sourceLineNo">279</span>        this.cache.addAll(files.getFiles());<a name="line.279"></a>
+<span class="sourceLineNo">280</span>        known.put(name, files);<a name="line.280"></a>
+<span class="sourceLineNo">281</span>      }<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>
+<span class="sourceLineNo">284</span>    // 4. set the snapshots we are tracking<a name="line.284"></a>
+<span class="sourceLineNo">285</span>    this.snapshots.clear();<a name="line.285"></a>
+<span class="sourceLineNo">286</span>    this.snapshots.putAll(known);<a name="line.286"></a>
+<span class="sourceLineNo">287</span>  }<a name="line.287"></a>
+<span class="sourceLineNo">288</span><a name="line.288"></a>
+<span class="sourceLineNo">289</span>  @VisibleForTesting<a name="line.289"></a>
+<span class="sourceLineNo">290</span>  List&lt;String&gt; getSnapshotsInProgress() throws IOException {<a name="line.290"></a>
+<span class="sourceLineNo">291</span>    List&lt;String&gt; snapshotInProgress = Lists.newArrayList();<a name="line.291"></a>
+<span class="sourceLineNo">292</span>    // only add those files to the cache, but not to the known snapshots<a name="line.292"></a>
+<span class="sourceLineNo">293</span>    Path snapshotTmpDir = new Path(snapshotDir, SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME);<a name="line.293"></a>
+<span class="sourceLineNo">294</span>    FileStatus[] running = FSUtils.listStatus(fs, snapshotTmpDir);<a name="line.294"></a>
+<span class="sourceLineNo">295</span>    if (running != null) {<a name="line.295"></a>
+<span class="sourceLineNo">296</span>      for (FileStatus run : running) {<a name="line.296"></a>
+<span class="sourceLineNo">297</span>        try {<a name="line.297"></a>
+<span class="sourceLineNo">298</span>          snapshotInProgress.addAll(fileInspector.filesUnderSnapshot(run.getPath()));<a name="line.298"></a>
+<span class="sourceLineNo">299</span>        } catch (CorruptedSnapshotException e) {<a name="line.299"></a>
+<span class="sourceLineNo">300</span>          // See HBASE-16464<a name="line.300"></a>
+<span class="sourceLineNo">301</span>          if (e.getCause() instanceof FileNotFoundException) {<a name="line.301"></a>
+<span class="sourceLineNo">302</span>            // If the snapshot is corrupt, we will delete it<a name="line.302"></a>
+<span class="sourceLineNo">303</span>            fs.delete(run.getPath(), true);<a name="line.303"></a>
+<span class="sourceLineNo">304</span>            LOG.warn("delete the " + run.getPath() + " due to exception:", e.getCause());<a name="line.304"></a>
+<span class="sourceLineNo">305</span>          } else {<a name="line.305"></a>
+<span class="sourceLineNo">306</span>            throw e;<a name="line.306"></a>
+<span class="sourceLineNo">307</span>          }<a name="line.307"></a>
+<span class="sourceLineNo">308</span>        }<a name="line.308"></a>
+<span class="sourceLineNo">309</span>      }<a name="line.309"></a>
+<span class="sourceLineNo">310</span>    }<a name="line.310"></a>
+<span class="sourceLineNo">311</span>    return snapshotInProgress;<a name="line.311"></a>
+<span class="sourceLineNo">312</span>  }<a name="line.312"></a>
+<span class="sourceLineNo">313</span><a name="line.313"></a>
+<span class="sourceLineNo">314</span>  /**<a name="line.314"></a>
+<span class="sourceLineNo">315</span>   * Simple helper task that just periodically attempts to refresh the cache<a name="line.315"></a>
+<span class="sourceLineNo">316</span>   */<a name="line.316"></a>
+<span class="sourceLineNo">317</span>  public class RefreshCacheTask extends TimerTask {<a name="line.317"></a>
+<span class="sourceLineNo">318</span>    @Override<a name="line.318"></a>
+<span class="sourceLineNo">319</span>    public void run() {<a name="line.319"></a>
+<span class="sourceLineNo">320</span>      try {<a name="line.320"></a>
+<span class="sourceLineNo">321</span>        SnapshotFileCache.this.refreshCache();<a name="line.321"></a>
+<span class="sourceLineNo">322</span>      } catch (IOException e) {<a name="line.322"></a>
+<span class="sourceLineNo">323</span>        LOG.warn("Failed to refresh snapshot hfile cache!", e);<a name="line.323"></a>
+<span class="sourceLineNo">324</span>      }<a name="line.324"></a>
 <span class="sourceLineNo">325</span>    }<a name="line.325"></a>
-<span class="sourceLineNo">326</span><a name="line.326"></a>
-<span class="sourceLineNo">327</span>  }<a name="line.327"></a>
-<span class="sourceLineNo">328</span><a name="line.328"></a>
-<span class="sourceLineNo">329</span>  @Override<a name="line.329"></a>
-<span class="sourceLineNo">330</span>  public boolean isStopped() {<a name="line.330"></a>
-<span class="sourceLineNo">331</span>    return this.stop;<a name="line.331"></a>
-<span class="sourceLineNo">332</span>  }<a name="line.332"></a>
-<span class="sourceLineNo">333</span><a name="line.333"></a>
-<span class="sourceLineNo">334</span>  /**<a name="line.334"></a>
-<span class="sourceLineNo">335</span>   * Information about a snapshot directory<a name="line.335"></a>
-<span class="sourceLineNo">336</span>   */<a name="line.336"></a>
-<span class="sourceLineNo">337</span>  private static class SnapshotDirectoryInfo {<a name="line.337"></a>
-<span class="sourceLineNo">338</span>    long lastModified;<a name="line.338"></a>
-<span class="sourceLineNo">339</span>    Collection&lt;String&gt; files;<a name="line.339"></a>
-<span class="sourceLineNo">340</span><a name="line.340"></a>
-<span class="sourceLineNo">341</span>    public SnapshotDirectoryInfo(long mtime, Collection&lt;String&gt; files) {<a name="line.341"></a>
-<span class="sourceLineNo">342</span>      this.lastModified = mtime;<a name="line.342"></a>
-<span class="sourceLineNo">343</span>      this.files = files;<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    }<a name="line.344"></a>
-<span class="sourceLineNo">345</span><a name="line.345"></a>
-<span class="sourceLineNo">346</span>    /**<a name="line.346"></a>
-<span class="sourceLineNo">347</span>     * @return the hfiles in the snapshot when &lt;tt&gt;this&lt;/tt&gt; was made.<a name="line.347"></a>
-<span class="sourceLineNo">348</span>     */<a name="line.348"></a>
-<span class="sourceLineNo">349</span>    public Collection&lt;String&gt; getFiles() {<a name="line.349"></a>
-<span class="sourceLineNo">350</span>      return this.files;<a name="line.350"></a>
-<span class="sourceLineNo">351</span>    }<a name="line.351"></a>
-<span class="sourceLineNo">352</span><a name="line.352"></a>
-<span class="sourceLineNo">353</span>    /**<a name="line.353"></a>
-<span class="sourceLineNo">354</span>     * Check if the snapshot directory has been modified<a name="line.354"></a>
-<span class="sourceLineNo">355</span>     * @param mtime current modification time of the directory<a name="line.355"></a>
-<span class="sourceLineNo">356</span>     * @return &lt;tt&gt;true&lt;/tt&gt; if it the modification time of the directory is newer time when we<a name="line.356"></a>
-<span class="sourceLineNo">357</span>     *         created &lt;tt&gt;this&lt;/tt&gt;<a name="line.357"></a>
-<span class="sourceLineNo">358</span>     */<a name="line.358"></a>
-<span class="sourceLineNo">359</span>    public boolean hasBeenModified(long mtime) {<a name="line.359"></a>
-<span class="sourceLineNo">360</span>      return this.lastModified &lt; mtime;<a name="line.360"></a>
-<span class="sourceLineNo">361</span>    }<a name="line.361"></a>
-<span class="sourceLineNo">362</span>  }<a name="line.362"></a>
-<span class="sourceLineNo">363</span>}<a name="line.363"></a>
+<span class="sourceLineNo">326</span>  }<a name="line.326"></a>
+<span class="sourceLineNo">327</span><a name="line.327"></a>
+<span class="sourceLineNo">328</span>  @Override<a name="line.328"></a>
+<span class="sourceLineNo">329</span>  public void stop(String why) {<a name="line.329"></a>
+<span class="sourceLineNo">330</span>    if (!this.stop) {<a name="line.330"></a>
+<span class="sourceLineNo">331</span>      this.stop = true;<a name="line.331"></a>
+<span class="sourceLineNo">332</span>      this.refreshTimer.cancel();<a name="line.332"></a>
+<span class="sourceLineNo">333</span>    }<a name="line.333"></a>
+<span class="sourceLineNo">334</span><a name="line.334"></a>
+<span class="sourceLineNo">335</span>  }<a name="line.335"></a>
+<span class="sourceLineNo">336</span><a name="line.336"></a>
+<span class="sourceLineNo">337</span>  @Override<a name="line.337"></a>
+<span class="sourceLineNo">338</span>  public boolean isStopped() {<a name="line.338"></a>
+<span class="sourceLineNo">339</span>    return this.stop;<a name="line.339"></a>
+<span class="sourceLineNo">340</span>  }<a name="line.340"></a>
+<span class="sourceLineNo">341</span><a name="line.341"></a>
+<span class="sourceLineNo">342</span>  /**<a name="line.342"></a>
+<span class="sourceLineNo">343</span>   * Information about a snapshot directory<a name="line.343"></a>
+<span class="sourceLineNo">344</span>   */<a name="line.344"></a>
+<span class="sourceLineNo">345</span>  private static class SnapshotDirectoryInfo {<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    long lastModified;<a name="line.346"></a>
+<span class="sourceLineNo">347</span>    Collection&lt;String&gt; files;<a name="line.347"></a>
+<span class="sourceLineNo">348</span><a name="line.348"></a>
+<span class="sourceLineNo">349</span>    public SnapshotDirectoryInfo(long mtime, Collection&lt;String&gt; files) {<a name="line.349"></a>
+<span class="sourceLineNo">350</span>      this.lastModified = mtime;<a name="line.350"></a>
+<span class="sourceLineNo">351</span>      this.files = files;<a name="line.351"></a>
+<span class="sourceLineNo">352</span>    }<a name="line.352"></a>
+<span class="sourceLineNo">353</span><a name="line.353"></a>
+<span class="sourceLineNo">354</span>    /**<a name="line.354"></a>
+<span class="sourceLineNo">355</span>     * @return the hfiles in the snapshot when &lt;tt&gt;this&lt;/tt&gt; was made.<a name="line.355"></a>
+<span class="sourceLineNo">356</span>     */<a name="line.356"></a>
+<span class="sourceLineNo">357</span>    public Collection&lt;String&gt; getFiles() {<a name="line.357"></a>
+<span class="sourceLineNo">358</span>      return this.files;<a name="line.358"></a>
+<span class="sourceLineNo">359</span>    }<a name="line.359"></a>
+<span class="sourceLineNo">360</span><a name="line.360"></a>
+<span class="sourceLineNo">361</span>    /**<a name="line.361"></a>
+<span class="sourceLineNo">362</span>     * Check if the snapshot directory has been modified<a name="line.362"></a>
+<span class="sourceLineNo">363</span>     * @param mtime current modification time of the directory<a name="line.363"></a>
+<span class="sourceLineNo">364</span>     * @return &lt;tt&gt;true&lt;/tt&gt; if it the modification time of the directory is newer time when we<a name="line.364"></a>
+<span class="sourceLineNo">365</span>     *         created &lt;tt&gt;this&lt;/tt&gt;<a name="line.365"></a>
+<span class="sourceLineNo">366</span>     */<a name="line.366"></a>
+<span class="sourceLineNo">367</span>    public boolean hasBeenModified(long mtime) {<a name="line.367"></a>
+<span class="sourceLineNo">368</span>      return this.lastModified &lt; mtime;<a name="line.368"></a>
+<span class="sourceLineNo">369</span>    }<a name="line.369"></a>
+<span class="sourceLineNo">370</span>  }<a name="line.370"></a>
+<span class="sourceLineNo">371</span>}<a name="line.371"></a>
 
 
 
index 206b623..796ddc1 100644 (file)
@@ -35,7 +35,7 @@
 <span class="sourceLineNo">027</span>import java.util.Set;<a name="line.27"></a>
 <span class="sourceLineNo">028</span>import java.util.Timer;<a name="line.28"></a>
 <span class="sourceLineNo">029</span>import java.util.TimerTask;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import java.util.concurrent.locks.ReentrantLock;<a name="line.30"></a>
+<span class="sourceLineNo">030</span>import java.util.concurrent.locks.Lock;<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.FileStatus;<a name="line.33"></a>
 <span class="sourceLineNo">184</span>    List&lt;FileStatus&gt; unReferencedFiles = Lists.newArrayList();<a name="line.184"></a>
 <span class="sourceLineNo">185</span>    List&lt;String&gt; snapshotsInProgress = null;<a name="line.185"></a>
 <span class="sourceLineNo">186</span>    boolean refreshed = false;<a name="line.186"></a>
-<span class="sourceLineNo">187</span>    for (FileStatus file : files) {<a name="line.187"></a>
-<span class="sourceLineNo">188</span>      String fileName = file.getPath().getName();<a name="line.188"></a>
-<span class="sourceLineNo">189</span>      if (!refreshed &amp;&amp; !cache.contains(fileName)) {<a name="line.189"></a>
-<span class="sourceLineNo">190</span>        refreshCache();<a name="line.190"></a>
-<span class="sourceLineNo">191</span>        refreshed = true;<a name="line.191"></a>
-<span class="sourceLineNo">192</span>      }<a name="line.192"></a>
-<span class="sourceLineNo">193</span>      if (cache.contains(fileName)) {<a name="line.193"></a>
-<span class="sourceLineNo">194</span>        continue;<a name="line.194"></a>
-<span class="sourceLineNo">195</span>      }<a name="line.195"></a>
-<span class="sourceLineNo">196</span>      if (snapshotsInProgress == null) {<a name="line.196"></a>
-<span class="sourceLineNo">197</span>        snapshotsInProgress = getSnapshotsInProgress(snapshotManager);<a name="line.197"></a>
-<span class="sourceLineNo">198</span>      }<a name="line.198"></a>
-<span class="sourceLineNo">199</span>      if (snapshotsInProgress.contains(fileName)) {<a name="line.199"></a>
-<span class="sourceLineNo">200</span>        continue;<a name="line.200"></a>
-<span class="sourceLineNo">201</span>      }<a name="line.201"></a>
-<span class="sourceLineNo">202</span>      unReferencedFiles.add(file);<a name="line.202"></a>
-<span class="sourceLineNo">203</span>    }<a name="line.203"></a>
-<span class="sourceLineNo">204</span>    return unReferencedFiles;<a name="line.204"></a>
-<span class="sourceLineNo">205</span>  }<a name="line.205"></a>
-<span class="sourceLineNo">206</span><a name="line.206"></a>
-<span class="sourceLineNo">207</span>  private synchronized void refreshCache() throws IOException {<a name="line.207"></a>
-<span class="sourceLineNo">208</span>    // get the status of the snapshots directory and check if it is has changes<a name="line.208"></a>
-<span class="sourceLineNo">209</span>    FileStatus dirStatus;<a name="line.209"></a>
-<span class="sourceLineNo">210</span>    try {<a name="line.210"></a>
-<span class="sourceLineNo">211</span>      dirStatus = fs.getFileStatus(snapshotDir);<a name="line.211"></a>
-<span class="sourceLineNo">212</span>    } catch (FileNotFoundException e) {<a name="line.212"></a>
-<span class="sourceLineNo">213</span>      if (this.cache.size() &gt; 0) {<a name="line.213"></a>
-<span class="sourceLineNo">214</span>        LOG.error("Snapshot directory: " + snapshotDir + " doesn't exist");<a name="line.214"></a>
-<span class="sourceLineNo">215</span>      }<a name="line.215"></a>
-<span class="sourceLineNo">216</span>      return;<a name="line.216"></a>
-<span class="sourceLineNo">217</span>    }<a name="line.217"></a>
-<span class="sourceLineNo">218</span><a name="line.218"></a>
-<span class="sourceLineNo">219</span>    // if the snapshot directory wasn't modified since we last check, we are done<a name="line.219"></a>
-<span class="sourceLineNo">220</span>    if (dirStatus.getModificationTime() &lt;= this.lastModifiedTime) return;<a name="line.220"></a>
-<span class="sourceLineNo">221</span><a name="line.221"></a>
-<span class="sourceLineNo">222</span>    // directory was modified, so we need to reload our cache<a name="line.222"></a>
-<span class="sourceLineNo">223</span>    // there could be a slight race here where we miss the cache, check the directory modification<a name="line.223"></a>
-<span class="sourceLineNo">224</span>    // time, then someone updates the directory, causing us to not scan the directory again.<a name="line.224"></a>
-<span class="sourceLineNo">225</span>    // However, snapshot directories are only created once, so this isn't an issue.<a name="line.225"></a>
-<span class="sourceLineNo">226</span><a name="line.226"></a>
-<span class="sourceLineNo">227</span>    // 1. update the modified time<a name="line.227"></a>
-<span class="sourceLineNo">228</span>    this.lastModifiedTime = dirStatus.getModificationTime();<a name="line.228"></a>
-<span class="sourceLineNo">229</span><a name="line.229"></a>
-<span class="sourceLineNo">230</span>    // 2.clear the cache<a name="line.230"></a>
-<span class="sourceLineNo">231</span>    this.cache.clear();<a name="line.231"></a>
-<span class="sourceLineNo">232</span>    Map&lt;String, SnapshotDirectoryInfo&gt; known = new HashMap&lt;&gt;();<a name="line.232"></a>
-<span class="sourceLineNo">233</span><a name="line.233"></a>
-<span class="sourceLineNo">234</span>    // 3. check each of the snapshot directories<a name="line.234"></a>
-<span class="sourceLineNo">235</span>    FileStatus[] snapshots = FSUtils.listStatus(fs, snapshotDir);<a name="line.235"></a>
-<span class="sourceLineNo">236</span>    if (snapshots == null) {<a name="line.236"></a>
-<span class="sourceLineNo">237</span>      // remove all the remembered snapshots because we don't have any left<a name="line.237"></a>
-<span class="sourceLineNo">238</span>      if (LOG.isDebugEnabled() &amp;&amp; this.snapshots.size() &gt; 0) {<a name="line.238"></a>
-<span class="sourceLineNo">239</span>        LOG.debug("No snapshots on-disk, cache empty");<a name="line.239"></a>
-<span class="sourceLineNo">240</span>      }<a name="line.240"></a>
-<span class="sourceLineNo">241</span>      this.snapshots.clear();<a name="line.241"></a>
-<span class="sourceLineNo">242</span>      return;<a name="line.242"></a>
-<span class="sourceLineNo">243</span>    }<a name="line.243"></a>
-<span class="sourceLineNo">244</span><a name="line.244"></a>
-<span class="sourceLineNo">245</span>    // 3.1 iterate through the on-disk snapshots<a name="line.245"></a>
-<span class="sourceLineNo">246</span>    for (FileStatus snapshot : snapshots) {<a name="line.246"></a>
-<span class="sourceLineNo">247</span>      String name = snapshot.getPath().getName();<a name="line.247"></a>
-<span class="sourceLineNo">248</span>      // its not the tmp dir,<a name="line.248"></a>
-<span class="sourceLineNo">249</span>      if (!name.equals(SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME)) {<a name="line.249"></a>
-<span class="sourceLineNo">250</span>        SnapshotDirectoryInfo files = this.snapshots.remove(name);<a name="line.250"></a>
-<span class="sourceLineNo">251</span>        // 3.1.1 if we don't know about the snapshot or its been modified, we need to update the<a name="line.251"></a>
-<span class="sourceLineNo">252</span>        // files the latter could occur where I create a snapshot, then delete it, and then make a<a name="line.252"></a>
-<span class="sourceLineNo">253</span>        // new snapshot with the same name. We will need to update the cache the information from<a name="line.253"></a>
-<span class="sourceLineNo">254</span>        // that new snapshot, even though it has the same name as the files referenced have<a name="line.254"></a>
-<span class="sourceLineNo">255</span>        // probably changed.<a name="line.255"></a>
-<span class="sourceLineNo">256</span>        if (files == null || files.hasBeenModified(snapshot.getModificationTime())) {<a name="line.256"></a>
-<span class="sourceLineNo">257</span>          // get all files for the snapshot and create a new info<a name="line.257"></a>
-<span class="sourceLineNo">258</span>          Collection&lt;String&gt; storedFiles = fileInspector.filesUnderSnapshot(snapshot.getPath());<a name="line.258"></a>
-<span class="sourceLineNo">259</span>          files = new SnapshotDirectoryInfo(snapshot.getModificationTime(), storedFiles);<a name="line.259"></a>
-<span class="sourceLineNo">260</span>        }<a name="line.260"></a>
-<span class="sourceLineNo">261</span>        // 3.2 add all the files to cache<a name="line.261"></a>
-<span class="sourceLineNo">262</span>        this.cache.addAll(files.getFiles());<a name="line.262"></a>
-<span class="sourceLineNo">263</span>        known.put(name, files);<a name="line.263"></a>
-<span class="sourceLineNo">264</span>      }<a name="line.264"></a>
-<span class="sourceLineNo">265</span>    }<a name="line.265"></a>
-<span class="sourceLineNo">266</span><a name="line.266"></a>
-<span class="sourceLineNo">267</span>    // 4. set the snapshots we are tracking<a name="line.267"></a>
-<span class="sourceLineNo">268</span>    this.snapshots.clear();<a name="line.268"></a>
-<span class="sourceLineNo">269</span>    this.snapshots.putAll(known);<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>  @VisibleForTesting List&lt;String&gt; getSnapshotsInProgress(<a name="line.272"></a>
-<span class="sourceLineNo">273</span>    final SnapshotManager snapshotManager) throws IOException {<a name="line.273"></a>
-<span class="sourceLineNo">274</span>    List&lt;String&gt; snapshotInProgress = Lists.newArrayList();<a name="line.274"></a>
-<span class="sourceLineNo">275</span>    // only add those files to the cache, but not to the known snapshots<a name="line.275"></a>
-<span class="sourceLineNo">276</span>    Path snapshotTmpDir = new Path(snapshotDir, SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME);<a name="line.276"></a>
-<span class="sourceLineNo">277</span>    // only add those files to the cache, but not to the known snapshots<a name="line.277"></a>
-<span class="sourceLineNo">278</span>    FileStatus[] running = FSUtils.listStatus(fs, snapshotTmpDir);<a name="line.278"></a>
-<span class="sourceLineNo">279</span>    if (running != null) {<a name="line.279"></a>
-<span class="sourceLineNo">280</span>      for (FileStatus run : running) {<a name="line.280"></a>
-<span class="sourceLineNo">281</span>        ReentrantLock lock = null;<a name="line.281"></a>
-<span class="sourceLineNo">282</span>        if (snapshotManager != null) {<a name="line.282"></a>
-<span class="sourceLineNo">283</span>          lock = snapshotManager.getLocks().acquireLock(run.getPath().getName());<a name="line.283"></a>
-<span class="sourceLineNo">284</span>        }<a name="line.284"></a>
-<span class="sourceLineNo">285</span>        try {<a name="line.285"></a>
-<span class="sourceLineNo">286</span>          snapshotInProgress.addAll(fileInspector.filesUnderSnapshot(run.getPath()));<a name="line.286"></a>
-<span class="sourceLineNo">287</span>        } catch (CorruptedSnapshotException e) {<a name="line.287"></a>
-<span class="sourceLineNo">288</span>          // See HBASE-16464<a name="line.288"></a>
-<span class="sourceLineNo">289</span>          if (e.getCause() instanceof FileNotFoundException) {<a name="line.289"></a>
-<span class="sourceLineNo">290</span>            // If the snapshot is corrupt, we will delete it<a name="line.290"></a>
-<span class="sourceLineNo">291</span>            fs.delete(run.getPath(), true);<a name="line.291"></a>
-<span class="sourceLineNo">292</span>            LOG.warn("delete the " + run.getPath() + " due to exception:", e.getCause());<a name="line.292"></a>
-<span class="sourceLineNo">293</span>          } else {<a name="line.293"></a>
-<span class="sourceLineNo">294</span>            throw e;<a name="line.294"></a>
-<span class="sourceLineNo">295</span>          }<a name="line.295"></a>
-<span class="sourceLineNo">296</span>        } finally {<a name="line.296"></a>
-<span class="sourceLineNo">297</span>          if (lock != null) {<a name="line.297"></a>
-<span class="sourceLineNo">298</span>            lock.unlock();<a name="line.298"></a>
-<span class="sourceLineNo">299</span>          }<a name="line.299"></a>
-<span class="sourceLineNo">300</span>        }<a name="line.300"></a>
-<span class="sourceLineNo">301</span>      }<a name="line.301"></a>
-<span class="sourceLineNo">302</span>    }<a name="line.302"></a>
-<span class="sourceLineNo">303</span>    return snapshotInProgress;<a name="line.303"></a>
-<span class="sourceLineNo">304</span>  }<a name="line.304"></a>
-<span class="sourceLineNo">305</span><a name="line.305"></a>
-<span class="sourceLineNo">306</span>  /**<a name="line.306"></a>
-<span class="sourceLineNo">307</span>   * Simple helper task that just periodically attempts to refresh the cache<a name="line.307"></a>
-<span class="sourceLineNo">308</span>   */<a name="line.308"></a>
-<span class="sourceLineNo">309</span>  public class RefreshCacheTask extends TimerTask {<a name="line.309"></a>
-<span class="sourceLineNo">310</span>    @Override<a name="line.310"></a>
-<span class="sourceLineNo">311</span>    public void run() {<a name="line.311"></a>
-<span class="sourceLineNo">312</span>      try {<a name="line.312"></a>
-<span class="sourceLineNo">313</span>        SnapshotFileCache.this.refreshCache();<a name="line.313"></a>
-<span class="sourceLineNo">314</span>      } catch (IOException e) {<a name="line.314"></a>
-<span class="sourceLineNo">315</span>        LOG.warn("Failed to refresh snapshot hfile cache!", e);<a name="line.315"></a>
-<span class="sourceLineNo">316</span>      }<a name="line.316"></a>
-<span class="sourceLineNo">317</span>    }<a name="line.317"></a>
-<span class="sourceLineNo">318</span>  }<a name="line.318"></a>
-<span class="sourceLineNo">319</span><a name="line.319"></a>
-<span class="sourceLineNo">320</span>  @Override<a name="line.320"></a>
-<span class="sourceLineNo">321</span>  public void stop(String why) {<a name="line.321"></a>
-<span class="sourceLineNo">322</span>    if (!this.stop) {<a name="line.322"></a>
-<span class="sourceLineNo">323</span>      this.stop = true;<a name="line.323"></a>
-<span class="sourceLineNo">324</span>      this.refreshTimer.cancel();<a name="line.324"></a>
+<span class="sourceLineNo">187</span>    Lock lock = null;<a name="line.187"></a>
+<span class="sourceLineNo">188</span>    if (snapshotManager != null) {<a name="line.188"></a>
+<span class="sourceLineNo">189</span>      lock = snapshotManager.getTakingSnapshotLock().writeLock();<a name="line.189"></a>
+<span class="sourceLineNo">190</span>    }<a name="line.190"></a>
+<span class="sourceLineNo">191</span>    if (lock == null || lock.tryLock()) {<a name="line.191"></a>
+<span class="sourceLineNo">192</span>      try {<a name="line.192"></a>
+<span class="sourceLineNo">193</span>        if (snapshotManager == null || snapshotManager.isTakingAnySnapshot()) {<a name="line.193"></a>
+<span class="sourceLineNo">194</span>          LOG.warn("Not checking unreferenced files since snapshot is running, it will "<a name="line.194"></a>
+<span class="sourceLineNo">195</span>              + "skip to clean the HFiles this time");<a name="line.195"></a>
+<span class="sourceLineNo">196</span>          return unReferencedFiles;<a name="line.196"></a>
+<span class="sourceLineNo">197</span>        }<a name="line.197"></a>
+<span class="sourceLineNo">198</span>        for (FileStatus file : files) {<a name="line.198"></a>
+<span class="sourceLineNo">199</span>          String fileName = file.getPath().getName();<a name="line.199"></a>
+<span class="sourceLineNo">200</span>          if (!refreshed &amp;&amp; !cache.contains(fileName)) {<a name="line.200"></a>
+<span class="sourceLineNo">201</span>            refreshCache();<a name="line.201"></a>
+<span class="sourceLineNo">202</span>            refreshed = true;<a name="line.202"></a>
+<span class="sourceLineNo">203</span>          }<a name="line.203"></a>
+<span class="sourceLineNo">204</span>          if (cache.contains(fileName)) {<a name="line.204"></a>
+<span class="sourceLineNo">205</span>            continue;<a name="line.205"></a>
+<span class="sourceLineNo">206</span>          }<a name="line.206"></a>
+<span class="sourceLineNo">207</span>          if (snapshotsInProgress == null) {<a name="line.207"></a>
+<span class="sourceLineNo">208</span>            snapshotsInProgress = getSnapshotsInProgress();<a name="line.208"></a>
+<span class="sourceLineNo">209</span>          }<a name="line.209"></a>
+<span class="sourceLineNo">210</span>          if (snapshotsInProgress.contains(fileName)) {<a name="line.210"></a>
+<span class="sourceLineNo">211</span>            continue;<a name="line.211"></a>
+<span class="sourceLineNo">212</span>          }<a name="line.212"></a>
+<span class="sourceLineNo">213</span>          unReferencedFiles.add(file);<a name="line.213"></a>
+<span class="sourceLineNo">214</span>        }<a name="line.214"></a>
+<span class="sourceLineNo">215</span>      } finally {<a name="line.215"></a>
+<span class="sourceLineNo">216</span>        if (lock != null) {<a name="line.216"></a>
+<span class="sourceLineNo">217</span>          lock.unlock();<a name="line.217"></a>
+<span class="sourceLineNo">218</span>        }<a name="line.218"></a>
+<span class="sourceLineNo">219</span>      }<a name="line.219"></a>
+<span class="sourceLineNo">220</span>    }<a name="line.220"></a>
+<span class="sourceLineNo">221</span>    return unReferencedFiles;<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>  private synchronized void refreshCache() throws IOException {<a name="line.224"></a>
+<span class="sourceLineNo">225</span>    // get the status of the snapshots directory and check if it is has changes<a name="line.225"></a>
+<span class="sourceLineNo">226</span>    FileStatus dirStatus;<a name="line.226"></a>
+<span class="sourceLineNo">227</span>    try {<a name="line.227"></a>
+<span class="sourceLineNo">228</span>      dirStatus = fs.getFileStatus(snapshotDir);<a name="line.228"></a>
+<span class="sourceLineNo">229</span>    } catch (FileNotFoundException e) {<a name="line.229"></a>
+<span class="sourceLineNo">230</span>      if (this.cache.size() &gt; 0) {<a name="line.230"></a>
+<span class="sourceLineNo">231</span>        LOG.error("Snapshot directory: " + snapshotDir + " doesn't exist");<a name="line.231"></a>
+<span class="sourceLineNo">232</span>      }<a name="line.232"></a>
+<span class="sourceLineNo">233</span>      return;<a name="line.233"></a>
+<span class="sourceLineNo">234</span>    }<a name="line.234"></a>
+<span class="sourceLineNo">235</span><a name="line.235"></a>
+<span class="sourceLineNo">236</span>    // if the snapshot directory wasn't modified since we last check, we are done<a name="line.236"></a>
+<span class="sourceLineNo">237</span>    if (dirStatus.getModificationTime() &lt;= this.lastModifiedTime) return;<a name="line.237"></a>
+<span class="sourceLineNo">238</span><a name="line.238"></a>
+<span class="sourceLineNo">239</span>    // directory was modified, so we need to reload our cache<a name="line.239"></a>
+<span class="sourceLineNo">240</span>    // there could be a slight race here where we miss the cache, check the directory modification<a name="line.240"></a>
+<span class="sourceLineNo">241</span>    // time, then someone updates the directory, causing us to not scan the directory again.<a name="line.241"></a>
+<span class="sourceLineNo">242</span>    // However, snapshot directories are only created once, so this isn't an issue.<a name="line.242"></a>
+<span class="sourceLineNo">243</span><a name="line.243"></a>
+<span class="sourceLineNo">244</span>    // 1. update the modified time<a name="line.244"></a>
+<span class="sourceLineNo">245</span>    this.lastModifiedTime = dirStatus.getModificationTime();<a name="line.245"></a>
+<span class="sourceLineNo">246</span><a name="line.246"></a>
+<span class="sourceLineNo">247</span>    // 2.clear the cache<a name="line.247"></a>
+<span class="sourceLineNo">248</span>    this.cache.clear();<a name="line.248"></a>
+<span class="sourceLineNo">249</span>    Map&lt;String, SnapshotDirectoryInfo&gt; known = new HashMap&lt;&gt;();<a name="line.249"></a>
+<span class="sourceLineNo">250</span><a name="line.250"></a>
+<span class="sourceLineNo">251</span>    // 3. check each of the snapshot directories<a name="line.251"></a>
+<span class="sourceLineNo">252</span>    FileStatus[] snapshots = FSUtils.listStatus(fs, snapshotDir);<a name="line.252"></a>
+<span class="sourceLineNo">253</span>    if (snapshots == null) {<a name="line.253"></a>
+<span class="sourceLineNo">254</span>      // remove all the remembered snapshots because we don't have any left<a name="line.254"></a>
+<span class="sourceLineNo">255</span>      if (LOG.isDebugEnabled() &amp;&amp; this.snapshots.size() &gt; 0) {<a name="line.255"></a>
+<span class="sourceLineNo">256</span>        LOG.debug("No snapshots on-disk, cache empty");<a name="line.256"></a>
+<span class="sourceLineNo">257</span>      }<a name="line.257"></a>
+<span class="sourceLineNo">258</span>      this.snapshots.clear();<a name="line.258"></a>
+<span class="sourceLineNo">259</span>      return;<a name="line.259"></a>
+<span class="sourceLineNo">260</span>    }<a name="line.260"></a>
+<span class="sourceLineNo">261</span><a name="line.261"></a>
+<span class="sourceLineNo">262</span>    // 3.1 iterate through the on-disk snapshots<a name="line.262"></a>
+<span class="sourceLineNo">263</span>    for (FileStatus snapshot : snapshots) {<a name="line.263"></a>
+<span class="sourceLineNo">264</span>      String name = snapshot.getPath().getName();<a name="line.264"></a>
+<span class="sourceLineNo">265</span>      // its not the tmp dir,<a name="line.265"></a>
+<span class="sourceLineNo">266</span>      if (!name.equals(SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME)) {<a name="line.266"></a>
+<span class="sourceLineNo">267</span>        SnapshotDirectoryInfo files = this.snapshots.remove(name);<a name="line.267"></a>
+<span class="sourceLineNo">268</span>        // 3.1.1 if we don't know about the snapshot or its been modified, we need to update the<a name="line.268"></a>
+<span class="sourceLineNo">269</span>        // files the latter could occur where I create a snapshot, then delete it, and then make a<a name="line.269"></a>
+<span class="sourceLineNo">270</span>        // new snapshot with the same name. We will need to update the cache the information from<a name="line.270"></a>
+<span class="sourceLineNo">271</span>        // that new snapshot, even though it has the same name as the files referenced have<a name="line.271"></a>
+<span class="sourceLineNo">272</span>        // probably changed.<a name="line.272"></a>
+<span class="sourceLineNo">273</span>        if (files == null || files.hasBeenModified(snapshot.getModificationTime())) {<a name="line.273"></a>
+<span class="sourceLineNo">274</span>          // get all files for the snapshot and create a new info<a name="line.274"></a>
+<span class="sourceLineNo">275</span>          Collection&lt;String&gt; storedFiles = fileInspector.filesUnderSnapshot(snapshot.getPath());<a name="line.275"></a>
+<span class="sourceLineNo">276</span>          files = new SnapshotDirectoryInfo(snapshot.getModificationTime(), storedFiles);<a name="line.276"></a>
+<span class="sourceLineNo">277</span>        }<a name="line.277"></a>
+<span class="sourceLineNo">278</span>        // 3.2 add all the files to cache<a name="line.278"></a>
+<span class="sourceLineNo">279</span>        this.cache.addAll(files.getFiles());<a name="line.279"></a>
+<span class="sourceLineNo">280</span>        known.put(name, files);<a name="line.280"></a>
+<span class="sourceLineNo">281</span>      }<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>
+<span class="sourceLineNo">284</span>    // 4. set the snapshots we are tracking<a name="line.284"></a>
+<span class="sourceLineNo">285</span>    this.snapshots.clear();<a name="line.285"></a>
+<span class="sourceLineNo">286</span>    this.snapshots.putAll(known);<a name="line.286"></a>
+<span class="sourceLineNo">287</span>  }<a name="line.287"></a>
+<span class="sourceLineNo">288</span><a name="line.288"></a>
+<span class="sourceLineNo">289</span>  @VisibleForTesting<a name="line.289"></a>
+<span class="sourceLineNo">290</span>  List&lt;String&gt; getSnapshotsInProgress() throws IOException {<a name="line.290"></a>
+<span class="sourceLineNo">291</span>    List&lt;String&gt; snapshotInProgress = Lists.newArrayList();<a name="line.291"></a>
+<span class="sourceLineNo">292</span>    // only add those files to the cache, but not to the known snapshots<a name="line.292"></a>
+<span class="sourceLineNo">293</span>    Path snapshotTmpDir = new Path(snapshotDir, SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME);<a name="line.293"></a>
+<span class="sourceLineNo">294</span>    FileStatus[] running = FSUtils.listStatus(fs, snapshotTmpDir);<a name="line.294"></a>
+<span class="sourceLineNo">295</span>    if (running != null) {<a name="line.295"></a>
+<span class="sourceLineNo">296</span>      for (FileStatus run : running) {<a name="line.296"></a>
+<span class="sourceLineNo">297</span>        try {<a name="line.297"></a>
+<span class="sourceLineNo">298</span>          snapshotInProgress.addAll(fileInspector.filesUnderSnapshot(run.getPath()));<a name="line.298"></a>
+<span class="sourceLineNo">299</span>        } catch (CorruptedSnapshotException e) {<a name="line.299"></a>
+<span class="sourceLineNo">300</span>          // See HBASE-16464<a name="line.300"></a>
+<span class="sourceLineNo">301</span>          if (e.getCause() instanceof FileNotFoundException) {<a name="line.301"></a>
+<span class="sourceLineNo">302</span>            // If the snapshot is corrupt, we will delete it<a name="line.302"></a>
+<span class="sourceLineNo">303</span>            fs.delete(run.getPath(), true);<a name="line.303"></a>
+<span class="sourceLineNo">304</span>            LOG.warn("delete the " + run.getPath() + " due to exception:", e.getCause());<a name="line.304"></a>
+<span class="sourceLineNo">305</span>          } else {<a name="line.305"></a>
+<span class="sourceLineNo">306</span>            throw e;<a name="line.306"></a>
+<span class="sourceLineNo">307</span>          }<a name="line.307"></a>
+<span class="sourceLineNo">308</span>        }<a name="line.308"></a>
+<span class="sourceLineNo">309</span>      }<a name="line.309"></a>
+<span class="sourceLineNo">310</span>    }<a name="line.310"></a>
+<span class="sourceLineNo">311</span>    return snapshotInProgress;<a name="line.311"></a>
+<span class="sourceLineNo">312</span>  }<a name="line.312"></a>
+<span class="sourceLineNo">313</span><a name="line.313"></a>
+<span class="sourceLineNo">314</span>  /**<a name="line.314"></a>
+<span class="sourceLineNo">315</span>   * Simple helper task that just periodically attempts to refresh the cache<a name="line.315"></a>
+<span class="sourceLineNo">316</span>   */<a name="line.316"></a>
+<span class="sourceLineNo">317</span>  public class RefreshCacheTask extends TimerTask {<a name="line.317"></a>
+<span class="sourceLineNo">318</span>    @Override<a name="line.318"></a>
+<span class="sourceLineNo">319</span>    public void run() {<a name="line.319"></a>
+<span class="sourceLineNo">320</span>      try {<a name="line.320"></a>
+<span class="sourceLineNo">321</span>        SnapshotFileCache.this.refreshCache();<a name="line.321"></a>
+<span class="sourceLineNo">322</span>      } catch (IOException e) {<a name="line.322"></a>
+<span class="sourceLineNo">323</span>        LOG.warn("Failed to refresh snapshot hfile cache!", e);<a name="line.323"></a>
+<span class="sourceLineNo">324</span>      }<a name="line.324"></a>
 <span class="sourceLineNo">325</span>    }<a name="line.325"></a>
-<span class="sourceLineNo">326</span><a name="line.326"></a>
-<span class="sourceLineNo">327</span>  }<a name="line.327"></a>
-<span class="sourceLineNo">328</span><a name="line.328"></a>
-<span class="sourceLineNo">329</span>  @Override<a name="line.329"></a>
-<span class="sourceLineNo">330</span>  public boolean isStopped() {<a name="line.330"></a>
-<span class="sourceLineNo">331</span>    return this.stop;<a name="line.331"></a>
-<span class="sourceLineNo">332</span>  }<a name="line.332"></a>
-<span class="sourceLineNo">333</span><a name="line.333"></a>
-<span class="sourceLineNo">334</span>  /**<a name="line.334"></a>
-<span class="sourceLineNo">335</span>   * Information about a snapshot directory<a name="line.335"></a>
-<span class="sourceLineNo">336</span>   */<a name="line.336"></a>
-<span class="sourceLineNo">337</span>  private static class SnapshotDirectoryInfo {<a name="line.337"></a>
-<span class="sourceLineNo">338</span>    long lastModified;<a name="line.338"></a>
-<span class="sourceLineNo">339</span>    Collection&lt;String&gt; files;<a name="line.339"></a>
-<span class="sourceLineNo">340</span><a name="line.340"></a>
-<span class="sourceLineNo">341</span>    public SnapshotDirectoryInfo(long mtime, Collection&lt;String&gt; files) {<a name="line.341"></a>
-<span class="sourceLineNo">342</span>      this.lastModified = mtime;<a name="line.342"></a>
-<span class="sourceLineNo">343</span>      this.files = files;<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    }<a name="line.344"></a>
-<span class="sourceLineNo">345</span><a name="line.345"></a>
-<span class="sourceLineNo">346</span>    /**<a name="line.346"></a>
-<span class="sourceLineNo">347</span>     * @return the hfiles in the snapshot when &lt;tt&gt;this&lt;/tt&gt; was made.<a name="line.347"></a>
-<span class="sourceLineNo">348</span>     */<a name="line.348"></a>
-<span class="sourceLineNo">349</span>    public Collection&lt;String&gt; getFiles() {<a name="line.349"></a>
-<span class="sourceLineNo">350</span>      return this.files;<a name="line.350"></a>
-<span class="sourceLineNo">351</span>    }<a name="line.351"></a>
-<span class="sourceLineNo">352</span><a name="line.352"></a>
-<span class="sourceLineNo">353</span>    /**<a name="line.353"></a>
-<span class="sourceLineNo">354</span>     * Check if the snapshot directory has been modified<a name="line.354"></a>
-<span class="sourceLineNo">355</span>     * @param mtime current modification time of the directory<a name="line.355"></a>
-<span class="sourceLineNo">356</span>     * @return &lt;tt&gt;true&lt;/tt&gt; if it the modification time of the directory is newer time when we<a name="line.356"></a>
-<span class="sourceLineNo">357</span>     *         created &lt;tt&gt;this&lt;/tt&gt;<a name="line.357"></a>
-<span class="sourceLineNo">358</span>     */<a name="line.358"></a>
-<span class="sourceLineNo">359</span>    public boolean hasBeenModified(long mtime) {<a name="line.359"></a>
-<span class="sourceLineNo">360</span>      return this.lastModified &lt; mtime;<a name="line.360"></a>
-<span class="sourceLineNo">361</span>    }<a name="line.361"></a>
-<span class="sourceLineNo">362</span>  }<a name="line.362"></a>
-<span class="sourceLineNo">363</span>}<a name="line.363"></a>
+<span class="sourceLineNo">326</span>  }<a name="line.326"></a>
+<span class="sourceLineNo">327</span><a name="line.327"></a>
+<span class="sourceLineNo">328</span>  @Override<a name="line.328"></a>
+<span class="sourceLineNo">329</span>  public void stop(String why) {<a name="line.329"></a>
+<span class="sourceLineNo">330</span>    if (!this.stop) {<a name="line.330"></a>
+<span class="sourceLineNo">331</span>      this.stop = true;<a name="line.331"></a>
+<span class="sourceLineNo">332</span>      this.refreshTimer.cancel();<a name="line.332"></a>
+<span class="sourceLineNo">333</span>    }<a name="line.333"></a>
+<span class="sourceLineNo">334</span><a name="line.334"></a>
+<span class="sourceLineNo">335</span>  }<a name="line.335"></a>
+<span class="sourceLineNo">336</span><a name="line.336"></a>
+<span class="sourceLineNo">337</span>  @Override<a name="line.337"></a>
+<span class="sourceLineNo">338</span>  public boolean isStopped() {<a name="line.338"></a>
+<span class="sourceLineNo">339</span>    return this.stop;<a name="line.339"></a>
+<span class="sourceLineNo">340</span>  }<a name="line.340"></a>
+<span class="sourceLineNo">341</span><a name="line.341"></a>
+<span class="sourceLineNo">342</span>  /**<a name="line.342"></a>
+<span class="sourceLineNo">343</span>   * Information about a snapshot directory<a name="line.343"></a>
+<span class="sourceLineNo">344</span>   */<a name="line.344"></a>
+<span class="sourceLineNo">345</span>  private static class SnapshotDirectoryInfo {<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    long lastModified;<a name="line.346"></a>
+<span class="sourceLineNo">347</span>    Collection&lt;String&gt; files;<a name="line.347"></a>
+<span class="sourceLineNo">348</span><a name="line.348"></a>
+<span class="sourceLineNo">349</span>    public SnapshotDirectoryInfo(long mtime, Collection&lt;String&gt; files) {<a name="line.349"></a>
+<span class="sourceLineNo">350</span>      this.lastModified = mtime;<a name="line.350"></a>
+<span class="sourceLineNo">351</span>      this.files = files;<a name="line.351"></a>
+<span class="sourceLineNo">352</span>    }<a name="line.352"></a>
+<span class="sourceLineNo">353</span><a name="line.353"></a>
+<span class="sourceLineNo">354</span>    /**<a name="line.354"></a>
+<span class="sourceLineNo">355</span>     * @return the hfiles in the snapshot when &lt;tt&gt;this&lt;/tt&gt; was made.<a name="line.355"></a>
+<span class="sourceLineNo">356</span>     */<a name="line.356"></a>
+<span class="sourceLineNo">357</span>    public Collection&lt;String&gt; getFiles() {<a name="line.357"></a>
+<span class="sourceLineNo">358</span>      return this.files;<a name="line.358"></a>
+<span class="sourceLineNo">359</span>    }<a name="line.359"></a>
+<span class="sourceLineNo">360</span><a name="line.360"></a>
+<span class="sourceLineNo">361</span>    /**<a name="line.361"></a>
+<span class="sourceLineNo">362</span>     * Check if the snapshot directory has been modified<a name="line.362"></a>
+<span class="sourceLineNo">363</span>     * @param mtime current modification time of the directory<a name="line.363"></a>
+<span class="sourceLineNo">364</span>     * @return &lt;tt&gt;true&lt;/tt&gt; if it the modification time of the directory is newer time when we<a name="line.364"></a>
+<span class="sourceLineNo">365</span>     *         created &lt;tt&gt;this&lt;/tt&gt;<a name="line.365"></a>
+<span class="sourceLineNo">366</span>     */<a name="line.366"></a>
+<span class="sourceLineNo">367</span>    public boolean hasBeenModified(long mtime) {<a name="line.367"></a>
+<span class="sourceLineNo">368</span>      return this.lastModified &lt; mtime;<a name="line.368"></a>
+<span class="sourceLineNo">369</span>    }<a name="line.369"></a>
+<span class="sourceLineNo">370</span>  }<a name="line.370"></a>
+<span class="sourceLineNo">371</span>}<a name="line.371"></a>
 
 
 
index 206b623..796ddc1 100644 (file)
@@ -35,7 +35,7 @@
 <span class="sourceLineNo">027</span>import java.util.Set;<a name="line.27"></a>
 <span class="sourceLineNo">028</span>import java.util.Timer;<a name="line.28"></a>
 <span class="sourceLineNo">029</span>import java.util.TimerTask;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import java.util.concurrent.locks.ReentrantLock;<a name="line.30"></a>
+<span class="sourceLineNo">030</span>import java.util.concurrent.locks.Lock;<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.FileStatus;<a name="line.33"></a>
 <span class="sourceLineNo">184</span>    List&lt;FileStatus&gt; unReferencedFiles = Lists.newArrayList();<a name="line.184"></a>
 <span class="sourceLineNo">185</span>    List&lt;String&gt; snapshotsInProgress = null;<a name="line.185"></a>
 <span class="sourceLineNo">186</span>    boolean refreshed = false;<a name="line.186"></a>
-<span class="sourceLineNo">187</span>    for (FileStatus file : files) {<a name="line.187"></a>
-<span class="sourceLineNo">188</span>      String fileName = file.getPath().getName();<a name="line.188"></a>
-<span class="sourceLineNo">189</span>      if (!refreshed &amp;&amp; !cache.contains(fileName)) {<a name="line.189"></a>
-<span class="sourceLineNo">190</span>        refreshCache();<a name="line.190"></a>
-<span class="sourceLineNo">191</span>        refreshed = true;<a name="line.191"></a>
-<span class="sourceLineNo">192</span>      }<a name="line.192"></a>
-<span class="sourceLineNo">193</span>      if (cache.contains(fileName)) {<a name="line.193"></a>
-<span class="sourceLineNo">194</span>        continue;<a name="line.194"></a>
-<span class="sourceLineNo">195</span>      }<a name="line.195"></a>
-<span class="sourceLineNo">196</span>      if (snapshotsInProgress == null) {<a name="line.196"></a>
-<span class="sourceLineNo">197</span>        snapshotsInProgress = getSnapshotsInProgress(snapshotManager);<a name="line.197"></a>
-<span class="sourceLineNo">198</span>      }<a name="line.198"></a>
-<span class="sourceLineNo">199</span>      if (snapshotsInProgress.contains(fileName)) {<a name="line.199"></a>
-<span class="sourceLineNo">200</span>        continue;<a name="line.200"></a>
-<span class="sourceLineNo">201</span>      }<a name="line.201"></a>
-<span class="sourceLineNo">202</span>      unReferencedFiles.add(file);<a name="line.202"></a>
-<span class="sourceLineNo">203</span>    }<a name="line.203"></a>
-<span class="sourceLineNo">204</span>    return unReferencedFiles;<a name="line.204"></a>
-<span class="sourceLineNo">205</span>  }<a name="line.205"></a>
-<span class="sourceLineNo">206</span><a name="line.206"></a>
-<span class="sourceLineNo">207</span>  private synchronized void refreshCache() throws IOException {<a name="line.207"></a>
-<span class="sourceLineNo">208</span>    // get the status of the snapshots directory and check if it is has changes<a name="line.208"></a>
-<span class="sourceLineNo">209</span>    FileStatus dirStatus;<a name="line.209"></a>
-<span class="sourceLineNo">210</span>    try {<a name="line.210"></a>
-<span class="sourceLineNo">211</span>      dirStatus = fs.getFileStatus(snapshotDir);<a name="line.211"></a>
-<span class="sourceLineNo">212</span>    } catch (FileNotFoundException e) {<a name="line.212"></a>
-<span class="sourceLineNo">213</span>      if (this.cache.size() &gt; 0) {<a name="line.213"></a>
-<span class="sourceLineNo">214</span>        LOG.error("Snapshot directory: " + snapshotDir + " doesn't exist");<a name="line.214"></a>
-<span class="sourceLineNo">215</span>      }<a name="line.215"></a>
-<span class="sourceLineNo">216</span>      return;<a name="line.216"></a>
-<span class="sourceLineNo">217</span>    }<a name="line.217"></a>
-<span class="sourceLineNo">218</span><a name="line.218"></a>
-<span class="sourceLineNo">219</span>    // if the snapshot directory wasn't modified since we last check, we are done<a name="line.219"></a>
-<span class="sourceLineNo">220</span>    if (dirStatus.getModificationTime() &lt;= this.lastModifiedTime) return;<a name="line.220"></a>
-<span class="sourceLineNo">221</span><a name="line.221"></a>
-<span class="sourceLineNo">222</span>    // directory was modified, so we need to reload our cache<a name="line.222"></a>
-<span class="sourceLineNo">223</span>    // there could be a slight race here where we miss the cache, check the directory modification<a name="line.223"></a>
-<span class="sourceLineNo">224</span>    // time, then someone updates the directory, causing us to not scan the directory again.<a name="line.224"></a>
-<span class="sourceLineNo">225</span>    // However, snapshot directories are only created once, so this isn't an issue.<a name="line.225"></a>
-<span class="sourceLineNo">226</span><a name="line.226"></a>
-<span class="sourceLineNo">227</span>    // 1. update the modified time<a name="line.227"></a>
-<span class="sourceLineNo">228</span>    this.lastModifiedTime = dirStatus.getModificationTime();<a name="line.228"></a>
-<span class="sourceLineNo">229</span><a name="line.229"></a>
-<span class="sourceLineNo">230</span>    // 2.clear the cache<a name="line.230"></a>
-<span class="sourceLineNo">231</span>    this.cache.clear();<a name="line.231"></a>
-<span class="sourceLineNo">232</span>    Map&lt;String, SnapshotDirectoryInfo&gt; known = new HashMap&lt;&gt;();<a name="line.232"></a>
-<span class="sourceLineNo">233</span><a name="line.233"></a>
-<span class="sourceLineNo">234</span>    // 3. check each of the snapshot directories<a name="line.234"></a>
-<span class="sourceLineNo">235</span>    FileStatus[] snapshots = FSUtils.listStatus(fs, snapshotDir);<a name="line.235"></a>
-<span class="sourceLineNo">236</span>    if (snapshots == null) {<a name="line.236"></a>
-<span class="sourceLineNo">237</span>      // remove all the remembered snapshots because we don't have any left<a name="line.237"></a>
-<span class="sourceLineNo">238</span>      if (LOG.isDebugEnabled() &amp;&amp; this.snapshots.size() &gt; 0) {<a name="line.238"></a>
-<span class="sourceLineNo">239</span>        LOG.debug("No snapshots on-disk, cache empty");<a name="line.239"></a>
-<span class="sourceLineNo">240</span>      }<a name="line.240"></a>
-<span class="sourceLineNo">241</span>      this.snapshots.clear();<a name="line.241"></a>
-<span class="sourceLineNo">242</span>      return;<a name="line.242"></a>
-<span class="sourceLineNo">243</span>    }<a name="line.243"></a>
-<span class="sourceLineNo">244</span><a name="line.244"></a>
-<span class="sourceLineNo">245</span>    // 3.1 iterate through the on-disk snapshots<a name="line.245"></a>
-<span class="sourceLineNo">246</span>    for (FileStatus snapshot : snapshots) {<a name="line.246"></a>
-<span class="sourceLineNo">247</span>      String name = snapshot.getPath().getName();<a name="line.247"></a>
-<span class="sourceLineNo">248</span>      // its not the tmp dir,<a name="line.248"></a>
-<span class="sourceLineNo">249</span>      if (!name.equals(SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME)) {<a name="line.249"></a>
-<span class="sourceLineNo">250</span>        SnapshotDirectoryInfo files = this.snapshots.remove(name);<a name="line.250"></a>
-<span class="sourceLineNo">251</span>        // 3.1.1 if we don't know about the snapshot or its been modified, we need to update the<a name="line.251"></a>
-<span class="sourceLineNo">252</span>        // files the latter could occur where I create a snapshot, then delete it, and then make a<a name="line.252"></a>
-<span class="sourceLineNo">253</span>        // new snapshot with the same name. We will need to update the cache the information from<a name="line.253"></a>
-<span class="sourceLineNo">254</span>        // that new snapshot, even though it has the same name as the files referenced have<a name="line.254"></a>
-<span class="sourceLineNo">255</span>        // probably changed.<a name="line.255"></a>
-<span class="sourceLineNo">256</span>        if (files == null || files.hasBeenModified(snapshot.getModificationTime())) {<a name="line.256"></a>
-<span class="sourceLineNo">257</span>          // get all files for the snapshot and create a new info<a name="line.257"></a>
-<span class="sourceLineNo">258</span>          Collection&lt;String&gt; storedFiles = fileInspector.filesUnderSnapshot(snapshot.getPath());<a name="line.258"></a>
-<span class="sourceLineNo">259</span>          files = new SnapshotDirectoryInfo(snapshot.getModificationTime(), storedFiles);<a name="line.259"></a>
-<span class="sourceLineNo">260</span>        }<a name="line.260"></a>
-<span class="sourceLineNo">261</span>        // 3.2 add all the files to cache<a name="line.261"></a>
-<span class="sourceLineNo">262</span>        this.cache.addAll(files.getFiles());<a name="line.262"></a>
-<span class="sourceLineNo">263</span>        known.put(name, files);<a name="line.263"></a>
-<span class="sourceLineNo">264</span>      }<a name="line.264"></a>
-<span class="sourceLineNo">265</span>    }<a name="line.265"></a>
-<span class="sourceLineNo">266</span><a name="line.266"></a>
-<span class="sourceLineNo">267</span>    // 4. set the snapshots we are tracking<a name="line.267"></a>
-<span class="sourceLineNo">268</span>    this.snapshots.clear();<a name="line.268"></a>
-<span class="sourceLineNo">269</span>    this.snapshots.putAll(known);<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>  @VisibleForTesting List&lt;String&gt; getSnapshotsInProgress(<a name="line.272"></a>
-<span class="sourceLineNo">273</span>    final SnapshotManager snapshotManager) throws IOException {<a name="line.273"></a>
-<span class="sourceLineNo">274</span>    List&lt;String&gt; snapshotInProgress = Lists.newArrayList();<a name="line.274"></a>
-<span class="sourceLineNo">275</span>    // only add those files to the cache, but not to the known snapshots<a name="line.275"></a>
-<span class="sourceLineNo">276</span>    Path snapshotTmpDir = new Path(snapshotDir, SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME);<a name="line.276"></a>
-<span class="sourceLineNo">277</span>    // only add those files to the cache, but not to the known snapshots<a name="line.277"></a>
-<span class="sourceLineNo">278</span>    FileStatus[] running = FSUtils.listStatus(fs, snapshotTmpDir);<a name="line.278"></a>
-<span class="sourceLineNo">279</span>    if (running != null) {<a name="line.279"></a>
-<span class="sourceLineNo">280</span>      for (FileStatus run : running) {<a name="line.280"></a>
-<span class="sourceLineNo">281</span>        ReentrantLock lock = null;<a name="line.281"></a>
-<span class="sourceLineNo">282</span>        if (snapshotManager != null) {<a name="line.282"></a>
-<span class="sourceLineNo">283</span>          lock = snapshotManager.getLocks().acquireLock(run.getPath().getName());<a name="line.283"></a>
-<span class="sourceLineNo">284</span>        }<a name="line.284"></a>
-<span class="sourceLineNo">285</span>        try {<a name="line.285"></a>
-<span class="sourceLineNo">286</span>          snapshotInProgress.addAll(fileInspector.filesUnderSnapshot(run.getPath()));<a name="line.286"></a>
-<span class="sourceLineNo">287</span>        } catch (CorruptedSnapshotException e) {<a name="line.287"></a>
-<span class="sourceLineNo">288</span>          // See HBASE-16464<a name="line.288"></a>
-<span class="sourceLineNo">289</span>          if (e.getCause() instanceof FileNotFoundException) {<a name="line.289"></a>
-<span class="sourceLineNo">290</span>            // If the snapshot is corrupt, we will delete it<a name="line.290"></a>
-<span class="sourceLineNo">291</span>            fs.delete(run.getPath(), true);<a name="line.291"></a>
-<span class="sourceLineNo">292</span>            LOG.warn("delete the " + run.getPath() + " due to exception:", e.getCause());<a name="line.292"></a>
-<span class="sourceLineNo">293</span>          } else {<a name="line.293"></a>
-<span class="sourceLineNo">294</span>            throw e;<a name="line.294"></a>
-<span class="sourceLineNo">295</span>          }<a name="line.295"></a>
-<span class="sourceLineNo">296</span>        } finally {<a name="line.296"></a>
-<span class="sourceLineNo">297</span>          if (lock != null) {<a name="line.297"></a>
-<span class="sourceLineNo">298</span>            lock.unlock();<a name="line.298"></a>
-<span class="sourceLineNo">299</span>          }<a name="line.299"></a>
-<span class="sourceLineNo">300</span>        }<a name="line.300"></a>
-<span class="sourceLineNo">301</span>      }<a name="line.301"></a>
-<span class="sourceLineNo">302</span>    }<a name="line.302"></a>
-<span class="sourceLineNo">303</span>    return snapshotInProgress;<a name="line.303"></a>
-<span class="sourceLineNo">304</span>  }<a name="line.304"></a>
-<span class="sourceLineNo">305</span><a name="line.305"></a>
-<span class="sourceLineNo">306</span>  /**<a name="line.306"></a>
-<span class="sourceLineNo">307</span>   * Simple helper task that just periodically attempts to refresh the cache<a name="line.307"></a>
-<span class="sourceLineNo">308</span>   */<a name="line.308"></a>
-<span class="sourceLineNo">309</span>  public class RefreshCacheTask extends TimerTask {<a name="line.309"></a>
-<span class="sourceLineNo">310</span>    @Override<a name="line.310"></a>
-<span class="sourceLineNo">311</span>    public void run() {<a name="line.311"></a>
-<span class="sourceLineNo">312</span>      try {<a name="line.312"></a>
-<span class="sourceLineNo">313</span>        SnapshotFileCache.this.refreshCache();<a name="line.313"></a>
-<span class="sourceLineNo">314</span>      } catch (IOException e) {<a name="line.314"></a>
-<span class="sourceLineNo">315</span>        LOG.warn("Failed to refresh snapshot hfile cache!", e);<a name="line.315"></a>
-<span class="sourceLineNo">316</span>      }<a name="line.316"></a>
-<span class="sourceLineNo">317</span>    }<a name="line.317"></a>
-<span class="sourceLineNo">318</span>  }<a name="line.318"></a>
-<span class="sourceLineNo">319</span><a name="line.319"></a>
-<span class="sourceLineNo">320</span>  @Override<a name="line.320"></a>
-<span class="sourceLineNo">321</span>  public void stop(String why) {<a name="line.321"></a>
-<span class="sourceLineNo">322</span>    if (!this.stop) {<a name="line.322"></a>
-<span class="sourceLineNo">323</span>      this.stop = true;<a name="line.323"></a>
-<span class="sourceLineNo">324</span>      this.refreshTimer.cancel();<a name="line.324"></a>
+<span class="sourceLineNo">187</span>    Lock lock = null;<a name="line.187"></a>
+<span class="sourceLineNo">188</span>    if (snapshotManager != null) {<a name="line.188"></a>
+<span class="sourceLineNo">189</span>      lock = snapshotManager.getTakingSnapshotLock().writeLock();<a name="line.189"></a>
+<span class="sourceLineNo">190</span>    }<a name="line.190"></a>
+<span class="sourceLineNo">191</span>    if (lock == null || lock.tryLock()) {<a name="line.191"></a>
+<span class="sourceLineNo">192</span>      try {<a name="line.192"></a>
+<span class="sourceLineNo">193</span>        if (snapshotManager == null || snapshotManager.isTakingAnySnapshot()) {<a name="line.193"></a>
+<span class="sourceLineNo">194</span>          LOG.warn("Not checking unreferenced files since snapshot is running, it will "<a name="line.194"></a>
+<span class="sourceLineNo">195</span>              + "skip to clean the HFiles this time");<a name="line.195"></a>
+<span class="sourceLineNo">196</span>          return unReferencedFiles;<a name="line.196"></a>
+<span class="sourceLineNo">197</span>        }<a name="line.197"></a>
+<span class="sourceLineNo">198</span>        for (FileStatus file : files) {<a name="line.198"></a>
+<span class="sourceLineNo">199</span>          String fileName = file.getPath().getName();<a name="line.199"></a>
+<span class="sourceLineNo">200</span>          if (!refreshed &amp;&amp; !cache.contains(fileName)) {<a name="line.200"></a>
+<span class="sourceLineNo">201</span>            refreshCache();<a name="line.201"></a>
+<span class="sourceLineNo">202</span>            refreshed = true;<a name="line.202"></a>
+<span class="sourceLineNo">203</span>          }<a name="line.203"></a>
+<span class="sourceLineNo">204</span>          if (cache.contains(fileName)) {<a name="line.204"></a>
+<span class="sourceLineNo">205</span>            continue;<a name="line.205"></a>
+<span class="sourceLineNo">206</span>          }<a name="line.206"></a>
+<span class="sourceLineNo">207</span>          if (snapshotsInProgress == null) {<a name="line.207"></a>
+<span class="sourceLineNo">208</span>            snapshotsInProgress = getSnapshotsInProgress();<a name="line.208"></a>
+<span class="sourceLineNo">209</span>          }<a name="line.209"></a>
+<span class="sourceLineNo">210</span>          if (snapshotsInProgress.contains(fileName)) {<a name="line.210"></a>
+<span class="sourceLineNo">211</span>            continue;<a name="line.211"></a>
+<span class="sourceLineNo">212</span>          }<a name="line.212"></a>
+<span class="sourceLineNo">213</span>          unReferencedFiles.add(file);<a name="line.213"></a>
+<span class="sourceLineNo">214</span>        }<a name="line.214"></a>
+<span class="sourceLineNo">215</span>      } finally {<a name="line.215"></a>
+<span class="sourceLineNo">216</span>        if (lock != null) {<a name="line.216"></a>
+<span class="sourceLineNo">217</span>          lock.unlock();<a name="line.217"></a>
+<span class="sourceLineNo">218</span>        }<a name="line.218"></a>
+<span class="sourceLineNo">219</span>      }<a name="line.219"></a>
+<span class="sourceLineNo">220</span>    }<a name="line.220"></a>
+<span class="sourceLineNo">221</span>    return unReferencedFiles;<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>  private synchronized void refreshCache() throws IOException {<a name="line.224"></a>
+<span class="sourceLineNo">225</span>    // get the status of the snapshots directory and check if it is has changes<a name="line.225"></a>
+<span class="sourceLineNo">226</span>    FileStatus dirStatus;<a name="line.226"></a>
+<span class="sourceLineNo">227</span>    try {<a name="line.227"></a>
+<span class="sourceLineNo">228</span>      dirStatus = fs.getFileStatus(snapshotDir);<a name="line.228"></a>
+<span class="sourceLineNo">229</span>    } catch (FileNotFoundException e) {<a name="line.229"></a>
+<span class="sourceLineNo">230</span>      if (this.cache.size() &gt; 0) {<a name="line.230"></a>
+<span class="sourceLineNo">231</span>        LOG.error("Snapshot directory: " + snapshotDir + " doesn't exist");<a name="line.231"></a>
+<span class="sourceLineNo">232</span>      }<a name="line.232"></a>
+<span class="sourceLineNo">233</span>      return;<a name="line.233"></a>
+<span class="sourceLineNo">234</span>    }<a name="line.234"></a>
+<span class="sourceLineNo">235</span><a name="line.235"></a>
+<span class="sourceLineNo">236</span>    // if the snapshot directory wasn't modified since we last check, we are done<a name="line.236"></a>
+<span class="sourceLineNo">237</span>    if (dirStatus.getModificationTime() &lt;= this.lastModifiedTime) return;<a name="line.237"></a>
+<span class="sourceLineNo">238</span><a name="line.238"></a>
+<span class="sourceLineNo">239</span>    // directory was modified, so we need to reload our cache<a name="line.239"></a>
+<span class="sourceLineNo">240</span>    // there could be a slight race here where we miss the cache, check the directory modification<a name="line.240"></a>
+<span class="sourceLineNo">241</span>    // time, then someone updates the directory, causing us to not scan the directory again.<a name="line.241"></a>
+<span class="sourceLineNo">242</span>    // However, snapshot directories are only created once, so this isn't an issue.<a name="line.242"></a>
+<span class="sourceLineNo">243</span><a name="line.243"></a>
+<span class="sourceLineNo">244</span>    // 1. update the modified time<a name="line.244"></a>
+<span class="sourceLineNo">245</span>    this.lastModifiedTime = dirStatus.getModificationTime();<a name="line.245"></a>
+<span class="sourceLineNo">246</span><a name="line.246"></a>
+<span class="sourceLineNo">247</span>    // 2.clear the cache<a name="line.247"></a>
+<span class="sourceLineNo">248</span>    this.cache.clear();<a name="line.248"></a>
+<span class="sourceLineNo">249</span>    Map&lt;String, SnapshotDirectoryInfo&gt; known = new HashMap&lt;&gt;();<a name="line.249"></a>
+<span class="sourceLineNo">250</span><a name="line.250"></a>
+<span class="sourceLineNo">251</span>    // 3. check each of the snapshot directories<a name="line.251"></a>
+<span class="sourceLineNo">252</span>    FileStatus[] snapshots = FSUtils.listStatus(fs, snapshotDir);<a name="line.252"></a>
+<span class="sourceLineNo">253</span>    if (snapshots == null) {<a name="line.253"></a>
+<span class="sourceLineNo">254</span>      // remove all the remembered snapshots because we don't have any left<a name="line.254"></a>
+<span class="sourceLineNo">255</span>      if (LOG.isDebugEnabled() &amp;&amp; this.snapshots.size() &gt; 0) {<a name="line.255"></a>
+<span class="sourceLineNo">256</span>        LOG.debug("No snapshots on-disk, cache empty");<a name="line.256"></a>
+<span class="sourceLineNo">257</span>      }<a name="line.257"></a>
+<span class="sourceLineNo">258</span>      this.snapshots.clear();<a name="line.258"></a>
+<span class="sourceLineNo">259</span>      return;<a name="line.259"></a>
+<span class="sourceLineNo">260</span>    }<a name="line.260"></a>
+<span class="sourceLineNo">261</span><a name="line.261"></a>
+<span class="sourceLineNo">262</span>    // 3.1 iterate through the on-disk snapshots<a name="line.262"></a>
+<span class="sourceLineNo">263</span>    for (FileStatus snapshot : snapshots) {<a name="line.263"></a>
+<span class="sourceLineNo">264</span>      String name = snapshot.getPath().getName();<a name="line.264"></a>
+<span class="sourceLineNo">265</span>      // its not the tmp dir,<a name="line.265"></a>
+<span class="sourceLineNo">266</span>      if (!name.equals(SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME)) {<a name="line.266"></a>
+<span class="sourceLineNo">267</span>        SnapshotDirectoryInfo files = this.snapshots.remove(name);<a name="line.267"></a>
+<span class="sourceLineNo">268</span>        // 3.1.1 if we don't know about the snapshot or its been modified, we need to update the<a name="line.268"></a>
+<span class="sourceLineNo">269</span>        // files the latter could occur where I create a snapshot, then delete it, and then make a<a name="line.269"></a>
+<span class="sourceLineNo">270</span>        // new snapshot with the same name. We will need to update the cache the information from<a name="line.270"></a>
+<span class="sourceLineNo">271</span>        // that new snapshot, even though it has the same name as the files referenced have<a name="line.271"></a>
+<span class="sourceLineNo">272</span>        // probably changed.<a name="line.272"></a>
+<span class="sourceLineNo">273</span>        if (files == null || files.hasBeenModified(snapshot.getModificationTime())) {<a name="line.273"></a>
+<span class="sourceLineNo">274</span>          // get all files for the snapshot and create a new info<a name="line.274"></a>
+<span class="sourceLineNo">275</span>          Collection&lt;String&gt; storedFiles = fileInspector.filesUnderSnapshot(snapshot.getPath());<a name="line.275"></a>
+<span class="sourceLineNo">276</span>          files = new SnapshotDirectoryInfo(snapshot.getModificationTime(), storedFiles);<a name="line.276"></a>
+<span class="sourceLineNo">277</span>        }<a name="line.277"></a>
+<span class="sourceLineNo">278</span>        // 3.2 add all the files to cache<a name="line.278"></a>
+<span class="sourceLineNo">279</span>        this.cache.addAll(files.getFiles());<a name="line.279"></a>
+<span class="sourceLineNo">280</span>        known.put(name, files);<a name="line.280"></a>
+<span class="sourceLineNo">281</span>      }<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>
+<span class="sourceLineNo">284</span>    // 4. set the snapshots we are tracking<a name="line.284"></a>
+<span class="sourceLineNo">285</span>    this.snapshots.clear();<a name="line.285"></a>
+<span class="sourceLineNo">286</span>    this.snapshots.putAll(known);<a name="line.286"></a>
+<span class="sourceLineNo">287</span>  }<a name="line.287"></a>
+<span class="sourceLineNo">288</span><a name="line.288"></a>
+<span class="sourceLineNo">289</span>  @VisibleForTesting<a name="line.289"></a>
+<span class="sourceLineNo">290</span>  List&lt;String&gt; getSnapshotsInProgress() throws IOException {<a name="line.290"></a>
+<span class="sourceLineNo">291</span>    List&lt;String&gt; snapshotInProgress = Lists.newArrayList();<a name="line.291"></a>
+<span class="sourceLineNo">292</span>    // only add those files to the cache, but not to the known snapshots<a name="line.292"></a>
+<span class="sourceLineNo">293</span>    Path snapshotTmpDir = new Path(snapshotDir, SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME);<a name="line.293"></a>
+<span class="sourceLineNo">294</span>    FileStatus[] running = FSUtils.listStatus(fs, snapshotTmpDir);<a name="line.294"></a>
+<span class="sourceLineNo">295</span>    if (running != null) {<a name="line.295"></a>
+<span class="sourceLineNo">296</span>      for (FileStatus run : running) {<a name="line.296"></a>
+<span class="sourceLineNo">297</span>        try {<a name="line.297"></a>
+<span class="sourceLineNo">298</span>          snapshotInProgress.addAll(fileInspector.filesUnderSnapshot(run.getPath()));<a name="line.298"></a>
+<span class="sourceLineNo">299</span>        } catch (CorruptedSnapshotException e) {<a name="line.299"></a>
+<span class="sourceLineNo">300</span>          // See HBASE-16464<a name="line.300"></a>
+<span class="sourceLineNo">301</span>          if (e.getCause() instanceof FileNotFoundException) {<a name="line.301"></a>
+<span class="sourceLineNo">302</span>            // If the snapshot is corrupt, we will delete it<a name="line.302"></a>
+<span class="sourceLineNo">303</span>            fs.delete(run.getPath(), true);<a name="line.303"></a>
+<span class="sourceLineNo">304</span>            LOG.warn("delete the " + run.getPath() + " due to exception:", e.getCause());<a name="line.304"></a>
+<span class="sourceLineNo">305</span>          } else {<a name="line.305"></a>
+<span class="sourceLineNo">306</span>            throw e;<a name="line.306"></a>
+<span class="sourceLineNo">307</span>          }<a name="line.307"></a>
+<span class="sourceLineNo">308</span>        }<a name="line.308"></a>
+<span class="sourceLineNo">309</span>      }<a name="line.309"></a>
+<span class="sourceLineNo">310</span>    }<a name="line.310"></a>
+<span class="sourceLineNo">311</span>    return snapshotInProgress;<a name="line.311"></a>
+<span class="sourceLineNo">312</span>  }<a name="line.312"></a>
+<span class="sourceLineNo">313</span><a name="line.313"></a>
+<span class="sourceLineNo">314</span>  /**<a name="line.314"></a>
+<span class="sourceLineNo">315</span>   * Simple helper task that just periodically attempts to refresh the cache<a name="line.315"></a>
+<span class="sourceLineNo">316</span>   */<a name="line.316"></a>
+<span class="sourceLineNo">317</span>  public class RefreshCacheTask extends TimerTask {<a name="line.317"></a>
+<span class="sourceLineNo">318</span>    @Override<a name="line.318"></a>
+<span class="sourceLineNo">319</span>    public void run() {<a name="line.319"></a>
+<span class="sourceLineNo">320</span>      try {<a name="line.320"></a>
+<span class="sourceLineNo">321</span>        SnapshotFileCache.this.refreshCache();<a name="line.321"></a>
+<span class="sourceLineNo">322</span>      } catch (IOException e) {<a name="line.322"></a>
+<span class="sourceLineNo">323</span>        LOG.warn("Failed to refresh snapshot hfile cache!", e);<a name="line.323"></a>
+<span class="sourceLineNo">324</span>      }<a name="line.324"></a>
 <span class="sourceLineNo">325</span>    }<a name="line.325"></a>
-<span class="sourceLineNo">326</span><a name="line.326"></a>
-<span class="sourceLineNo">327</span>  }<a name="line.327"></a>
-<span class="sourceLineNo">328</span><a name="line.328"></a>
-<span class="sourceLineNo">329</span>  @Override<a name="line.329"></a>
-<span class="sourceLineNo">330</span>  public boolean isStopped() {<a name="line.330"></a>
-<span class="sourceLineNo">331</span>    return this.stop;<a name="line.331"></a>
-<span class="sourceLineNo">332</span>  }<a name="line.332"></a>
-<span class="sourceLineNo">333</span><a name="line.333"></a>
-<span class="sourceLineNo">334</span>  /**<a name="line.334"></a>
-<span class="sourceLineNo">335</span>   * Information about a snapshot directory<a name="line.335"></a>
-<span class="sourceLineNo">336</span>   */<a name="line.336"></a>
-<span class="sourceLineNo">337</span>  private static class SnapshotDirectoryInfo {<a name="line.337"></a>
-<span class="sourceLineNo">338</span>    long lastModified;<a name="line.338"></a>
-<span class="sourceLineNo">339</span>    Collection&lt;String&gt; files;<a name="line.339"></a>
-<span class="sourceLineNo">340</span><a name="line.340"></a>
-<span class="sourceLineNo">341</span>    public SnapshotDirectoryInfo(long mtime, Collection&lt;String&gt; files) {<a name="line.341"></a>
-<span class="sourceLineNo">342</span>      this.lastModified = mtime;<a name="line.342"></a>
-<span class="sourceLineNo">343</span>      this.files = files;<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    }<a name="line.344"></a>
-<span class="sourceLineNo">345</span><a name="line.345"></a>
-<span class="sourceLineNo">346</span>    /**<a name="line.346"></a>
-<span class="sourceLineNo">347</span>     * @return the hfiles in the snapshot when &lt;tt&gt;this&lt;/tt&gt; was made.<a name="line.347"></a>
-<span class="sourceLineNo">348</span>     */<a name="line.348"></a>
-<span class="sourceLineNo">349</span>    public Collection&lt;String&gt; getFiles() {<a name="line.349"></a>
-<span class="sourceLineNo">350</span>      return this.files;<a name="line.350"></a>
-<span class="sourceLineNo">351</span>    }<a name="line.351"></a>
-<span class="sourceLineNo">352</span><a name="line.352"></a>
-<span class="sourceLineNo">353</span>    /**<a name="line.353"></a>
-<span class="sourceLineNo">354</span>     * Check if the snapshot directory has been modified<a name="line.354"></a>
-<span class="sourceLineNo">355</span>     * @param mtime current modification time of the directory<a name="line.355"></a>
-<span class="sourceLineNo">356</span>     * @return &lt;tt&gt;true&lt;/tt&gt; if it the modification time of the directory is newer time when we<a name="line.356"></a>
-<span class="sourceLineNo">357</span>     *         created &lt;tt&gt;this&lt;/tt&gt;<a name="line.357"></a>
-<span class="sourceLineNo">358</span>     */<a name="line.358"></a>
-<span class="sourceLineNo">359</span>    public boolean hasBeenModified(long mtime) {<a name="line.359"></a>
-<span class="sourceLineNo">360</span>      return this.lastModified &lt; mtime;<a name="line.360"></a>
-<span class="sourceLineNo">361</span>    }<a name="line.361"></a>
-<span class="sourceLineNo">362</span>  }<a name="line.362"></a>
-<span class="sourceLineNo">363</span>}<a name="line.363"></a>
+<span class="sourceLineNo">326</span>  }<a name="line.326"></a>
+<span class="sourceLineNo">327</span><a name="line.327"></a>
+<span class="sourceLineNo">328</span>  @Override<a name="line.328"></a>
+<span class="sourceLineNo">329</span>  public void stop(String why) {<a name="line.329"></a>
+<span class="sourceLineNo">330</span>    if (!this.stop) {<a name="line.330"></a>
+<span class="sourceLineNo">331</span>      this.stop = true;<a name="line.331"></a>
+<span class="sourceLineNo">332</span>      this.refreshTimer.cancel();<a name="line.332"></a>
+<span class="sourceLineNo">333</span>    }<a name="line.333"></a>
+<span class="sourceLineNo">334</span><a name="line.334"></a>
+<span class="sourceLineNo">335</span>  }<a name="line.335"></a>
+<span class="sourceLineNo">336</span><a name="line.336"></a>
+<span class="sourceLineNo">337</span>  @Override<a name="line.337"></a>
+<span class="sourceLineNo">338</span>  public boolean isStopped() {<a name="line.338"></a>
+<span class="sourceLineNo">339</span>    return this.stop;<a name="line.339"></a>
+<span class="sourceLineNo">340</span>  }<a name="line.340"></a>
+<span class="sourceLineNo">341</span><a name="line.341"></a>
+<span class="sourceLineNo">342</span>  /**<a name="line.342"></a>
+<span class="sourceLineNo">343</span>   * Information about a snapshot directory<a name="line.343"></a>
+<span class="sourceLineNo">344</span>   */<a name="line.344"></a>
+<span class="sourceLineNo">345</span>  private static class SnapshotDirectoryInfo {<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    long lastModified;<a name="line.346"></a>
+<span class="sourceLineNo">347</span>    Collection&lt;String&gt; files;<a name="line.347"></a>
+<span class="sourceLineNo">348</span><a name="line.348"></a>
+<span class="sourceLineNo">349</span>    public SnapshotDirectoryInfo(long mtime, Collection&lt;String&gt; files) {<a name="line.349"></a>
+<span class="sourceLineNo">350</span>      this.lastModified = mtime;<a name="line.350"></a>
+<span class="sourceLineNo">351</span>      this.files = files;<a name="line.351"></a>
+<span class="sourceLineNo">352</span>    }<a name="line.352"></a>
+<span class="sourceLineNo">353</span><a name="line.353"></a>
+<span class="sourceLineNo">354</span>    /**<a name="line.354"></a>
+<span class="sourceLineNo">355</span>     * @return the hfiles in the snapshot when &lt;tt&gt;this&lt;/tt&gt; was made.<a name="line.355"></a>
+<span class="sourceLineNo">356</span>     */<a name="line.356"></a>
+<span class="sourceLineNo">357</span>    public Collection&lt;String&gt; getFiles() {<a name="line.357"></a>
+<span class="sourceLineNo">358</span>      return this.files;<a name="line.358"></a>
+<span class="sourceLineNo">359</span>    }<a name="line.359"></a>
+<span class="sourceLineNo">360</span><a name="line.360"></a>
+<span class="sourceLineNo">361</span>    /**<a name="line.361"></a>
+<span class="sourceLineNo">362</span>     * Check if the snapshot directory has been modified<a name="line.362"></a>
+<span class="sourceLineNo">363</span>     * @param mtime current modification time of the directory<a name="line.363"></a>
+<span class="sourceLineNo">364</span>     * @return &lt;tt&gt;true&lt;/tt&gt; if it the modification time of the directory is newer time when we<a name="line.364"></a>
+<span class="sourceLineNo">365</span>     *         created &lt;tt&gt;this&lt;/tt&gt;<a name="line.365"></a>
+<span class="sourceLineNo">366</span>     */<a name="line.366"></a>
+<span class="sourceLineNo">367</span>    public boolean hasBeenModified(long mtime) {<a name="line.367"></a>
+<span class="sourceLineNo">368</span>      return this.lastModified &lt; mtime;<a name="line.368"></a>
+<span class="sourceLineNo">369</span>    }<a name="line.369"></a>
+<span class="sourceLineNo">370</span>  }<a name="line.370"></a>
+<span class="sourceLineNo">371</span>}<a name="line.371"></a>
 
 
 
index f746c7f..bb24e1f 100644 (file)
 <span class="sourceLineNo">028</span>import java.util.Map;<a name="line.28"></a>
 <span class="sourceLineNo">029</span>import java.util.Set;<a name="line.29"></a>
 <span class="sourceLineNo">030</span>import java.util.concurrent.ThreadPoolExecutor;<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.FSDataInputStream;<a name="line.33"></a>
-<span class="sourceLineNo">034</span>import org.apache.hadoop.fs.FileStatus;<a name="line.34"></a>
-<span class="sourceLineNo">035</span>import org.apache.hadoop.fs.FileSystem;<a name="line.35"></a>
-<span class="sourceLineNo">036</span>import org.apache.hadoop.fs.Path;<a name="line.36"></a>
-<span class="sourceLineNo">037</span>import org.apache.hadoop.hbase.HBaseInterfaceAudience;<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.MetaTableAccessor;<a name="line.39"></a>
-<span class="sourceLineNo">040</span>import org.apache.hadoop.hbase.Stoppable;<a name="line.40"></a>
-<span class="sourceLineNo">041</span>import org.apache.hadoop.hbase.TableName;<a name="line.41"></a>
-<span class="sourceLineNo">042</span>import org.apache.hadoop.hbase.client.TableDescriptor;<a name="line.42"></a>
-<span class="sourceLineNo">043</span>import org.apache.hadoop.hbase.client.TableDescriptorBuilder;<a name="line.43"></a>
-<span class="sourceLineNo">044</span>import org.apache.hadoop.hbase.client.TableState;<a name="line.44"></a>
-<span class="sourceLineNo">045</span>import org.apache.hadoop.hbase.errorhandling.ForeignException;<a name="line.45"></a>
-<span class="sourceLineNo">046</span>import org.apache.hadoop.hbase.executor.ExecutorService;<a name="line.46"></a>
-<span class="sourceLineNo">047</span>import org.apache.hadoop.hbase.ipc.RpcServer;<a name="line.47"></a>
-<span class="sourceLineNo">048</span>import org.apache.hadoop.hbase.master.MasterCoprocessorHost;<a name="line.48"></a>
-<span class="sourceLineNo">049</span>import org.apache.hadoop.hbase.master.MasterFileSystem;<a name="line.49"></a>
-<span class="sourceLineNo">050</span>import org.apache.hadoop.hbase.master.MasterServices;<a name="line.50"></a>
-<span class="sourceLineNo">051</span>import org.apache.hadoop.hbase.master.MetricsMaster;<a name="line.51"></a>
-<span class="sourceLineNo">052</span>import org.apache.hadoop.hbase.master.SnapshotSentinel;<a name="line.52"></a>
-<span class="sourceLineNo">053</span>import org.apache.hadoop.hbase.master.cleaner.HFileCleaner;<a name="line.53"></a>
-<span class="sourceLineNo">054</span>import org.apache.hadoop.hbase.master.cleaner.HFileLinkCleaner;<a name="line.54"></a>
-<span class="sourceLineNo">055</span>import org.apache.hadoop.hbase.master.procedure.CloneSnapshotProcedure;<a name="line.55"></a>
-<span class="sourceLineNo">056</span>import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;<a name="line.56"></a>
-<span class="sourceLineNo">057</span>import org.apache.hadoop.hbase.master.procedure.RestoreSnapshotProcedure;<a name="line.57"></a>
-<span class="sourceLineNo">058</span>import org.apache.hadoop.hbase.procedure.MasterProcedureManager;<a name="line.58"></a>
-<span class="sourceLineNo">059</span>import org.apache.hadoop.hbase.procedure.Procedure;<a name="line.59"></a>
-<span class="sourceLineNo">060</span>import org.apache.hadoop.hbase.procedure.ProcedureCoordinator;<a name="line.60"></a>
-<span class="sourceLineNo">061</span>import org.apache.hadoop.hbase.procedure.ProcedureCoordinatorRpcs;<a name="line.61"></a>
-<span class="sourceLineNo">062</span>import org.apache.hadoop.hbase.procedure.ZKProcedureCoordinator;<a name="line.62"></a>
-<span class="sourceLineNo">063</span>import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;<a name="line.63"></a>
-<span class="sourceLineNo">064</span>import org.apache.hadoop.hbase.security.AccessDeniedException;<a name="line.64"></a>
-<span class="sourceLineNo">065</span>import org.apache.hadoop.hbase.security.User;<a name="line.65"></a>
-<span class="sourceLineNo">066</span>import org.apache.hadoop.hbase.security.access.AccessChecker;<a name="line.66"></a>
-<span class="sourceLineNo">067</span>import org.apache.hadoop.hbase.snapshot.ClientSnapshotDescriptionUtils;<a name="line.67"></a>
-<span class="sourceLineNo">068</span>import org.apache.hadoop.hbase.snapshot.HBaseSnapshotException;<a name="line.68"></a>
-<span class="sourceLineNo">069</span>import org.apache.hadoop.hbase.snapshot.RestoreSnapshotException;<a name="line.69"></a>
-<span class="sourceLineNo">070</span>import org.apache.hadoop.hbase.snapshot.SnapshotCreationException;<a name="line.70"></a>
-<span class="sourceLineNo">071</span>import org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils;<a name="line.71"></a>
-<span class="sourceLineNo">072</span>import org.apache.hadoop.hbase.snapshot.SnapshotDoesNotExistException;<a name="line.72"></a>
-<span class="sourceLineNo">073</span>import org.apache.hadoop.hbase.snapshot.SnapshotExistsException;<a name="line.73"></a>
-<span class="sourceLineNo">074</span>import org.apache.hadoop.hbase.snapshot.SnapshotManifest;<a name="line.74"></a>
-<span class="sourceLineNo">075</span>import org.apache.hadoop.hbase.snapshot.SnapshotReferenceUtil;<a name="line.75"></a>
-<span class="sourceLineNo">076</span>import org.apache.hadoop.hbase.snapshot.TablePartiallyOpenException;<a name="line.76"></a>
-<span class="sourceLineNo">077</span>import org.apache.hadoop.hbase.snapshot.UnknownSnapshotException;<a name="line.77"></a>
-<span class="sourceLineNo">078</span>import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;<a name="line.78"></a>
-<span class="sourceLineNo">079</span>import org.apache.hadoop.hbase.util.FSUtils;<a name="line.79"></a>
-<span class="sourceLineNo">080</span>import org.apache.hadoop.hbase.util.KeyLocker;<a name="line.80"></a>
-<span class="sourceLineNo">081</span>import org.apache.hadoop.hbase.util.NonceKey;<a name="line.81"></a>
-<span class="sourceLineNo">082</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.82"></a>
-<span class="sourceLineNo">083</span>import org.apache.yetus.audience.InterfaceStability;<a name="line.83"></a>
-<span class="sourceLineNo">084</span>import org.apache.zookeeper.KeeperException;<a name="line.84"></a>
-<span class="sourceLineNo">085</span>import org.slf4j.Logger;<a name="line.85"></a>
-<span class="sourceLineNo">086</span>import org.slf4j.LoggerFactory;<a name="line.86"></a>
-<span class="sourceLineNo">087</span>import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;<a name="line.87"></a>
-<span class="sourceLineNo">088</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair;<a name="line.88"></a>
-<span class="sourceLineNo">089</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription;<a name="line.89"></a>
-<span class="sourceLineNo">090</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription;<a name="line.90"></a>
-<span class="sourceLineNo">091</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription.Type;<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> * This class manages the procedure of taking and restoring snapshots. There is only one<a name="line.94"></a>
-<span class="sourceLineNo">095</span> * SnapshotManager for the master.<a name="line.95"></a>
-<span class="sourceLineNo">096</span> * &lt;p&gt;<a name="line.96"></a>
-<span class="sourceLineNo">097</span> * The class provides methods for monitoring in-progress snapshot actions.<a name="line.97"></a>
-<span class="sourceLineNo">098</span> * &lt;p&gt;<a name="line.98"></a>
-<span class="sourceLineNo">099</span> * Note: Currently there can only be one snapshot being taken at a time over the cluster. This is a<a name="line.99"></a>
-<span class="sourceLineNo">100</span> * simplification in the current implementation.<a name="line.100"></a>
-<span class="sourceLineNo">101</span> */<a name="line.101"></a>
-<span class="sourceLineNo">102</span>@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)<a name="line.102"></a>
-<span class="sourceLineNo">103</span>@InterfaceStability.Unstable<a name="line.103"></a>
-<span class="sourceLineNo">104</span>public class SnapshotManager extends MasterProcedureManager implements Stoppable {<a name="line.104"></a>
-<span class="sourceLineNo">105</span>  private static final Logger LOG = LoggerFactory.getLogger(SnapshotManager.class);<a name="line.105"></a>
-<span class="sourceLineNo">106</span><a name="line.106"></a>
-<span class="sourceLineNo">107</span>  /** By default, check to see if the snapshot is complete every WAKE MILLIS (ms) */<a name="line.107"></a>
-<span class="sourceLineNo">108</span>  private static final int SNAPSHOT_WAKE_MILLIS_DEFAULT = 500;<a name="line.108"></a>
-<span class="sourceLineNo">109</span><a name="line.109"></a>
-<span class="sourceLineNo">110</span>  /**<a name="line.110"></a>
-<span class="sourceLineNo">111</span>   * Wait time before removing a finished sentinel from the in-progress map<a name="line.111"></a>
-<span class="sourceLineNo">112</span>   *<a name="line.112"></a>
-<span class="sourceLineNo">113</span>   * NOTE: This is used as a safety auto cleanup.<a name="line.113"></a>
-<span class="sourceLineNo">114</span>   * The snapshot and restore handlers map entries are removed when a user asks if a snapshot or<a name="line.114"></a>
-<span class="sourceLineNo">115</span>   * restore is completed. This operation is part of the HBaseAdmin snapshot/restore API flow.<a name="line.115"></a>
-<span class="sourceLineNo">116</span>   * In case something fails on the client side and the snapshot/restore state is not reclaimed<a name="line.116"></a>
-<span class="sourceLineNo">117</span>   * after a default timeout, the entry is removed from the in-progress map.<a name="line.117"></a>
-<span class="sourceLineNo">118</span>   * At this point, if the user asks for the snapshot/restore status, the result will be<a name="line.118"></a>
-<span class="sourceLineNo">119</span>   * snapshot done if exists or failed if it doesn't exists.<a name="line.119"></a>
-<span class="sourceLineNo">120</span>   */<a name="line.120"></a>
-<span class="sourceLineNo">121</span>  private static final int SNAPSHOT_SENTINELS_CLEANUP_TIMEOUT = 60 * 1000;<a name="line.121"></a>
-<span class="sourceLineNo">122</span><a name="line.122"></a>
-<span class="sourceLineNo">123</span>  /** Enable or disable snapshot support */<a name="line.123"></a>
-<span class="sourceLineNo">124</span>  public static final String HBASE_SNAPSHOT_ENABLED = "hbase.snapshot.enabled";<a name="line.124"></a>
-<span class="sourceLineNo">125</span><a name="line.125"></a>
-<span class="sourceLineNo">126</span>  /**<a name="line.126"></a>
-<span class="sourceLineNo">127</span>   * Conf key for # of ms elapsed between checks for snapshot errors while waiting for<a name="line.127"></a>
-<span class="sourceLineNo">128</span>   * completion.<a name="line.128"></a>
-<span class="sourceLineNo">129</span>   */<a name="line.129"></a>
-<span class="sourceLineNo">130</span>  private static final String SNAPSHOT_WAKE_MILLIS_KEY = "hbase.snapshot.master.wakeMillis";<a name="line.130"></a>
-<span class="sourceLineNo">131</span><a name="line.131"></a>
-<span class="sourceLineNo">132</span>  /** Name of the operation to use in the controller */<a name="line.132"></a>
-<span class="sourceLineNo">133</span>  public static final String ONLINE_SNAPSHOT_CONTROLLER_DESCRIPTION = "online-snapshot";<a name="line.133"></a>
-<span class="sourceLineNo">134</span><a name="line.134"></a>
-<span class="sourceLineNo">135</span>  /** Conf key for # of threads used by the SnapshotManager thread pool */<a name="line.135"></a>
-<span class="sourceLineNo">136</span>  private static final String SNAPSHOT_POOL_THREADS_KEY = "hbase.snapshot.master.threads";<a name="line.136"></a>
-<span class="sourceLineNo">137</span><a name="line.137"></a>
-<span class="sourceLineNo">138</span>  /** number of current operations running on the master */<a name="line.138"></a>
-<span class="sourceLineNo">139</span>  private static final int SNAPSHOT_POOL_THREADS_DEFAULT = 1;<a name="line.139"></a>
-<span class="sourceLineNo">140</span><a name="line.140"></a>
-<span class="sourceLineNo">141</span>  private boolean stopped;<a name="line.141"></a>
-<span class="sourceLineNo">142</span>  private MasterServices master;  // Needed by TableEventHandlers<a name="line.142"></a>
-<span class="sourceLineNo">143</span>  private ProcedureCoordinator coordinator;<a name="line.143"></a>
-<span class="sourceLineNo">144</span><a name="line.144"></a>
-<span class="sourceLineNo">145</span>  // Is snapshot feature enabled?<a name="line.145"></a>
-<span class="sourceLineNo">146</span>  private boolean isSnapshotSupported = false;<a name="line.146"></a>
-<span class="sourceLineNo">147</span><a name="line.147"></a>
-<span class="sourceLineNo">148</span>  // Snapshot handlers map, with table name as key.<a name="line.148"></a>
-<span class="sourceLineNo">149</span>  // The map is always accessed and modified under the object lock using synchronized.<a name="line.149"></a>
-<span class="sourceLineNo">150</span>  // snapshotTable() will insert an Handler in the table.<a name="line.150"></a>
-<span class="sourceLineNo">151</span>  // isSnapshotDone() will remove the handler requested if the operation is finished.<a name="line.151"></a>
-<span class="sourceLineNo">152</span>  private Map&lt;TableName, SnapshotSentinel&gt; snapshotHandlers = new HashMap&lt;&gt;();<a name="line.152"></a>
-<span class="sourceLineNo">153</span><a name="line.153"></a>
-<span class="sourceLineNo">154</span>  // Restore map, with table name as key, procedure ID as value.<a name="line.154"></a>
-<span class="sourceLineNo">155</span>  // The map is always accessed and modified under the object lock using synchronized.<a name="line.155"></a>
-<span class="sourceLineNo">156</span>  // restoreSnapshot()/cloneSnapshot() will insert a procedure ID in the map.<a name="line.156"></a>
-<span class="sourceLineNo">157</span>  //<a name="line.157"></a>
-<span class="sourceLineNo">158</span>  // TODO: just as the Apache HBase 1.x implementation, this map would not survive master<a name="line.158"></a>
-<span class="sourceLineNo">159</span>  // restart/failover. This is just a stopgap implementation until implementation of taking<a name="line.159"></a>
-<span class="sourceLineNo">160</span>  // snapshot using Procedure-V2.<a name="line.160"></a>
-<span class="sourceLineNo">161</span>  private Map&lt;TableName, Long&gt; restoreTableToProcIdMap = new HashMap&lt;&gt;();<a name="line.161"></a>
-<span class="sourceLineNo">162</span><a name="line.162"></a>
-<span class="sourceLineNo">163</span>  private Path rootDir;<a name="line.163"></a>
-<span class="sourceLineNo">164</span>  private ExecutorService executorService;<a name="line.164"></a>
-<span class="sourceLineNo">165</span><a name="line.165"></a>
-<span class="sourceLineNo">166</span>  /**<a name="line.166"></a>
-<span class="sourceLineNo">167</span>   *  Locks for snapshot operations<a name="line.167"></a>
-<span class="sourceLineNo">168</span>   *  key is snapshot's filename in progress, value is the related lock<a name="line.168"></a>
-<span class="sourceLineNo">169</span>   *    - create snapshot<a name="line.169"></a>
-<span class="sourceLineNo">170</span>   *    - SnapshotCleaner<a name="line.170"></a>
-<span class="sourceLineNo">171</span>   * */<a name="line.171"></a>
-<span class="sourceLineNo">172</span>  private KeyLocker&lt;String&gt; locks = new KeyLocker&lt;&gt;();<a name="line.172"></a>
-<span class="sourceLineNo">173</span><a name="line.173"></a>
+<span class="sourceLineNo">031</span>import java.util.concurrent.locks.ReadWriteLock;<a name="line.31"></a>
+<span class="sourceLineNo">032</span>import java.util.concurrent.locks.ReentrantReadWriteLock;<a name="line.32"></a>
+<span class="sourceLineNo">033</span><a name="line.33"></a>
+<span class="sourceLineNo">034</span>import org.apache.hadoop.conf.Configuration;<a name="line.34"></a>
+<span class="sourceLineNo">035</span>import org.apache.hadoop.fs.FSDataInputStream;<a name="line.35"></a>
+<span class="sourceLineNo">036</span>import org.apache.hadoop.fs.FileStatus;<a name="line.36"></a>
+<span class="sourceLineNo">037</span>import org.apache.hadoop.fs.FileSystem;<a name="line.37"></a>
+<span class="sourceLineNo">038</span>import org.apache.hadoop.fs.Path;<a name="line.38"></a>
+<span class="sourceLineNo">039</span>import org.apache.hadoop.hbase.HBaseInterfaceAudience;<a name="line.39"></a>
+<span class="sourceLineNo">040</span>import org.apache.hadoop.hbase.HConstants;<a name="line.40"></a>
+<span class="sourceLineNo">041</span>import org.apache.hadoop.hbase.MetaTableAccessor;<a name="line.41"></a>
+<span class="sourceLineNo">042</span>import org.apache.hadoop.hbase.Stoppable;<a name="line.42"></a>
+<span class="sourceLineNo">043</span>import org.apache.hadoop.hbase.TableName;<a name="line.43"></a>
+<span class="sourceLineNo">044</span>import org.apache.hadoop.hbase.client.TableDescriptor;<a name="line.44"></a>
+<span class="sourceLineNo">045</span>import org.apache.hadoop.hbase.client.TableDescriptorBuilder;<a name="line.45"></a>
+<span class="sourceLineNo">046</span>import org.apache.hadoop.hbase.client.TableState;<a name="line.46"></a>
+<span class="sourceLineNo">047</span>import org.apache.hadoop.hbase.errorhandling.ForeignException;<a name="line.47"></a>
+<span class="sourceLineNo">048</span>import org.apache.hadoop.hbase.executor.ExecutorService;<a name="line.48"></a>
+<span class="sourceLineNo">049</span>import org.apache.hadoop.hbase.ipc.RpcServer;<a name="line.49"></a>
+<span class="sourceLineNo">050</span>import org.apache.hadoop.hbase.master.MasterCoprocessorHost;<a name="line.50"></a>
+<span class="sourceLineNo">051</span>import org.apache.hadoop.hbase.master.MasterFileSystem;<a name="line.51"></a>
+<span class="sourceLineNo">052</span>import org.apache.hadoop.hbase.master.MasterServices;<a name="line.52"></a>
+<span class="sourceLineNo">053</span>import org.apache.hadoop.hbase.master.MetricsMaster;<a name="line.53"></a>
+<span class="sourceLineNo">054</span>import org.apache.hadoop.hbase.master.SnapshotSentinel;<a name="line.54"></a>
+<span class="sourceLineNo">055</span>import org.apache.hadoop.hbase.master.cleaner.HFileCleaner;<a name="line.55"></a>
+<span class="sourceLineNo">056</span>import org.apache.hadoop.hbase.master.cleaner.HFileLinkCleaner;<a name="line.56"></a>
+<span class="sourceLineNo">057</span>import org.apache.hadoop.hbase.master.procedure.CloneSnapshotProcedure;<a name="line.57"></a>
+<span class="sourceLineNo">058</span>import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;<a name="line.58"></a>
+<span class="sourceLineNo">059</span>import org.apache.hadoop.hbase.master.procedure.RestoreSnapshotProcedure;<a name="line.59"></a>
+<span class="sourceLineNo">060</span>import org.apache.hadoop.hbase.procedure.MasterProcedureManager;<a name="line.60"></a>
+<span class="sourceLineNo">061</span>import org.apache.hadoop.hbase.procedure.Procedure;<a name="line.61"></a>
+<span class="sourceLineNo">062</span>import org.apache.hadoop.hbase.procedure.ProcedureCoordinator;<a name="line.62"></a>
+<span class="sourceLineNo">063</span>import org.apache.hadoop.hbase.procedure.ProcedureCoordinatorRpcs;<a name="line.63"></a>
+<span class="sourceLineNo">064</span>import org.apache.hadoop.hbase.procedure.ZKProcedureCoordinator;<a name="line.64"></a>
+<span class="sourceLineNo">065</span>import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;<a name="line.65"></a>
+<span class="sourceLineNo">066</span>import org.apache.hadoop.hbase.security.AccessDeniedException;<a name="line.66"></a>
+<span class="sourceLineNo">067</span>import org.apache.hadoop.hbase.security.User;<a name="line.67"></a>
+<span class="sourceLineNo">068</span>import org.apache.hadoop.hbase.security.access.AccessChecker;<a name="line.68"></a>
+<span class="sourceLineNo">069</span>import org.apache.hadoop.hbase.snapshot.ClientSnapshotDescriptionUtils;<a name="line.69"></a>
+<span class="sourceLineNo">070</span>import org.apache.hadoop.hbase.snapshot.HBaseSnapshotException;<a name="line.70"></a>
+<span class="sourceLineNo">071</span>import org.apache.hadoop.hbase.snapshot.RestoreSnapshotException;<a name="line.71"></a>
+<span class="sourceLineNo">072</span>import org.apache.hadoop.hbase.snapshot.SnapshotCreationException;<a name="line.72"></a>
+<span class="sourceLineNo">073</span>import org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils;<a name="line.73"></a>
+<span class="sourceLineNo">074</span>import org.apache.hadoop.hbase.snapshot.SnapshotDoesNotExistException;<a name="line.74"></a>
+<span class="sourceLineNo">075</span>import org.apache.hadoop.hbase.snapshot.SnapshotExistsException;<a name="line.75"></a>
+<span class="sourceLineNo">076</span>import org.apache.hadoop.hbase.snapshot.SnapshotManifest;<a name="line.76"></a>
+<span class="sourceLineNo">077</span>import org.apache.hadoop.hbase.snapshot.SnapshotReferenceUtil;<a name="line.77"></a>
+<span class="sourceLineNo">078</span>import org.apache.hadoop.hbase.snapshot.TablePartiallyOpenException;<a name="line.78"></a>
+<span class="sourceLineNo">079</span>import org.apache.hadoop.hbase.snapshot.UnknownSnapshotException;<a name="line.79"></a>
+<span class="sourceLineNo">080</span>import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;<a name="line.80"></a>
+<span class="sourceLineNo">081</span>import org.apache.hadoop.hbase.util.FSUtils;<a name="line.81"></a>
+<span class="sourceLineNo">082</span>import org.apache.hadoop.hbase.util.NonceKey;<a name="line.82"></a>
+<span class="sourceLineNo">083</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.83"></a>
+<span class="sourceLineNo">084</span>import org.apache.yetus.audience.InterfaceStability;<a name="line.84"></a>
+<span class="sourceLineNo">085</span>import org.apache.zookeeper.KeeperException;<a name="line.85"></a>
+<span class="sourceLineNo">086</span>import org.slf4j.Logger;<a name="line.86"></a>
+<span class="sourceLineNo">087</span>import org.slf4j.LoggerFactory;<a name="line.87"></a>
+<span class="sourceLineNo">088</span>import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;<a name="line.88"></a>
+<span class="sourceLineNo">089</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.NameStringPair;<a name="line.89"></a>
+<span class="sourceLineNo">090</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ProcedureDescription;<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>import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription.Type;<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> * This class manages the procedure of taking and restoring snapshots. There is only one<a name="line.95"></a>
+<span class="sourceLineNo">096</span> * SnapshotManager for the master.<a name="line.96"></a>
+<span class="sourceLineNo">097</span> * &lt;p&gt;<a name="line.97"></a>
+<span class="sourceLineNo">098</span> * The class provides methods for monitoring in-progress snapshot actions.<a name="line.98"></a>
+<span class="sourceLineNo">099</span> * &lt;p&gt;<a name="line.99"></a>
+<span class="sourceLineNo">100</span> * Note: Currently there can only be one snapshot being taken at a time over the cluster. This is a<a name="line.100"></a>
+<span class="sourceLineNo">101</span> * simplification in the current implementation.<a name="line.101"></a>
+<span class="sourceLineNo">102</span> */<a name="line.102"></a>
+<span class="sourceLineNo">103</span>@InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)<a name="line.103"></a>
+<span class="sourceLineNo">104</span>@InterfaceStability.Unstable<a name="line.104"></a>
+<span class="sourceLineNo">105</span>public class SnapshotManager extends MasterProcedureManager implements Stoppable {<a name="line.105"></a>
+<span class="sourceLineNo">106</span>  private static final Logger LOG = LoggerFactory.getLogger(SnapshotManager.class);<a name="line.106"></a>
+<span class="sourceLineNo">107</span><a name="line.107"></a>
+<span class="sourceLineNo">108</span>  /** By default, check to see if the snapshot is complete every WAKE MILLIS (ms) */<a name="line.108"></a>
+<span class="sourceLineNo">109</span>  private static final int SNAPSHOT_WAKE_MILLIS_DEFAULT = 500;<a name="line.109"></a>
+<span class="sourceLineNo">110</span><a name="line.110"></a>
+<span class="sourceLineNo">111</span>  /**<a name="line.111"></a>
+<span class="sourceLineNo">112</span>   * Wait time before removing a finished sentinel from the in-progress map<a name="line.112"></a>
+<span class="sourceLineNo">113</span>   *<a name="line.113"></a>
+<span class="sourceLineNo">114</span>   * NOTE: This is used as a safety auto cleanup.<a name="line.114"></a>
+<span class="sourceLineNo">115</span>   * The snapshot and restore handlers map entries are removed when a user asks if a snapshot or<a name="line.115"></a>
+<span class="sourceLineNo">116</span>   * restore is completed. This operation is part of the HBaseAdmin snapshot/restore API flow.<a name="line.116"></a>
+<span class="sourceLineNo">117</span>   * In case something fails on the client side and the snapshot/restore state is not reclaimed<a name="line.117"></a>
+<span class="sourceLineNo">118</span>   * after a default timeout, the entry is removed from the in-progress map.<a name="line.118"></a>
+<span class="sourceLineNo">119</span>   * At this point, if the user asks for the snapshot/restore status, the result will be<a name="line.119"></a>
+<span class="sourceLineNo">120</span>   * snapshot done if exists or failed if it doesn't exists.<a name="line.120"></a>
+<span class="sourceLineNo">121</span>