You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "David Knupp (Code Review)" <ge...@cloudera.org> on 2016/09/12 18:48:33 UTC

[Impala-ASF-CR] IMPALA-2013: Reintroduce steps for checking HBase health in run-hbase.sh

David Knupp has posted comments on this change.

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


Patch Set 5:

(8 comments)

Reworked the git commit message, and fixed all the issues. I'm trying to find a good way to check the remote health of the namenode on a remote cluster.

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

PS5, Line 50:     parser.add_argument('--timeout', '-t', action='store'
> I find action='store' to be redundant since that's the default.
Done


PS5, Line 52:                               'Default is 30 seconds.'))
> Don't hardcode 30. Use a format string and read from TIMEOUT_SECONDS.
Done


PS5, Line 56:                               'e.g, 0.0.0.0:5070. Default is localhost:5070.'))
> Use a format string and read from HDFS_HOST.
Done


PS5, Line 60:                               'e.g, 0.0.0.0:2181. Default is localhost:2181.'))
> Use a format string and read from ZK_HOSTS.
Done


PS5, Line 66:                               '/hbase/master and /hbase/rs.')
> Use a format string. Maybe use '-n '.join(HBASE_NODES)  as part of it?
Done


PS5, Line 127:         hdfs_client.list('/')
> What does this do?
Throws an exception if we can't connect to HDFS. I was re-thinking this weekend that maybe this whole bit should either moved or reworked. It doesn't seem to be working on remote hosts.


PS5, Line 125:     try:
             :         hdfs_client = InsecureClient('http://' + args.hdfs_host)
             :         hdfs_client.list('/')
             :     except requests.exceptions.ConnectionError as e:
             :         msg = 'Could not connect to HDFS web host http://{0} - {1}'.format(args.hdfs_host, e)
             :         LOGGER.error(msg)
             :         sys.exit(1)
             : 
             :     zk_client = connect_to_zookeeper(args.zookeeper_hosts, args.timeout)
             :     errors = sum([check_hbase_node(zk_client, node, args.timeout) for node in args.nodes])
> I suggest you make this a method. The __main__ can get the arguments, the e
Done


PS5, Line 135:     if errors:
> It would be better to have the explicit numerical > 0 comparison.
Done


-- 
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: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: David Knupp <dk...@cloudera.com>
Gerrit-Reviewer: Ishaan Joshi <is...@cloudera.com>
Gerrit-Reviewer: Michael Brown <mi...@cloudera.com>
Gerrit-HasComments: Yes