hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [11/51] [partial] hbase-site git commit: Published site at 82d554e3783372cc6b05489452c815b57c06f6cd.
Date Tue, 11 Jul 2017 15:02:49 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90c7dfe4/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.html
b/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.html
index 39254b4..2ceb2fb 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/client/RpcRetryingCallerImpl.html
@@ -117,132 +117,136 @@
 <span class="sourceLineNo">109</span>      } catch (Throwable t) {<a name="line.109"></a>
 <span class="sourceLineNo">110</span>        Throwable e = t.getCause();<a
name="line.110"></a>
 <span class="sourceLineNo">111</span>        ExceptionUtil.rethrowIfInterrupt(t);<a
name="line.111"></a>
-<span class="sourceLineNo">112</span><a name="line.112"></a>
-<span class="sourceLineNo">113</span>        // translateException throws exception
when should not retry: i.e. when request is bad.<a name="line.113"></a>
-<span class="sourceLineNo">114</span>        interceptor.handleFailure(context,
t);<a name="line.114"></a>
-<span class="sourceLineNo">115</span>        t = translateException(t);<a
name="line.115"></a>
-<span class="sourceLineNo">116</span><a name="line.116"></a>
-<span class="sourceLineNo">117</span>        if (tries &gt; startLogErrorsCnt)
{<a name="line.117"></a>
-<span class="sourceLineNo">118</span>          LOG.info("Call exception, tries="
+ tries + ", maxAttempts=" + maxAttempts + ", started="<a name="line.118"></a>
-<span class="sourceLineNo">119</span>              + (EnvironmentEdgeManager.currentTime()
- tracker.getStartTime()) + " ms ago, "<a name="line.119"></a>
-<span class="sourceLineNo">120</span>              + "cancelled=" + cancelled.get()
+ ", msg="<a name="line.120"></a>
-<span class="sourceLineNo">121</span>              + t.getMessage() + " " + callable.getExceptionMessageAdditionalDetail());<a
name="line.121"></a>
-<span class="sourceLineNo">122</span>        }<a name="line.122"></a>
-<span class="sourceLineNo">123</span><a name="line.123"></a>
-<span class="sourceLineNo">124</span>        callable.throwable(t, maxAttempts
!= 1);<a name="line.124"></a>
-<span class="sourceLineNo">125</span>        RetriesExhaustedException.ThrowableWithExtraContext
qt =<a name="line.125"></a>
-<span class="sourceLineNo">126</span>            new RetriesExhaustedException.ThrowableWithExtraContext(t,<a
name="line.126"></a>
-<span class="sourceLineNo">127</span>                EnvironmentEdgeManager.currentTime(),
toString());<a name="line.127"></a>
-<span class="sourceLineNo">128</span>        exceptions.add(qt);<a name="line.128"></a>
-<span class="sourceLineNo">129</span>        if (tries &gt;= maxAttempts
- 1) {<a name="line.129"></a>
-<span class="sourceLineNo">130</span>          throw new RetriesExhaustedException(tries,
exceptions);<a name="line.130"></a>
-<span class="sourceLineNo">131</span>        }<a name="line.131"></a>
-<span class="sourceLineNo">132</span>        // If the server is dead, we need
to wait a little before retrying, to give<a name="line.132"></a>
-<span class="sourceLineNo">133</span>        // a chance to the regions to be
moved<a name="line.133"></a>
-<span class="sourceLineNo">134</span>        // get right pause time, start by
RETRY_BACKOFF[0] * pauseBase, where pauseBase might be<a name="line.134"></a>
-<span class="sourceLineNo">135</span>        // special when encountering CallQueueTooBigException,
see #HBASE-17114<a name="line.135"></a>
-<span class="sourceLineNo">136</span>        long pauseBase = (t instanceof CallQueueTooBigException)
? pauseForCQTBE : pause;<a name="line.136"></a>
-<span class="sourceLineNo">137</span>        expectedSleep = callable.sleep(pauseBase,
tries);<a name="line.137"></a>
-<span class="sourceLineNo">138</span><a name="line.138"></a>
-<span class="sourceLineNo">139</span>        // If, after the planned sleep,
there won't be enough time left, we stop now.<a name="line.139"></a>
-<span class="sourceLineNo">140</span>        long duration = singleCallDuration(expectedSleep);<a
name="line.140"></a>
-<span class="sourceLineNo">141</span>        if (duration &gt; callTimeout)
{<a name="line.141"></a>
-<span class="sourceLineNo">142</span>          String msg = "callTimeout=" +
callTimeout + ", callDuration=" + duration +<a name="line.142"></a>
-<span class="sourceLineNo">143</span>              ": " +  t.getMessage() + "
" + callable.getExceptionMessageAdditionalDetail();<a name="line.143"></a>
-<span class="sourceLineNo">144</span>          throw (SocketTimeoutException)(new
SocketTimeoutException(msg).initCause(t));<a name="line.144"></a>
-<span class="sourceLineNo">145</span>        }<a name="line.145"></a>
-<span class="sourceLineNo">146</span>      } finally {<a name="line.146"></a>
-<span class="sourceLineNo">147</span>        interceptor.updateFailureInfo(context);<a
name="line.147"></a>
-<span class="sourceLineNo">148</span>      }<a name="line.148"></a>
-<span class="sourceLineNo">149</span>      try {<a name="line.149"></a>
-<span class="sourceLineNo">150</span>        if (expectedSleep &gt; 0) {<a
name="line.150"></a>
-<span class="sourceLineNo">151</span>          synchronized (cancelled) {<a
name="line.151"></a>
-<span class="sourceLineNo">152</span>            if (cancelled.get()) return
null;<a name="line.152"></a>
-<span class="sourceLineNo">153</span>            cancelled.wait(expectedSleep);<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>        if (cancelled.get()) return null;<a
name="line.156"></a>
-<span class="sourceLineNo">157</span>      } catch (InterruptedException e) {<a
name="line.157"></a>
-<span class="sourceLineNo">158</span>        throw new InterruptedIOException("Interrupted
after " + tries<a name="line.158"></a>
-<span class="sourceLineNo">159</span>            + " tries while maxAttempts="
+ maxAttempts);<a name="line.159"></a>
-<span class="sourceLineNo">160</span>      }<a name="line.160"></a>
-<span class="sourceLineNo">161</span>    }<a name="line.161"></a>
-<span class="sourceLineNo">162</span>  }<a name="line.162"></a>
-<span class="sourceLineNo">163</span><a name="line.163"></a>
-<span class="sourceLineNo">164</span>  /**<a name="line.164"></a>
-<span class="sourceLineNo">165</span>   * @return Calculate how long a single
call took<a name="line.165"></a>
-<span class="sourceLineNo">166</span>   */<a name="line.166"></a>
-<span class="sourceLineNo">167</span>  private long singleCallDuration(final
long expectedSleep) {<a name="line.167"></a>
-<span class="sourceLineNo">168</span>    return (EnvironmentEdgeManager.currentTime()
- tracker.getStartTime()) + expectedSleep;<a name="line.168"></a>
-<span class="sourceLineNo">169</span>  }<a name="line.169"></a>
-<span class="sourceLineNo">170</span><a name="line.170"></a>
-<span class="sourceLineNo">171</span>  @Override<a name="line.171"></a>
-<span class="sourceLineNo">172</span>  public T callWithoutRetries(RetryingCallable&lt;T&gt;
callable, int callTimeout)<a name="line.172"></a>
-<span class="sourceLineNo">173</span>  throws IOException, RuntimeException {<a
name="line.173"></a>
-<span class="sourceLineNo">174</span>    // The code of this method should be
shared with withRetries.<a name="line.174"></a>
-<span class="sourceLineNo">175</span>    try {<a name="line.175"></a>
-<span class="sourceLineNo">176</span>      callable.prepare(false);<a name="line.176"></a>
-<span class="sourceLineNo">177</span>      return callable.call(callTimeout);<a
name="line.177"></a>
-<span class="sourceLineNo">178</span>    } catch (Throwable t) {<a name="line.178"></a>
-<span class="sourceLineNo">179</span>      Throwable t2 = translateException(t);<a
name="line.179"></a>
-<span class="sourceLineNo">180</span>      ExceptionUtil.rethrowIfInterrupt(t2);<a
name="line.180"></a>
-<span class="sourceLineNo">181</span>      // It would be nice to clear the location
cache here.<a name="line.181"></a>
-<span class="sourceLineNo">182</span>      if (t2 instanceof IOException) {<a
name="line.182"></a>
-<span class="sourceLineNo">183</span>        throw (IOException)t2;<a name="line.183"></a>
-<span class="sourceLineNo">184</span>      } else {<a name="line.184"></a>
-<span class="sourceLineNo">185</span>        throw new RuntimeException(t2);<a
name="line.185"></a>
-<span class="sourceLineNo">186</span>      }<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>   * Get the good or the remote exception
if any, throws the DoNotRetryIOException.<a name="line.191"></a>
-<span class="sourceLineNo">192</span>   * @param t the throwable to analyze<a
name="line.192"></a>
-<span class="sourceLineNo">193</span>   * @return the translated exception, if
it's not a DoNotRetryIOException<a name="line.193"></a>
-<span class="sourceLineNo">194</span>   * @throws DoNotRetryIOException - if
we find it, we throw it instead of translating.<a name="line.194"></a>
-<span class="sourceLineNo">195</span>   */<a name="line.195"></a>
-<span class="sourceLineNo">196</span>  static Throwable translateException(Throwable
t) throws DoNotRetryIOException {<a name="line.196"></a>
-<span class="sourceLineNo">197</span>    if (t instanceof UndeclaredThrowableException)
{<a name="line.197"></a>
-<span class="sourceLineNo">198</span>      if (t.getCause() != null) {<a name="line.198"></a>
-<span class="sourceLineNo">199</span>        t = t.getCause();<a name="line.199"></a>
-<span class="sourceLineNo">200</span>      }<a name="line.200"></a>
-<span class="sourceLineNo">201</span>    }<a name="line.201"></a>
-<span class="sourceLineNo">202</span>    if (t instanceof RemoteException) {<a
name="line.202"></a>
-<span class="sourceLineNo">203</span>      t = ((RemoteException)t).unwrapRemoteException();<a
name="line.203"></a>
-<span class="sourceLineNo">204</span>    }<a name="line.204"></a>
-<span class="sourceLineNo">205</span>    if (t instanceof LinkageError) {<a
name="line.205"></a>
-<span class="sourceLineNo">206</span>      throw new DoNotRetryIOException(t);<a
name="line.206"></a>
-<span class="sourceLineNo">207</span>    }<a name="line.207"></a>
-<span class="sourceLineNo">208</span>    if (t instanceof ServiceException) {<a
name="line.208"></a>
-<span class="sourceLineNo">209</span>      ServiceException se = (ServiceException)t;<a
name="line.209"></a>
-<span class="sourceLineNo">210</span>      Throwable cause = se.getCause();<a
name="line.210"></a>
-<span class="sourceLineNo">211</span>      if (cause != null &amp;&amp;
cause instanceof DoNotRetryIOException) {<a name="line.211"></a>
-<span class="sourceLineNo">212</span>        throw (DoNotRetryIOException)cause;<a
name="line.212"></a>
-<span class="sourceLineNo">213</span>      }<a name="line.213"></a>
-<span class="sourceLineNo">214</span>      // Don't let ServiceException out;
its rpc specific.<a name="line.214"></a>
-<span class="sourceLineNo">215</span>      t = cause;<a name="line.215"></a>
-<span class="sourceLineNo">216</span>      // t could be a RemoteException so
go around again.<a name="line.216"></a>
-<span class="sourceLineNo">217</span>      translateException(t);<a name="line.217"></a>
-<span class="sourceLineNo">218</span>    } else if (t instanceof DoNotRetryIOException)
{<a name="line.218"></a>
-<span class="sourceLineNo">219</span>      throw (DoNotRetryIOException)t;<a
name="line.219"></a>
-<span class="sourceLineNo">220</span>    }<a name="line.220"></a>
-<span class="sourceLineNo">221</span>    return t;<a name="line.221"></a>
-<span class="sourceLineNo">222</span>  }<a name="line.222"></a>
-<span class="sourceLineNo">223</span><a name="line.223"></a>
-<span class="sourceLineNo">224</span>  private int getTimeout(int callTimeout){<a
name="line.224"></a>
-<span class="sourceLineNo">225</span>    int timeout = tracker.getRemainingTime(callTimeout);<a
name="line.225"></a>
-<span class="sourceLineNo">226</span>    if (timeout &lt;= 0 || rpcTimeout
&gt; 0 &amp;&amp; rpcTimeout &lt; timeout){<a name="line.226"></a>
-<span class="sourceLineNo">227</span>      timeout = rpcTimeout;<a name="line.227"></a>
-<span class="sourceLineNo">228</span>    }<a name="line.228"></a>
-<span class="sourceLineNo">229</span>    return timeout;<a name="line.229"></a>
-<span class="sourceLineNo">230</span>  }<a name="line.230"></a>
-<span class="sourceLineNo">231</span><a name="line.231"></a>
-<span class="sourceLineNo">232</span>  @Override<a name="line.232"></a>
-<span class="sourceLineNo">233</span>  public String toString() {<a name="line.233"></a>
-<span class="sourceLineNo">234</span>    return "RpcRetryingCaller{" + "globalStartTime="
+ tracker.getStartTime() +<a name="line.234"></a>
-<span class="sourceLineNo">235</span>        ", pause=" + pause + ", maxAttempts="
+ maxAttempts + '}';<a name="line.235"></a>
-<span class="sourceLineNo">236</span>  }<a name="line.236"></a>
-<span class="sourceLineNo">237</span>}<a name="line.237"></a>
+<span class="sourceLineNo">112</span>        Throwable cause = t.getCause();<a
name="line.112"></a>
+<span class="sourceLineNo">113</span>        if (cause instanceof DoNotRetryIOException)
{<a name="line.113"></a>
+<span class="sourceLineNo">114</span>          // Fail fast<a name="line.114"></a>
+<span class="sourceLineNo">115</span>          throw (DoNotRetryIOException)
cause;<a name="line.115"></a>
+<span class="sourceLineNo">116</span>        }<a name="line.116"></a>
+<span class="sourceLineNo">117</span>        // translateException throws exception
when should not retry: i.e. when request is bad.<a name="line.117"></a>
+<span class="sourceLineNo">118</span>        interceptor.handleFailure(context,
t);<a name="line.118"></a>
+<span class="sourceLineNo">119</span>        t = translateException(t);<a
name="line.119"></a>
+<span class="sourceLineNo">120</span><a name="line.120"></a>
+<span class="sourceLineNo">121</span>        if (tries &gt; startLogErrorsCnt)
{<a name="line.121"></a>
+<span class="sourceLineNo">122</span>          LOG.info("Call exception, tries="
+ tries + ", maxAttempts=" + maxAttempts + ", started="<a name="line.122"></a>
+<span class="sourceLineNo">123</span>              + (EnvironmentEdgeManager.currentTime()
- tracker.getStartTime()) + " ms ago, "<a name="line.123"></a>
+<span class="sourceLineNo">124</span>              + "cancelled=" + cancelled.get()
+ ", msg="<a name="line.124"></a>
+<span class="sourceLineNo">125</span>              + t.getMessage() + " " + callable.getExceptionMessageAdditionalDetail());<a
name="line.125"></a>
+<span class="sourceLineNo">126</span>        }<a name="line.126"></a>
+<span class="sourceLineNo">127</span><a name="line.127"></a>
+<span class="sourceLineNo">128</span>        callable.throwable(t, maxAttempts
!= 1);<a name="line.128"></a>
+<span class="sourceLineNo">129</span>        RetriesExhaustedException.ThrowableWithExtraContext
qt =<a name="line.129"></a>
+<span class="sourceLineNo">130</span>            new RetriesExhaustedException.ThrowableWithExtraContext(t,<a
name="line.130"></a>
+<span class="sourceLineNo">131</span>                EnvironmentEdgeManager.currentTime(),
toString());<a name="line.131"></a>
+<span class="sourceLineNo">132</span>        exceptions.add(qt);<a name="line.132"></a>
+<span class="sourceLineNo">133</span>        if (tries &gt;= maxAttempts
- 1) {<a name="line.133"></a>
+<span class="sourceLineNo">134</span>          throw new RetriesExhaustedException(tries,
exceptions);<a name="line.134"></a>
+<span class="sourceLineNo">135</span>        }<a name="line.135"></a>
+<span class="sourceLineNo">136</span>        // If the server is dead, we need
to wait a little before retrying, to give<a name="line.136"></a>
+<span class="sourceLineNo">137</span>        // a chance to the regions to be
moved<a name="line.137"></a>
+<span class="sourceLineNo">138</span>        // get right pause time, start by
RETRY_BACKOFF[0] * pauseBase, where pauseBase might be<a name="line.138"></a>
+<span class="sourceLineNo">139</span>        // special when encountering CallQueueTooBigException,
see #HBASE-17114<a name="line.139"></a>
+<span class="sourceLineNo">140</span>        long pauseBase = (t instanceof CallQueueTooBigException)
? pauseForCQTBE : pause;<a name="line.140"></a>
+<span class="sourceLineNo">141</span>        expectedSleep = callable.sleep(pauseBase,
tries);<a name="line.141"></a>
+<span class="sourceLineNo">142</span><a name="line.142"></a>
+<span class="sourceLineNo">143</span>        // If, after the planned sleep,
there won't be enough time left, we stop now.<a name="line.143"></a>
+<span class="sourceLineNo">144</span>        long duration = singleCallDuration(expectedSleep);<a
name="line.144"></a>
+<span class="sourceLineNo">145</span>        if (duration &gt; callTimeout)
{<a name="line.145"></a>
+<span class="sourceLineNo">146</span>          String msg = "callTimeout=" +
callTimeout + ", callDuration=" + duration +<a name="line.146"></a>
+<span class="sourceLineNo">147</span>              ": " +  t.getMessage() + "
" + callable.getExceptionMessageAdditionalDetail();<a name="line.147"></a>
+<span class="sourceLineNo">148</span>          throw (SocketTimeoutException)(new
SocketTimeoutException(msg).initCause(t));<a name="line.148"></a>
+<span class="sourceLineNo">149</span>        }<a name="line.149"></a>
+<span class="sourceLineNo">150</span>      } finally {<a name="line.150"></a>
+<span class="sourceLineNo">151</span>        interceptor.updateFailureInfo(context);<a
name="line.151"></a>
+<span class="sourceLineNo">152</span>      }<a name="line.152"></a>
+<span class="sourceLineNo">153</span>      try {<a name="line.153"></a>
+<span class="sourceLineNo">154</span>        if (expectedSleep &gt; 0) {<a
name="line.154"></a>
+<span class="sourceLineNo">155</span>          synchronized (cancelled) {<a
name="line.155"></a>
+<span class="sourceLineNo">156</span>            if (cancelled.get()) return
null;<a name="line.156"></a>
+<span class="sourceLineNo">157</span>            cancelled.wait(expectedSleep);<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>        if (cancelled.get()) return null;<a
name="line.160"></a>
+<span class="sourceLineNo">161</span>      } catch (InterruptedException e) {<a
name="line.161"></a>
+<span class="sourceLineNo">162</span>        throw new InterruptedIOException("Interrupted
after " + tries<a name="line.162"></a>
+<span class="sourceLineNo">163</span>            + " tries while maxAttempts="
+ maxAttempts);<a name="line.163"></a>
+<span class="sourceLineNo">164</span>      }<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><a name="line.167"></a>
+<span class="sourceLineNo">168</span>  /**<a name="line.168"></a>
+<span class="sourceLineNo">169</span>   * @return Calculate how long a single
call took<a name="line.169"></a>
+<span class="sourceLineNo">170</span>   */<a name="line.170"></a>
+<span class="sourceLineNo">171</span>  private long singleCallDuration(final
long expectedSleep) {<a name="line.171"></a>
+<span class="sourceLineNo">172</span>    return (EnvironmentEdgeManager.currentTime()
- tracker.getStartTime()) + expectedSleep;<a name="line.172"></a>
+<span class="sourceLineNo">173</span>  }<a name="line.173"></a>
+<span class="sourceLineNo">174</span><a name="line.174"></a>
+<span class="sourceLineNo">175</span>  @Override<a name="line.175"></a>
+<span class="sourceLineNo">176</span>  public T callWithoutRetries(RetryingCallable&lt;T&gt;
callable, int callTimeout)<a name="line.176"></a>
+<span class="sourceLineNo">177</span>  throws IOException, RuntimeException {<a
name="line.177"></a>
+<span class="sourceLineNo">178</span>    // The code of this method should be
shared with withRetries.<a name="line.178"></a>
+<span class="sourceLineNo">179</span>    try {<a name="line.179"></a>
+<span class="sourceLineNo">180</span>      callable.prepare(false);<a name="line.180"></a>
+<span class="sourceLineNo">181</span>      return callable.call(callTimeout);<a
name="line.181"></a>
+<span class="sourceLineNo">182</span>    } catch (Throwable t) {<a name="line.182"></a>
+<span class="sourceLineNo">183</span>      Throwable t2 = translateException(t);<a
name="line.183"></a>
+<span class="sourceLineNo">184</span>      ExceptionUtil.rethrowIfInterrupt(t2);<a
name="line.184"></a>
+<span class="sourceLineNo">185</span>      // It would be nice to clear the location
cache here.<a name="line.185"></a>
+<span class="sourceLineNo">186</span>      if (t2 instanceof IOException) {<a
name="line.186"></a>
+<span class="sourceLineNo">187</span>        throw (IOException)t2;<a name="line.187"></a>
+<span class="sourceLineNo">188</span>      } else {<a name="line.188"></a>
+<span class="sourceLineNo">189</span>        throw new RuntimeException(t2);<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>   * Get the good or the remote exception
if any, throws the DoNotRetryIOException.<a name="line.195"></a>
+<span class="sourceLineNo">196</span>   * @param t the throwable to analyze<a
name="line.196"></a>
+<span class="sourceLineNo">197</span>   * @return the translated exception, if
it's not a DoNotRetryIOException<a name="line.197"></a>
+<span class="sourceLineNo">198</span>   * @throws DoNotRetryIOException - if
we find it, we throw it instead of translating.<a name="line.198"></a>
+<span class="sourceLineNo">199</span>   */<a name="line.199"></a>
+<span class="sourceLineNo">200</span>  static Throwable translateException(Throwable
t) throws DoNotRetryIOException {<a name="line.200"></a>
+<span class="sourceLineNo">201</span>    if (t instanceof UndeclaredThrowableException)
{<a name="line.201"></a>
+<span class="sourceLineNo">202</span>      if (t.getCause() != null) {<a name="line.202"></a>
+<span class="sourceLineNo">203</span>        t = t.getCause();<a name="line.203"></a>
+<span class="sourceLineNo">204</span>      }<a name="line.204"></a>
+<span class="sourceLineNo">205</span>    }<a name="line.205"></a>
+<span class="sourceLineNo">206</span>    if (t instanceof RemoteException) {<a
name="line.206"></a>
+<span class="sourceLineNo">207</span>      t = ((RemoteException)t).unwrapRemoteException();<a
name="line.207"></a>
+<span class="sourceLineNo">208</span>    }<a name="line.208"></a>
+<span class="sourceLineNo">209</span>    if (t instanceof LinkageError) {<a
name="line.209"></a>
+<span class="sourceLineNo">210</span>      throw new DoNotRetryIOException(t);<a
name="line.210"></a>
+<span class="sourceLineNo">211</span>    }<a name="line.211"></a>
+<span class="sourceLineNo">212</span>    if (t instanceof ServiceException) {<a
name="line.212"></a>
+<span class="sourceLineNo">213</span>      ServiceException se = (ServiceException)t;<a
name="line.213"></a>
+<span class="sourceLineNo">214</span>      Throwable cause = se.getCause();<a
name="line.214"></a>
+<span class="sourceLineNo">215</span>      if (cause != null &amp;&amp;
cause instanceof DoNotRetryIOException) {<a name="line.215"></a>
+<span class="sourceLineNo">216</span>        throw (DoNotRetryIOException)cause;<a
name="line.216"></a>
+<span class="sourceLineNo">217</span>      }<a name="line.217"></a>
+<span class="sourceLineNo">218</span>      // Don't let ServiceException out;
its rpc specific.<a name="line.218"></a>
+<span class="sourceLineNo">219</span>      t = cause;<a name="line.219"></a>
+<span class="sourceLineNo">220</span>      // t could be a RemoteException so
go around again.<a name="line.220"></a>
+<span class="sourceLineNo">221</span>      translateException(t);<a name="line.221"></a>
+<span class="sourceLineNo">222</span>    } else if (t instanceof DoNotRetryIOException)
{<a name="line.222"></a>
+<span class="sourceLineNo">223</span>      throw (DoNotRetryIOException)t;<a
name="line.223"></a>
+<span class="sourceLineNo">224</span>    }<a name="line.224"></a>
+<span class="sourceLineNo">225</span>    return t;<a name="line.225"></a>
+<span class="sourceLineNo">226</span>  }<a name="line.226"></a>
+<span class="sourceLineNo">227</span><a name="line.227"></a>
+<span class="sourceLineNo">228</span>  private int getTimeout(int callTimeout){<a
name="line.228"></a>
+<span class="sourceLineNo">229</span>    int timeout = tracker.getRemainingTime(callTimeout);<a
name="line.229"></a>
+<span class="sourceLineNo">230</span>    if (timeout &lt;= 0 || rpcTimeout
&gt; 0 &amp;&amp; rpcTimeout &lt; timeout){<a name="line.230"></a>
+<span class="sourceLineNo">231</span>      timeout = rpcTimeout;<a name="line.231"></a>
+<span class="sourceLineNo">232</span>    }<a name="line.232"></a>
+<span class="sourceLineNo">233</span>    return timeout;<a name="line.233"></a>
+<span class="sourceLineNo">234</span>  }<a name="line.234"></a>
+<span class="sourceLineNo">235</span><a name="line.235"></a>
+<span class="sourceLineNo">236</span>  @Override<a name="line.236"></a>
+<span class="sourceLineNo">237</span>  public String toString() {<a name="line.237"></a>
+<span class="sourceLineNo">238</span>    return "RpcRetryingCaller{" + "globalStartTime="
+ tracker.getStartTime() +<a name="line.238"></a>
+<span class="sourceLineNo">239</span>        ", pause=" + pause + ", maxAttempts="
+ maxAttempts + '}';<a name="line.239"></a>
+<span class="sourceLineNo">240</span>  }<a name="line.240"></a>
+<span class="sourceLineNo">241</span>}<a name="line.241"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90c7dfe4/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterRpcServices.BalanceSwitchMode.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterRpcServices.BalanceSwitchMode.html
b/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterRpcServices.BalanceSwitchMode.html
index 1782372..7bd1c36 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterRpcServices.BalanceSwitchMode.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterRpcServices.BalanceSwitchMode.html
@@ -710,8 +710,8 @@
 <span class="sourceLineNo">702</span>      MasterProcedureManager mpm = master.getMasterProcedureManagerHost().getProcedureManager(<a
name="line.702"></a>
 <span class="sourceLineNo">703</span>        desc.getSignature());<a name="line.703"></a>
 <span class="sourceLineNo">704</span>      if (mpm == null) {<a name="line.704"></a>
-<span class="sourceLineNo">705</span>        throw new ServiceException("The
procedure is not registered: "<a name="line.705"></a>
-<span class="sourceLineNo">706</span>          + desc.getSignature());<a name="line.706"></a>
+<span class="sourceLineNo">705</span>        throw new ServiceException(new DoNotRetryIOException("The
procedure is not registered: "<a name="line.705"></a>
+<span class="sourceLineNo">706</span>          + desc.getSignature()));<a
name="line.706"></a>
 <span class="sourceLineNo">707</span>      }<a name="line.707"></a>
 <span class="sourceLineNo">708</span><a name="line.708"></a>
 <span class="sourceLineNo">709</span>      LOG.info(master.getClientIdAuditPrefix()
+ " procedure request for: "<a name="line.709"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90c7dfe4/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterRpcServices.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterRpcServices.html b/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterRpcServices.html
index 1782372..7bd1c36 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterRpcServices.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/master/MasterRpcServices.html
@@ -710,8 +710,8 @@
 <span class="sourceLineNo">702</span>      MasterProcedureManager mpm = master.getMasterProcedureManagerHost().getProcedureManager(<a
name="line.702"></a>
 <span class="sourceLineNo">703</span>        desc.getSignature());<a name="line.703"></a>
 <span class="sourceLineNo">704</span>      if (mpm == null) {<a name="line.704"></a>
-<span class="sourceLineNo">705</span>        throw new ServiceException("The
procedure is not registered: "<a name="line.705"></a>
-<span class="sourceLineNo">706</span>          + desc.getSignature());<a name="line.706"></a>
+<span class="sourceLineNo">705</span>        throw new ServiceException(new DoNotRetryIOException("The
procedure is not registered: "<a name="line.705"></a>
+<span class="sourceLineNo">706</span>          + desc.getSignature()));<a
name="line.706"></a>
 <span class="sourceLineNo">707</span>      }<a name="line.707"></a>
 <span class="sourceLineNo">708</span><a name="line.708"></a>
 <span class="sourceLineNo">709</span>      LOG.info(master.getClientIdAuditPrefix()
+ " procedure request for: "<a name="line.709"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90c7dfe4/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.LogDelegate.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.LogDelegate.html
b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.LogDelegate.html
index 24e96b0..fc58824 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.LogDelegate.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.LogDelegate.html
@@ -699,7 +699,7 @@
 <span class="sourceLineNo">691</span>        }<a name="line.691"></a>
 <span class="sourceLineNo">692</span>      }<a name="line.692"></a>
 <span class="sourceLineNo">693</span>      if (region.getCoprocessorHost() !=
null) {<a name="line.693"></a>
-<span class="sourceLineNo">694</span>        region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
+<span class="sourceLineNo">694</span>        r = region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
 <span class="sourceLineNo">695</span>      }<a name="line.695"></a>
 <span class="sourceLineNo">696</span>    }<a name="line.696"></a>
 <span class="sourceLineNo">697</span>    if (regionServer.metricsRegionServer
!= null) {<a name="line.697"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90c7dfe4/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerCloseCallBack.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerCloseCallBack.html
b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerCloseCallBack.html
index 24e96b0..fc58824 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerCloseCallBack.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerCloseCallBack.html
@@ -699,7 +699,7 @@
 <span class="sourceLineNo">691</span>        }<a name="line.691"></a>
 <span class="sourceLineNo">692</span>      }<a name="line.692"></a>
 <span class="sourceLineNo">693</span>      if (region.getCoprocessorHost() !=
null) {<a name="line.693"></a>
-<span class="sourceLineNo">694</span>        region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
+<span class="sourceLineNo">694</span>        r = region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
 <span class="sourceLineNo">695</span>      }<a name="line.695"></a>
 <span class="sourceLineNo">696</span>    }<a name="line.696"></a>
 <span class="sourceLineNo">697</span>    if (regionServer.metricsRegionServer
!= null) {<a name="line.697"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90c7dfe4/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerHolder.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerHolder.html
b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerHolder.html
index 24e96b0..fc58824 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerHolder.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerHolder.html
@@ -699,7 +699,7 @@
 <span class="sourceLineNo">691</span>        }<a name="line.691"></a>
 <span class="sourceLineNo">692</span>      }<a name="line.692"></a>
 <span class="sourceLineNo">693</span>      if (region.getCoprocessorHost() !=
null) {<a name="line.693"></a>
-<span class="sourceLineNo">694</span>        region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
+<span class="sourceLineNo">694</span>        r = region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
 <span class="sourceLineNo">695</span>      }<a name="line.695"></a>
 <span class="sourceLineNo">696</span>    }<a name="line.696"></a>
 <span class="sourceLineNo">697</span>    if (regionServer.metricsRegionServer
!= null) {<a name="line.697"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90c7dfe4/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerShippedCallBack.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerShippedCallBack.html
b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerShippedCallBack.html
index 24e96b0..fc58824 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerShippedCallBack.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannerShippedCallBack.html
@@ -699,7 +699,7 @@
 <span class="sourceLineNo">691</span>        }<a name="line.691"></a>
 <span class="sourceLineNo">692</span>      }<a name="line.692"></a>
 <span class="sourceLineNo">693</span>      if (region.getCoprocessorHost() !=
null) {<a name="line.693"></a>
-<span class="sourceLineNo">694</span>        region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
+<span class="sourceLineNo">694</span>        r = region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
 <span class="sourceLineNo">695</span>      }<a name="line.695"></a>
 <span class="sourceLineNo">696</span>    }<a name="line.696"></a>
 <span class="sourceLineNo">697</span>    if (regionServer.metricsRegionServer
!= null) {<a name="line.697"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90c7dfe4/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannersCloseCallBack.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannersCloseCallBack.html
b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannersCloseCallBack.html
index 24e96b0..fc58824 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannersCloseCallBack.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.RegionScannersCloseCallBack.html
@@ -699,7 +699,7 @@
 <span class="sourceLineNo">691</span>        }<a name="line.691"></a>
 <span class="sourceLineNo">692</span>      }<a name="line.692"></a>
 <span class="sourceLineNo">693</span>      if (region.getCoprocessorHost() !=
null) {<a name="line.693"></a>
-<span class="sourceLineNo">694</span>        region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
+<span class="sourceLineNo">694</span>        r = region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
 <span class="sourceLineNo">695</span>      }<a name="line.695"></a>
 <span class="sourceLineNo">696</span>    }<a name="line.696"></a>
 <span class="sourceLineNo">697</span>    if (regionServer.metricsRegionServer
!= null) {<a name="line.697"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90c7dfe4/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.ScannerListener.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.ScannerListener.html
b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.ScannerListener.html
index 24e96b0..fc58824 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.ScannerListener.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.ScannerListener.html
@@ -699,7 +699,7 @@
 <span class="sourceLineNo">691</span>        }<a name="line.691"></a>
 <span class="sourceLineNo">692</span>      }<a name="line.692"></a>
 <span class="sourceLineNo">693</span>      if (region.getCoprocessorHost() !=
null) {<a name="line.693"></a>
-<span class="sourceLineNo">694</span>        region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
+<span class="sourceLineNo">694</span>        r = region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
 <span class="sourceLineNo">695</span>      }<a name="line.695"></a>
 <span class="sourceLineNo">696</span>    }<a name="line.696"></a>
 <span class="sourceLineNo">697</span>    if (regionServer.metricsRegionServer
!= null) {<a name="line.697"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90c7dfe4/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.html
index 24e96b0..fc58824 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/RSRpcServices.html
@@ -699,7 +699,7 @@
 <span class="sourceLineNo">691</span>        }<a name="line.691"></a>
 <span class="sourceLineNo">692</span>      }<a name="line.692"></a>
 <span class="sourceLineNo">693</span>      if (region.getCoprocessorHost() !=
null) {<a name="line.693"></a>
-<span class="sourceLineNo">694</span>        region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
+<span class="sourceLineNo">694</span>        r = region.getCoprocessorHost().postAppend(append,
r);<a name="line.694"></a>
 <span class="sourceLineNo">695</span>      }<a name="line.695"></a>
 <span class="sourceLineNo">696</span>    }<a name="line.696"></a>
 <span class="sourceLineNo">697</span>    if (regionServer.metricsRegionServer
!= null) {<a name="line.697"></a>


Mime
View raw message