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 CTRL+C on running query in Impala-shell
Date Wed, 15 Nov 2017 00:23:38 GMT
Hello Lars Volker, Laszlo Gaal, Michael Brown, Zoltan Borok-Nagy, Philip Zeyliger, David Knupp,
Attila Jeges, Tim Armstrong, Csaba Ringhofer, Dan Hecht, 

I'd like you to reexamine a change. Please visit

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

to look at the new patch set (#2).

Change subject: IMPALA-1144: Fix exception when CTRL+C on running query in Impala-shell
......................................................................

IMPALA-1144: Fix exception when CTRL+C on running query in Impala-shell

When query was cancelled via CTRL+C while Impala-shell was fetching the
query results then an exception was thrown from Impala backend saying
'Invalid query handle'.
This was because one ImpalaClient was fetching the result in a loop while
another ImpalaClient cancelled the query on the backend without letting the
fetching client know that the query was cancelled. As a result when the
resources needed for fetching the results were cleared from the backend
the related ClientRequestState was not found anymore.

As a solution query cancellation is indicated to ImpalaClient via a bool
member, and fetching stops if it indicates cancellation.

Another issue was that every time a query was cancelled a 'use db' command
was issued automatically. This happened to historical reasons but not needed
anymore (see Jira for more details).

Tested manually starting with a select from a random table that has few
million rows. When the result rows started to show I hit CTRL+C to cancel
the query. Verified that the query stops, no error message, and no use statement
is executed.
After this I executed another random select query to see that fetching still
works and the cancellation indicator was reset successfully.

Change-Id: I6cefaf1dae78baae238289816a7cb9d210fb38e2
---
M shell/impala_client.py
M shell/impala_shell.py
2 files changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/49/8549/2
-- 
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: newpatchset
Gerrit-Change-Id: I6cefaf1dae78baae238289816a7cb9d210fb38e2
Gerrit-Change-Number: 8549
Gerrit-PatchSet: 2
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: 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>

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