Anuj Phadke has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11540 )

Change subject: IMPALA-7555: Set socket timeout in impala-shell
......................................................................


Patch Set 7:

I added some debugging logging to narrow down the failure. The open() in 
connect seems to finish very quickly in milliseconds. Majority of the time 
seems to contributed by PingImpalaService()

E   AssertionError: Cmd --query="create table
test_kudu_dml_reporting_256dcf63.dml_test (id int primary key, age int null) 
partition by hash(id) partitions 2 stored as kudu" was expected to succeed: 
Starting Impala Shell without Kerberos authentication
E   time taken to  connect in open(): 0.000133037567139
E   time with socket error: 5.005163908

I removed the handling of exception in the code and the socket timeout 
exception was thrown in the PingImpala() function -
Stacktrace

/data/jenkins/workspace/impala-private-parameterized/repos/Impala/tests/shell/test_shell_commandline.py:137:
 in test_default_db
    result = run_impala_shell_cmd(args)
shell/util.py:97: in run_impala_shell_cmd
    result.stderr)
E   AssertionError: Cmd -d parquet was expected to succeed: Starting Impala 
Shell without Kerberos authentication
E   Traceback (most recent call last):
E     File 
"/data/jenkins/workspace/impala-private-parameterized/repos/Impala/shell/impala_shell.py",
 line 1720, in <module>
E       shell = ImpalaShell(options, query_options)
E     File 
"/data/jenkins/workspace/impala-private-parameterized/repos/Impala/shell/impala_shell.py",
 line 233, in __init__
E       self.do_connect(options.impalad)
E     File 
"/data/jenkins/workspace/impala-private-parameterized/repos/Impala/shell/impala_shell.py",
 line 799, in do_connect
E       self._connect()
E     File 
"/data/jenkins/workspace/impala-private-parameterized/repos/Impala/shell/impala_shell.py",
 line 844, in _connect
E       result = self.imp_client.connect()
E     File 
"/data0/jenkins/workspace/impala-private-parameterized/repos/Impala/shell/impala_client.py",
 line 260, in connect
E       result = self.ping_impala_service()
E     File 
"/data0/jenkins/workspace/impala-private-parameterized/repos/Impala/shell/impala_client.py",
 line 267, in ping_impala_service
E       return self.imp_service.PingImpalaService()
E     File 
"/data/jenkins/workspace/impala-private-parameterized/repos/Impala/shell/gen-py/ImpalaService/ImpalaService.py",
 line 229, in PingImpalaService
E       return self.recv_PingImpalaService()
E     File 
"/data/jenkins/workspace/impala-private-parameterized/repos/Impala/shell/gen-py/ImpalaService/ImpalaService.py",
 line 240, in recv_PingImpalaService
E       (fname, mtype, rseqid) = iprot.readMessageBegin()
E     File 
"/data/jenkins/workspace/impala-private-parameterized/Impala-Toolchain/thrift-0.9.3-p4/python/lib64/python2.7/site-packages/thrift/protocol/TBinaryProtocol.py",
 line 126, in readMessageBegin
E       sz = self.readI32()
E     File 
"/data/jenkins/workspace/impala-private-parameterized/Impala-Toolchain/thrift-0.9.3-p4/python/lib64/python2.7/site-packages/thrift/protocol/TBinaryProtocol.py",
 line 206, in readI32
E       buff = self.trans.readAll(4)
E     File 
"/data/jenkins/workspace/impala-private-parameterized/Impala-Toolchain/thrift-0.9.3-p4/python/lib64/python2.7/site-packages/thrift/transport/TTransport.py",
 line 58, in readAll
E       chunk = self.read(sz - have)
E     File 
"/data/jenkins/workspace/impala-private-parameterized/Impala-Toolchain/thrift-0.9.3-p4/python/lib64/python2.7/site-packages/thrift/transport/TTransport.py",
 line 159, in read
E       self.__rbuf = StringIO(self.__trans.read(max(sz, self.__rbuf_size)))
E     File 
"/data/jenkins/workspace/impala-private-parameterized/Impala-Toolchain/thrift-0.9.3-p4/python/lib64/python2.7/site-packages/thrift/transport/TSocket.py",
 line 105, in read
E       buff = self.handle.recv(sz)
E   socket.timeout: timed out

I think the fix would be to move the timeout before the PingImpalaService.
Might have to get rid of the test I added as it will connect and the timeout 
happens in the PingRPC call.
I will verify it once on a kerberized setup.


--
To view, visit http://gerrit.cloudera.org:8080/11540
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I130fc47f7a83f591918d6842634b4e5787d00813
Gerrit-Change-Number: 11540
Gerrit-PatchSet: 7
Gerrit-Owner: Anuj Phadke <apha...@cloudera.com>
Gerrit-Reviewer: Anuj Phadke <apha...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Lars Volker <l...@cloudera.com>
Gerrit-Reviewer: Michael Ho <k...@cloudera.com>
Gerrit-Reviewer: Thomas Marshall <thomasmarsh...@cmu.edu>
Gerrit-Comment-Date: Mon, 15 Oct 2018 07:35:05 +0000
Gerrit-HasComments: No

Reply via email to