hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [37/51] [partial] hbase-site git commit: Published site at 092efb42749bf7fc6ad338c96aae8e7b9d3a2c74.
Date Thu, 16 Aug 2018 14:48:39 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/f3d62514/devapidocs/src-html/org/apache/hadoop/hbase/client/ClientAsyncPrefetchScanner.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/ClientAsyncPrefetchScanner.html
b/devapidocs/src-html/org/apache/hadoop/hbase/client/ClientAsyncPrefetchScanner.html
index 1c85f39..08653af 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/client/ClientAsyncPrefetchScanner.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/ClientAsyncPrefetchScanner.html
@@ -154,53 +154,52 @@
 <span class="sourceLineNo">146</span>    // Rethrow the exception so the application
can handle it.<a name="line.146"></a>
 <span class="sourceLineNo">147</span>    while (!exceptionsQueue.isEmpty()) {<a
name="line.147"></a>
 <span class="sourceLineNo">148</span>      Exception first = exceptionsQueue.peek();<a
name="line.148"></a>
-<span class="sourceLineNo">149</span>      first.printStackTrace();<a name="line.149"></a>
-<span class="sourceLineNo">150</span>      if (first instanceof IOException)
{<a name="line.150"></a>
-<span class="sourceLineNo">151</span>        throw (IOException) first;<a
name="line.151"></a>
-<span class="sourceLineNo">152</span>      }<a name="line.152"></a>
-<span class="sourceLineNo">153</span>      throw (RuntimeException) first;<a
name="line.153"></a>
-<span class="sourceLineNo">154</span>    }<a name="line.154"></a>
-<span class="sourceLineNo">155</span>  }<a name="line.155"></a>
-<span class="sourceLineNo">156</span><a name="line.156"></a>
-<span class="sourceLineNo">157</span>  private boolean prefetchCondition() {<a
name="line.157"></a>
-<span class="sourceLineNo">158</span>    return cacheSizeInBytes.get() &lt;
maxCacheSize / 2;<a name="line.158"></a>
-<span class="sourceLineNo">159</span>  }<a name="line.159"></a>
-<span class="sourceLineNo">160</span><a name="line.160"></a>
-<span class="sourceLineNo">161</span>  private Result pollCache() {<a name="line.161"></a>
-<span class="sourceLineNo">162</span>    Result res = cache.poll();<a name="line.162"></a>
-<span class="sourceLineNo">163</span>    long estimatedSize = calcEstimatedSize(res);<a
name="line.163"></a>
-<span class="sourceLineNo">164</span>    addEstimatedSize(-estimatedSize);<a
name="line.164"></a>
-<span class="sourceLineNo">165</span>    return res;<a name="line.165"></a>
-<span class="sourceLineNo">166</span>  }<a name="line.166"></a>
-<span class="sourceLineNo">167</span><a name="line.167"></a>
-<span class="sourceLineNo">168</span>  private class PrefetchRunnable implements
Runnable {<a name="line.168"></a>
-<span class="sourceLineNo">169</span><a name="line.169"></a>
-<span class="sourceLineNo">170</span>    @Override<a name="line.170"></a>
-<span class="sourceLineNo">171</span>    public void run() {<a name="line.171"></a>
-<span class="sourceLineNo">172</span>      while (!closed) {<a name="line.172"></a>
-<span class="sourceLineNo">173</span>        boolean succeed = false;<a name="line.173"></a>
-<span class="sourceLineNo">174</span>        try {<a name="line.174"></a>
-<span class="sourceLineNo">175</span>          lock.lock();<a name="line.175"></a>
-<span class="sourceLineNo">176</span>          while (!prefetchCondition()) {<a
name="line.176"></a>
-<span class="sourceLineNo">177</span>            notFull.await();<a name="line.177"></a>
-<span class="sourceLineNo">178</span>          }<a name="line.178"></a>
-<span class="sourceLineNo">179</span>          loadCache();<a name="line.179"></a>
-<span class="sourceLineNo">180</span>          succeed = true;<a name="line.180"></a>
-<span class="sourceLineNo">181</span>        } catch (Exception e) {<a name="line.181"></a>
-<span class="sourceLineNo">182</span>          exceptionsQueue.add(e);<a name="line.182"></a>
-<span class="sourceLineNo">183</span>        } finally {<a name="line.183"></a>
-<span class="sourceLineNo">184</span>          notEmpty.signalAll();<a name="line.184"></a>
-<span class="sourceLineNo">185</span>          lock.unlock();<a name="line.185"></a>
-<span class="sourceLineNo">186</span>          if (prefetchListener != null)
{<a name="line.186"></a>
-<span class="sourceLineNo">187</span>            prefetchListener.accept(succeed);<a
name="line.187"></a>
-<span class="sourceLineNo">188</span>          }<a name="line.188"></a>
-<span class="sourceLineNo">189</span>        }<a name="line.189"></a>
-<span class="sourceLineNo">190</span>      }<a name="line.190"></a>
-<span class="sourceLineNo">191</span>    }<a name="line.191"></a>
-<span class="sourceLineNo">192</span><a name="line.192"></a>
-<span class="sourceLineNo">193</span>  }<a name="line.193"></a>
-<span class="sourceLineNo">194</span><a name="line.194"></a>
-<span class="sourceLineNo">195</span>}<a name="line.195"></a>
+<span class="sourceLineNo">149</span>      if (first instanceof IOException)
{<a name="line.149"></a>
+<span class="sourceLineNo">150</span>        throw (IOException) first;<a
name="line.150"></a>
+<span class="sourceLineNo">151</span>      }<a name="line.151"></a>
+<span class="sourceLineNo">152</span>      throw (RuntimeException) first;<a
name="line.152"></a>
+<span class="sourceLineNo">153</span>    }<a name="line.153"></a>
+<span class="sourceLineNo">154</span>  }<a name="line.154"></a>
+<span class="sourceLineNo">155</span><a name="line.155"></a>
+<span class="sourceLineNo">156</span>  private boolean prefetchCondition() {<a
name="line.156"></a>
+<span class="sourceLineNo">157</span>    return cacheSizeInBytes.get() &lt;
maxCacheSize / 2;<a name="line.157"></a>
+<span class="sourceLineNo">158</span>  }<a name="line.158"></a>
+<span class="sourceLineNo">159</span><a name="line.159"></a>
+<span class="sourceLineNo">160</span>  private Result pollCache() {<a name="line.160"></a>
+<span class="sourceLineNo">161</span>    Result res = cache.poll();<a name="line.161"></a>
+<span class="sourceLineNo">162</span>    long estimatedSize = calcEstimatedSize(res);<a
name="line.162"></a>
+<span class="sourceLineNo">163</span>    addEstimatedSize(-estimatedSize);<a
name="line.163"></a>
+<span class="sourceLineNo">164</span>    return res;<a name="line.164"></a>
+<span class="sourceLineNo">165</span>  }<a name="line.165"></a>
+<span class="sourceLineNo">166</span><a name="line.166"></a>
+<span class="sourceLineNo">167</span>  private class PrefetchRunnable implements
Runnable {<a name="line.167"></a>
+<span class="sourceLineNo">168</span><a name="line.168"></a>
+<span class="sourceLineNo">169</span>    @Override<a name="line.169"></a>
+<span class="sourceLineNo">170</span>    public void run() {<a name="line.170"></a>
+<span class="sourceLineNo">171</span>      while (!closed) {<a name="line.171"></a>
+<span class="sourceLineNo">172</span>        boolean succeed = false;<a name="line.172"></a>
+<span class="sourceLineNo">173</span>        try {<a name="line.173"></a>
+<span class="sourceLineNo">174</span>          lock.lock();<a name="line.174"></a>
+<span class="sourceLineNo">175</span>          while (!prefetchCondition()) {<a
name="line.175"></a>
+<span class="sourceLineNo">176</span>            notFull.await();<a name="line.176"></a>
+<span class="sourceLineNo">177</span>          }<a name="line.177"></a>
+<span class="sourceLineNo">178</span>          loadCache();<a name="line.178"></a>
+<span class="sourceLineNo">179</span>          succeed = true;<a name="line.179"></a>
+<span class="sourceLineNo">180</span>        } catch (Exception e) {<a name="line.180"></a>
+<span class="sourceLineNo">181</span>          exceptionsQueue.add(e);<a name="line.181"></a>
+<span class="sourceLineNo">182</span>        } finally {<a name="line.182"></a>
+<span class="sourceLineNo">183</span>          notEmpty.signalAll();<a name="line.183"></a>
+<span class="sourceLineNo">184</span>          lock.unlock();<a name="line.184"></a>
+<span class="sourceLineNo">185</span>          if (prefetchListener != null)
{<a name="line.185"></a>
+<span class="sourceLineNo">186</span>            prefetchListener.accept(succeed);<a
name="line.186"></a>
+<span class="sourceLineNo">187</span>          }<a name="line.187"></a>
+<span class="sourceLineNo">188</span>        }<a name="line.188"></a>
+<span class="sourceLineNo">189</span>      }<a name="line.189"></a>
+<span class="sourceLineNo">190</span>    }<a name="line.190"></a>
+<span class="sourceLineNo">191</span><a name="line.191"></a>
+<span class="sourceLineNo">192</span>  }<a name="line.192"></a>
+<span class="sourceLineNo">193</span><a name="line.193"></a>
+<span class="sourceLineNo">194</span>}<a name="line.194"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/f3d62514/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.ReplicaRegionServerCallable.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.ReplicaRegionServerCallable.html
b/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.ReplicaRegionServerCallable.html
index 878793b..a8bfe80 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.ReplicaRegionServerCallable.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.ReplicaRegionServerCallable.html
@@ -287,66 +287,65 @@
 <span class="sourceLineNo">279</span>      throws RetriesExhaustedException,
DoNotRetryIOException {<a name="line.279"></a>
 <span class="sourceLineNo">280</span>    Throwable t = e.getCause();<a name="line.280"></a>
 <span class="sourceLineNo">281</span>    assert t != null; // That's what ExecutionException
is about: holding an exception<a name="line.281"></a>
-<span class="sourceLineNo">282</span>    t.printStackTrace();<a name="line.282"></a>
-<span class="sourceLineNo">283</span><a name="line.283"></a>
-<span class="sourceLineNo">284</span>    if (t instanceof RetriesExhaustedException)
{<a name="line.284"></a>
-<span class="sourceLineNo">285</span>      throw (RetriesExhaustedException)
t;<a name="line.285"></a>
-<span class="sourceLineNo">286</span>    }<a name="line.286"></a>
-<span class="sourceLineNo">287</span><a name="line.287"></a>
-<span class="sourceLineNo">288</span>    if (t instanceof DoNotRetryIOException)
{<a name="line.288"></a>
-<span class="sourceLineNo">289</span>      throw (DoNotRetryIOException) t;<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>    RetriesExhaustedException.ThrowableWithExtraContext
qt =<a name="line.292"></a>
-<span class="sourceLineNo">293</span>        new RetriesExhaustedException.ThrowableWithExtraContext(t,<a
name="line.293"></a>
-<span class="sourceLineNo">294</span>            EnvironmentEdgeManager.currentTime(),
null);<a name="line.294"></a>
-<span class="sourceLineNo">295</span><a name="line.295"></a>
-<span class="sourceLineNo">296</span>    List&lt;RetriesExhaustedException.ThrowableWithExtraContext&gt;
exceptions =<a name="line.296"></a>
-<span class="sourceLineNo">297</span>        Collections.singletonList(qt);<a
name="line.297"></a>
-<span class="sourceLineNo">298</span><a name="line.298"></a>
-<span class="sourceLineNo">299</span>    throw new RetriesExhaustedException(retries,
exceptions);<a name="line.299"></a>
-<span class="sourceLineNo">300</span>  }<a name="line.300"></a>
-<span class="sourceLineNo">301</span><a name="line.301"></a>
-<span class="sourceLineNo">302</span>  /**<a name="line.302"></a>
-<span class="sourceLineNo">303</span>   * Creates the calls and submit them<a
name="line.303"></a>
-<span class="sourceLineNo">304</span>   *<a name="line.304"></a>
-<span class="sourceLineNo">305</span>   * @param cs  - the completion service
to use for submitting<a name="line.305"></a>
-<span class="sourceLineNo">306</span>   * @param rl  - the region locations<a
name="line.306"></a>
-<span class="sourceLineNo">307</span>   * @param min - the id of the first replica,
inclusive<a name="line.307"></a>
-<span class="sourceLineNo">308</span>   * @param max - the id of the last replica,
inclusive.<a name="line.308"></a>
-<span class="sourceLineNo">309</span>   */<a name="line.309"></a>
-<span class="sourceLineNo">310</span>  private void addCallsForReplica(ResultBoundedCompletionService&lt;Result&gt;
cs,<a name="line.310"></a>
-<span class="sourceLineNo">311</span>                                 RegionLocations
rl, int min, int max) {<a name="line.311"></a>
-<span class="sourceLineNo">312</span>    for (int id = min; id &lt;= max;
id++) {<a name="line.312"></a>
-<span class="sourceLineNo">313</span>      HRegionLocation hrl = rl.getRegionLocation(id);<a
name="line.313"></a>
-<span class="sourceLineNo">314</span>      ReplicaRegionServerCallable callOnReplica
= new ReplicaRegionServerCallable(id, hrl);<a name="line.314"></a>
-<span class="sourceLineNo">315</span>      cs.submit(callOnReplica, operationTimeout,
id);<a name="line.315"></a>
-<span class="sourceLineNo">316</span>    }<a name="line.316"></a>
-<span class="sourceLineNo">317</span>  }<a name="line.317"></a>
-<span class="sourceLineNo">318</span><a name="line.318"></a>
-<span class="sourceLineNo">319</span>  static RegionLocations getRegionLocations(boolean
useCache, int replicaId,<a name="line.319"></a>
-<span class="sourceLineNo">320</span>                 ClusterConnection cConnection,
TableName tableName, byte[] row)<a name="line.320"></a>
-<span class="sourceLineNo">321</span>      throws RetriesExhaustedException,
DoNotRetryIOException, InterruptedIOException {<a name="line.321"></a>
-<span class="sourceLineNo">322</span><a name="line.322"></a>
-<span class="sourceLineNo">323</span>    RegionLocations rl;<a name="line.323"></a>
-<span class="sourceLineNo">324</span>    try {<a name="line.324"></a>
-<span class="sourceLineNo">325</span>      if (useCache) {<a name="line.325"></a>
-<span class="sourceLineNo">326</span>        rl = cConnection.locateRegion(tableName,
row, true, true, replicaId);<a name="line.326"></a>
-<span class="sourceLineNo">327</span>      } else {<a name="line.327"></a>
-<span class="sourceLineNo">328</span>        rl = cConnection.relocateRegion(tableName,
row, replicaId);<a name="line.328"></a>
-<span class="sourceLineNo">329</span>      }<a name="line.329"></a>
-<span class="sourceLineNo">330</span>    } catch (DoNotRetryIOException | InterruptedIOException
| RetriesExhaustedException e) {<a name="line.330"></a>
-<span class="sourceLineNo">331</span>      throw e;<a name="line.331"></a>
-<span class="sourceLineNo">332</span>    } catch (IOException e) {<a name="line.332"></a>
-<span class="sourceLineNo">333</span>      throw new RetriesExhaustedException("Can't
get the location for replica " + replicaId, e);<a name="line.333"></a>
-<span class="sourceLineNo">334</span>    }<a name="line.334"></a>
-<span class="sourceLineNo">335</span>    if (rl == null) {<a name="line.335"></a>
-<span class="sourceLineNo">336</span>      throw new RetriesExhaustedException("Can't
get the location for replica " + replicaId);<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>    return rl;<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">282</span><a name="line.282"></a>
+<span class="sourceLineNo">283</span>    if (t instanceof RetriesExhaustedException)
{<a name="line.283"></a>
+<span class="sourceLineNo">284</span>      throw (RetriesExhaustedException)
t;<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>    if (t instanceof DoNotRetryIOException)
{<a name="line.287"></a>
+<span class="sourceLineNo">288</span>      throw (DoNotRetryIOException) t;<a
name="line.288"></a>
+<span class="sourceLineNo">289</span>    }<a name="line.289"></a>
+<span class="sourceLineNo">290</span><a name="line.290"></a>
+<span class="sourceLineNo">291</span>    RetriesExhaustedException.ThrowableWithExtraContext
qt =<a name="line.291"></a>
+<span class="sourceLineNo">292</span>        new RetriesExhaustedException.ThrowableWithExtraContext(t,<a
name="line.292"></a>
+<span class="sourceLineNo">293</span>            EnvironmentEdgeManager.currentTime(),
null);<a name="line.293"></a>
+<span class="sourceLineNo">294</span><a name="line.294"></a>
+<span class="sourceLineNo">295</span>    List&lt;RetriesExhaustedException.ThrowableWithExtraContext&gt;
exceptions =<a name="line.295"></a>
+<span class="sourceLineNo">296</span>        Collections.singletonList(qt);<a
name="line.296"></a>
+<span class="sourceLineNo">297</span><a name="line.297"></a>
+<span class="sourceLineNo">298</span>    throw new RetriesExhaustedException(retries,
exceptions);<a name="line.298"></a>
+<span class="sourceLineNo">299</span>  }<a name="line.299"></a>
+<span class="sourceLineNo">300</span><a name="line.300"></a>
+<span class="sourceLineNo">301</span>  /**<a name="line.301"></a>
+<span class="sourceLineNo">302</span>   * Creates the calls and submit them<a
name="line.302"></a>
+<span class="sourceLineNo">303</span>   *<a name="line.303"></a>
+<span class="sourceLineNo">304</span>   * @param cs  - the completion service
to use for submitting<a name="line.304"></a>
+<span class="sourceLineNo">305</span>   * @param rl  - the region locations<a
name="line.305"></a>
+<span class="sourceLineNo">306</span>   * @param min - the id of the first replica,
inclusive<a name="line.306"></a>
+<span class="sourceLineNo">307</span>   * @param max - the id of the last replica,
inclusive.<a name="line.307"></a>
+<span class="sourceLineNo">308</span>   */<a name="line.308"></a>
+<span class="sourceLineNo">309</span>  private void addCallsForReplica(ResultBoundedCompletionService&lt;Result&gt;
cs,<a name="line.309"></a>
+<span class="sourceLineNo">310</span>                                 RegionLocations
rl, int min, int max) {<a name="line.310"></a>
+<span class="sourceLineNo">311</span>    for (int id = min; id &lt;= max;
id++) {<a name="line.311"></a>
+<span class="sourceLineNo">312</span>      HRegionLocation hrl = rl.getRegionLocation(id);<a
name="line.312"></a>
+<span class="sourceLineNo">313</span>      ReplicaRegionServerCallable callOnReplica
= new ReplicaRegionServerCallable(id, hrl);<a name="line.313"></a>
+<span class="sourceLineNo">314</span>      cs.submit(callOnReplica, operationTimeout,
id);<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><a name="line.317"></a>
+<span class="sourceLineNo">318</span>  static RegionLocations getRegionLocations(boolean
useCache, int replicaId,<a name="line.318"></a>
+<span class="sourceLineNo">319</span>                 ClusterConnection cConnection,
TableName tableName, byte[] row)<a name="line.319"></a>
+<span class="sourceLineNo">320</span>      throws RetriesExhaustedException,
DoNotRetryIOException, InterruptedIOException {<a name="line.320"></a>
+<span class="sourceLineNo">321</span><a name="line.321"></a>
+<span class="sourceLineNo">322</span>    RegionLocations rl;<a name="line.322"></a>
+<span class="sourceLineNo">323</span>    try {<a name="line.323"></a>
+<span class="sourceLineNo">324</span>      if (useCache) {<a name="line.324"></a>
+<span class="sourceLineNo">325</span>        rl = cConnection.locateRegion(tableName,
row, true, true, replicaId);<a name="line.325"></a>
+<span class="sourceLineNo">326</span>      } else {<a name="line.326"></a>
+<span class="sourceLineNo">327</span>        rl = cConnection.relocateRegion(tableName,
row, replicaId);<a name="line.327"></a>
+<span class="sourceLineNo">328</span>      }<a name="line.328"></a>
+<span class="sourceLineNo">329</span>    } catch (DoNotRetryIOException | InterruptedIOException
| RetriesExhaustedException e) {<a name="line.329"></a>
+<span class="sourceLineNo">330</span>      throw e;<a name="line.330"></a>
+<span class="sourceLineNo">331</span>    } catch (IOException e) {<a name="line.331"></a>
+<span class="sourceLineNo">332</span>      throw new RetriesExhaustedException("Can't
get the location for replica " + replicaId, e);<a name="line.332"></a>
+<span class="sourceLineNo">333</span>    }<a name="line.333"></a>
+<span class="sourceLineNo">334</span>    if (rl == null) {<a name="line.334"></a>
+<span class="sourceLineNo">335</span>      throw new RetriesExhaustedException("Can't
get the location for replica " + replicaId);<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>    return rl;<a name="line.338"></a>
+<span class="sourceLineNo">339</span>  }<a name="line.339"></a>
+<span class="sourceLineNo">340</span>}<a name="line.340"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/f3d62514/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.html
b/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.html
index 878793b..a8bfe80 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerWithReadReplicas.html
@@ -287,66 +287,65 @@
 <span class="sourceLineNo">279</span>      throws RetriesExhaustedException,
DoNotRetryIOException {<a name="line.279"></a>
 <span class="sourceLineNo">280</span>    Throwable t = e.getCause();<a name="line.280"></a>
 <span class="sourceLineNo">281</span>    assert t != null; // That's what ExecutionException
is about: holding an exception<a name="line.281"></a>
-<span class="sourceLineNo">282</span>    t.printStackTrace();<a name="line.282"></a>
-<span class="sourceLineNo">283</span><a name="line.283"></a>
-<span class="sourceLineNo">284</span>    if (t instanceof RetriesExhaustedException)
{<a name="line.284"></a>
-<span class="sourceLineNo">285</span>      throw (RetriesExhaustedException)
t;<a name="line.285"></a>
-<span class="sourceLineNo">286</span>    }<a name="line.286"></a>
-<span class="sourceLineNo">287</span><a name="line.287"></a>
-<span class="sourceLineNo">288</span>    if (t instanceof DoNotRetryIOException)
{<a name="line.288"></a>
-<span class="sourceLineNo">289</span>      throw (DoNotRetryIOException) t;<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>    RetriesExhaustedException.ThrowableWithExtraContext
qt =<a name="line.292"></a>
-<span class="sourceLineNo">293</span>        new RetriesExhaustedException.ThrowableWithExtraContext(t,<a
name="line.293"></a>
-<span class="sourceLineNo">294</span>            EnvironmentEdgeManager.currentTime(),
null);<a name="line.294"></a>
-<span class="sourceLineNo">295</span><a name="line.295"></a>
-<span class="sourceLineNo">296</span>    List&lt;RetriesExhaustedException.ThrowableWithExtraContext&gt;
exceptions =<a name="line.296"></a>
-<span class="sourceLineNo">297</span>        Collections.singletonList(qt);<a
name="line.297"></a>
-<span class="sourceLineNo">298</span><a name="line.298"></a>
-<span class="sourceLineNo">299</span>    throw new RetriesExhaustedException(retries,
exceptions);<a name="line.299"></a>
-<span class="sourceLineNo">300</span>  }<a name="line.300"></a>
-<span class="sourceLineNo">301</span><a name="line.301"></a>
-<span class="sourceLineNo">302</span>  /**<a name="line.302"></a>
-<span class="sourceLineNo">303</span>   * Creates the calls and submit them<a
name="line.303"></a>
-<span class="sourceLineNo">304</span>   *<a name="line.304"></a>
-<span class="sourceLineNo">305</span>   * @param cs  - the completion service
to use for submitting<a name="line.305"></a>
-<span class="sourceLineNo">306</span>   * @param rl  - the region locations<a
name="line.306"></a>
-<span class="sourceLineNo">307</span>   * @param min - the id of the first replica,
inclusive<a name="line.307"></a>
-<span class="sourceLineNo">308</span>   * @param max - the id of the last replica,
inclusive.<a name="line.308"></a>
-<span class="sourceLineNo">309</span>   */<a name="line.309"></a>
-<span class="sourceLineNo">310</span>  private void addCallsForReplica(ResultBoundedCompletionService&lt;Result&gt;
cs,<a name="line.310"></a>
-<span class="sourceLineNo">311</span>                                 RegionLocations
rl, int min, int max) {<a name="line.311"></a>
-<span class="sourceLineNo">312</span>    for (int id = min; id &lt;= max;
id++) {<a name="line.312"></a>
-<span class="sourceLineNo">313</span>      HRegionLocation hrl = rl.getRegionLocation(id);<a
name="line.313"></a>
-<span class="sourceLineNo">314</span>      ReplicaRegionServerCallable callOnReplica
= new ReplicaRegionServerCallable(id, hrl);<a name="line.314"></a>
-<span class="sourceLineNo">315</span>      cs.submit(callOnReplica, operationTimeout,
id);<a name="line.315"></a>
-<span class="sourceLineNo">316</span>    }<a name="line.316"></a>
-<span class="sourceLineNo">317</span>  }<a name="line.317"></a>
-<span class="sourceLineNo">318</span><a name="line.318"></a>
-<span class="sourceLineNo">319</span>  static RegionLocations getRegionLocations(boolean
useCache, int replicaId,<a name="line.319"></a>
-<span class="sourceLineNo">320</span>                 ClusterConnection cConnection,
TableName tableName, byte[] row)<a name="line.320"></a>
-<span class="sourceLineNo">321</span>      throws RetriesExhaustedException,
DoNotRetryIOException, InterruptedIOException {<a name="line.321"></a>
-<span class="sourceLineNo">322</span><a name="line.322"></a>
-<span class="sourceLineNo">323</span>    RegionLocations rl;<a name="line.323"></a>
-<span class="sourceLineNo">324</span>    try {<a name="line.324"></a>
-<span class="sourceLineNo">325</span>      if (useCache) {<a name="line.325"></a>
-<span class="sourceLineNo">326</span>        rl = cConnection.locateRegion(tableName,
row, true, true, replicaId);<a name="line.326"></a>
-<span class="sourceLineNo">327</span>      } else {<a name="line.327"></a>
-<span class="sourceLineNo">328</span>        rl = cConnection.relocateRegion(tableName,
row, replicaId);<a name="line.328"></a>
-<span class="sourceLineNo">329</span>      }<a name="line.329"></a>
-<span class="sourceLineNo">330</span>    } catch (DoNotRetryIOException | InterruptedIOException
| RetriesExhaustedException e) {<a name="line.330"></a>
-<span class="sourceLineNo">331</span>      throw e;<a name="line.331"></a>
-<span class="sourceLineNo">332</span>    } catch (IOException e) {<a name="line.332"></a>
-<span class="sourceLineNo">333</span>      throw new RetriesExhaustedException("Can't
get the location for replica " + replicaId, e);<a name="line.333"></a>
-<span class="sourceLineNo">334</span>    }<a name="line.334"></a>
-<span class="sourceLineNo">335</span>    if (rl == null) {<a name="line.335"></a>
-<span class="sourceLineNo">336</span>      throw new RetriesExhaustedException("Can't
get the location for replica " + replicaId);<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>    return rl;<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">282</span><a name="line.282"></a>
+<span class="sourceLineNo">283</span>    if (t instanceof RetriesExhaustedException)
{<a name="line.283"></a>
+<span class="sourceLineNo">284</span>      throw (RetriesExhaustedException)
t;<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>    if (t instanceof DoNotRetryIOException)
{<a name="line.287"></a>
+<span class="sourceLineNo">288</span>      throw (DoNotRetryIOException) t;<a
name="line.288"></a>
+<span class="sourceLineNo">289</span>    }<a name="line.289"></a>
+<span class="sourceLineNo">290</span><a name="line.290"></a>
+<span class="sourceLineNo">291</span>    RetriesExhaustedException.ThrowableWithExtraContext
qt =<a name="line.291"></a>
+<span class="sourceLineNo">292</span>        new RetriesExhaustedException.ThrowableWithExtraContext(t,<a
name="line.292"></a>
+<span class="sourceLineNo">293</span>            EnvironmentEdgeManager.currentTime(),
null);<a name="line.293"></a>
+<span class="sourceLineNo">294</span><a name="line.294"></a>
+<span class="sourceLineNo">295</span>    List&lt;RetriesExhaustedException.ThrowableWithExtraContext&gt;
exceptions =<a name="line.295"></a>
+<span class="sourceLineNo">296</span>        Collections.singletonList(qt);<a
name="line.296"></a>
+<span class="sourceLineNo">297</span><a name="line.297"></a>
+<span class="sourceLineNo">298</span>    throw new RetriesExhaustedException(retries,
exceptions);<a name="line.298"></a>
+<span class="sourceLineNo">299</span>  }<a name="line.299"></a>
+<span class="sourceLineNo">300</span><a name="line.300"></a>
+<span class="sourceLineNo">301</span>  /**<a name="line.301"></a>
+<span class="sourceLineNo">302</span>   * Creates the calls and submit them<a
name="line.302"></a>
+<span class="sourceLineNo">303</span>   *<a name="line.303"></a>
+<span class="sourceLineNo">304</span>   * @param cs  - the completion service
to use for submitting<a name="line.304"></a>
+<span class="sourceLineNo">305</span>   * @param rl  - the region locations<a
name="line.305"></a>
+<span class="sourceLineNo">306</span>   * @param min - the id of the first replica,
inclusive<a name="line.306"></a>
+<span class="sourceLineNo">307</span>   * @param max - the id of the last replica,
inclusive.<a name="line.307"></a>
+<span class="sourceLineNo">308</span>   */<a name="line.308"></a>
+<span class="sourceLineNo">309</span>  private void addCallsForReplica(ResultBoundedCompletionService&lt;Result&gt;
cs,<a name="line.309"></a>
+<span class="sourceLineNo">310</span>                                 RegionLocations
rl, int min, int max) {<a name="line.310"></a>
+<span class="sourceLineNo">311</span>    for (int id = min; id &lt;= max;
id++) {<a name="line.311"></a>
+<span class="sourceLineNo">312</span>      HRegionLocation hrl = rl.getRegionLocation(id);<a
name="line.312"></a>
+<span class="sourceLineNo">313</span>      ReplicaRegionServerCallable callOnReplica
= new ReplicaRegionServerCallable(id, hrl);<a name="line.313"></a>
+<span class="sourceLineNo">314</span>      cs.submit(callOnReplica, operationTimeout,
id);<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><a name="line.317"></a>
+<span class="sourceLineNo">318</span>  static RegionLocations getRegionLocations(boolean
useCache, int replicaId,<a name="line.318"></a>
+<span class="sourceLineNo">319</span>                 ClusterConnection cConnection,
TableName tableName, byte[] row)<a name="line.319"></a>
+<span class="sourceLineNo">320</span>      throws RetriesExhaustedException,
DoNotRetryIOException, InterruptedIOException {<a name="line.320"></a>
+<span class="sourceLineNo">321</span><a name="line.321"></a>
+<span class="sourceLineNo">322</span>    RegionLocations rl;<a name="line.322"></a>
+<span class="sourceLineNo">323</span>    try {<a name="line.323"></a>
+<span class="sourceLineNo">324</span>      if (useCache) {<a name="line.324"></a>
+<span class="sourceLineNo">325</span>        rl = cConnection.locateRegion(tableName,
row, true, true, replicaId);<a name="line.325"></a>
+<span class="sourceLineNo">326</span>      } else {<a name="line.326"></a>
+<span class="sourceLineNo">327</span>        rl = cConnection.relocateRegion(tableName,
row, replicaId);<a name="line.327"></a>
+<span class="sourceLineNo">328</span>      }<a name="line.328"></a>
+<span class="sourceLineNo">329</span>    } catch (DoNotRetryIOException | InterruptedIOException
| RetriesExhaustedException e) {<a name="line.329"></a>
+<span class="sourceLineNo">330</span>      throw e;<a name="line.330"></a>
+<span class="sourceLineNo">331</span>    } catch (IOException e) {<a name="line.331"></a>
+<span class="sourceLineNo">332</span>      throw new RetriesExhaustedException("Can't
get the location for replica " + replicaId, e);<a name="line.332"></a>
+<span class="sourceLineNo">333</span>    }<a name="line.333"></a>
+<span class="sourceLineNo">334</span>    if (rl == null) {<a name="line.334"></a>
+<span class="sourceLineNo">335</span>      throw new RetriesExhaustedException("Can't
get the location for replica " + replicaId);<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>    return rl;<a name="line.338"></a>
+<span class="sourceLineNo">339</span>  }<a name="line.339"></a>
+<span class="sourceLineNo">340</span>}<a name="line.340"></a>
 
 
 


Mime
View raw message