impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabor Kaszab (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-1144: Fix exception when cancelling query in Impala-shell with CTRL-C
Date Wed, 15 Nov 2017 04:24:03 GMT
Gabor Kaszab has posted comments on this change. ( http://gerrit.cloudera.org:8080/8549 )

Change subject: IMPALA-1144: Fix exception when cancelling query in Impala-shell with CTRL-C
......................................................................


Patch Set 3:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/8549/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/8549/2//COMMIT_MSG@7
PS2, Line 7: IMPALA-1144: Fix exception when cancelling query in Impala-shell with CTRL-C
> Perhaps: Fix exception when cancelling query in impala-shell with Ctrl-C
Done


http://gerrit.cloudera.org:8080/#/c/8549/2//COMMIT_MSG@11
PS2, Line 11: 'Invalid query handle'. This was because one ImpalaClient was fetching
> nit: reformat this as one paragraph?
Done


http://gerrit.cloudera.org:8080/#/c/8549/2//COMMIT_MSG@22
PS2, Line 22: was issued automatically. This happened to historical reasons but is not
> nit: "but is not needed" (insert "is")
Done


http://gerrit.cloudera.org:8080/#/c/8549/2//COMMIT_MSG@25
PS2, Line 25: Tested manually starting with a select from a random table that has few
> Can we write a normal test for this? I don't know if it's true, but "select
I haven't figured out a way to test this automatically.
The one you mention wouldn't cover this case as this issue only appears if the Impala-shell
had started fetching the results when the cancellation comes. With sleep(..) no fetching is
done, hence the issue is not triggered.

I'm open to further suggestions though :)


http://gerrit.cloudera.org:8080/#/c/8549/2/shell/impala_client.py
File shell/impala_client.py:

http://gerrit.cloudera.org:8080/#/c/8549/2/shell/impala_client.py@336
PS2, Line 336:         break
> Python abhors a semi-colon.
Done


http://gerrit.cloudera.org:8080/#/c/8549/2/shell/impala_shell.py
File shell/impala_shell.py:

http://gerrit.cloudera.org:8080/#/c/8549/2/shell/impala_shell.py@485
PS2, Line 485:         new_imp_client = self._new_impala_client()
> does new_imp_client need to be closed? or old_imp_client?
The only purpose of new_imp_client is to cancel the query while the old_imp_shell is busy
fetching the results. Once, that happened we keep the old_imp_client and let the new_imp_client
disappear.

Btw, I checked the open connections of an impalad before and after doing my tests, and the
number doesn't increase so old_imp_client's connections gets closed by destructing it's members.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6cefaf1dae78baae238289816a7cb9d210fb38e2
Gerrit-Change-Number: 8549
Gerrit-PatchSet: 3
Gerrit-Owner: Gabor Kaszab <gaborkaszab@cloudera.com>
Gerrit-Reviewer: Attila Jeges <attilaj@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <csringhofer@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: David Knupp <dknupp@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <gaborkaszab@cloudera.com>
Gerrit-Reviewer: Lars Volker <lv@cloudera.com>
Gerrit-Reviewer: Laszlo Gaal <laszlo.gaal@cloudera.com>
Gerrit-Reviewer: Michael Brown <mikeb@cloudera.com>
Gerrit-Reviewer: Philip Zeyliger <philip@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <boroknagyz@cloudera.com>
Gerrit-Comment-Date: Wed, 15 Nov 2017 04:24:03 +0000
Gerrit-HasComments: Yes

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message