Phoenix timeout=60000ms 问题的解决

  • 场景:在phoenix shell 中创建phoenix表关联hbase已存在的大表,以及通过Phoenix api进行处理数据时分别出现如下异常:
Error: org.apache.phoenix.exception.PhoenixIOException: Failed to get result within timeout, timeout=60000ms (state=08000,code=101)

org.apache.phoenix.exception.PhoenixIOException: 125071ms passed since the last invocation, timeout is currently set to 60000
  • 遇到的坑:
    通过Ambar界面修改如下两个参数:
Phoenix Query Timeout=1800000
HBase RPC Timeout=1800000

重启hbase发现设置的这个时间值并没有生效,依然是出现上述异常。


  • 解决方式:
    配置hbase-site.xml 如下属性,没有对应的属性则添加到hbase-site.xml中,笔者用的Ambari,所以如下属性就直接通过界面来修改了
phoenix.query.timeoutMs=1800000 
hbase.regionserver.lease.period = 1200000 
hbase.rpc.timeout = 1200000 
hbase.client.scanner.caching = 1000 (这个属性在Ambari中为Number of Fetched Rows when Scanning from Disk=1000)
hbase.client.scanner.timeout.period = 1200000 

重启hbase

验证:执行同样的sql结果如下:

CREATE TABLE EX_XXX_XX_XXXLDJ(
. . . . . . . . . . . . . . . . . . . > "S_ID" varchar primary key,
. . . . . . . . . . . . . . . . . . . >
. . . . . . . . . . . . . . . . . . . > "CF"."SE" varchar);
10,622,787 rows affected (807.729 seconds)

如上运行了800秒一切正常。在Eclipse中通过Phoenix api 执行半个小时也依然没问题。

猜你喜欢

转载自blog.csdn.net/u013850277/article/details/80935545