IMPALA-6430: Log relevant debug pages if wait_for_metric_value times out

Log the memz, metrics and query page if the method wait_for_metric_value
times out. This would help us understand the state of the defaulting
impalad when the time out happens.

Change-Id: I069dad48ede709c4114f4d7175861f98321be6cf
Reviewed-on: http://gerrit.cloudera.org:8080/9098
Reviewed-by: Bikramjeet Vig <bikramjeet....@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/40fd5418
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/40fd5418
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/40fd5418

Branch: refs/heads/2.x
Commit: 40fd541801712c3c6e697194dfcbc850eb38f5e8
Parents: 489e5dc
Author: Bikramjeet Vig <bikramjeet....@cloudera.com>
Authored: Wed Jan 17 14:23:27 2018 -0800
Committer: Impala Public Jenkins <impala-public-jenk...@gerrit.cloudera.org>
Committed: Fri Feb 2 01:10:15 2018 +0000

----------------------------------------------------------------------
 tests/common/impala_service.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/40fd5418/tests/common/impala_service.py
----------------------------------------------------------------------
diff --git a/tests/common/impala_service.py b/tests/common/impala_service.py
index dfd4a6e..3ad0e84 100644
--- a/tests/common/impala_service.py
+++ b/tests/common/impala_service.py
@@ -115,8 +115,14 @@ class BaseImpalaService(object):
             (metric_name, expected_value, value))
       LOG.info("Sleeping %ds before next retry." % interval)
       sleep(interval)
-    assert 0, 'Metric value %s did not reach value %s in %ss' %\
-        (metric_name, expected_value, timeout)
+    assert 0, 'Metric value %s did not reach value %s in %ss\nDumping impalad 
debug ' \
+              'pages:\nmemz: %s\nmetrics: %s\nqueries: %s\nthreadz: %s\nrpcz: 
%s' % \
+              (metric_name, expected_value, timeout,
+               json.dumps(self.read_debug_webpage('memz?json')),
+               json.dumps(self.read_debug_webpage('metrics?json')),
+               json.dumps(self.read_debug_webpage('queries?json')),
+               json.dumps(self.read_debug_webpage('threadz?json')),
+               json.dumps(self.read_debug_webpage('rpcz?json')))
 
 # Allows for interacting with an Impalad instance to perform operations such 
as creating
 # new connections or accessing the debug webpage.

Reply via email to