Taras Bobrovytsky has posted comments on this change. Change subject: CDH-36755 - Reuse session for executing queries (Hive on Spark) ......................................................................
Patch Set 1: (4 comments) http://gerrit.cloudera.org:8080/#/c/2374/1/tests/performance/query_exec_functions.py File tests/performance/query_exec_functions.py: Line 42: cursor_set = [] > not a set, it's a list We are creating a new cursor every time we create a new thread, but when a thread exits, cursors don't get destroyed. This means that by the end of the execution, the number of cursors in this list will be equal to the total number of threads created. This is not good, so I think you should change the architecture so that whenever a thread exits, the cursor that belongs to the thread is destroyed. Line 44: def cleanup_cursor(): how about cleanup_cursors() Line 54: atexit.register(cleanup_cursor) This should be a decorator, move it above cleanup_cursors: @atexit.register def cleanup_cursors() Line 86: global I don't think you need the global keyword here -- To view, visit http://gerrit.cloudera.org:8080/2374 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I06c798dc311d63eb0a875450fd26d06db4e84a03 Gerrit-PatchSet: 1 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Kapil Rastogi <[email protected]> Gerrit-Reviewer: Henry Robinson <[email protected]> Gerrit-Reviewer: Ishaan Joshi <[email protected]> Gerrit-Reviewer: Kapil Rastogi <[email protected]> Gerrit-Reviewer: Taras Bobrovytsky <[email protected]> Gerrit-HasComments: Yes
