Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 654B2200CD1 for ; Tue, 11 Jul 2017 17:02:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 642F91661F0; Tue, 11 Jul 2017 15:02:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DE3931661FB for ; Tue, 11 Jul 2017 17:02:43 +0200 (CEST) Received: (qmail 62101 invoked by uid 500); 11 Jul 2017 15:02:42 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 60909 invoked by uid 99); 11 Jul 2017 15:02:41 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2017 15:02:41 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1A74BF550C; Tue, 11 Jul 2017 15:02:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: git-site-role@apache.org To: commits@hbase.apache.org Date: Tue, 11 Jul 2017 15:02:49 -0000 Message-Id: In-Reply-To: <8657cf38cf36446491e7263da6cbcde9@git.apache.org> References: <8657cf38cf36446491e7263da6cbcde9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [11/51] [partial] hbase-site git commit: Published site at 82d554e3783372cc6b05489452c815b57c06f6cd. archived-at: Tue, 11 Jul 2017 15:02:45 -0000 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 @@ 109 } catch (Throwable t) { 110 Throwable e = t.getCause(); 111 ExceptionUtil.rethrowIfInterrupt(t); -112 -113 // translateException throws exception when should not retry: i.e. when request is bad. -114 interceptor.handleFailure(context, t); -115 t = translateException(t); -116 -117 if (tries > startLogErrorsCnt) { -118 LOG.info("Call exception, tries=" + tries + ", maxAttempts=" + maxAttempts + ", started=" -119 + (EnvironmentEdgeManager.currentTime() - tracker.getStartTime()) + " ms ago, " -120 + "cancelled=" + cancelled.get() + ", msg=" -121 + t.getMessage() + " " + callable.getExceptionMessageAdditionalDetail()); -122 } -123 -124 callable.throwable(t, maxAttempts != 1); -125 RetriesExhaustedException.ThrowableWithExtraContext qt = -126 new RetriesExhaustedException.ThrowableWithExtraContext(t, -127 EnvironmentEdgeManager.currentTime(), toString()); -128 exceptions.add(qt); -129 if (tries >= maxAttempts - 1) { -130 throw new RetriesExhaustedException(tries, exceptions); -131 } -132 // If the server is dead, we need to wait a little before retrying, to give -133 // a chance to the regions to be moved -134 // get right pause time, start by RETRY_BACKOFF[0] * pauseBase, where pauseBase might be -135 // special when encountering CallQueueTooBigException, see #HBASE-17114 -136 long pauseBase = (t instanceof CallQueueTooBigException) ? pauseForCQTBE : pause; -137 expectedSleep = callable.sleep(pauseBase, tries); -138 -139 // If, after the planned sleep, there won't be enough time left, we stop now. -140 long duration = singleCallDuration(expectedSleep); -141 if (duration > callTimeout) { -142 String msg = "callTimeout=" + callTimeout + ", callDuration=" + duration + -143 ": " + t.getMessage() + " " + callable.getExceptionMessageAdditionalDetail(); -144 throw (SocketTimeoutException)(new SocketTimeoutException(msg).initCause(t)); -145 } -146 } finally { -147 interceptor.updateFailureInfo(context); -148 } -149 try { -150 if (expectedSleep > 0) { -151 synchronized (cancelled) { -152 if (cancelled.get()) return null; -153 cancelled.wait(expectedSleep); -154 } -155 } -156 if (cancelled.get()) return null; -157 } catch (InterruptedException e) { -158 throw new InterruptedIOException("Interrupted after " + tries -159 + " tries while maxAttempts=" + maxAttempts); -160 } -161 } -162 } -163 -164 /** -165 * @return Calculate how long a single call took -166 */ -167 private long singleCallDuration(final long expectedSleep) { -168 return (EnvironmentEdgeManager.currentTime() - tracker.getStartTime()) + expectedSleep; -169 } -170 -171 @Override -172 public T callWithoutRetries(RetryingCallable<T> callable, int callTimeout) -173 throws IOException, RuntimeException { -174 // The code of this method should be shared with withRetries. -175 try { -176 callable.prepare(false); -177 return callable.call(callTimeout); -178 } catch (Throwable t) { -179 Throwable t2 = translateException(t); -180 ExceptionUtil.rethrowIfInterrupt(t2); -181 // It would be nice to clear the location cache here. -182 if (t2 instanceof IOException) { -183 throw (IOException)t2; -184 } else { -185 throw new RuntimeException(t2); -186 } -187 } -188 } -189 -190 /** -191 * Get the good or the remote exception if any, throws the DoNotRetryIOException. -192 * @param t the throwable to analyze -193 * @return the translated exception, if it's not a DoNotRetryIOException -194 * @throws DoNotRetryIOException - if we find it, we throw it instead of translating. -195 */ -196 static Throwable translateException(Throwable t) throws DoNotRetryIOException { -197 if (t instanceof UndeclaredThrowableException) { -198 if (t.getCause() != null) { -199 t = t.getCause(); -200 } -201 } -202 if (t instanceof RemoteException) { -203 t = ((RemoteException)t).unwrapRemoteException(); -204 } -205 if (t instanceof LinkageError) { -206 throw new DoNotRetryIOException(t); -207 } -208 if (t instanceof ServiceException) { -209 ServiceException se = (ServiceException)t; -210 Throwable cause = se.getCause(); -211 if (cause != null && cause instanceof DoNotRetryIOException) { -212 throw (DoNotRetryIOException)cause; -213 } -214 // Don't let ServiceException out; its rpc specific. -215 t = cause; -216 // t could be a RemoteException so go around again. -217 translateException(t); -218 } else if (t instanceof DoNotRetryIOException) { -219 throw (DoNotRetryIOException)t; -220 } -221 return t; -222 } -223 -224 private int getTimeout(int callTimeout){ -225 int timeout = tracker.getRemainingTime(callTimeout); -226 if (timeout <= 0 || rpcTimeout > 0 && rpcTimeout < timeout){ -227 timeout = rpcTimeout; -228 } -229 return timeout; -230 } -231 -232 @Override -233 public String toString() { -234 return "RpcRetryingCaller{" + "globalStartTime=" + tracker.getStartTime() + -235 ", pause=" + pause + ", maxAttempts=" + maxAttempts + '}'; -236 } -237} +112 Throwable cause = t.getCause(); +113 if (cause instanceof DoNotRetryIOException) { +114 // Fail fast +115 throw (DoNotRetryIOException) cause; +116 } +117 // translateException throws exception when should not retry: i.e. when request is bad. +118 interceptor.handleFailure(context, t); +119 t = translateException(t); +120 +121 if (tries > startLogErrorsCnt) { +122 LOG.info("Call exception, tries=" + tries + ", maxAttempts=" + maxAttempts + ", started=" +123 + (EnvironmentEdgeManager.currentTime() - tracker.getStartTime()) + " ms ago, " +124 + "cancelled=" + cancelled.get() + ", msg=" +125 + t.getMessage() + " " + callable.getExceptionMessageAdditionalDetail()); +126 } +127 +128 callable.throwable(t, maxAttempts != 1); +129 RetriesExhaustedException.ThrowableWithExtraContext qt = +130 new RetriesExhaustedException.ThrowableWithExtraContext(t, +131 EnvironmentEdgeManager.currentTime(), toString()); +132 exceptions.add(qt); +133 if (tries >= maxAttempts - 1) { +134 throw new RetriesExhaustedException(tries, exceptions); +135 } +136 // If the server is dead, we need to wait a little before retrying, to give +137 // a chance to the regions to be moved +138 // get right pause time, start by RETRY_BACKOFF[0] * pauseBase, where pauseBase might be +139 // special when encountering CallQueueTooBigException, see #HBASE-17114 +140 long pauseBase = (t instanceof CallQueueTooBigException) ? pauseForCQTBE : pause; +141 expectedSleep = callable.sleep(pauseBase, tries); +142 +143 // If, after the planned sleep, there won't be enough time left, we stop now. +144 long duration = singleCallDuration(expectedSleep); +145 if (duration > callTimeout) { +146 String msg = "callTimeout=" + callTimeout + ", callDuration=" + duration + +147 ": " + t.getMessage() + " " + callable.getExceptionMessageAdditionalDetail(); +148 throw (SocketTimeoutException)(new SocketTimeoutException(msg).initCause(t)); +149 } +150 } finally { +151 interceptor.updateFailureInfo(context); +152 } +153 try { +154 if (expectedSleep > 0) { +155 synchronized (cancelled) { +156 if (cancelled.get()) return null; +157 cancelled.wait(expectedSleep); +158 } +159 } +160 if (cancelled.get()) return null; +161 } catch (InterruptedException e) { +162 throw new InterruptedIOException("Interrupted after " + tries +163 + " tries while maxAttempts=" + maxAttempts); +164 } +165 } +166 } +167 +168 /** +169 * @return Calculate how long a single call took +170 */ +171 private long singleCallDuration(final long expectedSleep) { +172 return (EnvironmentEdgeManager.currentTime() - tracker.getStartTime()) + expectedSleep; +173 } +174 +175 @Override +176 public T callWithoutRetries(RetryingCallable<T> callable, int callTimeout) +177 throws IOException, RuntimeException { +178 // The code of this method should be shared with withRetries. +179 try { +180 callable.prepare(false); +181 return callable.call(callTimeout); +182 } catch (Throwable t) { +183 Throwable t2 = translateException(t); +184 ExceptionUtil.rethrowIfInterrupt(t2); +185 // It would be nice to clear the location cache here. +186 if (t2 instanceof IOException) { +187 throw (IOException)t2; +188 } else { +189 throw new RuntimeException(t2); +190 } +191 } +192 } +193 +194 /** +195 * Get the good or the remote exception if any, throws the DoNotRetryIOException. +196 * @param t the throwable to analyze +197 * @return the translated exception, if it's not a DoNotRetryIOException +198 * @throws DoNotRetryIOException - if we find it, we throw it instead of translating. +199 */ +200 static Throwable translateException(Throwable t) throws DoNotRetryIOException { +201 if (t instanceof UndeclaredThrowableException) { +202 if (t.getCause() != null) { +203 t = t.getCause(); +204 } +205 } +206 if (t instanceof RemoteException) { +207 t = ((RemoteException)t).unwrapRemoteException(); +208 } +209 if (t instanceof LinkageError) { +210 throw new DoNotRetryIOException(t); +211 } +212 if (t instanceof ServiceException) { +213 ServiceException se = (ServiceException)t; +214 Throwable cause = se.getCause(); +215 if (cause != null && cause instanceof DoNotRetryIOException) { +216 throw (DoNotRetryIOException)cause; +217 } +218 // Don't let ServiceException out; its rpc specific. +219 t = cause; +220 // t could be a RemoteException so go around again. +221 translateException(t); +222 } else if (t instanceof DoNotRetryIOException) { +223 throw (DoNotRetryIOException)t; +224 } +225 return t; +226 } +227 +228 private int getTimeout(int callTimeout){ +229 int timeout = tracker.getRemainingTime(callTimeout); +230 if (timeout <= 0 || rpcTimeout > 0 && rpcTimeout < timeout){ +231 timeout = rpcTimeout; +232 } +233 return timeout; +234 } +235 +236 @Override +237 public String toString() { +238 return "RpcRetryingCaller{" + "globalStartTime=" + tracker.getStartTime() + +239 ", pause=" + pause + ", maxAttempts=" + maxAttempts + '}'; +240 } +241} 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 @@ 702 MasterProcedureManager mpm = master.getMasterProcedureManagerHost().getProcedureManager( 703 desc.getSignature()); 704 if (mpm == null) { -705 throw new ServiceException("The procedure is not registered: " -706 + desc.getSignature()); +705 throw new ServiceException(new DoNotRetryIOException("The procedure is not registered: " +706 + desc.getSignature())); 707 } 708 709 LOG.info(master.getClientIdAuditPrefix() + " procedure request for: " 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 @@ 702 MasterProcedureManager mpm = master.getMasterProcedureManagerHost().getProcedureManager( 703 desc.getSignature()); 704 if (mpm == null) { -705 throw new ServiceException("The procedure is not registered: " -706 + desc.getSignature()); +705 throw new ServiceException(new DoNotRetryIOException("The procedure is not registered: " +706 + desc.getSignature())); 707 } 708 709 LOG.info(master.getClientIdAuditPrefix() + " procedure request for: " 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 @@ 691 } 692 } 693 if (region.getCoprocessorHost() != null) { -694 region.getCoprocessorHost().postAppend(append, r); +694 r = region.getCoprocessorHost().postAppend(append, r); 695 } 696 } 697 if (regionServer.metricsRegionServer != null) { 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 @@ 691 } 692 } 693 if (region.getCoprocessorHost() != null) { -694 region.getCoprocessorHost().postAppend(append, r); +694 r = region.getCoprocessorHost().postAppend(append, r); 695 } 696 } 697 if (regionServer.metricsRegionServer != null) { 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 @@ 691 } 692 } 693 if (region.getCoprocessorHost() != null) { -694 region.getCoprocessorHost().postAppend(append, r); +694 r = region.getCoprocessorHost().postAppend(append, r); 695 } 696 } 697 if (regionServer.metricsRegionServer != null) { 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 @@ 691 } 692 } 693 if (region.getCoprocessorHost() != null) { -694 region.getCoprocessorHost().postAppend(append, r); +694 r = region.getCoprocessorHost().postAppend(append, r); 695 } 696 } 697 if (regionServer.metricsRegionServer != null) { 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 @@ 691 } 692 } 693 if (region.getCoprocessorHost() != null) { -694 region.getCoprocessorHost().postAppend(append, r); +694 r = region.getCoprocessorHost().postAppend(append, r); 695 } 696 } 697 if (regionServer.metricsRegionServer != null) { 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 @@ 691 } 692 } 693 if (region.getCoprocessorHost() != null) { -694 region.getCoprocessorHost().postAppend(append, r); +694 r = region.getCoprocessorHost().postAppend(append, r); 695 } 696 } 697 if (regionServer.metricsRegionServer != null) { 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 @@ 691 } 692 } 693 if (region.getCoprocessorHost() != null) { -694 region.getCoprocessorHost().postAppend(append, r); +694 r = region.getCoprocessorHost().postAppend(append, r); 695 } 696 } 697 if (regionServer.metricsRegionServer != null) {