[ 
https://issues.apache.org/jira/browse/HBASE-25735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Stack resolved HBASE-25735.
-----------------------------------
    Resolution: Fixed

I pushed this addendum on branch-2.4+

{code}
kalashnikov:hbase.apache.git stack$ git show -1
commit f9819f33b6b1016364c10d80129e3d0faf7ff17e (HEAD -> m, origin/master, 
origin/HEAD)
Author: stack <[email protected]>
Date:   Thu Apr 8 13:24:29 2021 -0700

    HBASE-25735 Add target Region to connection exceptions
    Restore API for Phoenix (though it shouldn't be using
    Private classes).

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcControllerFactory.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcControllerFactory.java
index 0dcb22fa5b..e6d63fac1f 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcControllerFactory.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcControllerFactory.java
@@ -18,15 +18,14 @@
 package org.apache.hadoop.hbase.ipc;

 import java.util.List;
-
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.CellScannable;
 import org.apache.hadoop.hbase.CellScanner;
 import org.apache.hadoop.hbase.client.RegionInfo;
+import org.apache.hadoop.hbase.util.ReflectionUtils;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.hadoop.hbase.util.ReflectionUtils;

 /**
  * Factory to create a {@link HBaseRpcController}
@@ -52,16 +51,23 @@ public class RpcControllerFactory {
     return new HBaseRpcControllerImpl();
   }

+  public HBaseRpcController newController(CellScanner cellScanner) {
+    return new HBaseRpcControllerImpl(null, cellScanner);
+  }
+
   public HBaseRpcController newController(RegionInfo regionInfo, CellScanner 
cellScanner) {
     return new HBaseRpcControllerImpl(regionInfo, cellScanner);
   }

+  public HBaseRpcController newController(final List<CellScannable> 
cellIterables) {
+    return new HBaseRpcControllerImpl(null, cellIterables);
+  }
+
   public HBaseRpcController newController(RegionInfo regionInfo,
       final List<CellScannable> cellIterables) {
     return new HBaseRpcControllerImpl(regionInfo, cellIterables);
   }

-
   public static RpcControllerFactory instantiate(Configuration configuration) {
     String rpcControllerFactoryClazz =
         configuration.get(CUSTOM_CONTROLLER_CONF_KEY,
{code}

> Add target Region to connection exceptions
> ------------------------------------------
>
>                 Key: HBASE-25735
>                 URL: https://issues.apache.org/jira/browse/HBASE-25735
>             Project: HBase
>          Issue Type: Bug
>          Components: rpc
>            Reporter: Michael Stack
>            Assignee: Michael Stack
>            Priority: Major
>             Fix For: 3.0.0-alpha-1, 2.5.0, 2.4.3
>
>
> We spent a bit of time making it so exceptions included the remote host name. 
> Looks like we can add the target Region name too with a bit of manipulation; 
> will help figuring hot-spotting or problem Region on serverside.  For 
> example, here is what I was seeing recently on client-side when a RS was was 
> timing out requests:
> {code}
> 2021-04-06T02:18:23.533Z, RpcRetryingCaller{globalStartTime=1617675482894, 
> pause=100, maxAttempts=4}, org.apache.hadoop.hbase.ipc.CallTimeoutException: 
> Call to ps0989.example.org/1.1.1.1:16020 failed on local exception: 
> org.apache.hadoop.hbase.ipc.CallTimeoutException: 
> Call[id=88369369,methodName=Get], waitTime=5006, rpcTimeout=5000
>         at 
> org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithRetries(RpcRetryingCallerImpl.java:145)
>         at org.apache.hadoop.hbase.client.HTable.get(HTable.java:383)
>         at org.apache.hadoop.hbase.client.HTable.get(HTable.java:357)
> ...
> Caused by: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call to 
> ps0989.bot.parsec.apple.com/17.58.114.206:16020 failed on local exception: 
> org.apache.hadoop.hbase.ipc.CallTimeoutException: 
> Call[id=88369369,methodName=Get], waitTime=5006, rpcTimeout=5000
>         at org.apache.hadoop.hbase.ipc.IPCUtil.wrapException(IPCUtil.java:209)
>         at 
> org.apache.hadoop.hbase.ipc.AbstractRpcClient.onCallFinished(AbstractRpcClient.java:378)
>         at 
> org.apache.hadoop.hbase.ipc.AbstractRpcClient.access$100(AbstractRpcClient.java:89)
>         at 
> org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:409)
>         at 
> org.apache.hadoop.hbase.ipc.AbstractRpcClient$3.run(AbstractRpcClient.java:405)
>         at org.apache.hadoop.hbase.ipc.Call.setTimeout(Call.java:110)
>         at 
> org.apache.hadoop.hbase.ipc.RpcConnection$1.run(RpcConnection.java:136)
>         at 
> org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:672)
>         at 
> org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:747)
>         at 
> org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:472)
>         ... 1 more
> Caused by: org.apache.hadoop.hbase.ipc.CallTimeoutException: 
> Call[id=88369369,methodName=Get], waitTime=5006, rpcTimeout=5000
>         at 
> org.apache.hadoop.hbase.ipc.RpcConnection$1.run(RpcConnection.java:137)
>         ... 4 more
> {code}
> I wanted the region it was hitting. I wanted to know if it was a server 
> problem or a Region issue. If clients only having issue w/ one Region, then I 
> could focus on it.
> After the PR the exception (from another context) looks like this:
> {code}
> org.apache.hadoop.hbase.ipc.CallTimeoutException: Call to 
> address=127.0.0.1:12345, regionInfo=hbase:meta,,1.1588230740 failed on local 
> exception: org.apache.hadoop.hbase.ipc.CallTimeoutException: error
> ....
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to