XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Impala 4.3.0
    • None
    • Clients
    • None
    • ghx-label-3

    Description

      Various tests import code from the shell codebase:

      $ git grep 'from shell\..*import'
      custom_cluster/test_hs2_fault_injection.py:from shell.ImpalaHttpClient import ImpalaHttpClient
      custom_cluster/test_hs2_fault_injection.py:from shell.impala_client import ImpalaHS2Client
      custom_cluster/test_hs2_fault_injection.py:from shell.shell_exceptions import HttpError
      custom_cluster/test_shell_interactive_reconnect.py:from shell.impala_shell import ImpalaShell as ImpalaShellClass
      shell/test_cookie_util.py:from shell.cookie_util import (cookie_matches_path, get_cookie_expiry,
      shell/test_shell_client.py:from shell.impala_client import ImpalaBeeswaxClient, ImpalaHS2Client
      shell/test_shell_commandline.py:from shell.impala_shell import ImpalaShell as ImpalaShellClass
      shell/test_shell_interactive.py:from shell.impala_shell import ImpalaShell as ImpalaShellClass

      The shell codebase currently uses relative imports, so when using Python 3, the imports within the shell codebase will not work. For example, impala_shell.py includes compatibility.py via a relative import:

      from compatibility import _xrange as xrange

      In order for this to work under Python 3, these relative imports will need to be absolute. However, some ways of invoking the shell will fail with absolute imports (e.g. bin/impala-shell.sh). Other form factors are fine with absolute imports (e.g. pip installs into a venv).

      Attachments

        Activity

          People

            Unassigned Unassigned
            joemcdonnell Joe McDonnell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: