Regression test for IMPALA-6741 - checks that last reporting time exists in profiles of fragment instances.
(self)
| 75 | assert exchange['peak_mem'] > 0 |
| 76 | |
| 77 | def test_report_time(self): |
| 78 | """ Regression test for IMPALA-6741 - checks that last reporting time exists in |
| 79 | profiles of fragment instances.""" |
| 80 | query = """select count(distinct a.int_col) from functional.alltypes a |
| 81 | inner join functional.alltypessmall b on (a.id = b.id + cast(sleep(15) as INT))""" |
| 82 | handle = self.hs2_client.execute_async(query) |
| 83 | |
| 84 | num_validated = 0 |
| 85 | tree = self.hs2_client.get_runtime_profile(handle, TRuntimeProfileFormat.THRIFT) |
| 86 | while not self.hs2_client.state_is_finished(handle): |
| 87 | assert tree, num_validated |
| 88 | for node in tree.nodes: |
| 89 | if node.name.startswith('Instance '): |
| 90 | info_strings_key = 'Last report received time' |
| 91 | assert info_strings_key in node.info_strings |
| 92 | report_time_str = node.info_strings[info_strings_key].split(".")[0] |
| 93 | # Try converting the string to make sure it's in the expected format |
| 94 | assert datetime.strptime(report_time_str, '%Y-%m-%d %H:%M:%S') |
| 95 | num_validated += 1 |
| 96 | tree = self.hs2_client.get_runtime_profile(handle, TRuntimeProfileFormat.THRIFT) |
| 97 | # Let's not hit the backend too hard |
| 98 | sleep(0.1) |
| 99 | assert num_validated > 0 |
| 100 | self.hs2_client.close_query(handle) |
| 101 | |
| 102 | @SkipIfFS.hbase |
| 103 | def test_scan_summary(self): |
nothing calls this directly
no test coverage detected