Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-9171

Update to impyla 0.16.1 is not Python 2.6 compatible

    XMLWordPrintableJSON

Details

    Description

      Centos 6 builds (which use Python 2.6) tripped up when starting Impala:

      12:05:52 Traceback (most recent call last):
      12:05:52   File "/data/jenkins/workspace/impala-asf-master-exhaustive-centos6-shard1/repos/Impala/bin/start-impala-cluster.py", line 38, in <module>
      12:05:52     from tests.common.impala_cluster import (ImpalaCluster, DEFAULT_BEESWAX_PORT,
      12:05:52   File "/data/jenkins/workspace/impala-asf-master-exhaustive-centos6-shard1/repos/Impala/tests/common/impala_cluster.py", line 35, in <module>
      12:05:52     from tests.common.impala_service import (
      12:05:52   File "/data/jenkins/workspace/impala-asf-master-exhaustive-centos6-shard1/repos/Impala/tests/common/impala_service.py", line 29, in <module>
      12:05:52     from tests.common.impala_connection import create_connection, create_ldap_connection
      12:05:52   File "/data/jenkins/workspace/impala-asf-master-exhaustive-centos6-shard1/repos/Impala/tests/common/impala_connection.py", line 26, in <module>
      12:05:52     import impala.dbapi as impyla
      12:05:52   File "/data/jenkins/workspace/impala-asf-master-exhaustive-centos6-shard1/repos/Impala/infra/python/env/lib/python2.6/site-packages/impala/dbapi.py", line 28, in <module>
      12:05:52     import impala.hiveserver2 as hs2
      12:05:52   File "/data/jenkins/workspace/impala-asf-master-exhaustive-centos6-shard1/repos/Impala/infra/python/env/lib/python2.6/site-packages/impala/hiveserver2.py", line 30, in <module>
      12:05:52     from impala.interface import Connection, Cursor, _bind_parameters
      12:05:52   File "/data/jenkins/workspace/impala-asf-master-exhaustive-centos6-shard1/repos/Impala/infra/python/env/lib/python2.6/site-packages/impala/interface.py", line 229
      12:05:52     if paramstyle in {'named', 'pyformat'}:
      12:05:52                              ^
      12:05:52 SyntaxError: invalid syntax

      That seems to be this line in impyla:

      https://github.com/cloudera/impyla/blob/master/impala/interface.py#L229

      It is the usage of a set literal that causes problems. The set literal could be replaced with a list.

      Python 2.7.12 (default, Oct  8 2019, 14:14:10) 
      [GCC 5.4.0 20160609] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> 'a' in {'a', 'b'}
      True
      >>> 'c' in {'a', 'b'}
      False
      >>> 'a' in ('a', 'b')
      True
      >>> 'c' in ('a', 'b')
      False
      

      Attachments

        Issue Links

          Activity

            People

              tarmstrong Tim Armstrong
              joemcdonnell Joe McDonnell
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: