[ 
https://issues.apache.org/jira/browse/HBASE-12617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14233305#comment-14233305
 ] 

stack commented on HBASE-12617:
-------------------------------

Before HBASE-12404, we were returning a new HBaseAdmin.  We kept it around 
while HTU was alive.  It was made using managed connection under the wraps.  
HBASE-12404 added to HTU a getConnection, a connection we keep around during 
life of HTU so you can make tables and admins.  We had inside in this new 
method a check if HTU had a minicluster running.  If not, we threw exception 
("No connections allowed before minihbase cluster").  Seemed like good idea in 
the HTU context.  But the IT rig is calling through to here to get a connection 
(Because IntegrationTestingUtility extends HBaseTestingUtility) even when test 
against non-HTU minicluster.

Thanks for +1. Let me commit.

> Running IntegrationTestBigLinkedList against cluster getting not an instance 
> of org.apache.hadoop.hbase.MiniHBaseCluster
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-12617
>                 URL: https://issues.apache.org/jira/browse/HBASE-12617
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>             Fix For: 1.0.0, 2.0.0
>
>         Attachments: 12617.txt
>
>
> Running integration test against cluster I'm getting this on tip of branch-1:
> {code}
> 2014-12-02 15:51:37,193 ERROR [main] util.AbstractHBaseTool: Error running 
> command-line tool
> java.lang.RuntimeException: 
> org.apache.hadoop.hbase.DistributedHBaseCluster@7103cb56 not an instance of 
> org.apache.hadoop.hbase.MiniHBaseCluster
>       at 
> org.apache.hadoop.hbase.HBaseTestingUtility.getMiniHBaseCluster(HBaseTestingUtility.java:952)
>       at 
> org.apache.hadoop.hbase.HBaseTestingUtility.getConnection(HBaseTestingUtility.java:2494)
>       at 
> org.apache.hadoop.hbase.HBaseTestingUtility.getHBaseAdmin(HBaseTestingUtility.java:2514)
>       at 
> org.apache.hadoop.hbase.IntegrationTestingUtility.createDistributedHBaseCluster(IntegrationTestingUtility.java:141)
>       at 
> org.apache.hadoop.hbase.IntegrationTestingUtility.initializeCluster(IntegrationTestingUtility.java:75)
>       at 
> org.apache.hadoop.hbase.test.IntegrationTestBigLinkedList.setUpCluster(IntegrationTestBigLinkedList.java:1104)
>       at 
> org.apache.hadoop.hbase.IntegrationTestBase.setUp(IntegrationTestBase.java:124)
>       at 
> org.apache.hadoop.hbase.IntegrationTestBase.doWork(IntegrationTestBase.java:109)
>       at 
> org.apache.hadoop.hbase.util.AbstractHBaseTool.run(AbstractHBaseTool.java:114)
>       at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
>       at 
> org.apache.hadoop.hbase.test.IntegrationTestBigLinkedList.main(IntegrationTestBigLinkedList.java:1225)
> {code}
> It looks like this was broken by:
> {code}
>    1 commit c0cdaf8400831bada22558febbab9681f606e26c
>    2 Author: stack <[email protected]>
>    3 Date:   Tue Nov 25 12:26:54 2014 -0800
>    4
>    5         HBASE-12404 Task 5 from parent: Replace internal HTable 
> constructor use with
>    6         HConnection#getTable (0.98, 0.99)
> {code}
> We used to create an HBaseAdmin internally with  managed connection but we 
> changed it to use the HTU's admin.  In the patch we added check that there is 
> a HTU cluster up and running -- a mini cluster -- but there won't be in the 
> case of an IT test going against a cluster.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to