You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2016/12/22 23:46:43 UTC

[10/15] incubator-impala git commit: IMPALA-4684: Wrap checking for HBase nodes ina try/finally block

IMPALA-4684: Wrap checking for HBase nodes ina  try/finally block

If an exception (other than NoNodeError) was raised while checking for
HBase nodes, we weren't cleanly stopping the ZooKeeper client, which
in turn created a second exception when the the connection was closed.
The second exception masked the original error condition.

Tested by forcibly raising unexpected errors while checking for HBase
nodes.

Change-Id: I46a74d018f9169385a9f10a85718044c31a24dbc
Reviewed-on: http://gerrit.cloudera.org:8080/5547
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Internal Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/73146a0a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/73146a0a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/73146a0a

Branch: refs/heads/hadoop-next
Commit: 73146a0a46817660505fa37957d44d73f020bc65
Parents: c03d398
Author: David Knupp <dk...@cloudera.com>
Authored: Mon Dec 19 14:47:38 2016 -0800
Committer: Internal Jenkins <cl...@gerrit.cloudera.org>
Committed: Wed Dec 21 00:22:16 2016 +0000

----------------------------------------------------------------------
 testdata/bin/check-hbase-nodes.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/73146a0a/testdata/bin/check-hbase-nodes.py
----------------------------------------------------------------------
diff --git a/testdata/bin/check-hbase-nodes.py b/testdata/bin/check-hbase-nodes.py
index 999a657..28ac0c1 100755
--- a/testdata/bin/check-hbase-nodes.py
+++ b/testdata/bin/check-hbase-nodes.py
@@ -131,8 +131,10 @@ def check_znodes_list_for_errors(nodes, zookeeper_hosts, timeout):
         0 success, or else the number of unresponsive nodes
     """
     with closing(connect_to_zookeeper(zookeeper_hosts, timeout)) as zk_client:
-        errors = sum([check_znode(node, zk_client, timeout) for node in nodes])
-        zk_client.stop()
+        try:
+            errors = sum([check_znode(node, zk_client, timeout) for node in nodes])
+        finally:
+            zk_client.stop()
     return errors