hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [08/51] [partial] hbase-site git commit: Published site at .
Date Sun, 29 Oct 2017 15:17:09 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/1d9053bc/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.PrivilegedWriter.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.PrivilegedWriter.html b/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.PrivilegedWriter.html
index 45f0981..a5f0277 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.PrivilegedWriter.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.PrivilegedWriter.html
@@ -397,152 +397,150 @@
 <span class="sourceLineNo">389</span>      if (region.getCoprocessorHost() == null) {<a name="line.389"></a>
 <span class="sourceLineNo">390</span>        scanner = region.getScanner(scan);<a name="line.390"></a>
 <span class="sourceLineNo">391</span>      } else {<a name="line.391"></a>
-<span class="sourceLineNo">392</span>        scanner = region.getCoprocessorHost().preScannerOpen(scan);<a name="line.392"></a>
-<span class="sourceLineNo">393</span>        if (scanner == null) {<a name="line.393"></a>
-<span class="sourceLineNo">394</span>          scanner = region.getScanner(scan);<a name="line.394"></a>
-<span class="sourceLineNo">395</span>        }<a name="line.395"></a>
-<span class="sourceLineNo">396</span>        scanner = region.getCoprocessorHost().postScannerOpen(scan, scanner);<a name="line.396"></a>
-<span class="sourceLineNo">397</span>      }<a name="line.397"></a>
-<span class="sourceLineNo">398</span>      if (scanner == null) {<a name="line.398"></a>
-<span class="sourceLineNo">399</span>        throw new IOException("Failed to open region scanner");<a name="line.399"></a>
-<span class="sourceLineNo">400</span>      }<a name="line.400"></a>
-<span class="sourceLineNo">401</span>      return scanner;<a name="line.401"></a>
-<span class="sourceLineNo">402</span>    }<a name="line.402"></a>
-<span class="sourceLineNo">403</span><a name="line.403"></a>
-<span class="sourceLineNo">404</span>    void checkScannerClose(final InternalScanner s) throws IOException {<a name="line.404"></a>
-<span class="sourceLineNo">405</span>      if (s == null) {<a name="line.405"></a>
-<span class="sourceLineNo">406</span>        return;<a name="line.406"></a>
-<span class="sourceLineNo">407</span>      }<a name="line.407"></a>
-<span class="sourceLineNo">408</span>      if (region.getCoprocessorHost() == null) {<a name="line.408"></a>
-<span class="sourceLineNo">409</span>        s.close();<a name="line.409"></a>
-<span class="sourceLineNo">410</span>        return;<a name="line.410"></a>
-<span class="sourceLineNo">411</span>      }<a name="line.411"></a>
-<span class="sourceLineNo">412</span>      if (region.getCoprocessorHost().preScannerClose(s)) {<a name="line.412"></a>
-<span class="sourceLineNo">413</span>        return;<a name="line.413"></a>
-<span class="sourceLineNo">414</span>      }<a name="line.414"></a>
-<span class="sourceLineNo">415</span>      try {<a name="line.415"></a>
-<span class="sourceLineNo">416</span>        s.close();<a name="line.416"></a>
-<span class="sourceLineNo">417</span>      } finally {<a name="line.417"></a>
-<span class="sourceLineNo">418</span>        region.getCoprocessorHost().postScannerClose(s);<a name="line.418"></a>
-<span class="sourceLineNo">419</span>      }<a name="line.419"></a>
-<span class="sourceLineNo">420</span>    }<a name="line.420"></a>
-<span class="sourceLineNo">421</span><a name="line.421"></a>
-<span class="sourceLineNo">422</span>    boolean preScannerNext(final InternalScanner s,<a name="line.422"></a>
-<span class="sourceLineNo">423</span>            final List&lt;Result&gt; results, final int limit) throws IOException {<a name="line.423"></a>
-<span class="sourceLineNo">424</span>      if (region.getCoprocessorHost() == null) {<a name="line.424"></a>
-<span class="sourceLineNo">425</span>        return false;<a name="line.425"></a>
-<span class="sourceLineNo">426</span>      } else {<a name="line.426"></a>
-<span class="sourceLineNo">427</span>        Boolean bypass = region.getCoprocessorHost().preScannerNext(s, results, limit);<a name="line.427"></a>
-<span class="sourceLineNo">428</span>        return bypass == null ? false : bypass;<a name="line.428"></a>
-<span class="sourceLineNo">429</span>      }<a name="line.429"></a>
-<span class="sourceLineNo">430</span>    }<a name="line.430"></a>
-<span class="sourceLineNo">431</span><a name="line.431"></a>
-<span class="sourceLineNo">432</span>    boolean postScannerNext(final InternalScanner s,<a name="line.432"></a>
-<span class="sourceLineNo">433</span>            final List&lt;Result&gt; results, final int limit, boolean hasMore)<a name="line.433"></a>
-<span class="sourceLineNo">434</span>            throws IOException {<a name="line.434"></a>
-<span class="sourceLineNo">435</span>      if (region.getCoprocessorHost() == null) {<a name="line.435"></a>
-<span class="sourceLineNo">436</span>        return false;<a name="line.436"></a>
-<span class="sourceLineNo">437</span>      } else {<a name="line.437"></a>
-<span class="sourceLineNo">438</span>        return region.getCoprocessorHost().postScannerNext(s, results, limit, hasMore);<a name="line.438"></a>
-<span class="sourceLineNo">439</span>      }<a name="line.439"></a>
-<span class="sourceLineNo">440</span>    }<a name="line.440"></a>
-<span class="sourceLineNo">441</span>  }<a name="line.441"></a>
-<span class="sourceLineNo">442</span><a name="line.442"></a>
-<span class="sourceLineNo">443</span>  private static class SecureWriter implements Closeable {<a name="line.443"></a>
-<span class="sourceLineNo">444</span>    private final PrivilegedWriter privilegedWriter;<a name="line.444"></a>
-<span class="sourceLineNo">445</span><a name="line.445"></a>
-<span class="sourceLineNo">446</span>    SecureWriter(final Configuration conf, final UserProvider userProvider, final Token userToken,<a name="line.446"></a>
-<span class="sourceLineNo">447</span>            final List&lt;SequenceFile.Writer.Option&gt; opts) throws IOException {<a name="line.447"></a>
-<span class="sourceLineNo">448</span>      privilegedWriter = new PrivilegedWriter(getActiveUser(userProvider, userToken),<a name="line.448"></a>
-<span class="sourceLineNo">449</span>        SequenceFile.createWriter(conf, opts.toArray(new SequenceFile.Writer.Option[opts.size()])));<a name="line.449"></a>
-<span class="sourceLineNo">450</span>    }<a name="line.450"></a>
-<span class="sourceLineNo">451</span><a name="line.451"></a>
-<span class="sourceLineNo">452</span>    void append(final Object key, final Object value) throws IOException {<a name="line.452"></a>
-<span class="sourceLineNo">453</span>      privilegedWriter.append(key, value);<a name="line.453"></a>
-<span class="sourceLineNo">454</span>    }<a name="line.454"></a>
-<span class="sourceLineNo">455</span><a name="line.455"></a>
-<span class="sourceLineNo">456</span>    private static User getActiveUser(final UserProvider userProvider, final Token userToken) throws IOException {<a name="line.456"></a>
-<span class="sourceLineNo">457</span>      User user = RpcServer.getRequestUser().orElse(userProvider.getCurrent());<a name="line.457"></a>
-<span class="sourceLineNo">458</span>      if (user == null &amp;&amp; userToken != null) {<a name="line.458"></a>
-<span class="sourceLineNo">459</span>        LOG.warn("No found of user credentials, but a token was got from user request");<a name="line.459"></a>
-<span class="sourceLineNo">460</span>      } else if (user != null &amp;&amp; userToken != null) {<a name="line.460"></a>
-<span class="sourceLineNo">461</span>        user.addToken(userToken);<a name="line.461"></a>
-<span class="sourceLineNo">462</span>      }<a name="line.462"></a>
-<span class="sourceLineNo">463</span>      return user;<a name="line.463"></a>
-<span class="sourceLineNo">464</span>    }<a name="line.464"></a>
-<span class="sourceLineNo">465</span><a name="line.465"></a>
-<span class="sourceLineNo">466</span>    @Override<a name="line.466"></a>
-<span class="sourceLineNo">467</span>    public void close() throws IOException {<a name="line.467"></a>
-<span class="sourceLineNo">468</span>      privilegedWriter.close();<a name="line.468"></a>
-<span class="sourceLineNo">469</span>    }<a name="line.469"></a>
-<span class="sourceLineNo">470</span>  }<a name="line.470"></a>
-<span class="sourceLineNo">471</span><a name="line.471"></a>
-<span class="sourceLineNo">472</span>  private static class PrivilegedWriter implements PrivilegedExceptionAction&lt;Boolean&gt;, Closeable {<a name="line.472"></a>
-<span class="sourceLineNo">473</span>    private final User user;<a name="line.473"></a>
-<span class="sourceLineNo">474</span>    private final SequenceFile.Writer out;<a name="line.474"></a>
-<span class="sourceLineNo">475</span>    private Object key;<a name="line.475"></a>
-<span class="sourceLineNo">476</span>    private Object value;<a name="line.476"></a>
-<span class="sourceLineNo">477</span><a name="line.477"></a>
-<span class="sourceLineNo">478</span>    PrivilegedWriter(final User user, final SequenceFile.Writer out) {<a name="line.478"></a>
-<span class="sourceLineNo">479</span>      this.user = user;<a name="line.479"></a>
-<span class="sourceLineNo">480</span>      this.out = out;<a name="line.480"></a>
-<span class="sourceLineNo">481</span>    }<a name="line.481"></a>
-<span class="sourceLineNo">482</span><a name="line.482"></a>
-<span class="sourceLineNo">483</span>    void append(final Object key, final Object value) throws IOException {<a name="line.483"></a>
-<span class="sourceLineNo">484</span>      if (user == null) {<a name="line.484"></a>
-<span class="sourceLineNo">485</span>        out.append(key, value);<a name="line.485"></a>
-<span class="sourceLineNo">486</span>      } else {<a name="line.486"></a>
-<span class="sourceLineNo">487</span>        this.key = key;<a name="line.487"></a>
-<span class="sourceLineNo">488</span>        this.value = value;<a name="line.488"></a>
-<span class="sourceLineNo">489</span>        try {<a name="line.489"></a>
-<span class="sourceLineNo">490</span>          user.runAs(this);<a name="line.490"></a>
-<span class="sourceLineNo">491</span>        } catch (InterruptedException ex) {<a name="line.491"></a>
-<span class="sourceLineNo">492</span>          throw new IOException(ex);<a name="line.492"></a>
-<span class="sourceLineNo">493</span>        }<a name="line.493"></a>
-<span class="sourceLineNo">494</span>      }<a name="line.494"></a>
-<span class="sourceLineNo">495</span>    }<a name="line.495"></a>
-<span class="sourceLineNo">496</span><a name="line.496"></a>
-<span class="sourceLineNo">497</span>    @Override<a name="line.497"></a>
-<span class="sourceLineNo">498</span>    public Boolean run() throws Exception {<a name="line.498"></a>
-<span class="sourceLineNo">499</span>      out.append(key, value);<a name="line.499"></a>
-<span class="sourceLineNo">500</span>      return true;<a name="line.500"></a>
-<span class="sourceLineNo">501</span>    }<a name="line.501"></a>
-<span class="sourceLineNo">502</span><a name="line.502"></a>
-<span class="sourceLineNo">503</span>    @Override<a name="line.503"></a>
-<span class="sourceLineNo">504</span>    public void close() throws IOException {<a name="line.504"></a>
-<span class="sourceLineNo">505</span>      out.close();<a name="line.505"></a>
-<span class="sourceLineNo">506</span>    }<a name="line.506"></a>
-<span class="sourceLineNo">507</span>  }<a name="line.507"></a>
+<span class="sourceLineNo">392</span>        region.getCoprocessorHost().preScannerOpen(scan);<a name="line.392"></a>
+<span class="sourceLineNo">393</span>        scanner = region.getScanner(scan);<a name="line.393"></a>
+<span class="sourceLineNo">394</span>        scanner = region.getCoprocessorHost().postScannerOpen(scan, scanner);<a name="line.394"></a>
+<span class="sourceLineNo">395</span>      }<a name="line.395"></a>
+<span class="sourceLineNo">396</span>      if (scanner == null) {<a name="line.396"></a>
+<span class="sourceLineNo">397</span>        throw new IOException("Failed to open region scanner");<a name="line.397"></a>
+<span class="sourceLineNo">398</span>      }<a name="line.398"></a>
+<span class="sourceLineNo">399</span>      return scanner;<a name="line.399"></a>
+<span class="sourceLineNo">400</span>    }<a name="line.400"></a>
+<span class="sourceLineNo">401</span><a name="line.401"></a>
+<span class="sourceLineNo">402</span>    void checkScannerClose(final InternalScanner s) throws IOException {<a name="line.402"></a>
+<span class="sourceLineNo">403</span>      if (s == null) {<a name="line.403"></a>
+<span class="sourceLineNo">404</span>        return;<a name="line.404"></a>
+<span class="sourceLineNo">405</span>      }<a name="line.405"></a>
+<span class="sourceLineNo">406</span>      if (region.getCoprocessorHost() == null) {<a name="line.406"></a>
+<span class="sourceLineNo">407</span>        s.close();<a name="line.407"></a>
+<span class="sourceLineNo">408</span>        return;<a name="line.408"></a>
+<span class="sourceLineNo">409</span>      }<a name="line.409"></a>
+<span class="sourceLineNo">410</span>      if (region.getCoprocessorHost().preScannerClose(s)) {<a name="line.410"></a>
+<span class="sourceLineNo">411</span>        return;<a name="line.411"></a>
+<span class="sourceLineNo">412</span>      }<a name="line.412"></a>
+<span class="sourceLineNo">413</span>      try {<a name="line.413"></a>
+<span class="sourceLineNo">414</span>        s.close();<a name="line.414"></a>
+<span class="sourceLineNo">415</span>      } finally {<a name="line.415"></a>
+<span class="sourceLineNo">416</span>        region.getCoprocessorHost().postScannerClose(s);<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><a name="line.419"></a>
+<span class="sourceLineNo">420</span>    boolean preScannerNext(final InternalScanner s,<a name="line.420"></a>
+<span class="sourceLineNo">421</span>            final List&lt;Result&gt; results, final int limit) throws IOException {<a name="line.421"></a>
+<span class="sourceLineNo">422</span>      if (region.getCoprocessorHost() == null) {<a name="line.422"></a>
+<span class="sourceLineNo">423</span>        return false;<a name="line.423"></a>
+<span class="sourceLineNo">424</span>      } else {<a name="line.424"></a>
+<span class="sourceLineNo">425</span>        Boolean bypass = region.getCoprocessorHost().preScannerNext(s, results, limit);<a name="line.425"></a>
+<span class="sourceLineNo">426</span>        return bypass == null ? false : bypass;<a name="line.426"></a>
+<span class="sourceLineNo">427</span>      }<a name="line.427"></a>
+<span class="sourceLineNo">428</span>    }<a name="line.428"></a>
+<span class="sourceLineNo">429</span><a name="line.429"></a>
+<span class="sourceLineNo">430</span>    boolean postScannerNext(final InternalScanner s,<a name="line.430"></a>
+<span class="sourceLineNo">431</span>            final List&lt;Result&gt; results, final int limit, boolean hasMore)<a name="line.431"></a>
+<span class="sourceLineNo">432</span>            throws IOException {<a name="line.432"></a>
+<span class="sourceLineNo">433</span>      if (region.getCoprocessorHost() == null) {<a name="line.433"></a>
+<span class="sourceLineNo">434</span>        return false;<a name="line.434"></a>
+<span class="sourceLineNo">435</span>      } else {<a name="line.435"></a>
+<span class="sourceLineNo">436</span>        return region.getCoprocessorHost().postScannerNext(s, results, limit, hasMore);<a name="line.436"></a>
+<span class="sourceLineNo">437</span>      }<a name="line.437"></a>
+<span class="sourceLineNo">438</span>    }<a name="line.438"></a>
+<span class="sourceLineNo">439</span>  }<a name="line.439"></a>
+<span class="sourceLineNo">440</span><a name="line.440"></a>
+<span class="sourceLineNo">441</span>  private static class SecureWriter implements Closeable {<a name="line.441"></a>
+<span class="sourceLineNo">442</span>    private final PrivilegedWriter privilegedWriter;<a name="line.442"></a>
+<span class="sourceLineNo">443</span><a name="line.443"></a>
+<span class="sourceLineNo">444</span>    SecureWriter(final Configuration conf, final UserProvider userProvider, final Token userToken,<a name="line.444"></a>
+<span class="sourceLineNo">445</span>            final List&lt;SequenceFile.Writer.Option&gt; opts) throws IOException {<a name="line.445"></a>
+<span class="sourceLineNo">446</span>      privilegedWriter = new PrivilegedWriter(getActiveUser(userProvider, userToken),<a name="line.446"></a>
+<span class="sourceLineNo">447</span>        SequenceFile.createWriter(conf, opts.toArray(new SequenceFile.Writer.Option[opts.size()])));<a name="line.447"></a>
+<span class="sourceLineNo">448</span>    }<a name="line.448"></a>
+<span class="sourceLineNo">449</span><a name="line.449"></a>
+<span class="sourceLineNo">450</span>    void append(final Object key, final Object value) throws IOException {<a name="line.450"></a>
+<span class="sourceLineNo">451</span>      privilegedWriter.append(key, value);<a name="line.451"></a>
+<span class="sourceLineNo">452</span>    }<a name="line.452"></a>
+<span class="sourceLineNo">453</span><a name="line.453"></a>
+<span class="sourceLineNo">454</span>    private static User getActiveUser(final UserProvider userProvider, final Token userToken) throws IOException {<a name="line.454"></a>
+<span class="sourceLineNo">455</span>      User user = RpcServer.getRequestUser().orElse(userProvider.getCurrent());<a name="line.455"></a>
+<span class="sourceLineNo">456</span>      if (user == null &amp;&amp; userToken != null) {<a name="line.456"></a>
+<span class="sourceLineNo">457</span>        LOG.warn("No found of user credentials, but a token was got from user request");<a name="line.457"></a>
+<span class="sourceLineNo">458</span>      } else if (user != null &amp;&amp; userToken != null) {<a name="line.458"></a>
+<span class="sourceLineNo">459</span>        user.addToken(userToken);<a name="line.459"></a>
+<span class="sourceLineNo">460</span>      }<a name="line.460"></a>
+<span class="sourceLineNo">461</span>      return user;<a name="line.461"></a>
+<span class="sourceLineNo">462</span>    }<a name="line.462"></a>
+<span class="sourceLineNo">463</span><a name="line.463"></a>
+<span class="sourceLineNo">464</span>    @Override<a name="line.464"></a>
+<span class="sourceLineNo">465</span>    public void close() throws IOException {<a name="line.465"></a>
+<span class="sourceLineNo">466</span>      privilegedWriter.close();<a name="line.466"></a>
+<span class="sourceLineNo">467</span>    }<a name="line.467"></a>
+<span class="sourceLineNo">468</span>  }<a name="line.468"></a>
+<span class="sourceLineNo">469</span><a name="line.469"></a>
+<span class="sourceLineNo">470</span>  private static class PrivilegedWriter implements PrivilegedExceptionAction&lt;Boolean&gt;, Closeable {<a name="line.470"></a>
+<span class="sourceLineNo">471</span>    private final User user;<a name="line.471"></a>
+<span class="sourceLineNo">472</span>    private final SequenceFile.Writer out;<a name="line.472"></a>
+<span class="sourceLineNo">473</span>    private Object key;<a name="line.473"></a>
+<span class="sourceLineNo">474</span>    private Object value;<a name="line.474"></a>
+<span class="sourceLineNo">475</span><a name="line.475"></a>
+<span class="sourceLineNo">476</span>    PrivilegedWriter(final User user, final SequenceFile.Writer out) {<a name="line.476"></a>
+<span class="sourceLineNo">477</span>      this.user = user;<a name="line.477"></a>
+<span class="sourceLineNo">478</span>      this.out = out;<a name="line.478"></a>
+<span class="sourceLineNo">479</span>    }<a name="line.479"></a>
+<span class="sourceLineNo">480</span><a name="line.480"></a>
+<span class="sourceLineNo">481</span>    void append(final Object key, final Object value) throws IOException {<a name="line.481"></a>
+<span class="sourceLineNo">482</span>      if (user == null) {<a name="line.482"></a>
+<span class="sourceLineNo">483</span>        out.append(key, value);<a name="line.483"></a>
+<span class="sourceLineNo">484</span>      } else {<a name="line.484"></a>
+<span class="sourceLineNo">485</span>        this.key = key;<a name="line.485"></a>
+<span class="sourceLineNo">486</span>        this.value = value;<a name="line.486"></a>
+<span class="sourceLineNo">487</span>        try {<a name="line.487"></a>
+<span class="sourceLineNo">488</span>          user.runAs(this);<a name="line.488"></a>
+<span class="sourceLineNo">489</span>        } catch (InterruptedException ex) {<a name="line.489"></a>
+<span class="sourceLineNo">490</span>          throw new IOException(ex);<a name="line.490"></a>
+<span class="sourceLineNo">491</span>        }<a name="line.491"></a>
+<span class="sourceLineNo">492</span>      }<a name="line.492"></a>
+<span class="sourceLineNo">493</span>    }<a name="line.493"></a>
+<span class="sourceLineNo">494</span><a name="line.494"></a>
+<span class="sourceLineNo">495</span>    @Override<a name="line.495"></a>
+<span class="sourceLineNo">496</span>    public Boolean run() throws Exception {<a name="line.496"></a>
+<span class="sourceLineNo">497</span>      out.append(key, value);<a name="line.497"></a>
+<span class="sourceLineNo">498</span>      return true;<a name="line.498"></a>
+<span class="sourceLineNo">499</span>    }<a name="line.499"></a>
+<span class="sourceLineNo">500</span><a name="line.500"></a>
+<span class="sourceLineNo">501</span>    @Override<a name="line.501"></a>
+<span class="sourceLineNo">502</span>    public void close() throws IOException {<a name="line.502"></a>
+<span class="sourceLineNo">503</span>      out.close();<a name="line.503"></a>
+<span class="sourceLineNo">504</span>    }<a name="line.504"></a>
+<span class="sourceLineNo">505</span>  }<a name="line.505"></a>
+<span class="sourceLineNo">506</span><a name="line.506"></a>
+<span class="sourceLineNo">507</span>  public static class Response {<a name="line.507"></a>
 <span class="sourceLineNo">508</span><a name="line.508"></a>
-<span class="sourceLineNo">509</span>  public static class Response {<a name="line.509"></a>
-<span class="sourceLineNo">510</span><a name="line.510"></a>
-<span class="sourceLineNo">511</span>    private final long rowCount;<a name="line.511"></a>
-<span class="sourceLineNo">512</span>    private final long cellCount;<a name="line.512"></a>
-<span class="sourceLineNo">513</span><a name="line.513"></a>
-<span class="sourceLineNo">514</span>    private Response(ExportProtos.ExportResponse r) {<a name="line.514"></a>
-<span class="sourceLineNo">515</span>      this.rowCount = r.getRowCount();<a name="line.515"></a>
-<span class="sourceLineNo">516</span>      this.cellCount = r.getCellCount();<a name="line.516"></a>
-<span class="sourceLineNo">517</span>    }<a name="line.517"></a>
-<span class="sourceLineNo">518</span><a name="line.518"></a>
-<span class="sourceLineNo">519</span>    public long getRowCount() {<a name="line.519"></a>
-<span class="sourceLineNo">520</span>      return rowCount;<a name="line.520"></a>
-<span class="sourceLineNo">521</span>    }<a name="line.521"></a>
-<span class="sourceLineNo">522</span><a name="line.522"></a>
-<span class="sourceLineNo">523</span>    public long getCellCount() {<a name="line.523"></a>
-<span class="sourceLineNo">524</span>      return cellCount;<a name="line.524"></a>
-<span class="sourceLineNo">525</span>    }<a name="line.525"></a>
-<span class="sourceLineNo">526</span><a name="line.526"></a>
-<span class="sourceLineNo">527</span>    @Override<a name="line.527"></a>
-<span class="sourceLineNo">528</span>    public String toString() {<a name="line.528"></a>
-<span class="sourceLineNo">529</span>      StringBuilder builder = new StringBuilder(35);<a name="line.529"></a>
-<span class="sourceLineNo">530</span>      return builder.append("rowCount=")<a name="line.530"></a>
-<span class="sourceLineNo">531</span>             .append(rowCount)<a name="line.531"></a>
-<span class="sourceLineNo">532</span>             .append(", cellCount=")<a name="line.532"></a>
-<span class="sourceLineNo">533</span>             .append(cellCount)<a name="line.533"></a>
-<span class="sourceLineNo">534</span>             .toString();<a name="line.534"></a>
-<span class="sourceLineNo">535</span>    }<a name="line.535"></a>
-<span class="sourceLineNo">536</span>  }<a name="line.536"></a>
-<span class="sourceLineNo">537</span>}<a name="line.537"></a>
+<span class="sourceLineNo">509</span>    private final long rowCount;<a name="line.509"></a>
+<span class="sourceLineNo">510</span>    private final long cellCount;<a name="line.510"></a>
+<span class="sourceLineNo">511</span><a name="line.511"></a>
+<span class="sourceLineNo">512</span>    private Response(ExportProtos.ExportResponse r) {<a name="line.512"></a>
+<span class="sourceLineNo">513</span>      this.rowCount = r.getRowCount();<a name="line.513"></a>
+<span class="sourceLineNo">514</span>      this.cellCount = r.getCellCount();<a name="line.514"></a>
+<span class="sourceLineNo">515</span>    }<a name="line.515"></a>
+<span class="sourceLineNo">516</span><a name="line.516"></a>
+<span class="sourceLineNo">517</span>    public long getRowCount() {<a name="line.517"></a>
+<span class="sourceLineNo">518</span>      return rowCount;<a name="line.518"></a>
+<span class="sourceLineNo">519</span>    }<a name="line.519"></a>
+<span class="sourceLineNo">520</span><a name="line.520"></a>
+<span class="sourceLineNo">521</span>    public long getCellCount() {<a name="line.521"></a>
+<span class="sourceLineNo">522</span>      return cellCount;<a name="line.522"></a>
+<span class="sourceLineNo">523</span>    }<a name="line.523"></a>
+<span class="sourceLineNo">524</span><a name="line.524"></a>
+<span class="sourceLineNo">525</span>    @Override<a name="line.525"></a>
+<span class="sourceLineNo">526</span>    public String toString() {<a name="line.526"></a>
+<span class="sourceLineNo">527</span>      StringBuilder builder = new StringBuilder(35);<a name="line.527"></a>
+<span class="sourceLineNo">528</span>      return builder.append("rowCount=")<a name="line.528"></a>
+<span class="sourceLineNo">529</span>             .append(rowCount)<a name="line.529"></a>
+<span class="sourceLineNo">530</span>             .append(", cellCount=")<a name="line.530"></a>
+<span class="sourceLineNo">531</span>             .append(cellCount)<a name="line.531"></a>
+<span class="sourceLineNo">532</span>             .toString();<a name="line.532"></a>
+<span class="sourceLineNo">533</span>    }<a name="line.533"></a>
+<span class="sourceLineNo">534</span>  }<a name="line.534"></a>
+<span class="sourceLineNo">535</span>}<a name="line.535"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/1d9053bc/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.RegionOp.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.RegionOp.html b/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.RegionOp.html
index 45f0981..a5f0277 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.RegionOp.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.RegionOp.html
@@ -397,152 +397,150 @@
 <span class="sourceLineNo">389</span>      if (region.getCoprocessorHost() == null) {<a name="line.389"></a>
 <span class="sourceLineNo">390</span>        scanner = region.getScanner(scan);<a name="line.390"></a>
 <span class="sourceLineNo">391</span>      } else {<a name="line.391"></a>
-<span class="sourceLineNo">392</span>        scanner = region.getCoprocessorHost().preScannerOpen(scan);<a name="line.392"></a>
-<span class="sourceLineNo">393</span>        if (scanner == null) {<a name="line.393"></a>
-<span class="sourceLineNo">394</span>          scanner = region.getScanner(scan);<a name="line.394"></a>
-<span class="sourceLineNo">395</span>        }<a name="line.395"></a>
-<span class="sourceLineNo">396</span>        scanner = region.getCoprocessorHost().postScannerOpen(scan, scanner);<a name="line.396"></a>
-<span class="sourceLineNo">397</span>      }<a name="line.397"></a>
-<span class="sourceLineNo">398</span>      if (scanner == null) {<a name="line.398"></a>
-<span class="sourceLineNo">399</span>        throw new IOException("Failed to open region scanner");<a name="line.399"></a>
-<span class="sourceLineNo">400</span>      }<a name="line.400"></a>
-<span class="sourceLineNo">401</span>      return scanner;<a name="line.401"></a>
-<span class="sourceLineNo">402</span>    }<a name="line.402"></a>
-<span class="sourceLineNo">403</span><a name="line.403"></a>
-<span class="sourceLineNo">404</span>    void checkScannerClose(final InternalScanner s) throws IOException {<a name="line.404"></a>
-<span class="sourceLineNo">405</span>      if (s == null) {<a name="line.405"></a>
-<span class="sourceLineNo">406</span>        return;<a name="line.406"></a>
-<span class="sourceLineNo">407</span>      }<a name="line.407"></a>
-<span class="sourceLineNo">408</span>      if (region.getCoprocessorHost() == null) {<a name="line.408"></a>
-<span class="sourceLineNo">409</span>        s.close();<a name="line.409"></a>
-<span class="sourceLineNo">410</span>        return;<a name="line.410"></a>
-<span class="sourceLineNo">411</span>      }<a name="line.411"></a>
-<span class="sourceLineNo">412</span>      if (region.getCoprocessorHost().preScannerClose(s)) {<a name="line.412"></a>
-<span class="sourceLineNo">413</span>        return;<a name="line.413"></a>
-<span class="sourceLineNo">414</span>      }<a name="line.414"></a>
-<span class="sourceLineNo">415</span>      try {<a name="line.415"></a>
-<span class="sourceLineNo">416</span>        s.close();<a name="line.416"></a>
-<span class="sourceLineNo">417</span>      } finally {<a name="line.417"></a>
-<span class="sourceLineNo">418</span>        region.getCoprocessorHost().postScannerClose(s);<a name="line.418"></a>
-<span class="sourceLineNo">419</span>      }<a name="line.419"></a>
-<span class="sourceLineNo">420</span>    }<a name="line.420"></a>
-<span class="sourceLineNo">421</span><a name="line.421"></a>
-<span class="sourceLineNo">422</span>    boolean preScannerNext(final InternalScanner s,<a name="line.422"></a>
-<span class="sourceLineNo">423</span>            final List&lt;Result&gt; results, final int limit) throws IOException {<a name="line.423"></a>
-<span class="sourceLineNo">424</span>      if (region.getCoprocessorHost() == null) {<a name="line.424"></a>
-<span class="sourceLineNo">425</span>        return false;<a name="line.425"></a>
-<span class="sourceLineNo">426</span>      } else {<a name="line.426"></a>
-<span class="sourceLineNo">427</span>        Boolean bypass = region.getCoprocessorHost().preScannerNext(s, results, limit);<a name="line.427"></a>
-<span class="sourceLineNo">428</span>        return bypass == null ? false : bypass;<a name="line.428"></a>
-<span class="sourceLineNo">429</span>      }<a name="line.429"></a>
-<span class="sourceLineNo">430</span>    }<a name="line.430"></a>
-<span class="sourceLineNo">431</span><a name="line.431"></a>
-<span class="sourceLineNo">432</span>    boolean postScannerNext(final InternalScanner s,<a name="line.432"></a>
-<span class="sourceLineNo">433</span>            final List&lt;Result&gt; results, final int limit, boolean hasMore)<a name="line.433"></a>
-<span class="sourceLineNo">434</span>            throws IOException {<a name="line.434"></a>
-<span class="sourceLineNo">435</span>      if (region.getCoprocessorHost() == null) {<a name="line.435"></a>
-<span class="sourceLineNo">436</span>        return false;<a name="line.436"></a>
-<span class="sourceLineNo">437</span>      } else {<a name="line.437"></a>
-<span class="sourceLineNo">438</span>        return region.getCoprocessorHost().postScannerNext(s, results, limit, hasMore);<a name="line.438"></a>
-<span class="sourceLineNo">439</span>      }<a name="line.439"></a>
-<span class="sourceLineNo">440</span>    }<a name="line.440"></a>
-<span class="sourceLineNo">441</span>  }<a name="line.441"></a>
-<span class="sourceLineNo">442</span><a name="line.442"></a>
-<span class="sourceLineNo">443</span>  private static class SecureWriter implements Closeable {<a name="line.443"></a>
-<span class="sourceLineNo">444</span>    private final PrivilegedWriter privilegedWriter;<a name="line.444"></a>
-<span class="sourceLineNo">445</span><a name="line.445"></a>
-<span class="sourceLineNo">446</span>    SecureWriter(final Configuration conf, final UserProvider userProvider, final Token userToken,<a name="line.446"></a>
-<span class="sourceLineNo">447</span>            final List&lt;SequenceFile.Writer.Option&gt; opts) throws IOException {<a name="line.447"></a>
-<span class="sourceLineNo">448</span>      privilegedWriter = new PrivilegedWriter(getActiveUser(userProvider, userToken),<a name="line.448"></a>
-<span class="sourceLineNo">449</span>        SequenceFile.createWriter(conf, opts.toArray(new SequenceFile.Writer.Option[opts.size()])));<a name="line.449"></a>
-<span class="sourceLineNo">450</span>    }<a name="line.450"></a>
-<span class="sourceLineNo">451</span><a name="line.451"></a>
-<span class="sourceLineNo">452</span>    void append(final Object key, final Object value) throws IOException {<a name="line.452"></a>
-<span class="sourceLineNo">453</span>      privilegedWriter.append(key, value);<a name="line.453"></a>
-<span class="sourceLineNo">454</span>    }<a name="line.454"></a>
-<span class="sourceLineNo">455</span><a name="line.455"></a>
-<span class="sourceLineNo">456</span>    private static User getActiveUser(final UserProvider userProvider, final Token userToken) throws IOException {<a name="line.456"></a>
-<span class="sourceLineNo">457</span>      User user = RpcServer.getRequestUser().orElse(userProvider.getCurrent());<a name="line.457"></a>
-<span class="sourceLineNo">458</span>      if (user == null &amp;&amp; userToken != null) {<a name="line.458"></a>
-<span class="sourceLineNo">459</span>        LOG.warn("No found of user credentials, but a token was got from user request");<a name="line.459"></a>
-<span class="sourceLineNo">460</span>      } else if (user != null &amp;&amp; userToken != null) {<a name="line.460"></a>
-<span class="sourceLineNo">461</span>        user.addToken(userToken);<a name="line.461"></a>
-<span class="sourceLineNo">462</span>      }<a name="line.462"></a>
-<span class="sourceLineNo">463</span>      return user;<a name="line.463"></a>
-<span class="sourceLineNo">464</span>    }<a name="line.464"></a>
-<span class="sourceLineNo">465</span><a name="line.465"></a>
-<span class="sourceLineNo">466</span>    @Override<a name="line.466"></a>
-<span class="sourceLineNo">467</span>    public void close() throws IOException {<a name="line.467"></a>
-<span class="sourceLineNo">468</span>      privilegedWriter.close();<a name="line.468"></a>
-<span class="sourceLineNo">469</span>    }<a name="line.469"></a>
-<span class="sourceLineNo">470</span>  }<a name="line.470"></a>
-<span class="sourceLineNo">471</span><a name="line.471"></a>
-<span class="sourceLineNo">472</span>  private static class PrivilegedWriter implements PrivilegedExceptionAction&lt;Boolean&gt;, Closeable {<a name="line.472"></a>
-<span class="sourceLineNo">473</span>    private final User user;<a name="line.473"></a>
-<span class="sourceLineNo">474</span>    private final SequenceFile.Writer out;<a name="line.474"></a>
-<span class="sourceLineNo">475</span>    private Object key;<a name="line.475"></a>
-<span class="sourceLineNo">476</span>    private Object value;<a name="line.476"></a>
-<span class="sourceLineNo">477</span><a name="line.477"></a>
-<span class="sourceLineNo">478</span>    PrivilegedWriter(final User user, final SequenceFile.Writer out) {<a name="line.478"></a>
-<span class="sourceLineNo">479</span>      this.user = user;<a name="line.479"></a>
-<span class="sourceLineNo">480</span>      this.out = out;<a name="line.480"></a>
-<span class="sourceLineNo">481</span>    }<a name="line.481"></a>
-<span class="sourceLineNo">482</span><a name="line.482"></a>
-<span class="sourceLineNo">483</span>    void append(final Object key, final Object value) throws IOException {<a name="line.483"></a>
-<span class="sourceLineNo">484</span>      if (user == null) {<a name="line.484"></a>
-<span class="sourceLineNo">485</span>        out.append(key, value);<a name="line.485"></a>
-<span class="sourceLineNo">486</span>      } else {<a name="line.486"></a>
-<span class="sourceLineNo">487</span>        this.key = key;<a name="line.487"></a>
-<span class="sourceLineNo">488</span>        this.value = value;<a name="line.488"></a>
-<span class="sourceLineNo">489</span>        try {<a name="line.489"></a>
-<span class="sourceLineNo">490</span>          user.runAs(this);<a name="line.490"></a>
-<span class="sourceLineNo">491</span>        } catch (InterruptedException ex) {<a name="line.491"></a>
-<span class="sourceLineNo">492</span>          throw new IOException(ex);<a name="line.492"></a>
-<span class="sourceLineNo">493</span>        }<a name="line.493"></a>
-<span class="sourceLineNo">494</span>      }<a name="line.494"></a>
-<span class="sourceLineNo">495</span>    }<a name="line.495"></a>
-<span class="sourceLineNo">496</span><a name="line.496"></a>
-<span class="sourceLineNo">497</span>    @Override<a name="line.497"></a>
-<span class="sourceLineNo">498</span>    public Boolean run() throws Exception {<a name="line.498"></a>
-<span class="sourceLineNo">499</span>      out.append(key, value);<a name="line.499"></a>
-<span class="sourceLineNo">500</span>      return true;<a name="line.500"></a>
-<span class="sourceLineNo">501</span>    }<a name="line.501"></a>
-<span class="sourceLineNo">502</span><a name="line.502"></a>
-<span class="sourceLineNo">503</span>    @Override<a name="line.503"></a>
-<span class="sourceLineNo">504</span>    public void close() throws IOException {<a name="line.504"></a>
-<span class="sourceLineNo">505</span>      out.close();<a name="line.505"></a>
-<span class="sourceLineNo">506</span>    }<a name="line.506"></a>
-<span class="sourceLineNo">507</span>  }<a name="line.507"></a>
+<span class="sourceLineNo">392</span>        region.getCoprocessorHost().preScannerOpen(scan);<a name="line.392"></a>
+<span class="sourceLineNo">393</span>        scanner = region.getScanner(scan);<a name="line.393"></a>
+<span class="sourceLineNo">394</span>        scanner = region.getCoprocessorHost().postScannerOpen(scan, scanner);<a name="line.394"></a>
+<span class="sourceLineNo">395</span>      }<a name="line.395"></a>
+<span class="sourceLineNo">396</span>      if (scanner == null) {<a name="line.396"></a>
+<span class="sourceLineNo">397</span>        throw new IOException("Failed to open region scanner");<a name="line.397"></a>
+<span class="sourceLineNo">398</span>      }<a name="line.398"></a>
+<span class="sourceLineNo">399</span>      return scanner;<a name="line.399"></a>
+<span class="sourceLineNo">400</span>    }<a name="line.400"></a>
+<span class="sourceLineNo">401</span><a name="line.401"></a>
+<span class="sourceLineNo">402</span>    void checkScannerClose(final InternalScanner s) throws IOException {<a name="line.402"></a>
+<span class="sourceLineNo">403</span>      if (s == null) {<a name="line.403"></a>
+<span class="sourceLineNo">404</span>        return;<a name="line.404"></a>
+<span class="sourceLineNo">405</span>      }<a name="line.405"></a>
+<span class="sourceLineNo">406</span>      if (region.getCoprocessorHost() == null) {<a name="line.406"></a>
+<span class="sourceLineNo">407</span>        s.close();<a name="line.407"></a>
+<span class="sourceLineNo">408</span>        return;<a name="line.408"></a>
+<span class="sourceLineNo">409</span>      }<a name="line.409"></a>
+<span class="sourceLineNo">410</span>      if (region.getCoprocessorHost().preScannerClose(s)) {<a name="line.410"></a>
+<span class="sourceLineNo">411</span>        return;<a name="line.411"></a>
+<span class="sourceLineNo">412</span>      }<a name="line.412"></a>
+<span class="sourceLineNo">413</span>      try {<a name="line.413"></a>
+<span class="sourceLineNo">414</span>        s.close();<a name="line.414"></a>
+<span class="sourceLineNo">415</span>      } finally {<a name="line.415"></a>
+<span class="sourceLineNo">416</span>        region.getCoprocessorHost().postScannerClose(s);<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><a name="line.419"></a>
+<span class="sourceLineNo">420</span>    boolean preScannerNext(final InternalScanner s,<a name="line.420"></a>
+<span class="sourceLineNo">421</span>            final List&lt;Result&gt; results, final int limit) throws IOException {<a name="line.421"></a>
+<span class="sourceLineNo">422</span>      if (region.getCoprocessorHost() == null) {<a name="line.422"></a>
+<span class="sourceLineNo">423</span>        return false;<a name="line.423"></a>
+<span class="sourceLineNo">424</span>      } else {<a name="line.424"></a>
+<span class="sourceLineNo">425</span>        Boolean bypass = region.getCoprocessorHost().preScannerNext(s, results, limit);<a name="line.425"></a>
+<span class="sourceLineNo">426</span>        return bypass == null ? false : bypass;<a name="line.426"></a>
+<span class="sourceLineNo">427</span>      }<a name="line.427"></a>
+<span class="sourceLineNo">428</span>    }<a name="line.428"></a>
+<span class="sourceLineNo">429</span><a name="line.429"></a>
+<span class="sourceLineNo">430</span>    boolean postScannerNext(final InternalScanner s,<a name="line.430"></a>
+<span class="sourceLineNo">431</span>            final List&lt;Result&gt; results, final int limit, boolean hasMore)<a name="line.431"></a>
+<span class="sourceLineNo">432</span>            throws IOException {<a name="line.432"></a>
+<span class="sourceLineNo">433</span>      if (region.getCoprocessorHost() == null) {<a name="line.433"></a>
+<span class="sourceLineNo">434</span>        return false;<a name="line.434"></a>
+<span class="sourceLineNo">435</span>      } else {<a name="line.435"></a>
+<span class="sourceLineNo">436</span>        return region.getCoprocessorHost().postScannerNext(s, results, limit, hasMore);<a name="line.436"></a>
+<span class="sourceLineNo">437</span>      }<a name="line.437"></a>
+<span class="sourceLineNo">438</span>    }<a name="line.438"></a>
+<span class="sourceLineNo">439</span>  }<a name="line.439"></a>
+<span class="sourceLineNo">440</span><a name="line.440"></a>
+<span class="sourceLineNo">441</span>  private static class SecureWriter implements Closeable {<a name="line.441"></a>
+<span class="sourceLineNo">442</span>    private final PrivilegedWriter privilegedWriter;<a name="line.442"></a>
+<span class="sourceLineNo">443</span><a name="line.443"></a>
+<span class="sourceLineNo">444</span>    SecureWriter(final Configuration conf, final UserProvider userProvider, final Token userToken,<a name="line.444"></a>
+<span class="sourceLineNo">445</span>            final List&lt;SequenceFile.Writer.Option&gt; opts) throws IOException {<a name="line.445"></a>
+<span class="sourceLineNo">446</span>      privilegedWriter = new PrivilegedWriter(getActiveUser(userProvider, userToken),<a name="line.446"></a>
+<span class="sourceLineNo">447</span>        SequenceFile.createWriter(conf, opts.toArray(new SequenceFile.Writer.Option[opts.size()])));<a name="line.447"></a>
+<span class="sourceLineNo">448</span>    }<a name="line.448"></a>
+<span class="sourceLineNo">449</span><a name="line.449"></a>
+<span class="sourceLineNo">450</span>    void append(final Object key, final Object value) throws IOException {<a name="line.450"></a>
+<span class="sourceLineNo">451</span>      privilegedWriter.append(key, value);<a name="line.451"></a>
+<span class="sourceLineNo">452</span>    }<a name="line.452"></a>
+<span class="sourceLineNo">453</span><a name="line.453"></a>
+<span class="sourceLineNo">454</span>    private static User getActiveUser(final UserProvider userProvider, final Token userToken) throws IOException {<a name="line.454"></a>
+<span class="sourceLineNo">455</span>      User user = RpcServer.getRequestUser().orElse(userProvider.getCurrent());<a name="line.455"></a>
+<span class="sourceLineNo">456</span>      if (user == null &amp;&amp; userToken != null) {<a name="line.456"></a>
+<span class="sourceLineNo">457</span>        LOG.warn("No found of user credentials, but a token was got from user request");<a name="line.457"></a>
+<span class="sourceLineNo">458</span>      } else if (user != null &amp;&amp; userToken != null) {<a name="line.458"></a>
+<span class="sourceLineNo">459</span>        user.addToken(userToken);<a name="line.459"></a>
+<span class="sourceLineNo">460</span>      }<a name="line.460"></a>
+<span class="sourceLineNo">461</span>      return user;<a name="line.461"></a>
+<span class="sourceLineNo">462</span>    }<a name="line.462"></a>
+<span class="sourceLineNo">463</span><a name="line.463"></a>
+<span class="sourceLineNo">464</span>    @Override<a name="line.464"></a>
+<span class="sourceLineNo">465</span>    public void close() throws IOException {<a name="line.465"></a>
+<span class="sourceLineNo">466</span>      privilegedWriter.close();<a name="line.466"></a>
+<span class="sourceLineNo">467</span>    }<a name="line.467"></a>
+<span class="sourceLineNo">468</span>  }<a name="line.468"></a>
+<span class="sourceLineNo">469</span><a name="line.469"></a>
+<span class="sourceLineNo">470</span>  private static class PrivilegedWriter implements PrivilegedExceptionAction&lt;Boolean&gt;, Closeable {<a name="line.470"></a>
+<span class="sourceLineNo">471</span>    private final User user;<a name="line.471"></a>
+<span class="sourceLineNo">472</span>    private final SequenceFile.Writer out;<a name="line.472"></a>
+<span class="sourceLineNo">473</span>    private Object key;<a name="line.473"></a>
+<span class="sourceLineNo">474</span>    private Object value;<a name="line.474"></a>
+<span class="sourceLineNo">475</span><a name="line.475"></a>
+<span class="sourceLineNo">476</span>    PrivilegedWriter(final User user, final SequenceFile.Writer out) {<a name="line.476"></a>
+<span class="sourceLineNo">477</span>      this.user = user;<a name="line.477"></a>
+<span class="sourceLineNo">478</span>      this.out = out;<a name="line.478"></a>
+<span class="sourceLineNo">479</span>    }<a name="line.479"></a>
+<span class="sourceLineNo">480</span><a name="line.480"></a>
+<span class="sourceLineNo">481</span>    void append(final Object key, final Object value) throws IOException {<a name="line.481"></a>
+<span class="sourceLineNo">482</span>      if (user == null) {<a name="line.482"></a>
+<span class="sourceLineNo">483</span>        out.append(key, value);<a name="line.483"></a>
+<span class="sourceLineNo">484</span>      } else {<a name="line.484"></a>
+<span class="sourceLineNo">485</span>        this.key = key;<a name="line.485"></a>
+<span class="sourceLineNo">486</span>        this.value = value;<a name="line.486"></a>
+<span class="sourceLineNo">487</span>        try {<a name="line.487"></a>
+<span class="sourceLineNo">488</span>          user.runAs(this);<a name="line.488"></a>
+<span class="sourceLineNo">489</span>        } catch (InterruptedException ex) {<a name="line.489"></a>
+<span class="sourceLineNo">490</span>          throw new IOException(ex);<a name="line.490"></a>
+<span class="sourceLineNo">491</span>        }<a name="line.491"></a>
+<span class="sourceLineNo">492</span>      }<a name="line.492"></a>
+<span class="sourceLineNo">493</span>    }<a name="line.493"></a>
+<span class="sourceLineNo">494</span><a name="line.494"></a>
+<span class="sourceLineNo">495</span>    @Override<a name="line.495"></a>
+<span class="sourceLineNo">496</span>    public Boolean run() throws Exception {<a name="line.496"></a>
+<span class="sourceLineNo">497</span>      out.append(key, value);<a name="line.497"></a>
+<span class="sourceLineNo">498</span>      return true;<a name="line.498"></a>
+<span class="sourceLineNo">499</span>    }<a name="line.499"></a>
+<span class="sourceLineNo">500</span><a name="line.500"></a>
+<span class="sourceLineNo">501</span>    @Override<a name="line.501"></a>
+<span class="sourceLineNo">502</span>    public void close() throws IOException {<a name="line.502"></a>
+<span class="sourceLineNo">503</span>      out.close();<a name="line.503"></a>
+<span class="sourceLineNo">504</span>    }<a name="line.504"></a>
+<span class="sourceLineNo">505</span>  }<a name="line.505"></a>
+<span class="sourceLineNo">506</span><a name="line.506"></a>
+<span class="sourceLineNo">507</span>  public static class Response {<a name="line.507"></a>
 <span class="sourceLineNo">508</span><a name="line.508"></a>
-<span class="sourceLineNo">509</span>  public static class Response {<a name="line.509"></a>
-<span class="sourceLineNo">510</span><a name="line.510"></a>
-<span class="sourceLineNo">511</span>    private final long rowCount;<a name="line.511"></a>
-<span class="sourceLineNo">512</span>    private final long cellCount;<a name="line.512"></a>
-<span class="sourceLineNo">513</span><a name="line.513"></a>
-<span class="sourceLineNo">514</span>    private Response(ExportProtos.ExportResponse r) {<a name="line.514"></a>
-<span class="sourceLineNo">515</span>      this.rowCount = r.getRowCount();<a name="line.515"></a>
-<span class="sourceLineNo">516</span>      this.cellCount = r.getCellCount();<a name="line.516"></a>
-<span class="sourceLineNo">517</span>    }<a name="line.517"></a>
-<span class="sourceLineNo">518</span><a name="line.518"></a>
-<span class="sourceLineNo">519</span>    public long getRowCount() {<a name="line.519"></a>
-<span class="sourceLineNo">520</span>      return rowCount;<a name="line.520"></a>
-<span class="sourceLineNo">521</span>    }<a name="line.521"></a>
-<span class="sourceLineNo">522</span><a name="line.522"></a>
-<span class="sourceLineNo">523</span>    public long getCellCount() {<a name="line.523"></a>
-<span class="sourceLineNo">524</span>      return cellCount;<a name="line.524"></a>
-<span class="sourceLineNo">525</span>    }<a name="line.525"></a>
-<span class="sourceLineNo">526</span><a name="line.526"></a>
-<span class="sourceLineNo">527</span>    @Override<a name="line.527"></a>
-<span class="sourceLineNo">528</span>    public String toString() {<a name="line.528"></a>
-<span class="sourceLineNo">529</span>      StringBuilder builder = new StringBuilder(35);<a name="line.529"></a>
-<span class="sourceLineNo">530</span>      return builder.append("rowCount=")<a name="line.530"></a>
-<span class="sourceLineNo">531</span>             .append(rowCount)<a name="line.531"></a>
-<span class="sourceLineNo">532</span>             .append(", cellCount=")<a name="line.532"></a>
-<span class="sourceLineNo">533</span>             .append(cellCount)<a name="line.533"></a>
-<span class="sourceLineNo">534</span>             .toString();<a name="line.534"></a>
-<span class="sourceLineNo">535</span>    }<a name="line.535"></a>
-<span class="sourceLineNo">536</span>  }<a name="line.536"></a>
-<span class="sourceLineNo">537</span>}<a name="line.537"></a>
+<span class="sourceLineNo">509</span>    private final long rowCount;<a name="line.509"></a>
+<span class="sourceLineNo">510</span>    private final long cellCount;<a name="line.510"></a>
+<span class="sourceLineNo">511</span><a name="line.511"></a>
+<span class="sourceLineNo">512</span>    private Response(ExportProtos.ExportResponse r) {<a name="line.512"></a>
+<span class="sourceLineNo">513</span>      this.rowCount = r.getRowCount();<a name="line.513"></a>
+<span class="sourceLineNo">514</span>      this.cellCount = r.getCellCount();<a name="line.514"></a>
+<span class="sourceLineNo">515</span>    }<a name="line.515"></a>
+<span class="sourceLineNo">516</span><a name="line.516"></a>
+<span class="sourceLineNo">517</span>    public long getRowCount() {<a name="line.517"></a>
+<span class="sourceLineNo">518</span>      return rowCount;<a name="line.518"></a>
+<span class="sourceLineNo">519</span>    }<a name="line.519"></a>
+<span class="sourceLineNo">520</span><a name="line.520"></a>
+<span class="sourceLineNo">521</span>    public long getCellCount() {<a name="line.521"></a>
+<span class="sourceLineNo">522</span>      return cellCount;<a name="line.522"></a>
+<span class="sourceLineNo">523</span>    }<a name="line.523"></a>
+<span class="sourceLineNo">524</span><a name="line.524"></a>
+<span class="sourceLineNo">525</span>    @Override<a name="line.525"></a>
+<span class="sourceLineNo">526</span>    public String toString() {<a name="line.526"></a>
+<span class="sourceLineNo">527</span>      StringBuilder builder = new StringBuilder(35);<a name="line.527"></a>
+<span class="sourceLineNo">528</span>      return builder.append("rowCount=")<a name="line.528"></a>
+<span class="sourceLineNo">529</span>             .append(rowCount)<a name="line.529"></a>
+<span class="sourceLineNo">530</span>             .append(", cellCount=")<a name="line.530"></a>
+<span class="sourceLineNo">531</span>             .append(cellCount)<a name="line.531"></a>
+<span class="sourceLineNo">532</span>             .toString();<a name="line.532"></a>
+<span class="sourceLineNo">533</span>    }<a name="line.533"></a>
+<span class="sourceLineNo">534</span>  }<a name="line.534"></a>
+<span class="sourceLineNo">535</span>}<a name="line.535"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/1d9053bc/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.Response.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.Response.html b/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.Response.html
index 45f0981..a5f0277 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.Response.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/coprocessor/Export.Response.html
@@ -397,152 +397,150 @@
 <span class="sourceLineNo">389</span>      if (region.getCoprocessorHost() == null) {<a name="line.389"></a>
 <span class="sourceLineNo">390</span>        scanner = region.getScanner(scan);<a name="line.390"></a>
 <span class="sourceLineNo">391</span>      } else {<a name="line.391"></a>
-<span class="sourceLineNo">392</span>        scanner = region.getCoprocessorHost().preScannerOpen(scan);<a name="line.392"></a>
-<span class="sourceLineNo">393</span>        if (scanner == null) {<a name="line.393"></a>
-<span class="sourceLineNo">394</span>          scanner = region.getScanner(scan);<a name="line.394"></a>
-<span class="sourceLineNo">395</span>        }<a name="line.395"></a>
-<span class="sourceLineNo">396</span>        scanner = region.getCoprocessorHost().postScannerOpen(scan, scanner);<a name="line.396"></a>
-<span class="sourceLineNo">397</span>      }<a name="line.397"></a>
-<span class="sourceLineNo">398</span>      if (scanner == null) {<a name="line.398"></a>
-<span class="sourceLineNo">399</span>        throw new IOException("Failed to open region scanner");<a name="line.399"></a>
-<span class="sourceLineNo">400</span>      }<a name="line.400"></a>
-<span class="sourceLineNo">401</span>      return scanner;<a name="line.401"></a>
-<span class="sourceLineNo">402</span>    }<a name="line.402"></a>
-<span class="sourceLineNo">403</span><a name="line.403"></a>
-<span class="sourceLineNo">404</span>    void checkScannerClose(final InternalScanner s) throws IOException {<a name="line.404"></a>
-<span class="sourceLineNo">405</span>      if (s == null) {<a name="line.405"></a>
-<span class="sourceLineNo">406</span>        return;<a name="line.406"></a>
-<span class="sourceLineNo">407</span>      }<a name="line.407"></a>
-<span class="sourceLineNo">408</span>      if (region.getCoprocessorHost() == null) {<a name="line.408"></a>
-<span class="sourceLineNo">409</span>        s.close();<a name="line.409"></a>
-<span class="sourceLineNo">410</span>        return;<a name="line.410"></a>
-<span class="sourceLineNo">411</span>      }<a name="line.411"></a>
-<span class="sourceLineNo">412</span>      if (region.getCoprocessorHost().preScannerClose(s)) {<a name="line.412"></a>
-<span class="sourceLineNo">413</span>        return;<a name="line.413"></a>
-<span class="sourceLineNo">414</span>      }<a name="line.414"></a>
-<span class="sourceLineNo">415</span>      try {<a name="line.415"></a>
-<span class="sourceLineNo">416</span>        s.close();<a name="line.416"></a>
-<span class="sourceLineNo">417</span>      } finally {<a name="line.417"></a>
-<span class="sourceLineNo">418</span>        region.getCoprocessorHost().postScannerClose(s);<a name="line.418"></a>
-<span class="sourceLineNo">419</span>      }<a name="line.419"></a>
-<span class="sourceLineNo">420</span>    }<a name="line.420"></a>
-<span class="sourceLineNo">421</span><a name="line.421"></a>
-<span class="sourceLineNo">422</span>    boolean preScannerNext(final InternalScanner s,<a name="line.422"></a>
-<span class="sourceLineNo">423</span>            final List&lt;Result&gt; results, final int limit) throws IOException {<a name="line.423"></a>
-<span class="sourceLineNo">424</span>      if (region.getCoprocessorHost() == null) {<a name="line.424"></a>
-<span class="sourceLineNo">425</span>        return false;<a name="line.425"></a>
-<span class="sourceLineNo">426</span>      } else {<a name="line.426"></a>
-<span class="sourceLineNo">427</span>        Boolean bypass = region.getCoprocessorHost().preScannerNext(s, results, limit);<a name="line.427"></a>
-<span class="sourceLineNo">428</span>        return bypass == null ? false : bypass;<a name="line.428"></a>
-<span class="sourceLineNo">429</span>      }<a name="line.429"></a>
-<span class="sourceLineNo">430</span>    }<a name="line.430"></a>
-<span class="sourceLineNo">431</span><a name="line.431"></a>
-<span class="sourceLineNo">432</span>    boolean postScannerNext(final InternalScanner s,<a name="line.432"></a>
-<span class="sourceLineNo">433</span>            final List&lt;Result&gt; results, final int limit, boolean hasMore)<a name="line.433"></a>
-<span class="sourceLineNo">434</span>            throws IOException {<a name="line.434"></a>
-<span class="sourceLineNo">435</span>      if (region.getCoprocessorHost() == null) {<a name="line.435"></a>
-<span class="sourceLineNo">436</span>        return false;<a name="line.436"></a>
-<span class="sourceLineNo">437</span>      } else {<a name="line.437"></a>
-<span class="sourceLineNo">438</span>        return region.getCoprocessorHost().postScannerNext(s, results, limit, hasMore);<a name="line.438"></a>
-<span class="sourceLineNo">439</span>      }<a name="line.439"></a>
-<span class="sourceLineNo">440</span>    }<a name="line.440"></a>
-<span class="sourceLineNo">441</span>  }<a name="line.441"></a>
-<span class="sourceLineNo">442</span><a name="line.442"></a>
-<span class="sourceLineNo">443</span>  private static class SecureWriter implements Closeable {<a name="line.443"></a>
-<span class="sourceLineNo">444</span>    private final PrivilegedWriter privilegedWriter;<a name="line.444"></a>
-<span class="sourceLineNo">445</span><a name="line.445"></a>
-<span class="sourceLineNo">446</span>    SecureWriter(final Configuration conf, final UserProvider userProvider, final Token userToken,<a name="line.446"></a>
-<span class="sourceLineNo">447</span>            final List&lt;SequenceFile.Writer.Option&gt; opts) throws IOException {<a name="line.447"></a>
-<span class="sourceLineNo">448</span>      privilegedWriter = new PrivilegedWriter(getActiveUser(userProvider, userToken),<a name="line.448"></a>
-<span class="sourceLineNo">449</span>        SequenceFile.createWriter(conf, opts.toArray(new SequenceFile.Writer.Option[opts.size()])));<a name="line.449"></a>
-<span class="sourceLineNo">450</span>    }<a name="line.450"></a>
-<span class="sourceLineNo">451</span><a name="line.451"></a>
-<span class="sourceLineNo">452</span>    void append(final Object key, final Object value) throws IOException {<a name="line.452"></a>
-<span class="sourceLineNo">453</span>      privilegedWriter.append(key, value);<a name="line.453"></a>
-<span class="sourceLineNo">454</span>    }<a name="line.454"></a>
-<span class="sourceLineNo">455</span><a name="line.455"></a>
-<span class="sourceLineNo">456</span>    private static User getActiveUser(final UserProvider userProvider, final Token userToken) throws IOException {<a name="line.456"></a>
-<span class="sourceLineNo">457</span>      User user = RpcServer.getRequestUser().orElse(userProvider.getCurrent());<a name="line.457"></a>
-<span class="sourceLineNo">458</span>      if (user == null &amp;&amp; userToken != null) {<a name="line.458"></a>
-<span class="sourceLineNo">459</span>        LOG.warn("No found of user credentials, but a token was got from user request");<a name="line.459"></a>
-<span class="sourceLineNo">460</span>      } else if (user != null &amp;&amp; userToken != null) {<a name="line.460"></a>
-<span class="sourceLineNo">461</span>        user.addToken(userToken);<a name="line.461"></a>
-<span class="sourceLineNo">462</span>      }<a name="line.462"></a>
-<span class="sourceLineNo">463</span>      return user;<a name="line.463"></a>
-<span class="sourceLineNo">464</span>    }<a name="line.464"></a>
-<span class="sourceLineNo">465</span><a name="line.465"></a>
-<span class="sourceLineNo">466</span>    @Override<a name="line.466"></a>
-<span class="sourceLineNo">467</span>    public void close() throws IOException {<a name="line.467"></a>
-<span class="sourceLineNo">468</span>      privilegedWriter.close();<a name="line.468"></a>
-<span class="sourceLineNo">469</span>    }<a name="line.469"></a>
-<span class="sourceLineNo">470</span>  }<a name="line.470"></a>
-<span class="sourceLineNo">471</span><a name="line.471"></a>
-<span class="sourceLineNo">472</span>  private static class PrivilegedWriter implements PrivilegedExceptionAction&lt;Boolean&gt;, Closeable {<a name="line.472"></a>
-<span class="sourceLineNo">473</span>    private final User user;<a name="line.473"></a>
-<span class="sourceLineNo">474</span>    private final SequenceFile.Writer out;<a name="line.474"></a>
-<span class="sourceLineNo">475</span>    private Object key;<a name="line.475"></a>
-<span class="sourceLineNo">476</span>    private Object value;<a name="line.476"></a>
-<span class="sourceLineNo">477</span><a name="line.477"></a>
-<span class="sourceLineNo">478</span>    PrivilegedWriter(final User user, final SequenceFile.Writer out) {<a name="line.478"></a>
-<span class="sourceLineNo">479</span>      this.user = user;<a name="line.479"></a>
-<span class="sourceLineNo">480</span>      this.out = out;<a name="line.480"></a>
-<span class="sourceLineNo">481</span>    }<a name="line.481"></a>
-<span class="sourceLineNo">482</span><a name="line.482"></a>
-<span class="sourceLineNo">483</span>    void append(final Object key, final Object value) throws IOException {<a name="line.483"></a>
-<span class="sourceLineNo">484</span>      if (user == null) {<a name="line.484"></a>
-<span class="sourceLineNo">485</span>        out.append(key, value);<a name="line.485"></a>
-<span class="sourceLineNo">486</span>      } else {<a name="line.486"></a>
-<span class="sourceLineNo">487</span>        this.key = key;<a name="line.487"></a>
-<span class="sourceLineNo">488</span>        this.value = value;<a name="line.488"></a>
-<span class="sourceLineNo">489</span>        try {<a name="line.489"></a>
-<span class="sourceLineNo">490</span>          user.runAs(this);<a name="line.490"></a>
-<span class="sourceLineNo">491</span>        } catch (InterruptedException ex) {<a name="line.491"></a>
-<span class="sourceLineNo">492</span>          throw new IOException(ex);<a name="line.492"></a>
-<span class="sourceLineNo">493</span>        }<a name="line.493"></a>
-<span class="sourceLineNo">494</span>      }<a name="line.494"></a>
-<span class="sourceLineNo">495</span>    }<a name="line.495"></a>
-<span class="sourceLineNo">496</span><a name="line.496"></a>
-<span class="sourceLineNo">497</span>    @Override<a name="line.497"></a>
-<span class="sourceLineNo">498</span>    public Boolean run() throws Exception {<a name="line.498"></a>
-<span class="sourceLineNo">499</span>      out.append(key, value);<a name="line.499"></a>
-<span class="sourceLineNo">500</span>      return true;<a name="line.500"></a>
-<span class="sourceLineNo">501</span>    }<a name="line.501"></a>
-<span class="sourceLineNo">502</span><a name="line.502"></a>
-<span class="sourceLineNo">503</span>    @Override<a name="line.503"></a>
-<span class="sourceLineNo">504</span>    public void close() throws IOException {<a name="line.504"></a>
-<span class="sourceLineNo">505</span>      out.close();<a name="line.505"></a>
-<span class="sourceLineNo">506</span>    }<a name="line.506"></a>
-<span class="sourceLineNo">507</span>  }<a name="line.507"></a>
+<span class="sourceLineNo">392</span>        region.getCoprocessorHost().preScannerOpen(scan);<a name="line.392"></a>
+<span class="sourceLineNo">393</span>        scanner = region.getScanner(scan);<a name="line.393"></a>
+<span class="sourceLineNo">394</span>        scanner = region.getCoprocessorHost().postScannerOpen(scan, scanner);<a name="line.394"></a>
+<span class="sourceLineNo">395</span>      }<a name="line.395"></a>
+<span class="sourceLineNo">396</span>      if (scanner == null) {<a name="line.396"></a>
+<span class="sourceLineNo">397</span>        throw new IOException("Failed to open region scanner");<a name="line.397"></a>
+<span class="sourceLineNo">398</span>      }<a name="line.398"></a>
+<span class="sourceLineNo">399</span>      return scanner;<a name="line.399"></a>
+<span class="sourceLineNo">400</span>    }<a name="line.400"></a>
+<span class="sourceLineNo">401</span><a name="line.401"></a>
+<span class="sourceLineNo">402</span>    void checkScannerClose(final InternalScanner s) throws IOException {<a name="line.402"></a>
+<span class="sourceLineNo">403</span>      if (s == null) {<a name="line.403"></a>
+<span class="sourceLineNo">404</span>        return;<a name="line.404"></a>
+<span class="sourceLineNo">405</span>      }<a name="line.405"></a>
+<span class="sourceLineNo">406</span>      if (region.getCoprocessorHost() == null) {<a name="line.406"></a>
+<span class="sourceLineNo">407</span>        s.close();<a name="line.407"></a>
+<span class="sourceLineNo">408</span>        return;<a name="line.408"></a>
+<span class="sourceLineNo">409</span>      }<a name="line.409"></a>
+<span class="sourceLineNo">410</span>      if (region.getCoprocessorHost().preScannerClose(s)) {<a name="line.410"></a>
+<span class="sourceLineNo">411</span>        return;<a name="line.411"></a>
+<span class="sourceLineNo">412</span>      }<a name="line.412"></a>
+<span class="sourceLineNo">413</span>      try {<a name="line.413"></a>
+<span class="sourceLineNo">414</span>        s.close();<a name="line.414"></a>
+<span class="sourceLineNo">415</span>      } finally {<a name="line.415"></a>
+<span class="sourceLineNo">416</span>        region.getCoprocessorHost().postScannerClose(s);<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><a name="line.419"></a>
+<span class="sourceLineNo">420</span>    boolean preScannerNext(final InternalScanner s,<a name="line.420"></a>
+<span class="sourceLineNo">421</span>            final List&lt;Result&gt; results, final int limit) throws IOException {<a name="line.421"></a>
+<span class="sourceLineNo">422</span>      if (region.getCoprocessorHost() == null) {<a name="line.422"></a>
+<span class="sourceLineNo">423</span>        return false;<a name="line.423"></a>
+<span class="sourceLineNo">424</span>      } else {<a name="line.424"></a>
+<span class="sourceLineNo">425</span>        Boolean bypass = region.getCoprocessorHost().preScannerNext(s, results, limit);<a name="line.425"></a>
+<span class="sourceLineNo">426</span>        return bypass == null ? false : bypass;<a name="line.426"></a>
+<span class="sourceLineNo">427</span>      }<a name="line.427"></a>
+<span class="sourceLineNo">428</span>    }<a name="line.428"></a>
+<span class="sourceLineNo">429</span><a name="line.429"></a>
+<span class="sourceLineNo">430</span>    boolean postScannerNext(final InternalScanner s,<a name="line.430"></a>
+<span class="sourceLineNo">431</span>            final List&lt;Result&gt; results, final int limit, boolean hasMore)<a name="line.431"></a>
+<span class="sourceLineNo">432</span>            throws IOException {<a name="line.432"></a>
+<span class="sourceLineNo">433</span>      if (region.getCoprocessorHost() == null) {<a name="line.433"></a>
+<span class="sourceLineNo">434</span>        return false;<a name="line.434"></a>
+<span class="sourceLineNo">435</span>      } else {<a name="line.435"></a>
+<span class="sourceLineNo">436</span>        return region.getCoprocessorHost().postScannerNext(s, results, limit, hasMore);<a name="line.436"></a>
+<span class="sourceLineNo">437</span>      }<a name="line.437"></a>
+<span class="sourceLineNo">438</span>    }<a name="line.438"></a>
+<span class="sourceLineNo">439</span>  }<a name="line.439"></a>
+<span class="sourceLineNo">440</span><a name="line.440"></a>
+<span class="sourceLineNo">441</span>  private static class SecureWriter implements Closeable {<a name="line.441"></a>
+<span class="sourceLineNo">442</span>    private final PrivilegedWriter privilegedWriter;<a name="line.442"></a>
+<span class="sourceLineNo">443</span><a name="line.443"></a>
+<span class="sourceLineNo">444</span>    SecureWriter(final Configuration conf, final UserProvider userProvider, final Token userToken,<a name="line.444"></a>
+<span class="sourceLineNo">445</span>            final List&lt;SequenceFile.Writer.Option&gt; opts) throws IOException {<a name="line.445"></a>
+<span class="sourceLineNo">446</span>      privilegedWriter = new PrivilegedWriter(getActiveUser(userProvider, userToken),<a name="line.446"></a>
+<span class="sourceLineNo">447</span>        SequenceFile.createWriter(conf, opts.toArray(new SequenceFile.Writer.Option[opts.size()])));<a name="line.447"></a>
+<span class="sourceLineNo">448</span>    }<a name="line.448"></a>
+<span class="sourceLineNo">449</span><a name="line.449"></a>
+<span class="sourceLineNo">450</span>    void append(final Object key, final Object value) throws IOException {<a name="line.450"></a>
+<span class="sourceLineNo">451</span>      privilegedWriter.append(key, value);<a name="line.451"></a>
+<span class="sourceLineNo">452</span>    }<a name="line.452"></a>
+<span class="sourceLineNo">453</span><a name="line.453"></a>
+<span class="sourceLineNo">454</span>    private static User getActiveUser(final UserProvider userProvider, final Token userToken) throws IOException {<a name="line.454"></a>
+<span class="sourceLineNo">455</span>      User user = RpcServer.getRequestUser().orElse(userProvider.getCurrent());<a name="line.455"></a>
+<span class="sourceLineNo">456</span>      if (user == null &amp;&amp; userToken != null) {<a name="line.456"></a>
+<span class="sourceLineNo">457</span>        LOG.warn("No found of user credentials, but a token was got from user request");<a name="line.457"></a>
+<span class="sourceLineNo">458</span>      } else if (user != null &amp;&amp; userToken != null) {<a name="line.458"></a>
+<span class="sourceLineNo">459</span>        user.addToken(userToken);<a name="line.459"></a>
+<span class="sourceLineNo">460</span>      }<a name="line.460"></a>
+<span class="sourceLineNo">461</span>      return user;<a name="line.461"></a>
+<span class="sourceLineNo">462</span>    }<a name="line.462"></a>
+<span class="sourceLineNo">463</span><a name="line.463"></a>
+<span class="sourceLineNo">464</span>    @Override<a name="line.464"></a>
+<span class="sourceLineNo">465</span>    public void close() throws IOException {<a name="line.465"></a>
+<span class="sourceLineNo">466</span>      privilegedWriter.close();<a name="line.466"></a>
+<span class="sourceLineNo">467</span>    }<a name="line.467"></a>
+<span class="sourceLineNo">468</span>  }<a name="line.468"></a>
+<span class="sourceLineNo">469</span><a name="line.469"></a>
+<span class="sourceLineNo">470</span>  private static class PrivilegedWriter implements PrivilegedExceptionAction&lt;Boolean&gt;, Closeable {<a name="line.470"></a>
+<span class="sourceLineNo">471</span>    private final User user;<a name="line.471"></a>
+<span class="sourceLineNo">472</span>    private final SequenceFile.Writer out;<a name="line.472"></a>
+<span class="sourceLineNo">473</span>    private Object key;<a name="line.473"></a>
+<span class="sourceLineNo">474</span>    private Object value;<a name="line.474"></a>
+<span class="sourceLineNo">475</span><a name="line.475"></a>
+<span class="sourceLineNo">476</span>    PrivilegedWriter(final User user, final SequenceFile.Writer out) {<a name="line.476"></a>
+<span class="sourceLineNo">477</span>      this.user = user;<a name="line.477"></a>
+<span class="sourceLineNo">478</span>      this.out = out;<a name="line.478"></a>
+<span class="sourceLineNo">479</span>    }<a name="line.479"></a>
+<span class="sourceLineNo">480</span><a name="line.480"></a>
+<span class="sourceLineNo">481</span>    void append(final Object key, final Object value) throws IOException {<a name="line.481"></a>
+<span class="sourceLineNo">482</span>      if (user == null) {<a name="line.482"></a>
+<span class="sourceLineNo">483</span>        out.append(key, value);<a name="line.483"></a>
+<span class="sourceLineNo">484</span>      } else {<a name="line.484"></a>
+<span class="sourceLineNo">485</span>        this.key = key;<a name="line.485"></a>
+<span class="sourceLineNo">486</span>        this.value = value;<a name="line.486"></a>
+<span class="sourceLineNo">487</span>        try {<a name="line.487"></a>
+<span class="sourceLineNo">488</span>          user.runAs(this);<a name="line.488"></a>
+<span class="sourceLineNo">489</span>        } catch (InterruptedException ex) {<a name="line.489"></a>
+<span class="sourceLineNo">490</span>          throw new IOException(ex);<a name="line.490"></a>
+<span class="sourceLineNo">491</span>        }<a name="line.491"></a>
+<span class="sourceLineNo">492</span>      }<a name="line.492"></a>
+<span class="sourceLineNo">493</span>    }<a name="line.493"></a>
+<span class="sourceLineNo">494</span><a name="line.494"></a>
+<span class="sourceLineNo">495</span>    @Override<a name="line.495"></a>
+<span class="sourceLineNo">496</span>    public Boolean run() throws Exception {<a name="line.496"></a>
+<span class="sourceLineNo">497</span>      out.append(key, value);<a name="line.497"></a>
+<span class="sourceLineNo">498</span>      return true;<a name="line.498"></a>
+<span class="sourceLineNo">499</span>    }<a name="line.499"></a>
+<span class="sourceLineNo">500</span><a name="line.500"></a>
+<span class="sourceLineNo">501</span>    @Override<a name="line.501"></a>
+<span class="sourceLineNo">502</span>    public void close() throws IOException {<a name="line.502"></a>
+<span class="sourceLineNo">503</span>      out.close();<a name="line.503"></a>
+<span class="sourceLineNo">504</span>    }<a name="line.504"></a>
+<span class="sourceLineNo">505</span>  }<a name="line.505"></a>
+<span class="sourceLineNo">506</span><a name="line.506"></a>
+<span class="sourceLineNo">507</span>  public static class Response {<a name="line.507"></a>
 <span class="sourceLineNo">508</span><a name="line.508"></a>
-<span class="sourceLineNo">509</span>  public static class Response {<a name="line.509"></a>
-<span class="sourceLineNo">510</span><a name="line.510"></a>
-<span class="sourceLineNo">511</span>    private final long rowCount;<a name="line.511"></a>
-<span class="sourceLineNo">512</span>    private final long cellCount;<a name="line.512"></a>
-<span class="sourceLineNo">513</span><a name="line.513"></a>
-<span class="sourceLineNo">514</span>    private Response(ExportProtos.ExportResponse r) {<a name="line.514"></a>
-<span class="sourceLineNo">515</span>      this.rowCount = r.getRowCount();<a name="line.515"></a>
-<span class="sourceLineNo">516</span>      this.cellCount = r.getCellCount();<a name="line.516"></a>
-<span class="sourceLineNo">517</span>    }<a name="line.517"></a>
-<span class="sourceLineNo">518</span><a name="line.518"></a>
-<span class="sourceLineNo">519</span>    public long getRowCount() {<a name="line.519"></a>
-<span class="sourceLineNo">520</span>      return rowCount;<a name="line.520"></a>
-<span class="sourceLineNo">521</span>    }<a name="line.521"></a>
-<span class="sourceLineNo">522</span><a name="line.522"></a>
-<span class="sourceLineNo">523</span>    public long getCellCount() {<a name="line.523"></a>
-<span class="sourceLineNo">524</span>      return cellCount;<a name="line.524"></a>
-<span class="sourceLineNo">525</span>    }<a name="line.525"></a>
-<span class="sourceLineNo">526</span><a name="line.526"></a>
-<span class="sourceLineNo">527</span>    @Override<a name="line.527"></a>
-<span class="sourceLineNo">528</span>    public String toString() {<a name="line.528"></a>
-<span class="sourceLineNo">529</span>      StringBuilder builder = new StringBuilder(35);<a name="line.529"></a>
-<span class="sourceLineNo">530</span>      return builder.append("rowCount=")<a name="line.530"></a>
-<span class="sourceLineNo">531</span>             .append(rowCount)<a name="line.531"></a>
-<span class="sourceLineNo">532</span>             .append(", cellCount=")<a name="line.532"></a>
-<span class="sourceLineNo">533</span>             .append(cellCount)<a name="line.533"></a>
-<span class="sourceLineNo">534</span>             .toString();<a name="line.534"></a>
-<span class="sourceLineNo">535</span>    }<a name="line.535"></a>
-<span class="sourceLineNo">536</span>  }<a name="line.536"></a>
-<span class="sourceLineNo">537</span>}<a name="line.537"></a>
+<span class="sourceLineNo">509</span>    private final long rowCount;<a name="line.509"></a>
+<span class="sourceLineNo">510</span>    private final long cellCount;<a name="line.510"></a>
+<span class="sourceLineNo">511</span><a name="line.511"></a>
+<span class="sourceLineNo">512</span>    private Response(ExportProtos.ExportResponse r) {<a name="line.512"></a>
+<span class="sourceLineNo">513</span>      this.rowCount = r.getRowCount();<a name="line.513"></a>
+<span class="sourceLineNo">514</span>      this.cellCount = r.getCellCount();<a name="line.514"></a>
+<span class="sourceLineNo">515</span>    }<a name="line.515"></a>
+<span class="sourceLineNo">516</span><a name="line.516"></a>
+<span class="sourceLineNo">517</span>    public long getRowCount() {<a name="line.517"></a>
+<span class="sourceLineNo">518</span>      return rowCount;<a name="line.518"></a>
+<span class="sourceLineNo">519</span>    }<a name="line.519"></a>
+<span class="sourceLineNo">520</span><a name="line.520"></a>
+<span class="sourceLineNo">521</span>    public long getCellCount() {<a name="line.521"></a>
+<span class="sourceLineNo">522</span>      return cellCount;<a name="line.522"></a>
+<span class="sourceLineNo">523</span>    }<a name="line.523"></a>
+<span class="sourceLineNo">524</span><a name="line.524"></a>
+<span class="sourceLineNo">525</span>    @Override<a name="line.525"></a>
+<span class="sourceLineNo">526</span>    public String toString() {<a name="line.526"></a>
+<span class="sourceLineNo">527</span>      StringBuilder builder = new StringBuilder(35);<a name="line.527"></a>
+<span class="sourceLineNo">528</span>      return builder.append("rowCount=")<a name="line.528"></a>
+<span class="sourceLineNo">529</span>             .append(rowCount)<a name="line.529"></a>
+<span class="sourceLineNo">530</span>             .append(", cellCount=")<a name="line.530"></a>
+<span class="sourceLineNo">531</span>             .append(cellCount)<a name="line.531"></a>
+<span class="sourceLineNo">532</span>             .toString();<a name="line.532"></a>
+<span class="sourceLineNo">533</span>    }<a name="line.533"></a>
+<span class="sourceLineNo">534</span>  }<a name="line.534"></a>
+<span class="sourceLineNo">535</span>}<a name="line.535"></a>
 
 
 


Mime
View raw message