impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-3040: Fix test caching ddl test
Date Tue, 11 Apr 2017 20:45:10 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-3040: Fix test_caching_ddl test
......................................................................


Patch Set 2:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/6603/2/tests/query_test/test_hdfs_caching.py
File tests/query_test/test_hdfs_caching.py:

Line 303:       way cache requests are added/dropped/reported (see IMPALA-3040), it tries
to return
weird indentation

"it" -> this function


Line 304:       a stable result by making several attempts to stabilize that within a reasonable
that -> it


Line 311:   max_num_stabilization_attempts = 3
This is a little strange to me. If the num_requests keep changing, then intuitively we should
keep stabilizing.

How do you feel about simplifying to something like this:

while True:
  new_request = get_num_cache_requests_util()
  if num_requests == new_requests:
    break
  else:
    num_requests = new_requests
  # Consider the result stable if no changes occurred for 2s
  time.sleep(2)


Line 324:         num_stabilization_attempts = num_stabilization_attempts + 1
We hit the max attempts once we detect a change, but then we exit the loop. Shouldn't we continue?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3ec4ba5dfae6e90a2bb76e22c93909b05bd78fa4
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message