diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java index 43ace95ac71..9307667c5fd 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java @@ -179,7 +179,7 @@ public class HTable implements HTableInterface { this.connection = null; return; } - this.connection = (ClusterConnection) ConnectionFactory.createConnection(conf); + this.connection = ConnectionManager.getConnectionInternal(conf); this.configuration = conf; this.pool = getDefaultExecutor(conf); @@ -251,7 +251,7 @@ public class HTable implements HTableInterface { @Deprecated public HTable(Configuration conf, final TableName tableName, final ExecutorService pool) throws IOException { - this.connection = (ClusterConnection) ConnectionFactory.createConnection(conf); + this.connection = ConnectionManager.getConnectionInternal(conf); this.configuration = conf; this.pool = pool; if (pool == null) {