Reputation: 181
Hi All i am getting below error message while running phoenix count query on a large table.
0: jdbc:phoenix:hadoopm1:2181> select Count(*) from PJM_DATASET;
+------------+
| COUNT(1) |
+------------+
java.lang.RuntimeException: org.apache.phoenix.exception.PhoenixIOException: org.apache.phoenix.exception.PhoenixIOException: Failed after attempts=36, exceptions:
Fri Jan 09 02:18:10 CST 2015, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=62365: row '' on table 'PJM_DATASET' at region=PJM_DATASET,,1420633295836.4394a3aa2721f87f3e6216d20ebeec44., hostname=hadoopctrl,60020,1420790733247, seqNum=27753
at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2440)
at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2074)
at sqlline.SqlLine.print(SqlLine.java:1735)
at sqlline.SqlLine$Commands.execute(SqlLine.java:3683)
at sqlline.SqlLine$Commands.sql(SqlLine.java:3584)
at sqlline.SqlLine.dispatch(SqlLine.java:821)
at sqlline.SqlLine.begin(SqlLine.java:699)
at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
at sqlline.SqlLine.main(SqlLine.java:424)
0: jdbc:phoenix:hadoopm1:2181>
please help.
Upvotes: 18
Views: 5489
Reputation: 66
Yes, we add the same property while running the command and get resolved this problem hbase.client.scanner.timeout.period=600000
Hbase 1.2
Upvotes: 0
Reputation: 30285
(Three years after the original question)
We ran into very similar exceptions today:
java.net.SocketTimeoutException: callTimeout=60000, callDuration=60101: row '' on table '****' at region=****, hostname=wn1-bghbas.y1ao3ht4safu3e4em4fhuri0eh.ax.internal.cloudapp.net,16020,1543844388080, seqNum=568644
org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=36, exceptions:
Mon Dec 03 14:01:45 UTC 2018, null, java.net.SocketTimeoutException: callTimeout=60000, callDuration=60101: row '' on table '****' at region=****, hostname=****, seqNum=568644
at org.apache.hadoop.hbase.client.RpcRetryingCallerWithReadReplicas.throwEnrichedException(RpcRetryingCallerWithReadReplicas.java:271)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:210)
at org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:60)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:210)
at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:327)
at org.apache.hadoop.hbase.client.ClientScanner.loadCache(ClientScanner.java:413)
at org.apache.hadoop.hbase.client.ClientScanner.next(ClientScanner.java:371)
at org.apache.phoenix.iterate.ScanningResultIterator.next(ScanningResultIterator.java:55)
... 11 more
After tracking down the exception's call trace, we figured out that the right configuration variable is hbase.client.scanner.timeout.period
. Which can be found in class
org.apache.hadoop.hbase.HConstants
under the name HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD
.
Note that if you're passing a value for hbase.client.scanner.timeout.period
as a property to PhoenixDriver
using raw JDBC, the value has to be String
, not int
.
Something like:
Properties prop = new Properties();
prop.put("user", "***");
prop.put("password", "***");
prop.put(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, "800000");
Connection connection = DriverManager.getConnection("jdbc:phoenix:10.0.0.1:2181:/hbase-unsecure", prop);
For the record, we're using Phoenix 4.7 on Hbase 1.1
Upvotes: 2
Reputation: 8522
You need to increase the below hbase configuration property to a higher value in hbase server and client configurations, default value is 1 min(60000 Milli Sec)
<property>
<name>hbase.rpc.timeout</name>
<value>600000</value>
</property>
The most important thing is that the below command should return the correct hbase config directory where hbase-site.xml file contains the above property. If the value of hbase_conf_path is empty or ., Execute the command export HADOOP_CONF_DIR=<correct_hbase_dir>;
for pointing to correct hbase configuration before executing the command sqlline.py
.
phoenix_utils.py | grep hbase_conf_path
Upvotes: 2
Reputation: 1631
callTimeout=60000, callDuration=62365.
Looks like your call duration is longer than 10 minutes, which is the timeout duration. Try setting the "hbase.master.catalog.timeout" in the hbase-default.xml - (or your custom )config file to a higher value
Upvotes: 0