使用 impyla(python 驱动程序)为 Impala 设置请求超时

Set request timeout for Impala using impyla (python driver)

是否可以将请求超时设置为Impala? 使用 Python 和 impyla 驱动程序

根据代码 https://github.com/cloudera/impyla 看来只有连接方法支持超时。

% grep timeout * -R
impala/dbapi.py:def connect(host='localhost', port=21050, database=None, timeout=None,
impala/dbapi.py:    timeout : int, optional
impala/dbapi.py:        Connection timeout in seconds. Default is no timeout.
impala/dbapi.py:                          timeout=timeout, use_ssl=use_ssl,
impala/hiveserver2.py:def connect(host, port, timeout=None, use_ssl=False, ca_cert=None,
impala/hiveserver2.py:    if timeout is not None:
impala/hiveserver2.py:        timeout = timeout * 1000.  # TSocket expects millis
impala/hiveserver2.py:        sock.setTimeout(timeout)
impala/hiveserver2.py:            # thriftpy has a release where set_timeout is missing
impala/hiveserver2.py:            sock.set_timeout(timeout)
impala/hiveserver2.py:            sock.socket_timeout = timeout
impala/hiveserver2.py:            sock.connect_timeout = timeout
impala/tests/test_dbapi_connect.py:        self.connection = connect(ENV.host, ENV.port, timeout=5)
impala/tests/test_dbapi_connect.py:                                  timeout=5,
impala/tests/test_dbapi_connect.py:                                  timeout=5,
impala/tests/test_dbapi_connect.py:        self.connection = connect(ENV.host, ENV.hive_port, timeout=5)
impala/thrift/ImpalaService.thrift:  // --idle_query_timeout if that flag > 0.