0

I have 5 millions records in hbase and tried to find total count of records then I am getting following error using phoenix command line.

Error: org.apache.phoenix.exception.PhoenixIOException: Failed to get result within timeout, timeout=60000ms (state=08000,code=101)
org.apache.phoenix.exception.PhoenixIOException: org.apache.phoenix.exception.PhoenixIOException: Failed to get result within timeout, timeout=60000ms
    at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:111)
    at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:771)
    at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:714)
    at org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
    at org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
    at org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
    at org.apache.phoenix.iterate.BaseGroupedAggregatingResultIterator.next(BaseGroupedAggregatingResultIterator.java:64)
    at org.apache.phoenix.iterate.UngroupedAggregatingResultIterator.next(UngroupedAggregatingResultIterator.java:39)
    at org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
    at sqlline.BufferedRows.<init>(BufferedRows.java:37)
    at sqlline.SqlLine.print(SqlLine.java:1650)
    at sqlline.Commands.execute(Commands.java:833)
    at sqlline.Commands.sql(Commands.java:732)
    at sqlline.SqlLine.dispatch(SqlLine.java:808)
    at sqlline.SqlLine.begin(SqlLine.java:681)
    at sqlline.SqlLine.start(SqlLine.java:398)
    at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: java.util.concurrent.ExecutionException: org.apache.phoenix.exception.PhoenixIOException: Failed to get result within timeout, timeout=60000ms
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:206)
    at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:766)
    ... 15 more
Caused by: org.apache.phoenix.exception.PhoenixIOException: Failed to get result within timeout, timeout=60000ms
    at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:111)
    at org.apache.phoenix.iterate.TableResultIterator.initScanner(TableResultIterator.java:203)
    at org.apache.phoenix.iterate.ParallelIterators$1.call(ParallelIterators.java:108)
    at org.apache.phoenix.iterate.ParallelIterators$1.call(ParallelIterators.java:103)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.apache.phoenix.job.JobManager$InstrumentedJobFutureTask.run(JobManager.java:183)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Failed to get result within timeout, timeout=60000ms
    at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:206)
    at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:60)
    at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:200)
    at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:327)
    at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:302)
    at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:167)
    at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:162)
    at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:794)
    at org.apache.phoenix.iterate.TableResultIterator.initScanner(TableResultIterator.java:199)

Please look into this as I am not able to solve this problem. As I have changed the configration of Hbase as per this side refrence but it is still not working.

https://community.hortonworks.com/content/supportkb/49037/phoenix-sqlline-query-on-larger-data-set-fails-wit.html

I have changed in following path /etc/hbase/conf/hbase-site.xml . Do I need to copy this at any where in phoenix configration as I am not understanding this one. Could you help me for this.

Let me know if you need more details.

Community
  • 1
  • 1
Jain Hemant
  • 150
  • 2
  • 19
  • Do you have any joins in the query? I had this happen and used the query hints to optimize. The other bit is have you done any trials with the sqlline-thin.py vs sqline.py they emulate using the thick client and the query server – Paul Bastide Sep 11 '17 at 10:23

2 Answers2

2

Its late to answer but i had the same issue which i solved by setting maxSessionTimeout to a larger value in zoo.cfg(can be done through ambari in hdp). The default is 60000ms or one minute after which zookeeper closes the session that it opened for the query.

0

you can increase these params to solved:

  1. phoenix.query.timeoutMs
  2. hbase.regionserver.lease.period
  3. hbase.rpc.timeout
  4. hbase.client.scanner.timeout.period