[ https://issues.apache.org/jira/browse/HIVE-4644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hari Sekhon updated HIVE-4644: ------------------------------ Description: Right now it doesn't seem possible to simultaneously access multiple HBase clusters in Hive. The best workaround I've been able to come up with in Hive and BeeLine is: {code}set hbase.zookeeper.quorum=cluster2-zookeeper-host; select count(*) from hbase2_test; set hbase.zookeeper.quorum=cluster1-zookeeper-host; select count(*) from hbase1_test;{code} But I'm not sure I can use the hbase.zookeeper.quorum override in JDBC in HiveServer2, at least I haven't seen any example code for config overrides. This workaround is also non-ideal and doesn't allow for simultaneous access to different HBase clusters. So I've tried fiddling with SerDe, Table and Schema level properties to set hbase.zookeeper.quorum overrides on a per table or per schema basis but that didn't work. I think if the code can be made to respect those properties it would represent the best way of handling this in future, eg: create database cluster2 WITH DBPROPERTIES ("hbase.zookeeper.quorum"="cluster2-zookeeper-host"); would allow creation of tables in cluster2 database referencing the second HBase cluster. I've over-simplified here with one zookeeper host in the quorum just for brevity. was: Right now it doesn't seem possible to simultaneously access multiple HBase clusters in Hive. The best workaround I've been able to come up with in Hive and BeeLine is: set hbase.zookeeper.quorum=cluster2-zookeeper-host; select count(*) from hbase2_test; set hbase.zookeeper.quorum=cluster1-zookeeper-host; select count(*) from hbase1_test; But I'm not sure I can use the hbase.zookeeper.quorum override in JDBC in HiveServer2, at least I haven't seen any example code for config overrides. This workaround is also non-ideal and doesn't allow for simultaneous access to different HBase clusters. So I've tried fiddling with SerDe, Table and Schema level properties to set hbase.zookeeper.quorum overrides on a per table or per schema basis but that didn't work. I think if the code can be made to respect those properties it would represent the best way of handling this in future, eg: create database cluster2 WITH DBPROPERTIES ("hbase.zookeeper.quorum"="cluster2-zookeeper-host"); would allow creation of tables in cluster2 database referencing the second HBase cluster. I've over-simplified here with one zookeeper host in the quorum just for brevity. > Access Multiple HBase clusters' tables simultaneously > ----------------------------------------------------- > > Key: HIVE-4644 > URL: https://issues.apache.org/jira/browse/HIVE-4644 > Project: Hive > Issue Type: New Feature > Components: Database/Schema, HiveServer2, Metastore > Affects Versions: 0.10.0 > Reporter: Hari Sekhon > > Right now it doesn't seem possible to simultaneously access multiple HBase > clusters in Hive. The best workaround I've been able to come up with in Hive > and BeeLine is: > {code}set hbase.zookeeper.quorum=cluster2-zookeeper-host; > select count(*) from hbase2_test; > set hbase.zookeeper.quorum=cluster1-zookeeper-host; > select count(*) from hbase1_test;{code} > But I'm not sure I can use the hbase.zookeeper.quorum override in JDBC in > HiveServer2, at least I haven't seen any example code for config overrides. > This workaround is also non-ideal and doesn't allow for simultaneous access > to different HBase clusters. So I've tried fiddling with SerDe, Table and > Schema level properties to set hbase.zookeeper.quorum overrides on a per > table or per schema basis but that didn't work. > I think if the code can be made to respect those properties it would > represent the best way of handling this in future, eg: > create database cluster2 WITH DBPROPERTIES > ("hbase.zookeeper.quorum"="cluster2-zookeeper-host"); > would allow creation of tables in cluster2 database referencing the second > HBase cluster. > I've over-simplified here with one zookeeper host in the quorum just for > brevity. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira