[
https://issues.apache.org/jira/browse/IMPALA-11316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17583882#comment-17583882
]
ASF subversion and git services commented on IMPALA-11316:
----------------------------------------------------------
Commit f6ee249ac96fb09293cd3f9f1c0adeafb923cd5d in impala's branch
refs/heads/branch-4.1.1 from Joe McDonnell
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=f6ee249ac ]
IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
This fixes a few impala-shell Python 3 issues:
1. In ImpalaShell's do_history(), the decode() call needs to be
avoided in Python 3, because in Python 3 the cmd is already
a string and doesn't need further decoding. (IMPALA-11315)
2. TestImpalaShell.test_http_socket_timeout() gets a different
error message in Python 3. It throws the "BlockingIOError"
rather than "socker.error". (IMPALA-11316)
3. ImpalaHttpClient.py's code to retrieve the body when
handling an HTTP error needs to have a decode() call
for the body. Otherwise, the body remains bytes and
causes TestImpalaShellInteractive.test_http_interactions_extra()
to fail. (IMPALA-11317)
Testing:
- Ran shell tests in the standard way
- Ran shell tests with the impala-shell executable coming from
a Python 3 virtualenv using the PyPi package
Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Reviewed-on: http://gerrit.cloudera.org:8080/18556
Reviewed-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Wenzhe Zhou <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-on: http://gerrit.cloudera.org:8080/18885
Reviewed-by: Quanlong Huang <[email protected]>
> TestImpalaShell.test_http_socket_timeout fails on Python3 with different
> message
> --------------------------------------------------------------------------------
>
> Key: IMPALA-11316
> URL: https://issues.apache.org/jira/browse/IMPALA-11316
> Project: IMPALA
> Issue Type: Bug
> Components: Clients
> Affects Versions: Impala 4.1.0
> Reporter: Joe McDonnell
> Assignee: Joe McDonnell
> Priority: Major
> Fix For: Impala 4.2.0
>
>
> TestImpalaShell.test_http_socket_timeout fails when running with a Python 3
> impala-shell due to this difference in the error message:
> {noformat}
> > assert result.stderr.splitlines()[0] == expected_err
> E assert 'Caught excep...ning tries: 3' == 'Caught except...ning tries: 3'
> E Skipping 59 identical leading characters in diff, use -v to show
> E - e=<class 'BlockingIOError'> in OpenSession. Num remaining tries: 3
> E ? ^^ ^^^^^^
> E + e=<class 'socket.error'> in OpenSession. Num remaining tries: 3
> E ? ^ ^^^^
> {noformat}
> It seems like this is just different on Python 3, and we could tolerate
> either error message.
> https://github.com/apache/impala/blob/master/tests/shell/test_shell_commandline.py#L1206-L1208
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]