07-01-2016 03:36 AM
I am using datagrip to query Impala with Cloudera's JDBC driver. Due to the timeout configured in our cluster, my connection from datagrip with the driver timeouts very quickly.
When I try to make a query when the connection already expired I get a "socket write error". I have to close and reopen the connection manually, which is very annoying.
Other products like Toad for Hadoop, which comes with its own driver, automagically handles this case.
Is there any plan to improve the JDBC driver to avoid getting the "socket write error"?
07-01-2016 09:21 AM
I don't know if there is a way to automagically fix this. However I checked the manual ("Cloudera JDBC Driver for Impala") and there is a SocketTimeout option you can set.
The number of seconds after which Impala closes the connection with the client application if the connection is idle.
When this property is set to 0, idle connections are not closed.
Can you try and see if this fixes your problem? Cheers, Lars
07-02-2016 02:20 AM
I tried setting the SocketTimeOut (SocketTimeout?) property without luck. The connection seems to expire very quickly and I keep getting the socket write error. The property seems to have no effect at all in the actual timeout time.
I tried the following connection strings
jdbc:impala://cluster_host:21050/database;AuthMech=0;transportMode=binary;SocketTimeOut=0 jdbc:impala://cluster_host:21050/database;AuthMech=0;transportMode=binary;SocketTimeOut=600 jdbc:impala://cluster_host:21050/database;AuthMech=0;transportMode=binary;SocketTimeout=0 jdbc:impala://cluster_host:21050/database;AuthMech=0;transportMode=binary;SocketTimeout=600
I am confused because this document both uses the SocketTimeOut and SocketTimeout name for the timeout property while at the same time mentioning that the property names are case sensivite.
I am using driver 188.8.131.522 64-bit for windows.
08-16-2016 03:43 AM
Apologies for the late reply.
I had a look at the documentation you linked to and they only seem to mention SocketTimeout (lowercase 'o'). I also tried various settings of that variable in the connection string with the beeline JDBC client. However, none of them caused the connection to timeout. Can you try to reproduce your problem with beeline, too?
It might as well be a driver bug, but at this point I'm not sure. Do you currently have an active support subscription with Cloudera? Can you provide a detailed step-by-step guide to reproduce the problem?
08-22-2016 07:36 AM
Unfortunately, we do not have a support subscription.
I don't have the beeline command line installed. Below are the steps to reproduce the error I am getting.
If I run a query after the timeout, first I get a socket write error or a TTransportException.
I read in the release notes that in version 2.5.30 the following point was addressed:
Could it be a regression? I am definitely still getting the socket write error