hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [17/17] hbase-site git commit: Published site at .
Date Tue, 05 Sep 2017 15:13:59 GMT
Published site at .


Project: http://git-wip-us.apache.org/repos/asf/hbase-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase-site/commit/96bf4e08
Tree: http://git-wip-us.apache.org/repos/asf/hbase-site/tree/96bf4e08
Diff: http://git-wip-us.apache.org/repos/asf/hbase-site/diff/96bf4e08

Branch: refs/heads/asf-site
Commit: 96bf4e08618a9ddabcfcc19db1844443ef0c0b0e
Parents: 85f4b09
Author: jenkins <builds@apache.org>
Authored: Tue Sep 5 15:13:35 2017 +0000
Committer: jenkins <builds@apache.org>
Committed: Tue Sep 5 15:13:35 2017 +0000

----------------------------------------------------------------------
 acid-semantics.html                             |   4 +-
 apache_hbase_reference_guide.pdf                |   6 +-
 .../hadoop/hbase/snapshot/ExportSnapshot.html   |  10 +-
 .../hadoop/hbase/snapshot/ExportSnapshot.html   | 562 +++++++++----------
 book.html                                       |   2 +-
 bulk-loads.html                                 |   4 +-
 checkstyle-aggregate.html                       |  22 +-
 coc.html                                        |   4 +-
 cygwin.html                                     |   4 +-
 dependencies.html                               |   4 +-
 dependency-convergence.html                     |   8 +-
 dependency-info.html                            |   4 +-
 dependency-management.html                      |  18 +-
 devapidocs/constant-values.html                 |   6 +-
 .../hadoop/hbase/snapshot/ExportSnapshot.html   |  40 +-
 .../org/apache/hadoop/hbase/Version.html        |   6 +-
 .../hbase/snapshot/ExportSnapshot.Counter.html  | 562 +++++++++----------
 .../snapshot/ExportSnapshot.ExportMapper.html   | 562 +++++++++----------
 ...hotInputFormat.ExportSnapshotInputSplit.html | 562 +++++++++----------
 ...tInputFormat.ExportSnapshotRecordReader.html | 562 +++++++++----------
 ...xportSnapshot.ExportSnapshotInputFormat.html | 562 +++++++++----------
 .../hbase/snapshot/ExportSnapshot.Options.html  | 562 +++++++++----------
 .../hbase/snapshot/ExportSnapshot.Testing.html  | 562 +++++++++----------
 .../hadoop/hbase/snapshot/ExportSnapshot.html   | 562 +++++++++----------
 export_control.html                             |   4 +-
 hbase-build-configuration/dependencies.html     |   4 +-
 .../dependency-convergence.html                 |   8 +-
 hbase-build-configuration/dependency-info.html  |   4 +-
 .../dependency-management.html                  |  18 +-
 .../hbase-annotations/checkstyle.html           |   4 +-
 .../hbase-annotations/dependencies.html         |   4 +-
 .../dependency-convergence.html                 |   8 +-
 .../hbase-annotations/dependency-info.html      |   4 +-
 .../dependency-management.html                  |  18 +-
 .../hbase-annotations/index.html                |   4 +-
 .../hbase-annotations/integration.html          |   4 +-
 .../hbase-annotations/issue-tracking.html       |   4 +-
 .../hbase-annotations/license.html              |   4 +-
 .../hbase-annotations/mail-lists.html           |   4 +-
 .../hbase-annotations/plugin-management.html    |   4 +-
 .../hbase-annotations/plugins.html              |   4 +-
 .../hbase-annotations/project-info.html         |   4 +-
 .../hbase-annotations/project-reports.html      |   4 +-
 .../hbase-annotations/project-summary.html      |   4 +-
 .../hbase-annotations/source-repository.html    |   4 +-
 .../hbase-annotations/team-list.html            |   4 +-
 .../hbase-archetypes/dependencies.html          |   4 +-
 .../dependency-convergence.html                 |   8 +-
 .../hbase-archetypes/dependency-info.html       |   4 +-
 .../hbase-archetypes/dependency-management.html |  18 +-
 .../hbase-archetype-builder/dependencies.html   |   4 +-
 .../dependency-convergence.html                 |   8 +-
 .../dependency-info.html                        |   4 +-
 .../dependency-management.html                  |  18 +-
 .../hbase-archetype-builder/index.html          |   4 +-
 .../hbase-archetype-builder/integration.html    |   4 +-
 .../hbase-archetype-builder/issue-tracking.html |   4 +-
 .../hbase-archetype-builder/license.html        | 208 +------
 .../hbase-archetype-builder/mail-lists.html     |   4 +-
 .../plugin-management.html                      |   4 +-
 .../hbase-archetype-builder/plugins.html        |   4 +-
 .../hbase-archetype-builder/project-info.html   |   4 +-
 .../project-summary.html                        |   4 +-
 .../source-repository.html                      |   4 +-
 .../hbase-archetype-builder/team-list.html      |   4 +-
 .../hbase-client-project/checkstyle.html        |   4 +-
 .../hbase-client-project/dependencies.html      |  74 +--
 .../dependency-convergence.html                 |   8 +-
 .../hbase-client-project/dependency-info.html   |   4 +-
 .../dependency-management.html                  |  18 +-
 .../hbase-client-project/index.html             |   4 +-
 .../hbase-client-project/integration.html       |   4 +-
 .../hbase-client-project/issue-tracking.html    |   4 +-
 .../hbase-client-project/license.html           |   4 +-
 .../hbase-client-project/mail-lists.html        |   4 +-
 .../hbase-client-project/plugin-management.html |   4 +-
 .../hbase-client-project/plugins.html           |   4 +-
 .../hbase-client-project/project-info.html      |   4 +-
 .../hbase-client-project/project-reports.html   |   4 +-
 .../hbase-client-project/project-summary.html   |   4 +-
 .../hbase-client-project/source-repository.html |   4 +-
 .../hbase-client-project/team-list.html         |   4 +-
 .../hbase-shaded-client-project/checkstyle.html |   4 +-
 .../dependencies.html                           |  74 +--
 .../dependency-convergence.html                 |   8 +-
 .../dependency-info.html                        |   4 +-
 .../dependency-management.html                  |  18 +-
 .../hbase-shaded-client-project/index.html      |   4 +-
 .../integration.html                            |   4 +-
 .../issue-tracking.html                         |   4 +-
 .../hbase-shaded-client-project/license.html    |   6 +-
 .../hbase-shaded-client-project/mail-lists.html |   4 +-
 .../plugin-management.html                      |   4 +-
 .../hbase-shaded-client-project/plugins.html    |   4 +-
 .../project-info.html                           |   4 +-
 .../project-reports.html                        |   4 +-
 .../project-summary.html                        |   4 +-
 .../source-repository.html                      |   4 +-
 .../hbase-shaded-client-project/team-list.html  |   4 +-
 .../hbase-archetypes/index.html                 |   4 +-
 .../hbase-archetypes/integration.html           |   4 +-
 .../hbase-archetypes/issue-tracking.html        |   4 +-
 .../hbase-archetypes/license.html               |   4 +-
 .../hbase-archetypes/mail-lists.html            |   4 +-
 .../hbase-archetypes/plugin-management.html     |   4 +-
 .../hbase-archetypes/plugins.html               |   4 +-
 .../hbase-archetypes/project-info.html          |   4 +-
 .../hbase-archetypes/project-summary.html       |   4 +-
 .../hbase-archetypes/source-repository.html     |   4 +-
 .../hbase-archetypes/team-list.html             |   4 +-
 .../hbase-spark/checkstyle.html                 |   4 +-
 .../hbase-spark/dependencies.html               |  70 +--
 .../hbase-spark/dependency-convergence.html     |   8 +-
 .../hbase-spark/dependency-info.html            |   4 +-
 .../hbase-spark/dependency-management.html      |  18 +-
 .../hbase-spark/index.html                      |   4 +-
 .../hbase-spark/integration.html                |   4 +-
 .../hbase-spark/issue-tracking.html             |   4 +-
 .../hbase-spark/license.html                    | 208 +------
 .../hbase-spark/mail-lists.html                 |   4 +-
 .../hbase-spark/plugin-management.html          |   4 +-
 .../hbase-spark/plugins.html                    |   4 +-
 .../hbase-spark/project-info.html               |   4 +-
 .../hbase-spark/project-reports.html            |   4 +-
 .../hbase-spark/project-summary.html            |   4 +-
 .../hbase-spark/source-repository.html          |   4 +-
 .../hbase-spark/team-list.html                  |   4 +-
 hbase-build-configuration/index.html            |   4 +-
 hbase-build-configuration/integration.html      |   4 +-
 hbase-build-configuration/issue-tracking.html   |   4 +-
 hbase-build-configuration/license.html          |   4 +-
 hbase-build-configuration/mail-lists.html       |   4 +-
 .../plugin-management.html                      |   4 +-
 hbase-build-configuration/plugins.html          |   4 +-
 hbase-build-configuration/project-info.html     |   4 +-
 hbase-build-configuration/project-summary.html  |   4 +-
 .../source-repository.html                      |   4 +-
 hbase-build-configuration/team-list.html        |   4 +-
 hbase-shaded-check-invariants/checkstyle.html   |   4 +-
 hbase-shaded-check-invariants/dependencies.html | 455 ++++++++-------
 .../dependency-convergence.html                 |   8 +-
 .../dependency-info.html                        |   4 +-
 .../dependency-management.html                  |  18 +-
 hbase-shaded-check-invariants/index.html        |   4 +-
 hbase-shaded-check-invariants/integration.html  |   4 +-
 .../issue-tracking.html                         |   4 +-
 hbase-shaded-check-invariants/license.html      |   4 +-
 hbase-shaded-check-invariants/mail-lists.html   |   4 +-
 .../plugin-management.html                      |   4 +-
 hbase-shaded-check-invariants/plugins.html      |   4 +-
 hbase-shaded-check-invariants/project-info.html |   4 +-
 .../project-reports.html                        |   4 +-
 .../project-summary.html                        |   4 +-
 .../source-repository.html                      |   4 +-
 hbase-shaded-check-invariants/team-list.html    |   4 +-
 index.html                                      |   4 +-
 integration.html                                |   4 +-
 issue-tracking.html                             |   4 +-
 license.html                                    |   4 +-
 mail-lists.html                                 |   4 +-
 metrics.html                                    |   4 +-
 old_news.html                                   |   4 +-
 plugin-management.html                          |   4 +-
 plugins.html                                    |   4 +-
 poweredbyhbase.html                             |   4 +-
 project-info.html                               |   4 +-
 project-reports.html                            |   4 +-
 project-summary.html                            |   4 +-
 pseudo-distributed.html                         |   4 +-
 replication.html                                |   4 +-
 resources.html                                  |   4 +-
 source-repository.html                          |   4 +-
 sponsors.html                                   |   4 +-
 supportingprojects.html                         |   4 +-
 team-list.html                                  |   4 +-
 .../hadoop/hbase/tool/TestCanaryTool.html       |  34 +-
 .../hadoop/hbase/tool/TestCanaryTool.html       | 434 +++++++-------
 177 files changed, 3596 insertions(+), 3887 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase-site/blob/96bf4e08/acid-semantics.html
----------------------------------------------------------------------
diff --git a/acid-semantics.html b/acid-semantics.html
index b77016b..397fc27 100644
--- a/acid-semantics.html
+++ b/acid-semantics.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="20170904" />
+    <meta name="Date-Revision-yyyymmdd" content="20170905" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013;  
       Apache HBase (TM) ACID Properties
@@ -606,7 +606,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: 2017-09-04</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-09-05</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/96bf4e08/apache_hbase_reference_guide.pdf
----------------------------------------------------------------------
diff --git a/apache_hbase_reference_guide.pdf b/apache_hbase_reference_guide.pdf
index 7c18738..18497b7 100644
--- a/apache_hbase_reference_guide.pdf
+++ b/apache_hbase_reference_guide.pdf
@@ -5,8 +5,8 @@
 /Author (Apache HBase Team)
 /Creator (Asciidoctor PDF 1.5.0.alpha.15, based on Prawn 2.2.2)
 /Producer (Apache HBase Team)
-/ModDate (D:20170904144632+00'00')
-/CreationDate (D:20170904144632+00'00')
+/ModDate (D:20170905144634+00'00')
+/CreationDate (D:20170905144634+00'00')
 >>
 endobj
 2 0 obj
@@ -27334,7 +27334,7 @@ endobj
 endobj
 136 0 obj
 << /Limits [(__anchor-top) (adding.new.node)]
-/Names [(__anchor-top) 25 0 R (__indexterm-6968252) 3259 0 R (__indexterm-6970502) 3261 0 R (__indexterm-6972564) 3262 0 R (__indexterm-6974438) 3263 0 R (acid) 891 0 R (add-metric-name-and-function-to-hadoop-compat-interface) 3358 0 R (add-the-implementation-to-both-hadoop-1-and-hadoop-2-compat-modules) 3359 0 R (add.metrics) 3356 0 R (adding-a-new-chapter-to-the-hbase-reference-guide) 3597 0 R (adding.new.node) 2856 0 R]
+/Names [(__anchor-top) 25 0 R (__indexterm-6968250) 3259 0 R (__indexterm-6970500) 3261 0 R (__indexterm-6972562) 3262 0 R (__indexterm-6974436) 3263 0 R (acid) 891 0 R (add-metric-name-and-function-to-hadoop-compat-interface) 3358 0 R (add-the-implementation-to-both-hadoop-1-and-hadoop-2-compat-modules) 3359 0 R (add.metrics) 3356 0 R (adding-a-new-chapter-to-the-hbase-reference-guide) 3597 0 R (adding.new.node) 2856 0 R]
 >>
 endobj
 137 0 obj

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/96bf4e08/apidocs/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html
----------------------------------------------------------------------
diff --git a/apidocs/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html b/apidocs/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html
index 6ef033f..900b87d 100644
--- a/apidocs/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html
+++ b/apidocs/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html
@@ -359,7 +359,7 @@ implements org.apache.hadoop.util.Tool</pre>
 <ul class="blockList">
 <li class="blockList">
 <h4>processOptions</h4>
-<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html#line.890">processOptions</a>(org.apache.commons.cli.CommandLine&nbsp;cmd)</pre>
+<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html#line.888">processOptions</a>(org.apache.commons.cli.CommandLine&nbsp;cmd)</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code>org.apache.hadoop.hbase.util.AbstractHBaseTool</code></span></div>
 <div class="block">This method is called to process the options after they have been parsed.</div>
 <dl>
@@ -374,7 +374,7 @@ implements org.apache.hadoop.util.Tool</pre>
 <ul class="blockList">
 <li class="blockList">
 <h4>doWork</h4>
-<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html#line.915">doWork</a>()
+<pre>public&nbsp;int&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html#line.913">doWork</a>()
            throws <a href="http://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">Execute the export snapshot by copying the snapshot metadata, hfiles and wals.</div>
 <dl>
@@ -393,7 +393,7 @@ implements org.apache.hadoop.util.Tool</pre>
 <ul class="blockList">
 <li class="blockList">
 <h4>printUsage</h4>
-<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html#line.1080">printUsage</a>()</pre>
+<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html#line.1078">printUsage</a>()</pre>
 <dl>
 <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
 <dd><code>printUsage</code>&nbsp;in class&nbsp;<code>org.apache.hadoop.hbase.util.AbstractHBaseTool</code></dd>
@@ -406,7 +406,7 @@ implements org.apache.hadoop.util.Tool</pre>
 <ul class="blockList">
 <li class="blockList">
 <h4>addOptions</h4>
-<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html#line.1093">addOptions</a>()</pre>
+<pre>protected&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html#line.1091">addOptions</a>()</pre>
 <div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code>org.apache.hadoop.hbase.util.AbstractHBaseTool</code></span></div>
 <div class="block">Override this to add command-line options using <code>AbstractHBaseTool.addOptWithArg(java.lang.String, java.lang.String)</code>
  and similar methods.</div>
@@ -422,7 +422,7 @@ implements org.apache.hadoop.util.Tool</pre>
 <ul class="blockListLast">
 <li class="blockList">
 <h4>main</h4>
-<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html#line.1108">main</a>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;args)</pre>
+<pre>public static&nbsp;void&nbsp;<a href="../../../../../src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html#line.1106">main</a>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;args)</pre>
 </li>
 </ul>
 </li>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/96bf4e08/apidocs/src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html b/apidocs/src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html
index a73c866..dd2d739 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/snapshot/ExportSnapshot.html
@@ -834,289 +834,287 @@
 <span class="sourceLineNo">826</span><a name="line.826"></a>
 <span class="sourceLineNo">827</span>    // Run the MR Job<a name="line.827"></a>
 <span class="sourceLineNo">828</span>    if (!job.waitForCompletion(true)) {<a name="line.828"></a>
-<span class="sourceLineNo">829</span>      // TODO: Replace the fixed string with job.getStatus().getFailureInfo()<a name="line.829"></a>
-<span class="sourceLineNo">830</span>      // when it will be available on all the supported versions.<a name="line.830"></a>
-<span class="sourceLineNo">831</span>      throw new ExportSnapshotException("Copy Files Map-Reduce Job failed");<a name="line.831"></a>
-<span class="sourceLineNo">832</span>    }<a name="line.832"></a>
-<span class="sourceLineNo">833</span>  }<a name="line.833"></a>
-<span class="sourceLineNo">834</span><a name="line.834"></a>
-<span class="sourceLineNo">835</span>  private void verifySnapshot(final Configuration baseConf,<a name="line.835"></a>
-<span class="sourceLineNo">836</span>      final FileSystem fs, final Path rootDir, final Path snapshotDir) throws IOException {<a name="line.836"></a>
-<span class="sourceLineNo">837</span>    // Update the conf with the current root dir, since may be a different cluster<a name="line.837"></a>
-<span class="sourceLineNo">838</span>    Configuration conf = new Configuration(baseConf);<a name="line.838"></a>
-<span class="sourceLineNo">839</span>    FSUtils.setRootDir(conf, rootDir);<a name="line.839"></a>
-<span class="sourceLineNo">840</span>    FSUtils.setFsDefault(conf, FSUtils.getRootDir(conf));<a name="line.840"></a>
-<span class="sourceLineNo">841</span>    SnapshotDescription snapshotDesc = SnapshotDescriptionUtils.readSnapshotInfo(fs, snapshotDir);<a name="line.841"></a>
-<span class="sourceLineNo">842</span>    SnapshotReferenceUtil.verifySnapshot(conf, fs, snapshotDir, snapshotDesc);<a name="line.842"></a>
-<span class="sourceLineNo">843</span>  }<a name="line.843"></a>
-<span class="sourceLineNo">844</span><a name="line.844"></a>
-<span class="sourceLineNo">845</span>  /**<a name="line.845"></a>
-<span class="sourceLineNo">846</span>   * Set path ownership.<a name="line.846"></a>
-<span class="sourceLineNo">847</span>   */<a name="line.847"></a>
-<span class="sourceLineNo">848</span>  private void setOwner(final FileSystem fs, final Path path, final String user,<a name="line.848"></a>
-<span class="sourceLineNo">849</span>      final String group, final boolean recursive) throws IOException {<a name="line.849"></a>
-<span class="sourceLineNo">850</span>    if (user != null || group != null) {<a name="line.850"></a>
-<span class="sourceLineNo">851</span>      if (recursive &amp;&amp; fs.isDirectory(path)) {<a name="line.851"></a>
-<span class="sourceLineNo">852</span>        for (FileStatus child : fs.listStatus(path)) {<a name="line.852"></a>
-<span class="sourceLineNo">853</span>          setOwner(fs, child.getPath(), user, group, recursive);<a name="line.853"></a>
-<span class="sourceLineNo">854</span>        }<a name="line.854"></a>
-<span class="sourceLineNo">855</span>      }<a name="line.855"></a>
-<span class="sourceLineNo">856</span>      fs.setOwner(path, user, group);<a name="line.856"></a>
-<span class="sourceLineNo">857</span>    }<a name="line.857"></a>
-<span class="sourceLineNo">858</span>  }<a name="line.858"></a>
-<span class="sourceLineNo">859</span><a name="line.859"></a>
-<span class="sourceLineNo">860</span>  /**<a name="line.860"></a>
-<span class="sourceLineNo">861</span>   * Set path permission.<a name="line.861"></a>
-<span class="sourceLineNo">862</span>   */<a name="line.862"></a>
-<span class="sourceLineNo">863</span>  private void setPermission(final FileSystem fs, final Path path, final short filesMode,<a name="line.863"></a>
-<span class="sourceLineNo">864</span>      final boolean recursive) throws IOException {<a name="line.864"></a>
-<span class="sourceLineNo">865</span>    if (filesMode &gt; 0) {<a name="line.865"></a>
-<span class="sourceLineNo">866</span>      FsPermission perm = new FsPermission(filesMode);<a name="line.866"></a>
-<span class="sourceLineNo">867</span>      if (recursive &amp;&amp; fs.isDirectory(path)) {<a name="line.867"></a>
-<span class="sourceLineNo">868</span>        for (FileStatus child : fs.listStatus(path)) {<a name="line.868"></a>
-<span class="sourceLineNo">869</span>          setPermission(fs, child.getPath(), filesMode, recursive);<a name="line.869"></a>
-<span class="sourceLineNo">870</span>        }<a name="line.870"></a>
-<span class="sourceLineNo">871</span>      }<a name="line.871"></a>
-<span class="sourceLineNo">872</span>      fs.setPermission(path, perm);<a name="line.872"></a>
-<span class="sourceLineNo">873</span>    }<a name="line.873"></a>
-<span class="sourceLineNo">874</span>  }<a name="line.874"></a>
-<span class="sourceLineNo">875</span><a name="line.875"></a>
-<span class="sourceLineNo">876</span>  private boolean verifyTarget = true;<a name="line.876"></a>
-<span class="sourceLineNo">877</span>  private boolean verifyChecksum = true;<a name="line.877"></a>
-<span class="sourceLineNo">878</span>  private String snapshotName = null;<a name="line.878"></a>
-<span class="sourceLineNo">879</span>  private String targetName = null;<a name="line.879"></a>
-<span class="sourceLineNo">880</span>  private boolean overwrite = false;<a name="line.880"></a>
-<span class="sourceLineNo">881</span>  private String filesGroup = null;<a name="line.881"></a>
-<span class="sourceLineNo">882</span>  private String filesUser = null;<a name="line.882"></a>
-<span class="sourceLineNo">883</span>  private Path outputRoot = null;<a name="line.883"></a>
-<span class="sourceLineNo">884</span>  private Path inputRoot = null;<a name="line.884"></a>
-<span class="sourceLineNo">885</span>  private int bandwidthMB = Integer.MAX_VALUE;<a name="line.885"></a>
-<span class="sourceLineNo">886</span>  private int filesMode = 0;<a name="line.886"></a>
-<span class="sourceLineNo">887</span>  private int mappers = 0;<a name="line.887"></a>
-<span class="sourceLineNo">888</span><a name="line.888"></a>
-<span class="sourceLineNo">889</span>  @Override<a name="line.889"></a>
-<span class="sourceLineNo">890</span>  protected void processOptions(CommandLine cmd) {<a name="line.890"></a>
-<span class="sourceLineNo">891</span>    snapshotName = cmd.getOptionValue(Options.SNAPSHOT.getLongOpt(), snapshotName);<a name="line.891"></a>
-<span class="sourceLineNo">892</span>    targetName = cmd.getOptionValue(Options.TARGET_NAME.getLongOpt(), targetName);<a name="line.892"></a>
-<span class="sourceLineNo">893</span>    if (cmd.hasOption(Options.COPY_TO.getLongOpt())) {<a name="line.893"></a>
-<span class="sourceLineNo">894</span>      outputRoot = new Path(cmd.getOptionValue(Options.COPY_TO.getLongOpt()));<a name="line.894"></a>
-<span class="sourceLineNo">895</span>    }<a name="line.895"></a>
-<span class="sourceLineNo">896</span>    if (cmd.hasOption(Options.COPY_FROM.getLongOpt())) {<a name="line.896"></a>
-<span class="sourceLineNo">897</span>      inputRoot = new Path(cmd.getOptionValue(Options.COPY_FROM.getLongOpt()));<a name="line.897"></a>
-<span class="sourceLineNo">898</span>    }<a name="line.898"></a>
-<span class="sourceLineNo">899</span>    mappers = getOptionAsInt(cmd, Options.MAPPERS.getLongOpt(), mappers);<a name="line.899"></a>
-<span class="sourceLineNo">900</span>    filesUser = cmd.getOptionValue(Options.CHUSER.getLongOpt(), filesUser);<a name="line.900"></a>
-<span class="sourceLineNo">901</span>    filesGroup = cmd.getOptionValue(Options.CHGROUP.getLongOpt(), filesGroup);<a name="line.901"></a>
-<span class="sourceLineNo">902</span>    filesMode = getOptionAsInt(cmd, Options.CHMOD.getLongOpt(), filesMode);<a name="line.902"></a>
-<span class="sourceLineNo">903</span>    bandwidthMB = getOptionAsInt(cmd, Options.BANDWIDTH.getLongOpt(), bandwidthMB);<a name="line.903"></a>
-<span class="sourceLineNo">904</span>    overwrite = cmd.hasOption(Options.OVERWRITE.getLongOpt());<a name="line.904"></a>
-<span class="sourceLineNo">905</span>    // And verifyChecksum and verifyTarget with values read from old args in processOldArgs(...).<a name="line.905"></a>
-<span class="sourceLineNo">906</span>    verifyChecksum = !cmd.hasOption(Options.NO_CHECKSUM_VERIFY.getLongOpt());<a name="line.906"></a>
-<span class="sourceLineNo">907</span>    verifyTarget = !cmd.hasOption(Options.NO_TARGET_VERIFY.getLongOpt());<a name="line.907"></a>
-<span class="sourceLineNo">908</span>  }<a name="line.908"></a>
-<span class="sourceLineNo">909</span><a name="line.909"></a>
-<span class="sourceLineNo">910</span>  /**<a name="line.910"></a>
-<span class="sourceLineNo">911</span>   * Execute the export snapshot by copying the snapshot metadata, hfiles and wals.<a name="line.911"></a>
-<span class="sourceLineNo">912</span>   * @return 0 on success, and != 0 upon failure.<a name="line.912"></a>
-<span class="sourceLineNo">913</span>   */<a name="line.913"></a>
-<span class="sourceLineNo">914</span>  @Override<a name="line.914"></a>
-<span class="sourceLineNo">915</span>  public int doWork() throws IOException {<a name="line.915"></a>
-<span class="sourceLineNo">916</span>    Configuration conf = getConf();<a name="line.916"></a>
-<span class="sourceLineNo">917</span><a name="line.917"></a>
-<span class="sourceLineNo">918</span>    // Check user options<a name="line.918"></a>
-<span class="sourceLineNo">919</span>    if (snapshotName == null) {<a name="line.919"></a>
-<span class="sourceLineNo">920</span>      System.err.println("Snapshot name not provided.");<a name="line.920"></a>
-<span class="sourceLineNo">921</span>      LOG.error("Use -h or --help for usage instructions.");<a name="line.921"></a>
-<span class="sourceLineNo">922</span>      return 0;<a name="line.922"></a>
-<span class="sourceLineNo">923</span>    }<a name="line.923"></a>
-<span class="sourceLineNo">924</span><a name="line.924"></a>
-<span class="sourceLineNo">925</span>    if (outputRoot == null) {<a name="line.925"></a>
-<span class="sourceLineNo">926</span>      System.err.println("Destination file-system (--" + Options.COPY_TO.getLongOpt()<a name="line.926"></a>
-<span class="sourceLineNo">927</span>              + ") not provided.");<a name="line.927"></a>
-<span class="sourceLineNo">928</span>      LOG.error("Use -h or --help for usage instructions.");<a name="line.928"></a>
-<span class="sourceLineNo">929</span>      return 0;<a name="line.929"></a>
-<span class="sourceLineNo">930</span>    }<a name="line.930"></a>
-<span class="sourceLineNo">931</span><a name="line.931"></a>
-<span class="sourceLineNo">932</span>    if (targetName == null) {<a name="line.932"></a>
-<span class="sourceLineNo">933</span>      targetName = snapshotName;<a name="line.933"></a>
-<span class="sourceLineNo">934</span>    }<a name="line.934"></a>
-<span class="sourceLineNo">935</span>    if (inputRoot == null) {<a name="line.935"></a>
-<span class="sourceLineNo">936</span>      inputRoot = FSUtils.getRootDir(conf);<a name="line.936"></a>
-<span class="sourceLineNo">937</span>    } else {<a name="line.937"></a>
-<span class="sourceLineNo">938</span>      FSUtils.setRootDir(conf, inputRoot);<a name="line.938"></a>
-<span class="sourceLineNo">939</span>    }<a name="line.939"></a>
-<span class="sourceLineNo">940</span><a name="line.940"></a>
-<span class="sourceLineNo">941</span>    Configuration srcConf = HBaseConfiguration.createClusterConf(conf, null, CONF_SOURCE_PREFIX);<a name="line.941"></a>
-<span class="sourceLineNo">942</span>    srcConf.setBoolean("fs." + inputRoot.toUri().getScheme() + ".impl.disable.cache", true);<a name="line.942"></a>
-<span class="sourceLineNo">943</span>    FileSystem inputFs = FileSystem.get(inputRoot.toUri(), srcConf);<a name="line.943"></a>
-<span class="sourceLineNo">944</span>    LOG.debug("inputFs=" + inputFs.getUri().toString() + " inputRoot=" + inputRoot);<a name="line.944"></a>
-<span class="sourceLineNo">945</span>    Configuration destConf = HBaseConfiguration.createClusterConf(conf, null, CONF_DEST_PREFIX);<a name="line.945"></a>
-<span class="sourceLineNo">946</span>    destConf.setBoolean("fs." + outputRoot.toUri().getScheme() + ".impl.disable.cache", true);<a name="line.946"></a>
-<span class="sourceLineNo">947</span>    FileSystem outputFs = FileSystem.get(outputRoot.toUri(), destConf);<a name="line.947"></a>
-<span class="sourceLineNo">948</span>    LOG.debug("outputFs=" + outputFs.getUri().toString() + " outputRoot=" + outputRoot.toString());<a name="line.948"></a>
+<span class="sourceLineNo">829</span>      throw new ExportSnapshotException(job.getStatus().getFailureInfo());<a name="line.829"></a>
+<span class="sourceLineNo">830</span>    }<a name="line.830"></a>
+<span class="sourceLineNo">831</span>  }<a name="line.831"></a>
+<span class="sourceLineNo">832</span><a name="line.832"></a>
+<span class="sourceLineNo">833</span>  private void verifySnapshot(final Configuration baseConf,<a name="line.833"></a>
+<span class="sourceLineNo">834</span>      final FileSystem fs, final Path rootDir, final Path snapshotDir) throws IOException {<a name="line.834"></a>
+<span class="sourceLineNo">835</span>    // Update the conf with the current root dir, since may be a different cluster<a name="line.835"></a>
+<span class="sourceLineNo">836</span>    Configuration conf = new Configuration(baseConf);<a name="line.836"></a>
+<span class="sourceLineNo">837</span>    FSUtils.setRootDir(conf, rootDir);<a name="line.837"></a>
+<span class="sourceLineNo">838</span>    FSUtils.setFsDefault(conf, FSUtils.getRootDir(conf));<a name="line.838"></a>
+<span class="sourceLineNo">839</span>    SnapshotDescription snapshotDesc = SnapshotDescriptionUtils.readSnapshotInfo(fs, snapshotDir);<a name="line.839"></a>
+<span class="sourceLineNo">840</span>    SnapshotReferenceUtil.verifySnapshot(conf, fs, snapshotDir, snapshotDesc);<a name="line.840"></a>
+<span class="sourceLineNo">841</span>  }<a name="line.841"></a>
+<span class="sourceLineNo">842</span><a name="line.842"></a>
+<span class="sourceLineNo">843</span>  /**<a name="line.843"></a>
+<span class="sourceLineNo">844</span>   * Set path ownership.<a name="line.844"></a>
+<span class="sourceLineNo">845</span>   */<a name="line.845"></a>
+<span class="sourceLineNo">846</span>  private void setOwner(final FileSystem fs, final Path path, final String user,<a name="line.846"></a>
+<span class="sourceLineNo">847</span>      final String group, final boolean recursive) throws IOException {<a name="line.847"></a>
+<span class="sourceLineNo">848</span>    if (user != null || group != null) {<a name="line.848"></a>
+<span class="sourceLineNo">849</span>      if (recursive &amp;&amp; fs.isDirectory(path)) {<a name="line.849"></a>
+<span class="sourceLineNo">850</span>        for (FileStatus child : fs.listStatus(path)) {<a name="line.850"></a>
+<span class="sourceLineNo">851</span>          setOwner(fs, child.getPath(), user, group, recursive);<a name="line.851"></a>
+<span class="sourceLineNo">852</span>        }<a name="line.852"></a>
+<span class="sourceLineNo">853</span>      }<a name="line.853"></a>
+<span class="sourceLineNo">854</span>      fs.setOwner(path, user, group);<a name="line.854"></a>
+<span class="sourceLineNo">855</span>    }<a name="line.855"></a>
+<span class="sourceLineNo">856</span>  }<a name="line.856"></a>
+<span class="sourceLineNo">857</span><a name="line.857"></a>
+<span class="sourceLineNo">858</span>  /**<a name="line.858"></a>
+<span class="sourceLineNo">859</span>   * Set path permission.<a name="line.859"></a>
+<span class="sourceLineNo">860</span>   */<a name="line.860"></a>
+<span class="sourceLineNo">861</span>  private void setPermission(final FileSystem fs, final Path path, final short filesMode,<a name="line.861"></a>
+<span class="sourceLineNo">862</span>      final boolean recursive) throws IOException {<a name="line.862"></a>
+<span class="sourceLineNo">863</span>    if (filesMode &gt; 0) {<a name="line.863"></a>
+<span class="sourceLineNo">864</span>      FsPermission perm = new FsPermission(filesMode);<a name="line.864"></a>
+<span class="sourceLineNo">865</span>      if (recursive &amp;&amp; fs.isDirectory(path)) {<a name="line.865"></a>
+<span class="sourceLineNo">866</span>        for (FileStatus child : fs.listStatus(path)) {<a name="line.866"></a>
+<span class="sourceLineNo">867</span>          setPermission(fs, child.getPath(), filesMode, recursive);<a name="line.867"></a>
+<span class="sourceLineNo">868</span>        }<a name="line.868"></a>
+<span class="sourceLineNo">869</span>      }<a name="line.869"></a>
+<span class="sourceLineNo">870</span>      fs.setPermission(path, perm);<a name="line.870"></a>
+<span class="sourceLineNo">871</span>    }<a name="line.871"></a>
+<span class="sourceLineNo">872</span>  }<a name="line.872"></a>
+<span class="sourceLineNo">873</span><a name="line.873"></a>
+<span class="sourceLineNo">874</span>  private boolean verifyTarget = true;<a name="line.874"></a>
+<span class="sourceLineNo">875</span>  private boolean verifyChecksum = true;<a name="line.875"></a>
+<span class="sourceLineNo">876</span>  private String snapshotName = null;<a name="line.876"></a>
+<span class="sourceLineNo">877</span>  private String targetName = null;<a name="line.877"></a>
+<span class="sourceLineNo">878</span>  private boolean overwrite = false;<a name="line.878"></a>
+<span class="sourceLineNo">879</span>  private String filesGroup = null;<a name="line.879"></a>
+<span class="sourceLineNo">880</span>  private String filesUser = null;<a name="line.880"></a>
+<span class="sourceLineNo">881</span>  private Path outputRoot = null;<a name="line.881"></a>
+<span class="sourceLineNo">882</span>  private Path inputRoot = null;<a name="line.882"></a>
+<span class="sourceLineNo">883</span>  private int bandwidthMB = Integer.MAX_VALUE;<a name="line.883"></a>
+<span class="sourceLineNo">884</span>  private int filesMode = 0;<a name="line.884"></a>
+<span class="sourceLineNo">885</span>  private int mappers = 0;<a name="line.885"></a>
+<span class="sourceLineNo">886</span><a name="line.886"></a>
+<span class="sourceLineNo">887</span>  @Override<a name="line.887"></a>
+<span class="sourceLineNo">888</span>  protected void processOptions(CommandLine cmd) {<a name="line.888"></a>
+<span class="sourceLineNo">889</span>    snapshotName = cmd.getOptionValue(Options.SNAPSHOT.getLongOpt(), snapshotName);<a name="line.889"></a>
+<span class="sourceLineNo">890</span>    targetName = cmd.getOptionValue(Options.TARGET_NAME.getLongOpt(), targetName);<a name="line.890"></a>
+<span class="sourceLineNo">891</span>    if (cmd.hasOption(Options.COPY_TO.getLongOpt())) {<a name="line.891"></a>
+<span class="sourceLineNo">892</span>      outputRoot = new Path(cmd.getOptionValue(Options.COPY_TO.getLongOpt()));<a name="line.892"></a>
+<span class="sourceLineNo">893</span>    }<a name="line.893"></a>
+<span class="sourceLineNo">894</span>    if (cmd.hasOption(Options.COPY_FROM.getLongOpt())) {<a name="line.894"></a>
+<span class="sourceLineNo">895</span>      inputRoot = new Path(cmd.getOptionValue(Options.COPY_FROM.getLongOpt()));<a name="line.895"></a>
+<span class="sourceLineNo">896</span>    }<a name="line.896"></a>
+<span class="sourceLineNo">897</span>    mappers = getOptionAsInt(cmd, Options.MAPPERS.getLongOpt(), mappers);<a name="line.897"></a>
+<span class="sourceLineNo">898</span>    filesUser = cmd.getOptionValue(Options.CHUSER.getLongOpt(), filesUser);<a name="line.898"></a>
+<span class="sourceLineNo">899</span>    filesGroup = cmd.getOptionValue(Options.CHGROUP.getLongOpt(), filesGroup);<a name="line.899"></a>
+<span class="sourceLineNo">900</span>    filesMode = getOptionAsInt(cmd, Options.CHMOD.getLongOpt(), filesMode);<a name="line.900"></a>
+<span class="sourceLineNo">901</span>    bandwidthMB = getOptionAsInt(cmd, Options.BANDWIDTH.getLongOpt(), bandwidthMB);<a name="line.901"></a>
+<span class="sourceLineNo">902</span>    overwrite = cmd.hasOption(Options.OVERWRITE.getLongOpt());<a name="line.902"></a>
+<span class="sourceLineNo">903</span>    // And verifyChecksum and verifyTarget with values read from old args in processOldArgs(...).<a name="line.903"></a>
+<span class="sourceLineNo">904</span>    verifyChecksum = !cmd.hasOption(Options.NO_CHECKSUM_VERIFY.getLongOpt());<a name="line.904"></a>
+<span class="sourceLineNo">905</span>    verifyTarget = !cmd.hasOption(Options.NO_TARGET_VERIFY.getLongOpt());<a name="line.905"></a>
+<span class="sourceLineNo">906</span>  }<a name="line.906"></a>
+<span class="sourceLineNo">907</span><a name="line.907"></a>
+<span class="sourceLineNo">908</span>  /**<a name="line.908"></a>
+<span class="sourceLineNo">909</span>   * Execute the export snapshot by copying the snapshot metadata, hfiles and wals.<a name="line.909"></a>
+<span class="sourceLineNo">910</span>   * @return 0 on success, and != 0 upon failure.<a name="line.910"></a>
+<span class="sourceLineNo">911</span>   */<a name="line.911"></a>
+<span class="sourceLineNo">912</span>  @Override<a name="line.912"></a>
+<span class="sourceLineNo">913</span>  public int doWork() throws IOException {<a name="line.913"></a>
+<span class="sourceLineNo">914</span>    Configuration conf = getConf();<a name="line.914"></a>
+<span class="sourceLineNo">915</span><a name="line.915"></a>
+<span class="sourceLineNo">916</span>    // Check user options<a name="line.916"></a>
+<span class="sourceLineNo">917</span>    if (snapshotName == null) {<a name="line.917"></a>
+<span class="sourceLineNo">918</span>      System.err.println("Snapshot name not provided.");<a name="line.918"></a>
+<span class="sourceLineNo">919</span>      LOG.error("Use -h or --help for usage instructions.");<a name="line.919"></a>
+<span class="sourceLineNo">920</span>      return 0;<a name="line.920"></a>
+<span class="sourceLineNo">921</span>    }<a name="line.921"></a>
+<span class="sourceLineNo">922</span><a name="line.922"></a>
+<span class="sourceLineNo">923</span>    if (outputRoot == null) {<a name="line.923"></a>
+<span class="sourceLineNo">924</span>      System.err.println("Destination file-system (--" + Options.COPY_TO.getLongOpt()<a name="line.924"></a>
+<span class="sourceLineNo">925</span>              + ") not provided.");<a name="line.925"></a>
+<span class="sourceLineNo">926</span>      LOG.error("Use -h or --help for usage instructions.");<a name="line.926"></a>
+<span class="sourceLineNo">927</span>      return 0;<a name="line.927"></a>
+<span class="sourceLineNo">928</span>    }<a name="line.928"></a>
+<span class="sourceLineNo">929</span><a name="line.929"></a>
+<span class="sourceLineNo">930</span>    if (targetName == null) {<a name="line.930"></a>
+<span class="sourceLineNo">931</span>      targetName = snapshotName;<a name="line.931"></a>
+<span class="sourceLineNo">932</span>    }<a name="line.932"></a>
+<span class="sourceLineNo">933</span>    if (inputRoot == null) {<a name="line.933"></a>
+<span class="sourceLineNo">934</span>      inputRoot = FSUtils.getRootDir(conf);<a name="line.934"></a>
+<span class="sourceLineNo">935</span>    } else {<a name="line.935"></a>
+<span class="sourceLineNo">936</span>      FSUtils.setRootDir(conf, inputRoot);<a name="line.936"></a>
+<span class="sourceLineNo">937</span>    }<a name="line.937"></a>
+<span class="sourceLineNo">938</span><a name="line.938"></a>
+<span class="sourceLineNo">939</span>    Configuration srcConf = HBaseConfiguration.createClusterConf(conf, null, CONF_SOURCE_PREFIX);<a name="line.939"></a>
+<span class="sourceLineNo">940</span>    srcConf.setBoolean("fs." + inputRoot.toUri().getScheme() + ".impl.disable.cache", true);<a name="line.940"></a>
+<span class="sourceLineNo">941</span>    FileSystem inputFs = FileSystem.get(inputRoot.toUri(), srcConf);<a name="line.941"></a>
+<span class="sourceLineNo">942</span>    LOG.debug("inputFs=" + inputFs.getUri().toString() + " inputRoot=" + inputRoot);<a name="line.942"></a>
+<span class="sourceLineNo">943</span>    Configuration destConf = HBaseConfiguration.createClusterConf(conf, null, CONF_DEST_PREFIX);<a name="line.943"></a>
+<span class="sourceLineNo">944</span>    destConf.setBoolean("fs." + outputRoot.toUri().getScheme() + ".impl.disable.cache", true);<a name="line.944"></a>
+<span class="sourceLineNo">945</span>    FileSystem outputFs = FileSystem.get(outputRoot.toUri(), destConf);<a name="line.945"></a>
+<span class="sourceLineNo">946</span>    LOG.debug("outputFs=" + outputFs.getUri().toString() + " outputRoot=" + outputRoot.toString());<a name="line.946"></a>
+<span class="sourceLineNo">947</span><a name="line.947"></a>
+<span class="sourceLineNo">948</span>    boolean skipTmp = conf.getBoolean(CONF_SKIP_TMP, false);<a name="line.948"></a>
 <span class="sourceLineNo">949</span><a name="line.949"></a>
-<span class="sourceLineNo">950</span>    boolean skipTmp = conf.getBoolean(CONF_SKIP_TMP, false);<a name="line.950"></a>
-<span class="sourceLineNo">951</span><a name="line.951"></a>
-<span class="sourceLineNo">952</span>    Path snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshotName, inputRoot);<a name="line.952"></a>
-<span class="sourceLineNo">953</span>    Path snapshotTmpDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(targetName, outputRoot);<a name="line.953"></a>
-<span class="sourceLineNo">954</span>    Path outputSnapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(targetName, outputRoot);<a name="line.954"></a>
-<span class="sourceLineNo">955</span>    Path initialOutputSnapshotDir = skipTmp ? outputSnapshotDir : snapshotTmpDir;<a name="line.955"></a>
-<span class="sourceLineNo">956</span><a name="line.956"></a>
-<span class="sourceLineNo">957</span>    // Find the necessary directory which need to change owner and group<a name="line.957"></a>
-<span class="sourceLineNo">958</span>    Path needSetOwnerDir = SnapshotDescriptionUtils.getSnapshotRootDir(outputRoot);<a name="line.958"></a>
-<span class="sourceLineNo">959</span>    if (outputFs.exists(needSetOwnerDir)) {<a name="line.959"></a>
-<span class="sourceLineNo">960</span>      if (skipTmp) {<a name="line.960"></a>
-<span class="sourceLineNo">961</span>        needSetOwnerDir = outputSnapshotDir;<a name="line.961"></a>
-<span class="sourceLineNo">962</span>      } else {<a name="line.962"></a>
-<span class="sourceLineNo">963</span>        needSetOwnerDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(outputRoot);<a name="line.963"></a>
-<span class="sourceLineNo">964</span>        if (outputFs.exists(needSetOwnerDir)) {<a name="line.964"></a>
-<span class="sourceLineNo">965</span>          needSetOwnerDir = snapshotTmpDir;<a name="line.965"></a>
-<span class="sourceLineNo">966</span>        }<a name="line.966"></a>
-<span class="sourceLineNo">967</span>      }<a name="line.967"></a>
-<span class="sourceLineNo">968</span>    }<a name="line.968"></a>
-<span class="sourceLineNo">969</span><a name="line.969"></a>
-<span class="sourceLineNo">970</span>    // Check if the snapshot already exists<a name="line.970"></a>
-<span class="sourceLineNo">971</span>    if (outputFs.exists(outputSnapshotDir)) {<a name="line.971"></a>
-<span class="sourceLineNo">972</span>      if (overwrite) {<a name="line.972"></a>
-<span class="sourceLineNo">973</span>        if (!outputFs.delete(outputSnapshotDir, true)) {<a name="line.973"></a>
-<span class="sourceLineNo">974</span>          System.err.println("Unable to remove existing snapshot directory: " + outputSnapshotDir);<a name="line.974"></a>
-<span class="sourceLineNo">975</span>          return 1;<a name="line.975"></a>
-<span class="sourceLineNo">976</span>        }<a name="line.976"></a>
-<span class="sourceLineNo">977</span>      } else {<a name="line.977"></a>
-<span class="sourceLineNo">978</span>        System.err.println("The snapshot '" + targetName +<a name="line.978"></a>
-<span class="sourceLineNo">979</span>          "' already exists in the destination: " + outputSnapshotDir);<a name="line.979"></a>
-<span class="sourceLineNo">980</span>        return 1;<a name="line.980"></a>
-<span class="sourceLineNo">981</span>      }<a name="line.981"></a>
-<span class="sourceLineNo">982</span>    }<a name="line.982"></a>
-<span class="sourceLineNo">983</span><a name="line.983"></a>
-<span class="sourceLineNo">984</span>    if (!skipTmp) {<a name="line.984"></a>
-<span class="sourceLineNo">985</span>      // Check if the snapshot already in-progress<a name="line.985"></a>
-<span class="sourceLineNo">986</span>      if (outputFs.exists(snapshotTmpDir)) {<a name="line.986"></a>
-<span class="sourceLineNo">987</span>        if (overwrite) {<a name="line.987"></a>
-<span class="sourceLineNo">988</span>          if (!outputFs.delete(snapshotTmpDir, true)) {<a name="line.988"></a>
-<span class="sourceLineNo">989</span>            System.err.println("Unable to remove existing snapshot tmp directory: "+snapshotTmpDir);<a name="line.989"></a>
-<span class="sourceLineNo">990</span>            return 1;<a name="line.990"></a>
-<span class="sourceLineNo">991</span>          }<a name="line.991"></a>
-<span class="sourceLineNo">992</span>        } else {<a name="line.992"></a>
-<span class="sourceLineNo">993</span>          System.err.println("A snapshot with the same name '"+ targetName +"' may be in-progress");<a name="line.993"></a>
-<span class="sourceLineNo">994</span>          System.err.println("Please check "+snapshotTmpDir+". If the snapshot has completed, ");<a name="line.994"></a>
-<span class="sourceLineNo">995</span>          System.err.println("consider removing "+snapshotTmpDir+" by using the -overwrite option");<a name="line.995"></a>
-<span class="sourceLineNo">996</span>          return 1;<a name="line.996"></a>
-<span class="sourceLineNo">997</span>        }<a name="line.997"></a>
-<span class="sourceLineNo">998</span>      }<a name="line.998"></a>
-<span class="sourceLineNo">999</span>    }<a name="line.999"></a>
-<span class="sourceLineNo">1000</span><a name="line.1000"></a>
-<span class="sourceLineNo">1001</span>    // Step 1 - Copy fs1:/.snapshot/&lt;snapshot&gt; to  fs2:/.snapshot/.tmp/&lt;snapshot&gt;<a name="line.1001"></a>
-<span class="sourceLineNo">1002</span>    // The snapshot references must be copied before the hfiles otherwise the cleaner<a name="line.1002"></a>
-<span class="sourceLineNo">1003</span>    // will remove them because they are unreferenced.<a name="line.1003"></a>
-<span class="sourceLineNo">1004</span>    try {<a name="line.1004"></a>
-<span class="sourceLineNo">1005</span>      LOG.info("Copy Snapshot Manifest");<a name="line.1005"></a>
-<span class="sourceLineNo">1006</span>      FileUtil.copy(inputFs, snapshotDir, outputFs, initialOutputSnapshotDir, false, false, conf);<a name="line.1006"></a>
-<span class="sourceLineNo">1007</span>    } catch (IOException e) {<a name="line.1007"></a>
-<span class="sourceLineNo">1008</span>      throw new ExportSnapshotException("Failed to copy the snapshot directory: from=" +<a name="line.1008"></a>
-<span class="sourceLineNo">1009</span>        snapshotDir + " to=" + initialOutputSnapshotDir, e);<a name="line.1009"></a>
-<span class="sourceLineNo">1010</span>    } finally {<a name="line.1010"></a>
-<span class="sourceLineNo">1011</span>      if (filesUser != null || filesGroup != null) {<a name="line.1011"></a>
-<span class="sourceLineNo">1012</span>        LOG.warn((filesUser == null ? "" : "Change the owner of " + needSetOwnerDir + " to "<a name="line.1012"></a>
-<span class="sourceLineNo">1013</span>            + filesUser)<a name="line.1013"></a>
-<span class="sourceLineNo">1014</span>            + (filesGroup == null ? "" : ", Change the group of " + needSetOwnerDir + " to "<a name="line.1014"></a>
-<span class="sourceLineNo">1015</span>            + filesGroup));<a name="line.1015"></a>
-<span class="sourceLineNo">1016</span>        setOwner(outputFs, needSetOwnerDir, filesUser, filesGroup, true);<a name="line.1016"></a>
-<span class="sourceLineNo">1017</span>      }<a name="line.1017"></a>
-<span class="sourceLineNo">1018</span>      if (filesMode &gt; 0) {<a name="line.1018"></a>
-<span class="sourceLineNo">1019</span>        LOG.warn("Change the permission of " + needSetOwnerDir + " to " + filesMode);<a name="line.1019"></a>
-<span class="sourceLineNo">1020</span>        setPermission(outputFs, needSetOwnerDir, (short)filesMode, true);<a name="line.1020"></a>
-<span class="sourceLineNo">1021</span>      }<a name="line.1021"></a>
-<span class="sourceLineNo">1022</span>    }<a name="line.1022"></a>
-<span class="sourceLineNo">1023</span><a name="line.1023"></a>
-<span class="sourceLineNo">1024</span>    // Write a new .snapshotinfo if the target name is different from the source name<a name="line.1024"></a>
-<span class="sourceLineNo">1025</span>    if (!targetName.equals(snapshotName)) {<a name="line.1025"></a>
-<span class="sourceLineNo">1026</span>      SnapshotDescription snapshotDesc =<a name="line.1026"></a>
-<span class="sourceLineNo">1027</span>        SnapshotDescriptionUtils.readSnapshotInfo(inputFs, snapshotDir)<a name="line.1027"></a>
-<span class="sourceLineNo">1028</span>          .toBuilder()<a name="line.1028"></a>
-<span class="sourceLineNo">1029</span>          .setName(targetName)<a name="line.1029"></a>
-<span class="sourceLineNo">1030</span>          .build();<a name="line.1030"></a>
-<span class="sourceLineNo">1031</span>      SnapshotDescriptionUtils.writeSnapshotInfo(snapshotDesc, initialOutputSnapshotDir, outputFs);<a name="line.1031"></a>
-<span class="sourceLineNo">1032</span>      if (filesUser != null || filesGroup != null) {<a name="line.1032"></a>
-<span class="sourceLineNo">1033</span>        outputFs.setOwner(new Path(initialOutputSnapshotDir,<a name="line.1033"></a>
-<span class="sourceLineNo">1034</span>          SnapshotDescriptionUtils.SNAPSHOTINFO_FILE), filesUser, filesGroup);<a name="line.1034"></a>
-<span class="sourceLineNo">1035</span>      }<a name="line.1035"></a>
-<span class="sourceLineNo">1036</span>      if (filesMode &gt; 0) {<a name="line.1036"></a>
-<span class="sourceLineNo">1037</span>        outputFs.setPermission(new Path(initialOutputSnapshotDir,<a name="line.1037"></a>
-<span class="sourceLineNo">1038</span>          SnapshotDescriptionUtils.SNAPSHOTINFO_FILE), new FsPermission((short)filesMode));<a name="line.1038"></a>
-<span class="sourceLineNo">1039</span>      }<a name="line.1039"></a>
-<span class="sourceLineNo">1040</span>    }<a name="line.1040"></a>
-<span class="sourceLineNo">1041</span><a name="line.1041"></a>
-<span class="sourceLineNo">1042</span>    // Step 2 - Start MR Job to copy files<a name="line.1042"></a>
-<span class="sourceLineNo">1043</span>    // The snapshot references must be copied before the files otherwise the files gets removed<a name="line.1043"></a>
-<span class="sourceLineNo">1044</span>    // by the HFileArchiver, since they have no references.<a name="line.1044"></a>
-<span class="sourceLineNo">1045</span>    try {<a name="line.1045"></a>
-<span class="sourceLineNo">1046</span>      runCopyJob(inputRoot, outputRoot, snapshotName, snapshotDir, verifyChecksum,<a name="line.1046"></a>
-<span class="sourceLineNo">1047</span>                 filesUser, filesGroup, filesMode, mappers, bandwidthMB);<a name="line.1047"></a>
-<span class="sourceLineNo">1048</span><a name="line.1048"></a>
-<span class="sourceLineNo">1049</span>      LOG.info("Finalize the Snapshot Export");<a name="line.1049"></a>
-<span class="sourceLineNo">1050</span>      if (!skipTmp) {<a name="line.1050"></a>
-<span class="sourceLineNo">1051</span>        // Step 3 - Rename fs2:/.snapshot/.tmp/&lt;snapshot&gt; fs2:/.snapshot/&lt;snapshot&gt;<a name="line.1051"></a>
-<span class="sourceLineNo">1052</span>        if (!outputFs.rename(snapshotTmpDir, outputSnapshotDir)) {<a name="line.1052"></a>
-<span class="sourceLineNo">1053</span>          throw new ExportSnapshotException("Unable to rename snapshot directory from=" +<a name="line.1053"></a>
-<span class="sourceLineNo">1054</span>            snapshotTmpDir + " to=" + outputSnapshotDir);<a name="line.1054"></a>
-<span class="sourceLineNo">1055</span>        }<a name="line.1055"></a>
-<span class="sourceLineNo">1056</span>      }<a name="line.1056"></a>
-<span class="sourceLineNo">1057</span><a name="line.1057"></a>
-<span class="sourceLineNo">1058</span>      // Step 4 - Verify snapshot integrity<a name="line.1058"></a>
-<span class="sourceLineNo">1059</span>      if (verifyTarget) {<a name="line.1059"></a>
-<span class="sourceLineNo">1060</span>        LOG.info("Verify snapshot integrity");<a name="line.1060"></a>
-<span class="sourceLineNo">1061</span>        verifySnapshot(destConf, outputFs, outputRoot, outputSnapshotDir);<a name="line.1061"></a>
-<span class="sourceLineNo">1062</span>      }<a name="line.1062"></a>
-<span class="sourceLineNo">1063</span><a name="line.1063"></a>
-<span class="sourceLineNo">1064</span>      LOG.info("Export Completed: " + targetName);<a name="line.1064"></a>
-<span class="sourceLineNo">1065</span>      return 0;<a name="line.1065"></a>
-<span class="sourceLineNo">1066</span>    } catch (Exception e) {<a name="line.1066"></a>
-<span class="sourceLineNo">1067</span>      LOG.error("Snapshot export failed", e);<a name="line.1067"></a>
-<span class="sourceLineNo">1068</span>      if (!skipTmp) {<a name="line.1068"></a>
-<span class="sourceLineNo">1069</span>        outputFs.delete(snapshotTmpDir, true);<a name="line.1069"></a>
-<span class="sourceLineNo">1070</span>      }<a name="line.1070"></a>
-<span class="sourceLineNo">1071</span>      outputFs.delete(outputSnapshotDir, true);<a name="line.1071"></a>
-<span class="sourceLineNo">1072</span>      return 1;<a name="line.1072"></a>
-<span class="sourceLineNo">1073</span>    } finally {<a name="line.1073"></a>
-<span class="sourceLineNo">1074</span>      IOUtils.closeStream(inputFs);<a name="line.1074"></a>
-<span class="sourceLineNo">1075</span>      IOUtils.closeStream(outputFs);<a name="line.1075"></a>
-<span class="sourceLineNo">1076</span>    }<a name="line.1076"></a>
-<span class="sourceLineNo">1077</span>  }<a name="line.1077"></a>
-<span class="sourceLineNo">1078</span><a name="line.1078"></a>
-<span class="sourceLineNo">1079</span>  @Override<a name="line.1079"></a>
-<span class="sourceLineNo">1080</span>  protected void printUsage() {<a name="line.1080"></a>
-<span class="sourceLineNo">1081</span>    super.printUsage();<a name="line.1081"></a>
-<span class="sourceLineNo">1082</span>    System.out.println("\n"<a name="line.1082"></a>
-<span class="sourceLineNo">1083</span>        + "Examples:\n"<a name="line.1083"></a>
-<span class="sourceLineNo">1084</span>        + "  hbase snapshot export \\\n"<a name="line.1084"></a>
-<span class="sourceLineNo">1085</span>        + "    --snapshot MySnapshot --copy-to hdfs://srv2:8082/hbase \\\n"<a name="line.1085"></a>
-<span class="sourceLineNo">1086</span>        + "    --chuser MyUser --chgroup MyGroup --chmod 700 --mappers 16\n"<a name="line.1086"></a>
-<span class="sourceLineNo">1087</span>        + "\n"<a name="line.1087"></a>
-<span class="sourceLineNo">1088</span>        + "  hbase snapshot export \\\n"<a name="line.1088"></a>
-<span class="sourceLineNo">1089</span>        + "    --snapshot MySnapshot --copy-from hdfs://srv2:8082/hbase \\\n"<a name="line.1089"></a>
-<span class="sourceLineNo">1090</span>        + "    --copy-to hdfs://srv1:50070/hbase");<a name="line.1090"></a>
-<span class="sourceLineNo">1091</span>  }<a name="line.1091"></a>
-<span class="sourceLineNo">1092</span><a name="line.1092"></a>
-<span class="sourceLineNo">1093</span>  @Override protected void addOptions() {<a name="line.1093"></a>
-<span class="sourceLineNo">1094</span>    addRequiredOption(Options.SNAPSHOT);<a name="line.1094"></a>
-<span class="sourceLineNo">1095</span>    addOption(Options.COPY_TO);<a name="line.1095"></a>
-<span class="sourceLineNo">1096</span>    addOption(Options.COPY_FROM);<a name="line.1096"></a>
-<span class="sourceLineNo">1097</span>    addOption(Options.TARGET_NAME);<a name="line.1097"></a>
-<span class="sourceLineNo">1098</span>    addOption(Options.NO_CHECKSUM_VERIFY);<a name="line.1098"></a>
-<span class="sourceLineNo">1099</span>    addOption(Options.NO_TARGET_VERIFY);<a name="line.1099"></a>
-<span class="sourceLineNo">1100</span>    addOption(Options.OVERWRITE);<a name="line.1100"></a>
-<span class="sourceLineNo">1101</span>    addOption(Options.CHUSER);<a name="line.1101"></a>
-<span class="sourceLineNo">1102</span>    addOption(Options.CHGROUP);<a name="line.1102"></a>
-<span class="sourceLineNo">1103</span>    addOption(Options.CHMOD);<a name="line.1103"></a>
-<span class="sourceLineNo">1104</span>    addOption(Options.MAPPERS);<a name="line.1104"></a>
-<span class="sourceLineNo">1105</span>    addOption(Options.BANDWIDTH);<a name="line.1105"></a>
-<span class="sourceLineNo">1106</span>  }<a name="line.1106"></a>
-<span class="sourceLineNo">1107</span><a name="line.1107"></a>
-<span class="sourceLineNo">1108</span>  public static void main(String[] args) {<a name="line.1108"></a>
-<span class="sourceLineNo">1109</span>    new ExportSnapshot().doStaticMain(args);<a name="line.1109"></a>
-<span class="sourceLineNo">1110</span>  }<a name="line.1110"></a>
-<span class="sourceLineNo">1111</span>}<a name="line.1111"></a>
+<span class="sourceLineNo">950</span>    Path snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshotName, inputRoot);<a name="line.950"></a>
+<span class="sourceLineNo">951</span>    Path snapshotTmpDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(targetName, outputRoot);<a name="line.951"></a>
+<span class="sourceLineNo">952</span>    Path outputSnapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(targetName, outputRoot);<a name="line.952"></a>
+<span class="sourceLineNo">953</span>    Path initialOutputSnapshotDir = skipTmp ? outputSnapshotDir : snapshotTmpDir;<a name="line.953"></a>
+<span class="sourceLineNo">954</span><a name="line.954"></a>
+<span class="sourceLineNo">955</span>    // Find the necessary directory which need to change owner and group<a name="line.955"></a>
+<span class="sourceLineNo">956</span>    Path needSetOwnerDir = SnapshotDescriptionUtils.getSnapshotRootDir(outputRoot);<a name="line.956"></a>
+<span class="sourceLineNo">957</span>    if (outputFs.exists(needSetOwnerDir)) {<a name="line.957"></a>
+<span class="sourceLineNo">958</span>      if (skipTmp) {<a name="line.958"></a>
+<span class="sourceLineNo">959</span>        needSetOwnerDir = outputSnapshotDir;<a name="line.959"></a>
+<span class="sourceLineNo">960</span>      } else {<a name="line.960"></a>
+<span class="sourceLineNo">961</span>        needSetOwnerDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(outputRoot);<a name="line.961"></a>
+<span class="sourceLineNo">962</span>        if (outputFs.exists(needSetOwnerDir)) {<a name="line.962"></a>
+<span class="sourceLineNo">963</span>          needSetOwnerDir = snapshotTmpDir;<a name="line.963"></a>
+<span class="sourceLineNo">964</span>        }<a name="line.964"></a>
+<span class="sourceLineNo">965</span>      }<a name="line.965"></a>
+<span class="sourceLineNo">966</span>    }<a name="line.966"></a>
+<span class="sourceLineNo">967</span><a name="line.967"></a>
+<span class="sourceLineNo">968</span>    // Check if the snapshot already exists<a name="line.968"></a>
+<span class="sourceLineNo">969</span>    if (outputFs.exists(outputSnapshotDir)) {<a name="line.969"></a>
+<span class="sourceLineNo">970</span>      if (overwrite) {<a name="line.970"></a>
+<span class="sourceLineNo">971</span>        if (!outputFs.delete(outputSnapshotDir, true)) {<a name="line.971"></a>
+<span class="sourceLineNo">972</span>          System.err.println("Unable to remove existing snapshot directory: " + outputSnapshotDir);<a name="line.972"></a>
+<span class="sourceLineNo">973</span>          return 1;<a name="line.973"></a>
+<span class="sourceLineNo">974</span>        }<a name="line.974"></a>
+<span class="sourceLineNo">975</span>      } else {<a name="line.975"></a>
+<span class="sourceLineNo">976</span>        System.err.println("The snapshot '" + targetName +<a name="line.976"></a>
+<span class="sourceLineNo">977</span>          "' already exists in the destination: " + outputSnapshotDir);<a name="line.977"></a>
+<span class="sourceLineNo">978</span>        return 1;<a name="line.978"></a>
+<span class="sourceLineNo">979</span>      }<a name="line.979"></a>
+<span class="sourceLineNo">980</span>    }<a name="line.980"></a>
+<span class="sourceLineNo">981</span><a name="line.981"></a>
+<span class="sourceLineNo">982</span>    if (!skipTmp) {<a name="line.982"></a>
+<span class="sourceLineNo">983</span>      // Check if the snapshot already in-progress<a name="line.983"></a>
+<span class="sourceLineNo">984</span>      if (outputFs.exists(snapshotTmpDir)) {<a name="line.984"></a>
+<span class="sourceLineNo">985</span>        if (overwrite) {<a name="line.985"></a>
+<span class="sourceLineNo">986</span>          if (!outputFs.delete(snapshotTmpDir, true)) {<a name="line.986"></a>
+<span class="sourceLineNo">987</span>            System.err.println("Unable to remove existing snapshot tmp directory: "+snapshotTmpDir);<a name="line.987"></a>
+<span class="sourceLineNo">988</span>            return 1;<a name="line.988"></a>
+<span class="sourceLineNo">989</span>          }<a name="line.989"></a>
+<span class="sourceLineNo">990</span>        } else {<a name="line.990"></a>
+<span class="sourceLineNo">991</span>          System.err.println("A snapshot with the same name '"+ targetName +"' may be in-progress");<a name="line.991"></a>
+<span class="sourceLineNo">992</span>          System.err.println("Please check "+snapshotTmpDir+". If the snapshot has completed, ");<a name="line.992"></a>
+<span class="sourceLineNo">993</span>          System.err.println("consider removing "+snapshotTmpDir+" by using the -overwrite option");<a name="line.993"></a>
+<span class="sourceLineNo">994</span>          return 1;<a name="line.994"></a>
+<span class="sourceLineNo">995</span>        }<a name="line.995"></a>
+<span class="sourceLineNo">996</span>      }<a name="line.996"></a>
+<span class="sourceLineNo">997</span>    }<a name="line.997"></a>
+<span class="sourceLineNo">998</span><a name="line.998"></a>
+<span class="sourceLineNo">999</span>    // Step 1 - Copy fs1:/.snapshot/&lt;snapshot&gt; to  fs2:/.snapshot/.tmp/&lt;snapshot&gt;<a name="line.999"></a>
+<span class="sourceLineNo">1000</span>    // The snapshot references must be copied before the hfiles otherwise the cleaner<a name="line.1000"></a>
+<span class="sourceLineNo">1001</span>    // will remove them because they are unreferenced.<a name="line.1001"></a>
+<span class="sourceLineNo">1002</span>    try {<a name="line.1002"></a>
+<span class="sourceLineNo">1003</span>      LOG.info("Copy Snapshot Manifest");<a name="line.1003"></a>
+<span class="sourceLineNo">1004</span>      FileUtil.copy(inputFs, snapshotDir, outputFs, initialOutputSnapshotDir, false, false, conf);<a name="line.1004"></a>
+<span class="sourceLineNo">1005</span>    } catch (IOException e) {<a name="line.1005"></a>
+<span class="sourceLineNo">1006</span>      throw new ExportSnapshotException("Failed to copy the snapshot directory: from=" +<a name="line.1006"></a>
+<span class="sourceLineNo">1007</span>        snapshotDir + " to=" + initialOutputSnapshotDir, e);<a name="line.1007"></a>
+<span class="sourceLineNo">1008</span>    } finally {<a name="line.1008"></a>
+<span class="sourceLineNo">1009</span>      if (filesUser != null || filesGroup != null) {<a name="line.1009"></a>
+<span class="sourceLineNo">1010</span>        LOG.warn((filesUser == null ? "" : "Change the owner of " + needSetOwnerDir + " to "<a name="line.1010"></a>
+<span class="sourceLineNo">1011</span>            + filesUser)<a name="line.1011"></a>
+<span class="sourceLineNo">1012</span>            + (filesGroup == null ? "" : ", Change the group of " + needSetOwnerDir + " to "<a name="line.1012"></a>
+<span class="sourceLineNo">1013</span>            + filesGroup));<a name="line.1013"></a>
+<span class="sourceLineNo">1014</span>        setOwner(outputFs, needSetOwnerDir, filesUser, filesGroup, true);<a name="line.1014"></a>
+<span class="sourceLineNo">1015</span>      }<a name="line.1015"></a>
+<span class="sourceLineNo">1016</span>      if (filesMode &gt; 0) {<a name="line.1016"></a>
+<span class="sourceLineNo">1017</span>        LOG.warn("Change the permission of " + needSetOwnerDir + " to " + filesMode);<a name="line.1017"></a>
+<span class="sourceLineNo">1018</span>        setPermission(outputFs, needSetOwnerDir, (short)filesMode, true);<a name="line.1018"></a>
+<span class="sourceLineNo">1019</span>      }<a name="line.1019"></a>
+<span class="sourceLineNo">1020</span>    }<a name="line.1020"></a>
+<span class="sourceLineNo">1021</span><a name="line.1021"></a>
+<span class="sourceLineNo">1022</span>    // Write a new .snapshotinfo if the target name is different from the source name<a name="line.1022"></a>
+<span class="sourceLineNo">1023</span>    if (!targetName.equals(snapshotName)) {<a name="line.1023"></a>
+<span class="sourceLineNo">1024</span>      SnapshotDescription snapshotDesc =<a name="line.1024"></a>
+<span class="sourceLineNo">1025</span>        SnapshotDescriptionUtils.readSnapshotInfo(inputFs, snapshotDir)<a name="line.1025"></a>
+<span class="sourceLineNo">1026</span>          .toBuilder()<a name="line.1026"></a>
+<span class="sourceLineNo">1027</span>          .setName(targetName)<a name="line.1027"></a>
+<span class="sourceLineNo">1028</span>          .build();<a name="line.1028"></a>
+<span class="sourceLineNo">1029</span>      SnapshotDescriptionUtils.writeSnapshotInfo(snapshotDesc, initialOutputSnapshotDir, outputFs);<a name="line.1029"></a>
+<span class="sourceLineNo">1030</span>      if (filesUser != null || filesGroup != null) {<a name="line.1030"></a>
+<span class="sourceLineNo">1031</span>        outputFs.setOwner(new Path(initialOutputSnapshotDir,<a name="line.1031"></a>
+<span class="sourceLineNo">1032</span>          SnapshotDescriptionUtils.SNAPSHOTINFO_FILE), filesUser, filesGroup);<a name="line.1032"></a>
+<span class="sourceLineNo">1033</span>      }<a name="line.1033"></a>
+<span class="sourceLineNo">1034</span>      if (filesMode &gt; 0) {<a name="line.1034"></a>
+<span class="sourceLineNo">1035</span>        outputFs.setPermission(new Path(initialOutputSnapshotDir,<a name="line.1035"></a>
+<span class="sourceLineNo">1036</span>          SnapshotDescriptionUtils.SNAPSHOTINFO_FILE), new FsPermission((short)filesMode));<a name="line.1036"></a>
+<span class="sourceLineNo">1037</span>      }<a name="line.1037"></a>
+<span class="sourceLineNo">1038</span>    }<a name="line.1038"></a>
+<span class="sourceLineNo">1039</span><a name="line.1039"></a>
+<span class="sourceLineNo">1040</span>    // Step 2 - Start MR Job to copy files<a name="line.1040"></a>
+<span class="sourceLineNo">1041</span>    // The snapshot references must be copied before the files otherwise the files gets removed<a name="line.1041"></a>
+<span class="sourceLineNo">1042</span>    // by the HFileArchiver, since they have no references.<a name="line.1042"></a>
+<span class="sourceLineNo">1043</span>    try {<a name="line.1043"></a>
+<span class="sourceLineNo">1044</span>      runCopyJob(inputRoot, outputRoot, snapshotName, snapshotDir, verifyChecksum,<a name="line.1044"></a>
+<span class="sourceLineNo">1045</span>                 filesUser, filesGroup, filesMode, mappers, bandwidthMB);<a name="line.1045"></a>
+<span class="sourceLineNo">1046</span><a name="line.1046"></a>
+<span class="sourceLineNo">1047</span>      LOG.info("Finalize the Snapshot Export");<a name="line.1047"></a>
+<span class="sourceLineNo">1048</span>      if (!skipTmp) {<a name="line.1048"></a>
+<span class="sourceLineNo">1049</span>        // Step 3 - Rename fs2:/.snapshot/.tmp/&lt;snapshot&gt; fs2:/.snapshot/&lt;snapshot&gt;<a name="line.1049"></a>
+<span class="sourceLineNo">1050</span>        if (!outputFs.rename(snapshotTmpDir, outputSnapshotDir)) {<a name="line.1050"></a>
+<span class="sourceLineNo">1051</span>          throw new ExportSnapshotException("Unable to rename snapshot directory from=" +<a name="line.1051"></a>
+<span class="sourceLineNo">1052</span>            snapshotTmpDir + " to=" + outputSnapshotDir);<a name="line.1052"></a>
+<span class="sourceLineNo">1053</span>        }<a name="line.1053"></a>
+<span class="sourceLineNo">1054</span>      }<a name="line.1054"></a>
+<span class="sourceLineNo">1055</span><a name="line.1055"></a>
+<span class="sourceLineNo">1056</span>      // Step 4 - Verify snapshot integrity<a name="line.1056"></a>
+<span class="sourceLineNo">1057</span>      if (verifyTarget) {<a name="line.1057"></a>
+<span class="sourceLineNo">1058</span>        LOG.info("Verify snapshot integrity");<a name="line.1058"></a>
+<span class="sourceLineNo">1059</span>        verifySnapshot(destConf, outputFs, outputRoot, outputSnapshotDir);<a name="line.1059"></a>
+<span class="sourceLineNo">1060</span>      }<a name="line.1060"></a>
+<span class="sourceLineNo">1061</span><a name="line.1061"></a>
+<span class="sourceLineNo">1062</span>      LOG.info("Export Completed: " + targetName);<a name="line.1062"></a>
+<span class="sourceLineNo">1063</span>      return 0;<a name="line.1063"></a>
+<span class="sourceLineNo">1064</span>    } catch (Exception e) {<a name="line.1064"></a>
+<span class="sourceLineNo">1065</span>      LOG.error("Snapshot export failed", e);<a name="line.1065"></a>
+<span class="sourceLineNo">1066</span>      if (!skipTmp) {<a name="line.1066"></a>
+<span class="sourceLineNo">1067</span>        outputFs.delete(snapshotTmpDir, true);<a name="line.1067"></a>
+<span class="sourceLineNo">1068</span>      }<a name="line.1068"></a>
+<span class="sourceLineNo">1069</span>      outputFs.delete(outputSnapshotDir, true);<a name="line.1069"></a>
+<span class="sourceLineNo">1070</span>      return 1;<a name="line.1070"></a>
+<span class="sourceLineNo">1071</span>    } finally {<a name="line.1071"></a>
+<span class="sourceLineNo">1072</span>      IOUtils.closeStream(inputFs);<a name="line.1072"></a>
+<span class="sourceLineNo">1073</span>      IOUtils.closeStream(outputFs);<a name="line.1073"></a>
+<span class="sourceLineNo">1074</span>    }<a name="line.1074"></a>
+<span class="sourceLineNo">1075</span>  }<a name="line.1075"></a>
+<span class="sourceLineNo">1076</span><a name="line.1076"></a>
+<span class="sourceLineNo">1077</span>  @Override<a name="line.1077"></a>
+<span class="sourceLineNo">1078</span>  protected void printUsage() {<a name="line.1078"></a>
+<span class="sourceLineNo">1079</span>    super.printUsage();<a name="line.1079"></a>
+<span class="sourceLineNo">1080</span>    System.out.println("\n"<a name="line.1080"></a>
+<span class="sourceLineNo">1081</span>        + "Examples:\n"<a name="line.1081"></a>
+<span class="sourceLineNo">1082</span>        + "  hbase snapshot export \\\n"<a name="line.1082"></a>
+<span class="sourceLineNo">1083</span>        + "    --snapshot MySnapshot --copy-to hdfs://srv2:8082/hbase \\\n"<a name="line.1083"></a>
+<span class="sourceLineNo">1084</span>        + "    --chuser MyUser --chgroup MyGroup --chmod 700 --mappers 16\n"<a name="line.1084"></a>
+<span class="sourceLineNo">1085</span>        + "\n"<a name="line.1085"></a>
+<span class="sourceLineNo">1086</span>        + "  hbase snapshot export \\\n"<a name="line.1086"></a>
+<span class="sourceLineNo">1087</span>        + "    --snapshot MySnapshot --copy-from hdfs://srv2:8082/hbase \\\n"<a name="line.1087"></a>
+<span class="sourceLineNo">1088</span>        + "    --copy-to hdfs://srv1:50070/hbase");<a name="line.1088"></a>
+<span class="sourceLineNo">1089</span>  }<a name="line.1089"></a>
+<span class="sourceLineNo">1090</span><a name="line.1090"></a>
+<span class="sourceLineNo">1091</span>  @Override protected void addOptions() {<a name="line.1091"></a>
+<span class="sourceLineNo">1092</span>    addRequiredOption(Options.SNAPSHOT);<a name="line.1092"></a>
+<span class="sourceLineNo">1093</span>    addOption(Options.COPY_TO);<a name="line.1093"></a>
+<span class="sourceLineNo">1094</span>    addOption(Options.COPY_FROM);<a name="line.1094"></a>
+<span class="sourceLineNo">1095</span>    addOption(Options.TARGET_NAME);<a name="line.1095"></a>
+<span class="sourceLineNo">1096</span>    addOption(Options.NO_CHECKSUM_VERIFY);<a name="line.1096"></a>
+<span class="sourceLineNo">1097</span>    addOption(Options.NO_TARGET_VERIFY);<a name="line.1097"></a>
+<span class="sourceLineNo">1098</span>    addOption(Options.OVERWRITE);<a name="line.1098"></a>
+<span class="sourceLineNo">1099</span>    addOption(Options.CHUSER);<a name="line.1099"></a>
+<span class="sourceLineNo">1100</span>    addOption(Options.CHGROUP);<a name="line.1100"></a>
+<span class="sourceLineNo">1101</span>    addOption(Options.CHMOD);<a name="line.1101"></a>
+<span class="sourceLineNo">1102</span>    addOption(Options.MAPPERS);<a name="line.1102"></a>
+<span class="sourceLineNo">1103</span>    addOption(Options.BANDWIDTH);<a name="line.1103"></a>
+<span class="sourceLineNo">1104</span>  }<a name="line.1104"></a>
+<span class="sourceLineNo">1105</span><a name="line.1105"></a>
+<span class="sourceLineNo">1106</span>  public static void main(String[] args) {<a name="line.1106"></a>
+<span class="sourceLineNo">1107</span>    new ExportSnapshot().doStaticMain(args);<a name="line.1107"></a>
+<span class="sourceLineNo">1108</span>  }<a name="line.1108"></a>
+<span class="sourceLineNo">1109</span>}<a name="line.1109"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/96bf4e08/book.html
----------------------------------------------------------------------
diff --git a/book.html b/book.html
index 4f16da2..4c780c6 100644
--- a/book.html
+++ b/book.html
@@ -35075,7 +35075,7 @@ The server will return cellblocks compressed using this same compressor as long
 <div id="footer">
 <div id="footer-text">
 Version 3.0.0-SNAPSHOT<br>
-Last updated 2017-09-04 14:29:36 UTC
+Last updated 2017-09-05 14:29:38 UTC
 </div>
 </div>
 </body>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/96bf4e08/bulk-loads.html
----------------------------------------------------------------------
diff --git a/bulk-loads.html b/bulk-loads.html
index 04e6cde..1885ab0 100644
--- a/bulk-loads.html
+++ b/bulk-loads.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="20170904" />
+    <meta name="Date-Revision-yyyymmdd" content="20170905" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013;  
       Bulk Loads in Apache HBase (TM)
@@ -311,7 +311,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: 2017-09-04</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-09-05</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/96bf4e08/checkstyle-aggregate.html
----------------------------------------------------------------------
diff --git a/checkstyle-aggregate.html b/checkstyle-aggregate.html
index 7c9b1fd..ec9d416 100644
--- a/checkstyle-aggregate.html
+++ b/checkstyle-aggregate.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="20170904" />
+    <meta name="Date-Revision-yyyymmdd" content="20170905" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Checkstyle Results</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -7141,12 +7141,12 @@
 <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>766</td>
+<td>761</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>3230</td>
+<td>3235</td>
 <td><img src="images/icon_error_sml.gif" alt="" />&#160;Error</td></tr>
 <tr class="b">
 <td>misc</td>
@@ -13110,7 +13110,7 @@
 <tr class="b">
 <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 43 has parse error. Missed HTML close tag 'TableName'. Sometimes it means that close tag missed for one of previous tags.</td>
 <td>179</td></tr>
 <tr class="a">
@@ -16962,7 +16962,7 @@
 <tr class="b">
 <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 64 has parse error. Missed HTML close tag 'code'. Sometimes it means that close tag missed for one of previous tags.</td>
 <td>2084</td></tr>
 <tr class="a">
@@ -22611,7 +22611,7 @@
 <tr class="b">
 <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 37 has parse error. Details: no viable alternative at input '&lt;ColumnFamily,' while parsing HTML_ELEMENT</td>
 <td>29</td></tr></table></div>
 <div class="section">
@@ -53202,7 +53202,7 @@
 <tr class="b">
 <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 60 has parse error. Missed HTML close tag 'Comparable'. Sometimes it means that close tag missed for one of previous tags.</td>
 <td>28</td></tr>
 <tr class="a">
@@ -56163,7 +56163,7 @@
 <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. Unrecognized error from ANTLR parser: null</td>
 <td>73</td></tr>
 <tr class="b">
@@ -81677,13 +81677,13 @@
 <td>sizes</td>
 <td>MethodLength</td>
 <td>Method length is 163 lines (max allowed is 150).</td>
-<td>914</td></tr>
+<td>912</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>954</td></tr></table></div>
+<td>952</td></tr></table></div>
 <div class="section">
 <h3 id="org.apache.hadoop.hbase.snapshot.RestoreSnapshotHelper.java">org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java</h3>
 <table border="0" class="table table-striped">
@@ -96669,7 +96669,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-09-04</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-09-05</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/96bf4e08/coc.html
----------------------------------------------------------------------
diff --git a/coc.html b/coc.html
index 6fc0bf4..3d24561 100644
--- 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="20170904" />
+    <meta name="Date-Revision-yyyymmdd" content="20170905" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; 
       Code of Conduct Policy
@@ -380,7 +380,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: 2017-09-04</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-09-05</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/96bf4e08/cygwin.html
----------------------------------------------------------------------
diff --git a/cygwin.html b/cygwin.html
index c21e3ca..80581dc 100644
--- a/cygwin.html
+++ b/cygwin.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="20170904" />
+    <meta name="Date-Revision-yyyymmdd" content="20170905" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Installing Apache HBase (TM) on Windows using Cygwin</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -679,7 +679,7 @@ Now your <b>HBase </b>server is running, <b>start coding</b> and build that next
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-09-04</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-09-05</li>
             </p>
                 </div>
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/96bf4e08/dependencies.html
----------------------------------------------------------------------
diff --git a/dependencies.html b/dependencies.html
index dc8c7c8..0733f8e 100644
--- a/dependencies.html
+++ b/dependencies.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="20170904" />
+    <meta name="Date-Revision-yyyymmdd" content="20170905" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Apache HBase &#x2013; Project Dependencies</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.5-HBASE.min.css" />
@@ -445,7 +445,7 @@
                         <a href="https://www.apache.org/">The Apache Software Foundation</a>.
             All rights reserved.      
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2017-09-04</li>
+                  <li id="publishDate" class="pull-right">Last Published: 2017-09-05</li>
             </p>
                 </div>
 


Mime
View raw message