You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by je...@apache.org on 2015/01/12 23:12:41 UTC
phoenix git commit: PHOENIX-1551 Upgrading from Phoenix 4.0.x to
4.2.2 and throw can't find SYSTEM.STATS
Repository: phoenix
Updated Branches:
refs/heads/4.0 b871f0693 -> 16fbfa7ab
PHOENIX-1551 Upgrading from Phoenix 4.0.x to 4.2.2 and throw can't find SYSTEM.STATS
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/16fbfa7a
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/16fbfa7a
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/16fbfa7a
Branch: refs/heads/4.0
Commit: 16fbfa7abd1c8f7e265b8656e8f574ae7f6f93b9
Parents: b871f06
Author: Jeffrey Zhong <je...@apache.org>
Authored: Mon Jan 12 14:12:52 2015 -0800
Committer: Jeffrey Zhong <je...@apache.org>
Committed: Mon Jan 12 14:12:52 2015 -0800
----------------------------------------------------------------------
.../main/java/org/apache/phoenix/util/ServerUtil.java | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/16fbfa7a/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
index 7205faa..0998e72 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
@@ -142,13 +142,22 @@ public class ServerUtil {
* This code works around HBASE-11837 which causes HTableInterfaces retrieved from
* RegionCoprocessorEnvironment to not read local data.
*/
- private static HTableInterface getTableFromSingletonPool(RegionCoprocessorEnvironment env, byte[] tableName) {
+ private static HTableInterface getTableFromSingletonPool(RegionCoprocessorEnvironment env, byte[] tableName) throws IOException {
// It's ok to not ever do a pool.close() as we're storing a single
// table only. The HTablePool holds no other resources that this table
// which will be closed itself when it's no longer needed.
@SuppressWarnings("resource")
HTablePool pool = new HTablePool(env.getConfiguration(),1);
- return pool.getTable(tableName);
+ try {
+ return pool.getTable(tableName);
+ } catch (RuntimeException t) {
+ // handle cases that an IOE is wrapped inside a RuntimeException like HTableInterface#createHTableInterface
+ if(t.getCause() instanceof IOException) {
+ throw (IOException)t.getCause();
+ } else {
+ throw t;
+ }
+ }
}
public static HTableInterface getHTableForCoprocessorScan (RegionCoprocessorEnvironment env, HTableInterface writerTable) throws IOException {