Jason Fehr has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22656 )

Change subject: IMPALA-13885: Add Query Id to Workload Management Insert Logs
......................................................................


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22656/6/tests/custom_cluster/test_query_log.py
File tests/custom_cluster/test_query_log.py:

http://gerrit.cloudera.org:8080/#/c/22656/6/tests/custom_cluster/test_query_log.py@583
PS6, Line 583:                                      line_regex=r'failed to 
write completed queries '
             :                                      + r'table="' + 
QUERY_TBL_LOG + r'" record_count=\d+ '
             :                                      + r'bytes=\S+\s\S+ 
gather_time=\S+ exec_time=\S+ '
             :                                      + r'query_id="' + 
self.insert_query_id
             :                                      + r'" msg="Query ' + 
self.insert_query_id
             :                                      + r' expired due to 
execution time limit of'
             :                                      + r' 1s000ms"',
> Can craft the string pattern first with .format().
I could not get placeholders to work on multi-line strings.  I now realize that 
is because the .format() was only being applied to the very last substring 
because I joined the substrings with + which I should not have done.

I would rather not clutter up the code with example log lines.  Searching the 
Impala code base for the string "failed to write completed queries" turns up a 
single match, thus it should be fairly quick to understand the log message 
being asserted.

The other fields are variable and don't have a source of truth that could be 
used in the assertions.  While I would like to match on some of them, I would 
have to use ranges and the test would probably end up being flaky resulting in 
the ranges being modified.

I like that idea to validate the msg parameter separately.  Done.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3c0816f9eb6bac8c891fd0e249de8863115bf466
Gerrit-Change-Number: 22656
Gerrit-PatchSet: 6
Gerrit-Owner: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ara...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Jason Fehr <jf...@cloudera.com>
Gerrit-Reviewer: Michael Smith <michael.sm...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com>
Gerrit-Reviewer: gaurav singh <gsi...@cloudera.com>
Gerrit-Comment-Date: Mon, 24 Mar 2025 23:06:53 +0000
Gerrit-HasComments: Yes

Reply via email to