David Knupp has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/8354 )

Change subject: IMPALA-6070: Parallel compute_table_stats.py
......................................................................


Patch Set 3:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/8354/2/tests/util/compute_table_stats.py
File tests/util/compute_table_stats.py:

http://gerrit.cloudera.org:8080/#/c/8354/2/tests/util/compute_table_stats.py@44
PS2, Line 44:       if not continue_on_error: raise e
Two nits: even though we tend to do this a lot, PEP 8 frowns on inline if 
statements.

Also, I believe that if you're not handling an exception, but rather just 
logging something and re-raising, then a bare raise statement is preferred. I'm 
not even sure you need to reference the base Exception class in this case, 
since you're catching all exceptions. E.g.

  try:
    fail()
  except:
    logging.exception("oops!")
    raise


http://gerrit.cloudera.org:8080/#/c/8354/2/tests/util/compute_table_stats.py@48
PS2, Line 48:
I'm curious -- why is it necessary to define the client factory inside of the 
if __name__ == "__main__" block, and then pass a reference to it here? Wouldn't 
defining the method in the top-level module namespace be just as effective? It 
might be obvious, but I'm missing it.


http://gerrit.cloudera.org:8080/#/c/8354/2/tests/util/compute_table_stats.py@71
PS2, Line 71: _factory, db, table, continue_on_error,)
It seems to me like you don't need the intersection. You already have either 
set(all_tables) or set(table_names). Why not just:

  for table in selected_tables:

?



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb080f2552b9dbe304ecadd6e52429214094237d
Gerrit-Change-Number: 8354
Gerrit-PatchSet: 3
Gerrit-Owner: Philip Zeyliger <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: David Knupp <[email protected]>
Gerrit-Reviewer: Michael Brown <[email protected]>
Gerrit-Reviewer: Philip Zeyliger <[email protected]>
Gerrit-Comment-Date: Mon, 23 Oct 2017 18:32:31 +0000
Gerrit-HasComments: Yes

Reply via email to