title: Phoenix sql query not working with large dataset
body: <p>I have 5 millions records in <code>hbase</code> and tried to find total count of records then I am getting following error using phoenix command line.</p>
  
  <pre><code>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.&lt;init&gt;(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.&lt;init&gt;(ClientScanner.java:162)
      at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:794)
      at org.apache.phoenix.iterate.TableResultIterator.initScanner(TableResultIterator.java:199)
  </code></pre>
  
  <p>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.</p>
  
  <p><a href="https://community.hortonworks.com/content/supportkb/49037/phoenix-sqlline-query-on-larger-data-set-fails-wit.html" rel="nofollow noreferrer">https://community.hortonworks.com/content/supportkb/49037/phoenix-sqlline-query-on-larger-data-set-fails-wit.html</a></p>
  
  <p>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. </p>
  
  <p>Let me know if you need more details.</p>