You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Quanlong Huang (Code Review)" <ge...@cloudera.org> on 2022/08/23 00:34:41 UTC

[Impala-ASF-CR](branch-4.1.1) IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes

Hello Wenzhe Zhou, Impala Public Jenkins,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/18885

to review the following change.


Change subject: IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
......................................................................

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 <im...@cloudera.com>
Reviewed-by: Wenzhe Zhou <wz...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M shell/ImpalaHttpClient.py
M shell/impala_shell.py
M tests/shell/test_shell_commandline.py
3 files changed, 13 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/85/18885/1
-- 
To view, visit http://gerrit.cloudera.org:8080/18885
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: branch-4.1.1
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Gerrit-Change-Number: 18885
Gerrit-PatchSet: 1
Gerrit-Owner: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>

[Impala-ASF-CR](branch-4.1.1) IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/18885 )

Change subject: IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
......................................................................


Patch Set 2:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/8490/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/18885
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: branch-4.1.1
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Gerrit-Change-Number: 18885
Gerrit-PatchSet: 2
Gerrit-Owner: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 23 Aug 2022 13:51:46 +0000
Gerrit-HasComments: No

[Impala-ASF-CR](branch-4.1.1) IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/18885 )

Change subject: IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
......................................................................

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 <im...@cloudera.com>
Reviewed-by: Wenzhe Zhou <wz...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-on: http://gerrit.cloudera.org:8080/18885
Reviewed-by: Quanlong Huang <hu...@gmail.com>
---
M shell/ImpalaHttpClient.py
M shell/impala_shell.py
M tests/shell/test_shell_commandline.py
3 files changed, 13 insertions(+), 5 deletions(-)

Approvals:
  Impala Public Jenkins: Verified
  Quanlong Huang: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/18885
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: branch-4.1.1
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Gerrit-Change-Number: 18885
Gerrit-PatchSet: 3
Gerrit-Owner: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>

[Impala-ASF-CR](branch-4.1.1) IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/18885 )

Change subject: IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
......................................................................


Patch Set 1:

This is a clean cherrypick to branch-4.1.1. Running GVO job.


-- 
To view, visit http://gerrit.cloudera.org:8080/18885
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: branch-4.1.1
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Gerrit-Change-Number: 18885
Gerrit-PatchSet: 1
Gerrit-Owner: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 23 Aug 2022 00:35:51 +0000
Gerrit-HasComments: No

[Impala-ASF-CR](branch-4.1.1) IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/18885 )

Change subject: IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
......................................................................


Patch Set 2: Code-Review+2

Carry Wenzhe's +2


-- 
To view, visit http://gerrit.cloudera.org:8080/18885
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: branch-4.1.1
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Gerrit-Change-Number: 18885
Gerrit-PatchSet: 2
Gerrit-Owner: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 23 Aug 2022 22:23:17 +0000
Gerrit-HasComments: No

[Impala-ASF-CR](branch-4.1.1) IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes

Posted by "Quanlong Huang (Code Review)" <ge...@cloudera.org>.
Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/18885 )

Change subject: IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
......................................................................


Patch Set 1:

> Patch Set 1: Verified-1
> 
> Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/8482/

The failures are 
https://jenkins.impala.io/job/ubuntu-16.04-from-scratch/17351
https://jenkins.impala.io/job/ubuntu-16.04-dockerised-tests/6196
They are due to IMPALA-11391 and IMPALA-11187.


-- 
To view, visit http://gerrit.cloudera.org:8080/18885
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: branch-4.1.1
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Gerrit-Change-Number: 18885
Gerrit-PatchSet: 1
Gerrit-Owner: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 23 Aug 2022 05:31:40 +0000
Gerrit-HasComments: No

[Impala-ASF-CR](branch-4.1.1) IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/18885 )

Change subject: IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
......................................................................


Patch Set 1: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/8482/


-- 
To view, visit http://gerrit.cloudera.org:8080/18885
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: branch-4.1.1
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Gerrit-Change-Number: 18885
Gerrit-PatchSet: 1
Gerrit-Owner: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 23 Aug 2022 05:07:35 +0000
Gerrit-HasComments: No

[Impala-ASF-CR](branch-4.1.1) IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/18885 )

Change subject: IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
......................................................................


Patch Set 1:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/8482/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/18885
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: branch-4.1.1
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Gerrit-Change-Number: 18885
Gerrit-PatchSet: 1
Gerrit-Owner: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 23 Aug 2022 00:36:05 +0000
Gerrit-HasComments: No

[Impala-ASF-CR](branch-4.1.1) IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes

Posted by "Wenzhe Zhou (Code Review)" <ge...@cloudera.org>.
Wenzhe Zhou has posted comments on this change. ( http://gerrit.cloudera.org:8080/18885 )

Change subject: IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
......................................................................


Patch Set 1: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/18885
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: branch-4.1.1
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Gerrit-Change-Number: 18885
Gerrit-PatchSet: 1
Gerrit-Owner: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 23 Aug 2022 01:07:07 +0000
Gerrit-HasComments: No

[Impala-ASF-CR](branch-4.1.1) IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/18885 )

Change subject: IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
......................................................................


Patch Set 2: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/18885
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: branch-4.1.1
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Gerrit-Change-Number: 18885
Gerrit-PatchSet: 2
Gerrit-Owner: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Tue, 23 Aug 2022 18:29:28 +0000
Gerrit-HasComments: No