David Knupp has posted comments on this change.

Change subject: IMPALA-3680: Cleanup the scan range state after failed hdfs 
cache reads
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/3313/5/tests/query_test/test_hdfs_caching.py
File tests/query_test/test_hdfs_caching.py:

PS5, Line 130: __cleanup()
> why is this needed given line 132?
[Disclaimer: still figuring stuff out here, so apologies in advance if my 
comments don't make sense.]

My guess is that the intention is for __cleanup() to run whether or not an 
exception is thrown. Rather than calling it in two places, adding a finally: 
clause to the block would accomplish that:

  try:
      # do stuff
  except:
      # oh no!
  finally:
      __cleanup()

That said, if the unique_database fixture is used (as a previous comment 
suggested), that might obviate the need entirely to have a __cleanup() 
function, since the fixture cleans up after itself. In that case, you could 
simply move the single line that invokes 'hdfs dfs -rm...' to the finally 
clause.

Also as noted, if unique_database is used, then it's *probably* OK to remove 
the execute_serially marker.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0a9ea19dd8571b01d2cd5b87da1c259219f6297a
Gerrit-PatchSet: 5
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: David Knupp <[email protected]>
Gerrit-HasComments: Yes

Reply via email to