impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ishaan Joshi (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-2013: Reintroduce steps for checking HBase health in run-hbase.sh
Date Fri, 09 Sep 2016 20:17:17 GMT
Ishaan Joshi has posted comments on this change.

Change subject: IMPALA-2013: Reintroduce steps for checking HBase health in run-hbase.sh
......................................................................


Patch Set 3:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/4348/3/testdata/bin/check-hbase-nodes.py
File testdata/bin/check-hbase-nodes.py:

Line 75:     except Exception as e:
Does the message you tack on to the exception give you a lot more information than the exception?
If not, then there's no need to catch it and then do an exit().


Line 92:     while True:
More readable to put the timeout at the top of the loop and exit if you bug out of it.

while time.time() - start_time > TIMEOUT_SECONDS:
  ...
  if foo: return 0

LOGGER.error(..)
return 1

On that note, why not return True/False instead of 1/0 ?


Line 103:             except Exception:
Unless you want this to catch SIGINT(Ctrl-C), you want to do:

except Exception as e: instead of except Exception


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9b81f3cfb6ea0ba7b18ce5fcd5d268f515c8b0c3
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: David Knupp <dknupp@cloudera.com>
Gerrit-Reviewer: Ishaan Joshi <ishaan@cloudera.com>
Gerrit-Reviewer: Michael Brown <mikeb@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message