You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Joe McDonnell (JIRA)" <ji...@apache.org> on 2019/07/08 22:05:00 UTC

[jira] [Created] (IMPALA-8747) ImpalaTestSuite::setup_class() can hit TypeError on HS2 connection setup failure

Joe McDonnell created IMPALA-8747:
-------------------------------------

             Summary: ImpalaTestSuite::setup_class() can hit TypeError on HS2 connection setup failure
                 Key: IMPALA-8747
                 URL: https://issues.apache.org/jira/browse/IMPALA-8747
             Project: IMPALA
          Issue Type: Bug
          Components: Infrastructure
    Affects Versions: Impala 3.3.0
            Reporter: Joe McDonnell


If we reach this exception handler in tests/common/impala_test_suite.py:
{code:java}
try:
  cls.hs2_client = cls.create_impala_client(protocol='hs2')
except Exception, e:
  # HS2 connection can fail for benign reasons, e.g. running with unsupported auth.
  LOG.info("HS2 connection setup failed, continuing...: {0}", e) <--------
{code}
then it will fail with:
{noformat}
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.7/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting{noformat}
The problem is that the statement uses "\{0}" replacements that work with .format() while LOG.info is using "%" replacements.

We can fix this by using .format ourselves or changing the message to use "%" codes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)