You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by gi...@apache.org on 2021/02/18 22:04:54 UTC

[hbase-site] branch asf-site updated: Published site at 1beda0d598f4be4afb303a976c96b5471ebf9cf8.

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/asf-site by this push:
     new 9cfcb26  Published site at 1beda0d598f4be4afb303a976c96b5471ebf9cf8.
9cfcb26 is described below

commit 9cfcb2696b87c5fd36c9b5e4c309710d0118952b
Author: jenkins <bu...@apache.org>
AuthorDate: Thu Feb 18 22:04:39 2021 +0000

    Published site at 1beda0d598f4be4afb303a976c96b5471ebf9cf8.
---
 acid-semantics.html                                |   2 +-
 apache_hbase_reference_guide.pdf                   |   4 +-
 book.html                                          |   2 +-
 bulk-loads.html                                    |   2 +-
 checkstyle-aggregate.html                          |   4 +-
 coc.html                                           |   2 +-
 dependencies.html                                  |   2 +-
 dependency-convergence.html                        |   2 +-
 dependency-info.html                               |   2 +-
 dependency-management.html                         |   2 +-
 .../replication/regionserver/WALEntryStream.html   |  22 +-
 .../replication/regionserver/WALEntryStream.html   | 357 +++++++++++----------
 downloads.html                                     |   2 +-
 export_control.html                                |   2 +-
 index.html                                         |   2 +-
 issue-tracking.html                                |   2 +-
 mail-lists.html                                    |   2 +-
 metrics.html                                       |   2 +-
 old_news.html                                      |   2 +-
 plugin-management.html                             |   2 +-
 plugins.html                                       |   2 +-
 poweredbyhbase.html                                |   2 +-
 project-info.html                                  |   2 +-
 project-reports.html                               |   2 +-
 project-summary.html                               |   2 +-
 pseudo-distributed.html                            |   2 +-
 replication.html                                   |   2 +-
 resources.html                                     |   2 +-
 source-repository.html                             |   2 +-
 sponsors.html                                      |   2 +-
 supportingprojects.html                            |   2 +-
 team-list.html                                     |   2 +-
 32 files changed, 222 insertions(+), 221 deletions(-)

diff --git a/acid-semantics.html b/acid-semantics.html
index 041c60e..48d6b9f 100644
--- a/acid-semantics.html
+++ b/acid-semantics.html
@@ -467,7 +467,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/apache_hbase_reference_guide.pdf b/apache_hbase_reference_guide.pdf
index 5564aa2..2420c3e 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.3, based on Prawn 2.2.2)
 /Producer (Apache HBase Team)
-/ModDate (D:20210216200502+00'00')
-/CreationDate (D:20210216201450+00'00')
+/ModDate (D:20210218215247+00'00')
+/CreationDate (D:20210218220233+00'00')
 >>
 endobj
 2 0 obj
diff --git a/book.html b/book.html
index 52f6a7e..791e00e 100644
--- a/book.html
+++ b/book.html
@@ -46091,7 +46091,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 2021-02-16 20:05:02 UTC
+Last updated 2021-02-18 21:52:47 UTC
 </div>
 </div>
 <link rel="stylesheet" href="./coderay-asciidoctor.css">
diff --git a/bulk-loads.html b/bulk-loads.html
index 9f89402..1a9916d 100644
--- a/bulk-loads.html
+++ b/bulk-loads.html
@@ -172,7 +172,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/checkstyle-aggregate.html b/checkstyle-aggregate.html
index 65a715d..4a588f1 100644
--- a/checkstyle-aggregate.html
+++ b/checkstyle-aggregate.html
@@ -58742,7 +58742,7 @@
 <td>blocks</td>
 <td>NeedBraces</td>
 <td>'if' construct must use '{}'s.</td>
-<td>368</td></tr></table></div>
+<td>369</td></tr></table></div>
 <div class="section">
 <h3 id="org.apache.hadoop.hbase.rest.ExistsResource.java">org/apache/hadoop/hbase/rest/ExistsResource.java</h3>
 <table border="0" class="table table-striped">
@@ -75689,7 +75689,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/coc.html b/coc.html
index e6cdbc7..e294e71 100644
--- a/coc.html
+++ b/coc.html
@@ -241,7 +241,7 @@ email to <a class="externalLink" href="mailto:private@hbase.apache.org">the priv
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/dependencies.html b/dependencies.html
index 8fba353..cc70556 100644
--- a/dependencies.html
+++ b/dependencies.html
@@ -313,7 +313,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/dependency-convergence.html b/dependency-convergence.html
index 6c5781b..c2e2296 100644
--- a/dependency-convergence.html
+++ b/dependency-convergence.html
@@ -824,7 +824,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/dependency-info.html b/dependency-info.html
index 7de1cc9..1e7f911 100644
--- a/dependency-info.html
+++ b/dependency-info.html
@@ -194,7 +194,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/dependency-management.html b/dependency-management.html
index db7d0ef..897d45d 100644
--- a/dependency-management.html
+++ b/dependency-management.html
@@ -1019,7 +1019,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/devapidocs/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html b/devapidocs/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html
index c1ec56f..b11e136 100644
--- a/devapidocs/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html
+++ b/devapidocs/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html
@@ -686,7 +686,7 @@ implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.
 <ul class="blockList">
 <li class="blockList">
 <h4>readNextEntryAndRecordReaderPosition</h4>
-<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.262">readNextEntryAndRecordReaderPosition</a>()
+<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.263">readNextEntryAndRecordReaderPosition</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">Returns whether the file is opened for writing.</div>
 <dl>
@@ -701,7 +701,7 @@ implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.
 <ul class="blockList">
 <li class="blockList">
 <h4>closeReader</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.286">closeReader</a>()
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.287">closeReader</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>
@@ -715,7 +715,7 @@ implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.
 <ul class="blockList">
 <li class="blockList">
 <h4>checkReader</h4>
-<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.294">checkReader</a>()
+<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.295">checkReader</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>
@@ -729,7 +729,7 @@ implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.
 <ul class="blockList">
 <li class="blockList">
 <h4>openNextLog</h4>
-<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.302">openNextLog</a>()
+<pre>private&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.303">openNextLog</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>
@@ -743,7 +743,7 @@ implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.
 <ul class="blockList">
 <li class="blockList">
 <h4>getArchivedLog</h4>
-<pre>private&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.317">getArchivedLog</a>(org.apache.hadoop.fs.Path&nbsp;path)
+<pre>private&nbsp;org.apache.hadoop.fs.Path&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.318">getArchivedLog</a>(org.apache.hadoop.fs.Path&nbsp;path)
                                           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>
@@ -757,7 +757,7 @@ implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.
 <ul class="blockList">
 <li class="blockList">
 <h4>handleFileNotFound</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.342">handleFileNotFound</a>(org.apache.hadoop.fs.Path&nbsp;path,
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.343">handleFileNotFound</a>(org.apache.hadoop.fs.Path&nbsp;path,
                                 <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>&nbsp;fnfe)
                          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>
@@ -772,7 +772,7 @@ implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.
 <ul class="blockList">
 <li class="blockList">
 <h4>openReader</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.352">openReader</a>(org.apache.hadoop.fs.Path&nbsp;path)
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.353">openReader</a>(org.apache.hadoop.fs.Path&nbsp;path)
                  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>
@@ -786,7 +786,7 @@ implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.
 <ul class="blockList">
 <li class="blockList">
 <h4>recoverLease</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.385">recoverLease</a>(org.apache.hadoop.conf.Configuration&nbsp;conf,
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.386">recoverLease</a>(org.apache.hadoop.conf.Configuration&nbsp;conf,
                           org.apache.hadoop.fs.Path&nbsp;path)</pre>
 </li>
 </ul>
@@ -796,7 +796,7 @@ implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.
 <ul class="blockList">
 <li class="blockList">
 <h4>resetReader</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.400">resetReader</a>()
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.401">resetReader</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>
@@ -810,7 +810,7 @@ implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.
 <ul class="blockList">
 <li class="blockList">
 <h4>seek</h4>
-<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.418">seek</a>()
+<pre>private&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.419">seek</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>
@@ -824,7 +824,7 @@ implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.
 <ul class="blockListLast">
 <li class="blockList">
 <h4>currentTrailerSize</h4>
-<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.424">currentTrailerSize</a>()</pre>
+<pre>private&nbsp;long&nbsp;<a href="../../../../../../src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html#line.425">currentTrailerSize</a>()</pre>
 </li>
 </ul>
 </li>
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html
index 974c626..bf896f3 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/replication/regionserver/WALEntryStream.html
@@ -260,184 +260,185 @@
 <span class="sourceLineNo">252</span>    LOG.debug("EOF, closing {}", currentPath);<a name="line.252"></a>
 <span class="sourceLineNo">253</span>    closeReader();<a name="line.253"></a>
 <span class="sourceLineNo">254</span>    logQueue.remove();<a name="line.254"></a>
-<span class="sourceLineNo">255</span>    setPosition(0);<a name="line.255"></a>
-<span class="sourceLineNo">256</span>    metrics.decrSizeOfLogQueue();<a name="line.256"></a>
-<span class="sourceLineNo">257</span>  }<a name="line.257"></a>
-<span class="sourceLineNo">258</span><a name="line.258"></a>
-<span class="sourceLineNo">259</span>  /**<a name="line.259"></a>
-<span class="sourceLineNo">260</span>   * Returns whether the file is opened for writing.<a name="line.260"></a>
-<span class="sourceLineNo">261</span>   */<a name="line.261"></a>
-<span class="sourceLineNo">262</span>  private boolean readNextEntryAndRecordReaderPosition() throws IOException {<a name="line.262"></a>
-<span class="sourceLineNo">263</span>    Entry readEntry = reader.next();<a name="line.263"></a>
-<span class="sourceLineNo">264</span>    long readerPos = reader.getPosition();<a name="line.264"></a>
-<span class="sourceLineNo">265</span>    OptionalLong fileLength = walFileLengthProvider.getLogFileSizeIfBeingWritten(currentPath);<a name="line.265"></a>
-<span class="sourceLineNo">266</span>    if (fileLength.isPresent() &amp;&amp; readerPos &gt; fileLength.getAsLong()) {<a name="line.266"></a>
-<span class="sourceLineNo">267</span>      // See HBASE-14004, for AsyncFSWAL which uses fan-out, it is possible that we read uncommitted<a name="line.267"></a>
-<span class="sourceLineNo">268</span>      // data, so we need to make sure that we do not read beyond the committed file length.<a name="line.268"></a>
-<span class="sourceLineNo">269</span>      if (LOG.isDebugEnabled()) {<a name="line.269"></a>
-<span class="sourceLineNo">270</span>        LOG.debug("The provider tells us the valid length for " + currentPath + " is " +<a name="line.270"></a>
-<span class="sourceLineNo">271</span>            fileLength.getAsLong() + ", but we have advanced to " + readerPos);<a name="line.271"></a>
-<span class="sourceLineNo">272</span>      }<a name="line.272"></a>
-<span class="sourceLineNo">273</span>      resetReader();<a name="line.273"></a>
-<span class="sourceLineNo">274</span>      return true;<a name="line.274"></a>
-<span class="sourceLineNo">275</span>    }<a name="line.275"></a>
-<span class="sourceLineNo">276</span>    if (readEntry != null) {<a name="line.276"></a>
-<span class="sourceLineNo">277</span>      LOG.trace("reading entry: {} ", readEntry);<a name="line.277"></a>
-<span class="sourceLineNo">278</span>      metrics.incrLogEditsRead();<a name="line.278"></a>
-<span class="sourceLineNo">279</span>      metrics.incrLogReadInBytes(readerPos - currentPositionOfEntry);<a name="line.279"></a>
-<span class="sourceLineNo">280</span>    }<a name="line.280"></a>
-<span class="sourceLineNo">281</span>    currentEntry = readEntry; // could be null<a name="line.281"></a>
-<span class="sourceLineNo">282</span>    this.currentPositionOfReader = readerPos;<a name="line.282"></a>
-<span class="sourceLineNo">283</span>    return fileLength.isPresent();<a name="line.283"></a>
-<span class="sourceLineNo">284</span>  }<a name="line.284"></a>
-<span class="sourceLineNo">285</span><a name="line.285"></a>
-<span class="sourceLineNo">286</span>  private void closeReader() throws IOException {<a name="line.286"></a>
-<span class="sourceLineNo">287</span>    if (reader != null) {<a name="line.287"></a>
-<span class="sourceLineNo">288</span>      reader.close();<a name="line.288"></a>
-<span class="sourceLineNo">289</span>      reader = null;<a name="line.289"></a>
-<span class="sourceLineNo">290</span>    }<a name="line.290"></a>
-<span class="sourceLineNo">291</span>  }<a name="line.291"></a>
-<span class="sourceLineNo">292</span><a name="line.292"></a>
-<span class="sourceLineNo">293</span>  // if we don't have a reader, open a reader on the next log<a name="line.293"></a>
-<span class="sourceLineNo">294</span>  private boolean checkReader() throws IOException {<a name="line.294"></a>
-<span class="sourceLineNo">295</span>    if (reader == null) {<a name="line.295"></a>
-<span class="sourceLineNo">296</span>      return openNextLog();<a name="line.296"></a>
-<span class="sourceLineNo">297</span>    }<a name="line.297"></a>
-<span class="sourceLineNo">298</span>    return true;<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>  // open a reader on the next log in queue<a name="line.301"></a>
-<span class="sourceLineNo">302</span>  private boolean openNextLog() throws IOException {<a name="line.302"></a>
-<span class="sourceLineNo">303</span>    Path nextPath = logQueue.peek();<a name="line.303"></a>
-<span class="sourceLineNo">304</span>    if (nextPath != null) {<a name="line.304"></a>
-<span class="sourceLineNo">305</span>      openReader(nextPath);<a name="line.305"></a>
-<span class="sourceLineNo">306</span>      if (reader != null) {<a name="line.306"></a>
-<span class="sourceLineNo">307</span>        return true;<a name="line.307"></a>
-<span class="sourceLineNo">308</span>      }<a name="line.308"></a>
-<span class="sourceLineNo">309</span>    } else {<a name="line.309"></a>
-<span class="sourceLineNo">310</span>      // no more files in queue, this could happen for recovered queue, or for a wal group of a sync<a name="line.310"></a>
-<span class="sourceLineNo">311</span>      // replication peer which has already been transited to DA or S.<a name="line.311"></a>
-<span class="sourceLineNo">312</span>      setCurrentPath(null);<a name="line.312"></a>
-<span class="sourceLineNo">313</span>    }<a name="line.313"></a>
-<span class="sourceLineNo">314</span>    return false;<a name="line.314"></a>
-<span class="sourceLineNo">315</span>  }<a name="line.315"></a>
-<span class="sourceLineNo">316</span><a name="line.316"></a>
-<span class="sourceLineNo">317</span>  private Path getArchivedLog(Path path) throws IOException {<a name="line.317"></a>
-<span class="sourceLineNo">318</span>    Path walRootDir = CommonFSUtils.getWALRootDir(conf);<a name="line.318"></a>
-<span class="sourceLineNo">319</span><a name="line.319"></a>
-<span class="sourceLineNo">320</span>    // Try found the log in old dir<a name="line.320"></a>
-<span class="sourceLineNo">321</span>    Path oldLogDir = new Path(walRootDir, HConstants.HREGION_OLDLOGDIR_NAME);<a name="line.321"></a>
-<span class="sourceLineNo">322</span>    Path archivedLogLocation = new Path(oldLogDir, path.getName());<a name="line.322"></a>
-<span class="sourceLineNo">323</span>    if (fs.exists(archivedLogLocation)) {<a name="line.323"></a>
-<span class="sourceLineNo">324</span>      LOG.info("Log " + path + " was moved to " + archivedLogLocation);<a name="line.324"></a>
-<span class="sourceLineNo">325</span>      return archivedLogLocation;<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>    // Try found the log in the seperate old log dir<a name="line.328"></a>
-<span class="sourceLineNo">329</span>    oldLogDir =<a name="line.329"></a>
-<span class="sourceLineNo">330</span>        new Path(walRootDir, new StringBuilder(HConstants.HREGION_OLDLOGDIR_NAME)<a name="line.330"></a>
-<span class="sourceLineNo">331</span>            .append(Path.SEPARATOR).append(serverName.getServerName()).toString());<a name="line.331"></a>
-<span class="sourceLineNo">332</span>    archivedLogLocation = new Path(oldLogDir, path.getName());<a name="line.332"></a>
-<span class="sourceLineNo">333</span>    if (fs.exists(archivedLogLocation)) {<a name="line.333"></a>
-<span class="sourceLineNo">334</span>      LOG.info("Log " + path + " was moved to " + archivedLogLocation);<a name="line.334"></a>
-<span class="sourceLineNo">335</span>      return archivedLogLocation;<a name="line.335"></a>
-<span class="sourceLineNo">336</span>    }<a name="line.336"></a>
-<span class="sourceLineNo">337</span><a name="line.337"></a>
-<span class="sourceLineNo">338</span>    LOG.error("Couldn't locate log: " + path);<a name="line.338"></a>
-<span class="sourceLineNo">339</span>    return path;<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>  private void handleFileNotFound(Path path, FileNotFoundException fnfe) throws IOException {<a name="line.342"></a>
-<span class="sourceLineNo">343</span>    // If the log was archived, continue reading from there<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    Path archivedLog = getArchivedLog(path);<a name="line.344"></a>
-<span class="sourceLineNo">345</span>    if (!path.equals(archivedLog)) {<a name="line.345"></a>
-<span class="sourceLineNo">346</span>      openReader(archivedLog);<a name="line.346"></a>
-<span class="sourceLineNo">347</span>    } else {<a name="line.347"></a>
-<span class="sourceLineNo">348</span>      throw fnfe;<a name="line.348"></a>
-<span class="sourceLineNo">349</span>    }<a name="line.349"></a>
-<span class="sourceLineNo">350</span>  }<a name="line.350"></a>
-<span class="sourceLineNo">351</span><a name="line.351"></a>
-<span class="sourceLineNo">352</span>  private void openReader(Path path) throws IOException {<a name="line.352"></a>
-<span class="sourceLineNo">353</span>    try {<a name="line.353"></a>
-<span class="sourceLineNo">354</span>      // Detect if this is a new file, if so get a new reader else<a name="line.354"></a>
-<span class="sourceLineNo">355</span>      // reset the current reader so that we see the new data<a name="line.355"></a>
-<span class="sourceLineNo">356</span>      if (reader == null || !getCurrentPath().equals(path)) {<a name="line.356"></a>
-<span class="sourceLineNo">357</span>        closeReader();<a name="line.357"></a>
-<span class="sourceLineNo">358</span>        reader = WALFactory.createReader(fs, path, conf);<a name="line.358"></a>
-<span class="sourceLineNo">359</span>        seek();<a name="line.359"></a>
-<span class="sourceLineNo">360</span>        setCurrentPath(path);<a name="line.360"></a>
-<span class="sourceLineNo">361</span>      } else {<a name="line.361"></a>
-<span class="sourceLineNo">362</span>        resetReader();<a name="line.362"></a>
-<span class="sourceLineNo">363</span>      }<a name="line.363"></a>
-<span class="sourceLineNo">364</span>    } catch (FileNotFoundException fnfe) {<a name="line.364"></a>
-<span class="sourceLineNo">365</span>      handleFileNotFound(path, fnfe);<a name="line.365"></a>
-<span class="sourceLineNo">366</span>    }  catch (RemoteException re) {<a name="line.366"></a>
-<span class="sourceLineNo">367</span>      IOException ioe = re.unwrapRemoteException(FileNotFoundException.class);<a name="line.367"></a>
-<span class="sourceLineNo">368</span>      if (!(ioe instanceof FileNotFoundException)) throw ioe;<a name="line.368"></a>
-<span class="sourceLineNo">369</span>      handleFileNotFound(path, (FileNotFoundException)ioe);<a name="line.369"></a>
-<span class="sourceLineNo">370</span>    } catch (LeaseNotRecoveredException lnre) {<a name="line.370"></a>
-<span class="sourceLineNo">371</span>      // HBASE-15019 the WAL was not closed due to some hiccup.<a name="line.371"></a>
-<span class="sourceLineNo">372</span>      LOG.warn("Try to recover the WAL lease " + currentPath, lnre);<a name="line.372"></a>
-<span class="sourceLineNo">373</span>      recoverLease(conf, currentPath);<a name="line.373"></a>
-<span class="sourceLineNo">374</span>      reader = null;<a name="line.374"></a>
-<span class="sourceLineNo">375</span>    } catch (NullPointerException npe) {<a name="line.375"></a>
-<span class="sourceLineNo">376</span>      // Workaround for race condition in HDFS-4380<a name="line.376"></a>
-<span class="sourceLineNo">377</span>      // which throws a NPE if we open a file before any data node has the most recent block<a name="line.377"></a>
-<span class="sourceLineNo">378</span>      // Just sleep and retry. Will require re-reading compressed WALs for compressionContext.<a name="line.378"></a>
-<span class="sourceLineNo">379</span>      LOG.warn("Got NPE opening reader, will retry.");<a name="line.379"></a>
-<span class="sourceLineNo">380</span>      reader = null;<a name="line.380"></a>
-<span class="sourceLineNo">381</span>    }<a name="line.381"></a>
-<span class="sourceLineNo">382</span>  }<a name="line.382"></a>
-<span class="sourceLineNo">383</span><a name="line.383"></a>
-<span class="sourceLineNo">384</span>  // For HBASE-15019<a name="line.384"></a>
-<span class="sourceLineNo">385</span>  private void recoverLease(final Configuration conf, final Path path) {<a name="line.385"></a>
-<span class="sourceLineNo">386</span>    try {<a name="line.386"></a>
-<span class="sourceLineNo">387</span>      final FileSystem dfs = CommonFSUtils.getWALFileSystem(conf);<a name="line.387"></a>
-<span class="sourceLineNo">388</span>      RecoverLeaseFSUtils.recoverFileLease(dfs, path, conf, new CancelableProgressable() {<a name="line.388"></a>
-<span class="sourceLineNo">389</span>        @Override<a name="line.389"></a>
-<span class="sourceLineNo">390</span>        public boolean progress() {<a name="line.390"></a>
-<span class="sourceLineNo">391</span>          LOG.debug("recover WAL lease: " + path);<a name="line.391"></a>
-<span class="sourceLineNo">392</span>          return true;<a name="line.392"></a>
-<span class="sourceLineNo">393</span>        }<a name="line.393"></a>
-<span class="sourceLineNo">394</span>      });<a name="line.394"></a>
-<span class="sourceLineNo">395</span>    } catch (IOException e) {<a name="line.395"></a>
-<span class="sourceLineNo">396</span>      LOG.warn("unable to recover lease for WAL: " + path, e);<a name="line.396"></a>
-<span class="sourceLineNo">397</span>    }<a name="line.397"></a>
-<span class="sourceLineNo">398</span>  }<a name="line.398"></a>
-<span class="sourceLineNo">399</span><a name="line.399"></a>
-<span class="sourceLineNo">400</span>  private void resetReader() throws IOException {<a name="line.400"></a>
-<span class="sourceLineNo">401</span>    try {<a name="line.401"></a>
-<span class="sourceLineNo">402</span>      currentEntry = null;<a name="line.402"></a>
-<span class="sourceLineNo">403</span>      reader.reset();<a name="line.403"></a>
-<span class="sourceLineNo">404</span>      seek();<a name="line.404"></a>
-<span class="sourceLineNo">405</span>    } catch (FileNotFoundException fnfe) {<a name="line.405"></a>
-<span class="sourceLineNo">406</span>      // If the log was archived, continue reading from there<a name="line.406"></a>
-<span class="sourceLineNo">407</span>      Path archivedLog = getArchivedLog(currentPath);<a name="line.407"></a>
-<span class="sourceLineNo">408</span>      if (!currentPath.equals(archivedLog)) {<a name="line.408"></a>
-<span class="sourceLineNo">409</span>        openReader(archivedLog);<a name="line.409"></a>
-<span class="sourceLineNo">410</span>      } else {<a name="line.410"></a>
-<span class="sourceLineNo">411</span>        throw fnfe;<a name="line.411"></a>
-<span class="sourceLineNo">412</span>      }<a name="line.412"></a>
-<span class="sourceLineNo">413</span>    } catch (NullPointerException npe) {<a name="line.413"></a>
-<span class="sourceLineNo">414</span>      throw new IOException("NPE resetting reader, likely HDFS-4380", npe);<a name="line.414"></a>
-<span class="sourceLineNo">415</span>    }<a name="line.415"></a>
-<span class="sourceLineNo">416</span>  }<a name="line.416"></a>
-<span class="sourceLineNo">417</span><a name="line.417"></a>
-<span class="sourceLineNo">418</span>  private void seek() throws IOException {<a name="line.418"></a>
-<span class="sourceLineNo">419</span>    if (currentPositionOfEntry != 0) {<a name="line.419"></a>
-<span class="sourceLineNo">420</span>      reader.seek(currentPositionOfEntry);<a name="line.420"></a>
-<span class="sourceLineNo">421</span>    }<a name="line.421"></a>
-<span class="sourceLineNo">422</span>  }<a name="line.422"></a>
-<span class="sourceLineNo">423</span><a name="line.423"></a>
-<span class="sourceLineNo">424</span>  private long currentTrailerSize() {<a name="line.424"></a>
-<span class="sourceLineNo">425</span>    long size = -1L;<a name="line.425"></a>
-<span class="sourceLineNo">426</span>    if (reader instanceof ProtobufLogReader) {<a name="line.426"></a>
-<span class="sourceLineNo">427</span>      final ProtobufLogReader pblr = (ProtobufLogReader) reader;<a name="line.427"></a>
-<span class="sourceLineNo">428</span>      size = pblr.trailerSize();<a name="line.428"></a>
-<span class="sourceLineNo">429</span>    }<a name="line.429"></a>
-<span class="sourceLineNo">430</span>    return size;<a name="line.430"></a>
-<span class="sourceLineNo">431</span>  }<a name="line.431"></a>
-<span class="sourceLineNo">432</span>}<a name="line.432"></a>
+<span class="sourceLineNo">255</span>    setCurrentPath(null);<a name="line.255"></a>
+<span class="sourceLineNo">256</span>    setPosition(0);<a name="line.256"></a>
+<span class="sourceLineNo">257</span>    metrics.decrSizeOfLogQueue();<a name="line.257"></a>
+<span class="sourceLineNo">258</span>  }<a name="line.258"></a>
+<span class="sourceLineNo">259</span><a name="line.259"></a>
+<span class="sourceLineNo">260</span>  /**<a name="line.260"></a>
+<span class="sourceLineNo">261</span>   * Returns whether the file is opened for writing.<a name="line.261"></a>
+<span class="sourceLineNo">262</span>   */<a name="line.262"></a>
+<span class="sourceLineNo">263</span>  private boolean readNextEntryAndRecordReaderPosition() throws IOException {<a name="line.263"></a>
+<span class="sourceLineNo">264</span>    Entry readEntry = reader.next();<a name="line.264"></a>
+<span class="sourceLineNo">265</span>    long readerPos = reader.getPosition();<a name="line.265"></a>
+<span class="sourceLineNo">266</span>    OptionalLong fileLength = walFileLengthProvider.getLogFileSizeIfBeingWritten(currentPath);<a name="line.266"></a>
+<span class="sourceLineNo">267</span>    if (fileLength.isPresent() &amp;&amp; readerPos &gt; fileLength.getAsLong()) {<a name="line.267"></a>
+<span class="sourceLineNo">268</span>      // See HBASE-14004, for AsyncFSWAL which uses fan-out, it is possible that we read uncommitted<a name="line.268"></a>
+<span class="sourceLineNo">269</span>      // data, so we need to make sure that we do not read beyond the committed file length.<a name="line.269"></a>
+<span class="sourceLineNo">270</span>      if (LOG.isDebugEnabled()) {<a name="line.270"></a>
+<span class="sourceLineNo">271</span>        LOG.debug("The provider tells us the valid length for " + currentPath + " is " +<a name="line.271"></a>
+<span class="sourceLineNo">272</span>            fileLength.getAsLong() + ", but we have advanced to " + readerPos);<a name="line.272"></a>
+<span class="sourceLineNo">273</span>      }<a name="line.273"></a>
+<span class="sourceLineNo">274</span>      resetReader();<a name="line.274"></a>
+<span class="sourceLineNo">275</span>      return true;<a name="line.275"></a>
+<span class="sourceLineNo">276</span>    }<a name="line.276"></a>
+<span class="sourceLineNo">277</span>    if (readEntry != null) {<a name="line.277"></a>
+<span class="sourceLineNo">278</span>      LOG.trace("reading entry: {} ", readEntry);<a name="line.278"></a>
+<span class="sourceLineNo">279</span>      metrics.incrLogEditsRead();<a name="line.279"></a>
+<span class="sourceLineNo">280</span>      metrics.incrLogReadInBytes(readerPos - currentPositionOfEntry);<a name="line.280"></a>
+<span class="sourceLineNo">281</span>    }<a name="line.281"></a>
+<span class="sourceLineNo">282</span>    currentEntry = readEntry; // could be null<a name="line.282"></a>
+<span class="sourceLineNo">283</span>    this.currentPositionOfReader = readerPos;<a name="line.283"></a>
+<span class="sourceLineNo">284</span>    return fileLength.isPresent();<a name="line.284"></a>
+<span class="sourceLineNo">285</span>  }<a name="line.285"></a>
+<span class="sourceLineNo">286</span><a name="line.286"></a>
+<span class="sourceLineNo">287</span>  private void closeReader() throws IOException {<a name="line.287"></a>
+<span class="sourceLineNo">288</span>    if (reader != null) {<a name="line.288"></a>
+<span class="sourceLineNo">289</span>      reader.close();<a name="line.289"></a>
+<span class="sourceLineNo">290</span>      reader = null;<a name="line.290"></a>
+<span class="sourceLineNo">291</span>    }<a name="line.291"></a>
+<span class="sourceLineNo">292</span>  }<a name="line.292"></a>
+<span class="sourceLineNo">293</span><a name="line.293"></a>
+<span class="sourceLineNo">294</span>  // if we don't have a reader, open a reader on the next log<a name="line.294"></a>
+<span class="sourceLineNo">295</span>  private boolean checkReader() throws IOException {<a name="line.295"></a>
+<span class="sourceLineNo">296</span>    if (reader == null) {<a name="line.296"></a>
+<span class="sourceLineNo">297</span>      return openNextLog();<a name="line.297"></a>
+<span class="sourceLineNo">298</span>    }<a name="line.298"></a>
+<span class="sourceLineNo">299</span>    return true;<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>  // open a reader on the next log in queue<a name="line.302"></a>
+<span class="sourceLineNo">303</span>  private boolean openNextLog() throws IOException {<a name="line.303"></a>
+<span class="sourceLineNo">304</span>    Path nextPath = logQueue.peek();<a name="line.304"></a>
+<span class="sourceLineNo">305</span>    if (nextPath != null) {<a name="line.305"></a>
+<span class="sourceLineNo">306</span>      openReader(nextPath);<a name="line.306"></a>
+<span class="sourceLineNo">307</span>      if (reader != null) {<a name="line.307"></a>
+<span class="sourceLineNo">308</span>        return true;<a name="line.308"></a>
+<span class="sourceLineNo">309</span>      }<a name="line.309"></a>
+<span class="sourceLineNo">310</span>    } else {<a name="line.310"></a>
+<span class="sourceLineNo">311</span>      // no more files in queue, this could happen for recovered queue, or for a wal group of a sync<a name="line.311"></a>
+<span class="sourceLineNo">312</span>      // replication peer which has already been transited to DA or S.<a name="line.312"></a>
+<span class="sourceLineNo">313</span>      setCurrentPath(null);<a name="line.313"></a>
+<span class="sourceLineNo">314</span>    }<a name="line.314"></a>
+<span class="sourceLineNo">315</span>    return false;<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>  private Path getArchivedLog(Path path) throws IOException {<a name="line.318"></a>
+<span class="sourceLineNo">319</span>    Path walRootDir = CommonFSUtils.getWALRootDir(conf);<a name="line.319"></a>
+<span class="sourceLineNo">320</span><a name="line.320"></a>
+<span class="sourceLineNo">321</span>    // Try found the log in old dir<a name="line.321"></a>
+<span class="sourceLineNo">322</span>    Path oldLogDir = new Path(walRootDir, HConstants.HREGION_OLDLOGDIR_NAME);<a name="line.322"></a>
+<span class="sourceLineNo">323</span>    Path archivedLogLocation = new Path(oldLogDir, path.getName());<a name="line.323"></a>
+<span class="sourceLineNo">324</span>    if (fs.exists(archivedLogLocation)) {<a name="line.324"></a>
+<span class="sourceLineNo">325</span>      LOG.info("Log " + path + " was moved to " + archivedLogLocation);<a name="line.325"></a>
+<span class="sourceLineNo">326</span>      return archivedLogLocation;<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>    // Try found the log in the seperate old log dir<a name="line.329"></a>
+<span class="sourceLineNo">330</span>    oldLogDir =<a name="line.330"></a>
+<span class="sourceLineNo">331</span>        new Path(walRootDir, new StringBuilder(HConstants.HREGION_OLDLOGDIR_NAME)<a name="line.331"></a>
+<span class="sourceLineNo">332</span>            .append(Path.SEPARATOR).append(serverName.getServerName()).toString());<a name="line.332"></a>
+<span class="sourceLineNo">333</span>    archivedLogLocation = new Path(oldLogDir, path.getName());<a name="line.333"></a>
+<span class="sourceLineNo">334</span>    if (fs.exists(archivedLogLocation)) {<a name="line.334"></a>
+<span class="sourceLineNo">335</span>      LOG.info("Log " + path + " was moved to " + archivedLogLocation);<a name="line.335"></a>
+<span class="sourceLineNo">336</span>      return archivedLogLocation;<a name="line.336"></a>
+<span class="sourceLineNo">337</span>    }<a name="line.337"></a>
+<span class="sourceLineNo">338</span><a name="line.338"></a>
+<span class="sourceLineNo">339</span>    LOG.error("Couldn't locate log: " + path);<a name="line.339"></a>
+<span class="sourceLineNo">340</span>    return path;<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>  private void handleFileNotFound(Path path, FileNotFoundException fnfe) throws IOException {<a name="line.343"></a>
+<span class="sourceLineNo">344</span>    // If the log was archived, continue reading from there<a name="line.344"></a>
+<span class="sourceLineNo">345</span>    Path archivedLog = getArchivedLog(path);<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    if (!path.equals(archivedLog)) {<a name="line.346"></a>
+<span class="sourceLineNo">347</span>      openReader(archivedLog);<a name="line.347"></a>
+<span class="sourceLineNo">348</span>    } else {<a name="line.348"></a>
+<span class="sourceLineNo">349</span>      throw fnfe;<a name="line.349"></a>
+<span class="sourceLineNo">350</span>    }<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>  private void openReader(Path path) throws IOException {<a name="line.353"></a>
+<span class="sourceLineNo">354</span>    try {<a name="line.354"></a>
+<span class="sourceLineNo">355</span>      // Detect if this is a new file, if so get a new reader else<a name="line.355"></a>
+<span class="sourceLineNo">356</span>      // reset the current reader so that we see the new data<a name="line.356"></a>
+<span class="sourceLineNo">357</span>      if (reader == null || !getCurrentPath().equals(path)) {<a name="line.357"></a>
+<span class="sourceLineNo">358</span>        closeReader();<a name="line.358"></a>
+<span class="sourceLineNo">359</span>        reader = WALFactory.createReader(fs, path, conf);<a name="line.359"></a>
+<span class="sourceLineNo">360</span>        seek();<a name="line.360"></a>
+<span class="sourceLineNo">361</span>        setCurrentPath(path);<a name="line.361"></a>
+<span class="sourceLineNo">362</span>      } else {<a name="line.362"></a>
+<span class="sourceLineNo">363</span>        resetReader();<a name="line.363"></a>
+<span class="sourceLineNo">364</span>      }<a name="line.364"></a>
+<span class="sourceLineNo">365</span>    } catch (FileNotFoundException fnfe) {<a name="line.365"></a>
+<span class="sourceLineNo">366</span>      handleFileNotFound(path, fnfe);<a name="line.366"></a>
+<span class="sourceLineNo">367</span>    }  catch (RemoteException re) {<a name="line.367"></a>
+<span class="sourceLineNo">368</span>      IOException ioe = re.unwrapRemoteException(FileNotFoundException.class);<a name="line.368"></a>
+<span class="sourceLineNo">369</span>      if (!(ioe instanceof FileNotFoundException)) throw ioe;<a name="line.369"></a>
+<span class="sourceLineNo">370</span>      handleFileNotFound(path, (FileNotFoundException)ioe);<a name="line.370"></a>
+<span class="sourceLineNo">371</span>    } catch (LeaseNotRecoveredException lnre) {<a name="line.371"></a>
+<span class="sourceLineNo">372</span>      // HBASE-15019 the WAL was not closed due to some hiccup.<a name="line.372"></a>
+<span class="sourceLineNo">373</span>      LOG.warn("Try to recover the WAL lease " + currentPath, lnre);<a name="line.373"></a>
+<span class="sourceLineNo">374</span>      recoverLease(conf, currentPath);<a name="line.374"></a>
+<span class="sourceLineNo">375</span>      reader = null;<a name="line.375"></a>
+<span class="sourceLineNo">376</span>    } catch (NullPointerException npe) {<a name="line.376"></a>
+<span class="sourceLineNo">377</span>      // Workaround for race condition in HDFS-4380<a name="line.377"></a>
+<span class="sourceLineNo">378</span>      // which throws a NPE if we open a file before any data node has the most recent block<a name="line.378"></a>
+<span class="sourceLineNo">379</span>      // Just sleep and retry. Will require re-reading compressed WALs for compressionContext.<a name="line.379"></a>
+<span class="sourceLineNo">380</span>      LOG.warn("Got NPE opening reader, will retry.");<a name="line.380"></a>
+<span class="sourceLineNo">381</span>      reader = null;<a name="line.381"></a>
+<span class="sourceLineNo">382</span>    }<a name="line.382"></a>
+<span class="sourceLineNo">383</span>  }<a name="line.383"></a>
+<span class="sourceLineNo">384</span><a name="line.384"></a>
+<span class="sourceLineNo">385</span>  // For HBASE-15019<a name="line.385"></a>
+<span class="sourceLineNo">386</span>  private void recoverLease(final Configuration conf, final Path path) {<a name="line.386"></a>
+<span class="sourceLineNo">387</span>    try {<a name="line.387"></a>
+<span class="sourceLineNo">388</span>      final FileSystem dfs = CommonFSUtils.getWALFileSystem(conf);<a name="line.388"></a>
+<span class="sourceLineNo">389</span>      RecoverLeaseFSUtils.recoverFileLease(dfs, path, conf, new CancelableProgressable() {<a name="line.389"></a>
+<span class="sourceLineNo">390</span>        @Override<a name="line.390"></a>
+<span class="sourceLineNo">391</span>        public boolean progress() {<a name="line.391"></a>
+<span class="sourceLineNo">392</span>          LOG.debug("recover WAL lease: " + path);<a name="line.392"></a>
+<span class="sourceLineNo">393</span>          return true;<a name="line.393"></a>
+<span class="sourceLineNo">394</span>        }<a name="line.394"></a>
+<span class="sourceLineNo">395</span>      });<a name="line.395"></a>
+<span class="sourceLineNo">396</span>    } catch (IOException e) {<a name="line.396"></a>
+<span class="sourceLineNo">397</span>      LOG.warn("unable to recover lease for WAL: " + path, e);<a name="line.397"></a>
+<span class="sourceLineNo">398</span>    }<a name="line.398"></a>
+<span class="sourceLineNo">399</span>  }<a name="line.399"></a>
+<span class="sourceLineNo">400</span><a name="line.400"></a>
+<span class="sourceLineNo">401</span>  private void resetReader() throws IOException {<a name="line.401"></a>
+<span class="sourceLineNo">402</span>    try {<a name="line.402"></a>
+<span class="sourceLineNo">403</span>      currentEntry = null;<a name="line.403"></a>
+<span class="sourceLineNo">404</span>      reader.reset();<a name="line.404"></a>
+<span class="sourceLineNo">405</span>      seek();<a name="line.405"></a>
+<span class="sourceLineNo">406</span>    } catch (FileNotFoundException fnfe) {<a name="line.406"></a>
+<span class="sourceLineNo">407</span>      // If the log was archived, continue reading from there<a name="line.407"></a>
+<span class="sourceLineNo">408</span>      Path archivedLog = getArchivedLog(currentPath);<a name="line.408"></a>
+<span class="sourceLineNo">409</span>      if (!currentPath.equals(archivedLog)) {<a name="line.409"></a>
+<span class="sourceLineNo">410</span>        openReader(archivedLog);<a name="line.410"></a>
+<span class="sourceLineNo">411</span>      } else {<a name="line.411"></a>
+<span class="sourceLineNo">412</span>        throw fnfe;<a name="line.412"></a>
+<span class="sourceLineNo">413</span>      }<a name="line.413"></a>
+<span class="sourceLineNo">414</span>    } catch (NullPointerException npe) {<a name="line.414"></a>
+<span class="sourceLineNo">415</span>      throw new IOException("NPE resetting reader, likely HDFS-4380", npe);<a name="line.415"></a>
+<span class="sourceLineNo">416</span>    }<a name="line.416"></a>
+<span class="sourceLineNo">417</span>  }<a name="line.417"></a>
+<span class="sourceLineNo">418</span><a name="line.418"></a>
+<span class="sourceLineNo">419</span>  private void seek() throws IOException {<a name="line.419"></a>
+<span class="sourceLineNo">420</span>    if (currentPositionOfEntry != 0) {<a name="line.420"></a>
+<span class="sourceLineNo">421</span>      reader.seek(currentPositionOfEntry);<a name="line.421"></a>
+<span class="sourceLineNo">422</span>    }<a name="line.422"></a>
+<span class="sourceLineNo">423</span>  }<a name="line.423"></a>
+<span class="sourceLineNo">424</span><a name="line.424"></a>
+<span class="sourceLineNo">425</span>  private long currentTrailerSize() {<a name="line.425"></a>
+<span class="sourceLineNo">426</span>    long size = -1L;<a name="line.426"></a>
+<span class="sourceLineNo">427</span>    if (reader instanceof ProtobufLogReader) {<a name="line.427"></a>
+<span class="sourceLineNo">428</span>      final ProtobufLogReader pblr = (ProtobufLogReader) reader;<a name="line.428"></a>
+<span class="sourceLineNo">429</span>      size = pblr.trailerSize();<a name="line.429"></a>
+<span class="sourceLineNo">430</span>    }<a name="line.430"></a>
+<span class="sourceLineNo">431</span>    return size;<a name="line.431"></a>
+<span class="sourceLineNo">432</span>  }<a name="line.432"></a>
+<span class="sourceLineNo">433</span>}<a name="line.433"></a>
 
 
 
diff --git a/downloads.html b/downloads.html
index 5f5d39d..e235b0d 100644
--- a/downloads.html
+++ b/downloads.html
@@ -462,7 +462,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/export_control.html b/export_control.html
index 44bff39..6edb4c3 100644
--- a/export_control.html
+++ b/export_control.html
@@ -197,7 +197,7 @@ for more details.</p>
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/index.html b/index.html
index d1594c8..a8338d5 100644
--- a/index.html
+++ b/index.html
@@ -275,7 +275,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/issue-tracking.html b/issue-tracking.html
index 3d60d1a..7e0115c 100644
--- a/issue-tracking.html
+++ b/issue-tracking.html
@@ -169,7 +169,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/mail-lists.html b/mail-lists.html
index dabcca1..fc8be96 100644
--- a/mail-lists.html
+++ b/mail-lists.html
@@ -229,7 +229,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/metrics.html b/metrics.html
index 10c24d4..ae8b8ac 100644
--- a/metrics.html
+++ b/metrics.html
@@ -325,7 +325,7 @@ export HBASE_REGIONSERVER_OPTS=&quot;$HBASE_JMX_OPTS -Dcom.sun.management.jmxrem
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/old_news.html b/old_news.html
index 8b48f59..c266aab 100644
--- a/old_news.html
+++ b/old_news.html
@@ -316,7 +316,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/plugin-management.html b/plugin-management.html
index 1617b4e..fa809c5 100644
--- a/plugin-management.html
+++ b/plugin-management.html
@@ -321,7 +321,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/plugins.html b/plugins.html
index 85e254d..40b8100 100644
--- a/plugins.html
+++ b/plugins.html
@@ -248,7 +248,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/poweredbyhbase.html b/poweredbyhbase.html
index 9c6df15..f8c2be7 100644
--- a/poweredbyhbase.html
+++ b/poweredbyhbase.html
@@ -650,7 +650,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/project-info.html b/project-info.html
index 328230d..9c6a86f 100644
--- a/project-info.html
+++ b/project-info.html
@@ -210,7 +210,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/project-reports.html b/project-reports.html
index 3f9b22f..e30128c 100644
--- a/project-reports.html
+++ b/project-reports.html
@@ -186,7 +186,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/project-summary.html b/project-summary.html
index 699e696..9cefaaa 100644
--- a/project-summary.html
+++ b/project-summary.html
@@ -212,7 +212,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/pseudo-distributed.html b/pseudo-distributed.html
index a32071e..86a9c8b 100644
--- a/pseudo-distributed.html
+++ b/pseudo-distributed.html
@@ -174,7 +174,7 @@ Running Apache HBase (TM) in pseudo-distributed mode
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/replication.html b/replication.html
index 75f037e..949e527 100644
--- a/replication.html
+++ b/replication.html
@@ -169,7 +169,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/resources.html b/resources.html
index 25e38f2..9ed7107 100644
--- a/resources.html
+++ b/resources.html
@@ -197,7 +197,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/source-repository.html b/source-repository.html
index 9eba964..15a0141 100644
--- a/source-repository.html
+++ b/source-repository.html
@@ -180,7 +180,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/sponsors.html b/sponsors.html
index 90ec680..22c385f 100644
--- a/sponsors.html
+++ b/sponsors.html
@@ -199,7 +199,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/supportingprojects.html b/supportingprojects.html
index 00dea60..fcf6ede 100644
--- a/supportingprojects.html
+++ b/supportingprojects.html
@@ -390,7 +390,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
diff --git a/team-list.html b/team-list.html
index 7c37cc0..1481c6e 100644
--- a/team-list.html
+++ b/team-list.html
@@ -719,7 +719,7 @@
         <div class="row">
             <p>Copyright &copy;2007&#x2013;2021
 <a href="https://www.apache.org/">The Apache Software Foundation</a>.
-All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-16</li>
+All rights reserved.        <li id="publishDate" class="pull-right">Last Published: 2021-02-18</li>
 </p>
         </div>
         <p id="poweredBy" class="pull-right"><a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>