hbase_使用中遇到的问题(CallTimeoutException)

时间:2021-11-01 22:09:42

1. CallTimeoutException

 

Caused by: java.net.SocketTimeoutException: callTimeout=60000, callDuration=139094: row '' on table 'hbase:meta' at region=hbase:meta,,1.1588230740, hostname=hykj-slave-4,60040,1498803691321, seqNum=0

at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:159)

at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.call(ScannerCallableWithReplicas.java:314)

at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas$RetryingRPC.call(ScannerCallableWithReplicas.java:295)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

... 1 more

Caused by: java.io.IOException: Call to hykj-slave-4/192.168.110.4:60040 failed on local exception: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call id=3384, waitTime=60165, operationTimeout=60000 expired.

at org.apache.hadoop.hbase.ipc.RpcClientImpl.wrapException(RpcClientImpl.java:1276)

at org.apache.hadoop.hbase.ipc.RpcClientImpl.call(RpcClientImpl.java:1244)

at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callBlockingMethod(AbstractRpcClient.java:216)

at org.apache.hadoop.hbase.ipc.AbstractRpcClient$BlockingRpcChannelImplementation.callBlockingMethod(AbstractRpcClient.java:300)

at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$BlockingStub.scan(ClientProtos.java:31979)

at org.apache.hadoop.hbase.client.ScannerCallable.openScanner(ScannerCallable.java:345)

at org.apache.hadoop.hbase.client.ScannerCallable.call(ScannerCallable.java:189)

at org.apache.hadoop.hbase.client.ScannerCallable.call(ScannerCallable.java:62)

at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:126)

... 6 more

Caused by: org.apache.hadoop.hbase.ipc.CallTimeoutException: Call id=3384, waitTime=60165, operationTimeout=60000 expired.

at org.apache.hadoop.hbase.ipc.Call.checkAndSetTimeout(Call.java:70)

at org.apache.hadoop.hbase.ipc.RpcClientImpl.call(RpcClientImpl.java:1218)

... 13 more

 

内网环境中三台hbase机器性能不好,机器反应慢,在使用过程中因为超时导致了一些操作失败。

因此需调整超时时间,默认为60秒,在配置文件 hbase-site.xml中:

<property>

   <name>hbase.rpc.timeout</name>

  <value>600000</value>

</property>

 

<property>

   <name>hbase.client.operation.timeout</name>

  <value>600000</value>

</property>

 

<property>

   <name>hbase.client.scanner.timeout.period</name>

  <value>600000</value>

</property>

 

<property>

   <name>hbase.regionserver.lease.period</name>

  <value>600000</value>

</property>

 

<property>

 <name>phoenix.query.timeoutMs</name>

 <value>600000</value>

</property>

 

<property>

 <name>phoenix.query.keepAliveMs</name>

 <value>600000</value>

</property>

 

<property>

   <name>hbase.client.ipc.pool.type</name>

   <value>RoundRobinPool</value>

</property>

<property>

   <name>hbase.client.ipc.pool.size</name>

   <value>10</value>

</property>