MCPcopy Create free account
hub / github.com/apache/impala / __verify_num_cached_rows

Method __verify_num_cached_rows

tests/hs2/test_fetch_first.py:69–79  ·  view source on GitHub ↗

Asserts that Impala has the given number of rows in its result set cache. Also sanity checks the metric for tracking the bytes consumed by the cache.

(self, num_cached_rows)

Source from the content-addressed store, hash-verified

67 "Num in flight queries did not reach 0")
68
69 def __verify_num_cached_rows(self, num_cached_rows):
70 """Asserts that Impala has the given number of rows in its result set cache. Also
71 sanity checks the metric for tracking the bytes consumed by the cache."""
72 self.impalad_test_service.wait_for_metric_value(
73 'impala-server.resultset-cache.total-num-rows', num_cached_rows, timeout=60)
74 cached_bytes = self.impalad_test_service.get_metric_value(
75 'impala-server.resultset-cache.total-bytes')
76 if num_cached_rows > 0:
77 assert cached_bytes > 0
78 else:
79 assert cached_bytes == 0
80
81 @pytest.mark.execute_serially
82 @needs_session(TCLIService.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V6)

Calls 2

wait_for_metric_valueMethod · 0.80
get_metric_valueMethod · 0.80

Tested by

no test coverage detected