You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Henry Robinson (Code Review)" <ge...@cloudera.org> on 2017/06/20 00:34:04 UTC

[Impala-ASF-CR] IMPALA-1474: Add a metric for running queries

Henry Robinson has uploaded a new change for review.

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

Change subject: IMPALA-1474: Add a metric for running queries
......................................................................

IMPALA-1474: Add a metric for running queries

impala-server.num-queries-in-flight is a gauge that counts all running
queries (including DDL and DML statements). Queries waiting to be
unregistered are included in the count.

Testing: checked completed, in-flight and cancelled queries. Added some
coverage to the HS2 test suite, and the query lifecycle tests.

Change-Id: I41bc88d0e91427ca2fd70136dc6e06fa7a2663da
---
M be/src/runtime/query-exec-mgr.cc
M be/src/runtime/query-state.cc
M be/src/service/client-request-state.cc
M be/src/service/impala-hs2-server.cc
M be/src/service/impala-server.cc
M be/src/service/impalad-main.cc
M be/src/service/session-expiry-test.cc
M be/src/util/impalad-metrics.cc
M be/src/util/impalad-metrics.h
M common/thrift/metrics.json
M tests/hs2/hs2_test_suite.py
M tests/hs2/test_fetch.py
M tests/query_test/test_lifecycle.py
13 files changed, 119 insertions(+), 77 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41bc88d0e91427ca2fd70136dc6e06fa7a2663da
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Henry Robinson <he...@cloudera.com>

[Impala-ASF-CR] IMPALA-1474: Add a metric for running queries

Posted by "Bharath Vissapragada (Code Review)" <ge...@cloudera.org>.
Bharath Vissapragada has posted comments on this change.

Change subject: IMPALA-1474: Add a metric for running queries
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/7228/1//COMMIT_MSG
Commit Message:

PS1, Line 10: Queries waiting to be
            : unregistered are included in the count.
Should this be exposed as a separate metric as well? Reason being we have seen a couple of bugs in the part due to this part contending on client_exec_state_map_lock_ and also the session_lock. May be it helps supportability.


http://gerrit.cloudera.org:8080/#/c/7228/1/be/src/service/impala-server.cc
File be/src/service/impala-server.cc:

Line 791:   ImpaladMetrics::NUM_QUERIES_IN_FLIGHT->Increment(1L);
Looks like there is some discrepancy on the term IN_FLIGHT in the code. For ex: SetQueryInFlight() is only called *after* the Execute() returns and fragments are started async whereas in the context of this patch any query still blocked inside Execute() is also counted under NUM_QUERIES_IN_FLIGHT (Ex: those blocked in metadata loading). So might be good to clear that up.


Line 965:   ImpaladMetrics::NUM_QUERIES_IN_FLIGHT->Increment(-1L);
Should this be moved to after L986 when the session state is cleaned up?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I41bc88d0e91427ca2fd70136dc6e06fa7a2663da
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-1474: Add a metric for running queries

Posted by "Matthew Jacobs (Code Review)" <ge...@cloudera.org>.
Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-1474: Add a metric for running queries
......................................................................


Patch Set 1:

(4 comments)

Just a few nits in addition to Bharath's comments.

http://gerrit.cloudera.org:8080/#/c/7228/1/be/src/util/impalad-metrics.cc
File be/src/util/impalad-metrics.cc:

PS1, Line 110: IntGauge* ImpaladMetrics::NUM_FRAGMENTS_IN_FLIGHT = NULL;
move below


http://gerrit.cloudera.org:8080/#/c/7228/1/be/src/util/impalad-metrics.h
File be/src/util/impalad-metrics.h:

PS1, Line 45:   /// Number of queries currently running on this server
            :   /// queries
1L


PS1, Line 168:   static IntGauge* NUM_FRAGMENTS_IN_FLIGHT;
move below


http://gerrit.cloudera.org:8080/#/c/7228/1/tests/hs2/test_fetch.py
File tests/hs2/test_fetch.py:

PS1, Line 30: @pytest.mark.execute_serially
do you have a ballpark idea how long this increases total test time?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I41bc88d0e91427ca2fd70136dc6e06fa7a2663da
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@cloudera.com>
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-1474: Add a metric for running queries

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has abandoned this change. ( http://gerrit.cloudera.org:8080/7228 )

Change subject: IMPALA-1474: Add a metric for running queries
......................................................................


Abandoned

Seems like this is probably redundant now. Can always reopen.
-- 
To view, visit http://gerrit.cloudera.org:8080/7228
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I41bc88d0e91427ca2fd70136dc6e06fa7a2663da
Gerrit-Change-Number: 7228
Gerrit-PatchSet: 1
Gerrit-Owner: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dh...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@apache.org>

[Impala-ASF-CR] IMPALA-1474: Add a metric for running queries

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

Change subject: IMPALA-1474: Add a metric for running queries
......................................................................


Patch Set 1:

I think it probably does. There's some miscellaneous cleanup in this patch but I think they implement the same functionality, more or less.


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I41bc88d0e91427ca2fd70136dc6e06fa7a2663da
Gerrit-Change-Number: 7228
Gerrit-PatchSet: 1
Gerrit-Owner: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dh...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 16 Nov 2017 21:33:30 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-1474: Add a metric for running queries

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

Change subject: IMPALA-1474: Add a metric for running queries
......................................................................


Patch Set 1:

Tim, does your recent change to add registered queries metric make this change obsolete?


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I41bc88d0e91427ca2fd70136dc6e06fa7a2663da
Gerrit-Change-Number: 7228
Gerrit-PatchSet: 1
Gerrit-Owner: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bh...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dh...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 16 Nov 2017 01:19:28 +0000
Gerrit-HasComments: No