From 90ab1628d85feb0be285d989c9f0730f9584f05e Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Sun, 2 Aug 2009 23:28:20 +0000 Subject: [PATCH] HBASE-1604 HBaseClient.getConnection() may return a broken connection without throwing an exception git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@800157 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index cff5046119e..51d7b7667af 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -310,6 +310,8 @@ Release 0.20.0 - Unreleased (Doğacan Güney via Stack) HBASE-1732 Flag to disable regionserver restart HBASE-1727 HTD and HCD versions need update + HBASE-1604 HBaseClient.getConnection() may return a broken connection + without throwing an exception (Eugene Kirpichov via Stack) IMPROVEMENTS HBASE-1089 Add count of regions on filesystem to master UI; add percentage diff --git a/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java b/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java index cbceff69429..603203184fc 100644 --- a/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java +++ b/src/java/org/apache/hadoop/hbase/ipc/HBaseClient.java @@ -286,7 +286,7 @@ public class HBaseClient { * a header to the server and starts * the connection thread that waits for responses. */ - protected synchronized void setupIOstreams() { + protected synchronized void setupIOstreams() throws IOException { if (socket != null || shouldCloseConnection.get()) { return; } @@ -328,6 +328,8 @@ public class HBaseClient { } catch (IOException e) { markClosed(e); close(); + + throw e; } }