Error in semantic analysis: Lock manager could not be initialized
here is my hive config file,i do not know why,anyone can help? property namejavax.jdo.option.ConnectionURL/name valuejdbc:mysql://192.168.10.118/metastore/value descriptionthe URL of the MySQL database/description /property property namejavax.jdo.option.ConnectionDriverName/name valuecom.mysql.jdbc.Driver/value /property property namejavax.jdo.option.ConnectionUserName/name valuehive/value /property property namejavax.jdo.option.ConnectionPassword/name valuemyhive/value /property property namedatanucleus.autoCreateSchema/name valuefalse/value /property property namedatanucleus.fixedDatastore/name valuetrue/value /property property namedatanucleus.autoStartMechanism/name valueSchemaTable/value /property property namehive.metastore.uris/name valuethrift://192.168.10.22:9083/value /property property namehive.metastore.warehouse.dir/name value/user/hive/warehouse/value /property property namehive.aux.jars.path/name valuefile:///usr/lib/hive/lib/hive-hbase-handler-0.10.0-cdh4.3.0.jar,file:///usr/lib/hive/lib/hbase.jar,file:///usr/lib/hive/lib/zookeeper.jar/value /property property namehive.zookeeper.quorum/name value192.168.10.22:2281/value /property property namehive.hwi.listen.host/name value0.0.0.0/value descriptionThis is the host address the Hive Web Interface will listen on/description /property property namehive.hwi.listen.port/name value/value descriptionThis is the port the Hive Web Interface will listen on/description /property property namehive.hwi.war.file/name valuelib/hive-hwi-0.7.1-cdh3u4.war/value descriptionThis is the WAR file with the jsp content for Hive Web Interface/description /property property namehive.support.concurrency/name valuetrue/value /property property namehive.zookeeper.client.port/name value2281/value /property property namehive.lock.manager/name valueorg.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager/value /property /configuration hive show tables; FAILED: Error in semantic analysis: Lock manager could not be initialized, check hive.lock.manager Check hive.zookeeper.quorum and hive.zookeeper.client.port OK demo_hive
Re: export csv, use ',' as split
hive create table is different than the hive query output, hive by default uses tab as output column separator on console. if you want to change to csv, why don't you just use sed and replace tab with , if you want a csv generated out of the query itself then create a temporary external table with , as separator and then load data using your query . Its a long route. Wait for sometime so that others can reply with better suggestion if mines are not suitable for you On Wed, Jul 10, 2013 at 10:18 AM, kentkong_work kentkong_w...@163.comwrote: ** hi here, I create a table like this and put a lot data into it. then I export query result into csv file like this: hive -e myquery result.csv but the csv uses tab as split. how to make hive use ','? thanks! CREATE TABLE if not exists upload_users( username string, mobile string, id_type string, id_no string, email string, address string, validate_time string ) partitioned by (fileid string) row format delimited fields terminated by \,; -- Nitin Pawar
Re: can not connect hive through jdbc
Can you tell use which jdbc version are you using? and try changing it to jdbc:hive from jdbc:hive2 On Wed, Jul 10, 2013 at 12:34 PM, ch huang justlo...@gmail.com wrote: i use following java code import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class DemoHive { public static void main(String[] args) throws Exception { Class.forName(org.apache.hadoop.hive.jdbc.HiveDriver); String dropSQL=drop table javabloger; String createSQL=create table javabloger (key int, value string); String insterSQL=LOAD DATA LOCAL INPATH '/work/hive/examples/files/kv1.txt' OVERWRITE INTO TABLE javabloger; String querySQL=SELECT * FROM hb_dmp_pageview; Connection con = DriverManager.getConnection(jdbc:hive2:// 192.168.10.22:1/default, , ); Statement stmt = con.createStatement(); // stmt.executeQuery(dropSQL); // 执行删除语句 // stmt.executeQuery(createSQL); // 执行建表语句 //stmt.executeQuery(insterSQL); // 执行插入语句 ResultSet res = stmt.executeQuery(querySQL); // 执行查询语句 while (res.next()) { System.out.println(Result: key:+res.getString(1) + �C value: +res.getString(2)); } } } Exception in thread main java.sql.SQLException: Invalid URL: jdbc:hive2://192.168.10.22:1/default at org.apache.hadoop.hive.jdbc.HiveConnection.init(HiveConnection.java:85) at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:104) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at DemoHive.main(DemoHive.java:17) and in hive server # nohup hive --service hiveserver # netstat -utlpn|grep 1 tcp0 0 0.0.0.0:1 0.0.0.0:* LISTEN 18430/java -- Nitin Pawar
Re: can not connect hive through jdbc
yes i try ,and i get Invalid URL error Exception in thread main java.sql.SQLException: Invalid URL: jdbc:hive2:// 192.168.10.22:1/default at org.apache.hadoop.hive.jdbc.HiveConnection.init(HiveConnection.java:85) at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:104) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at DemoHive.main(DemoHive.java:17) On Wed, Jul 10, 2013 at 3:14 PM, Nitin Pawar nitinpawar...@gmail.comwrote: Can you tell use which jdbc version are you using? and try changing it to jdbc:hive from jdbc:hive2 On Wed, Jul 10, 2013 at 12:34 PM, ch huang justlo...@gmail.com wrote: i use following java code import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class DemoHive { public static void main(String[] args) throws Exception { Class.forName(org.apache.hadoop.hive.jdbc.HiveDriver); String dropSQL=drop table javabloger; String createSQL=create table javabloger (key int, value string); String insterSQL=LOAD DATA LOCAL INPATH '/work/hive/examples/files/kv1.txt' OVERWRITE INTO TABLE javabloger; String querySQL=SELECT * FROM hb_dmp_pageview; Connection con = DriverManager.getConnection(jdbc:hive2://192.168.10.22:1/default, , ); Statement stmt = con.createStatement(); // stmt.executeQuery(dropSQL); // 执行删除语句 // stmt.executeQuery(createSQL); // 执行建表语句 //stmt.executeQuery(insterSQL); // 执行插入语句 ResultSet res = stmt.executeQuery(querySQL); // 执行查询语句 while (res.next()) { System.out.println(Result: key:+res.getString(1) + �C value: +res.getString(2)); } } } Exception in thread main java.sql.SQLException: Invalid URL: jdbc:hive2://192.168.10.22:1/default at org.apache.hadoop.hive.jdbc.HiveConnection.init(HiveConnection.java:85) at org.apache.hadoop.hive.jdbc.HiveDriver.connect(HiveDriver.java:104) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at DemoHive.main(DemoHive.java:17) and in hive server # nohup hive --service hiveserver # netstat -utlpn|grep 1 tcp0 0 0.0.0.0:1 0.0.0.0:* LISTEN 18430/java -- Nitin Pawar
start hive2 error
i try start hiveserver2 ,buy error in log file ,why ? i use hive 0.10 2013-07-10 14:18:31,821 WARN hive.metastore (HiveMetaStoreClient.java:open(285)) - Failed to connect to the MetaStore Server... 2013-07-10 14:18:32,830 ERROR service.CompositeService (CompositeService.java:start(74)) - Error starting services HiveServer2 org.apache.hive.service.ServiceException: Unable to connect to MetaStore! at org.apache.hive.service.cli.CLIService.start(CLIService.java:87) at org.apache.hive.service.CompositeService.start(CompositeService.java:70) at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:61) at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:208) Caused by: MetaException(message:Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused at org.apache.thrift.transport.TSocket.open(TSocket.java:185) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:277) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.init(HiveMetaStoreClient.java:163) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.init(HiveMetaStoreClient.java:103) at org.apache.hive.service.cli.CLIService.start(CLIService.java:84) at org.apache.hive.service.CompositeService.start(CompositeService.java:70) at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:61) at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:208) Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:529) at org.apache.thrift.transport.TSocket.open(TSocket.java:180)
Re: start hive2 error
hello, verify if ZooKeeper is running on port 2181 (not on port 2281 like you have in Hive-site.xml) if changing port don't work assure that your Zookeeper quorum is listining on port 2281. 2013/7/10 ch huang justlo...@gmail.com i try start hiveserver2 ,buy error in log file ,why ? i use hive 0.10 2013-07-10 14:18:31,821 WARN hive.metastore (HiveMetaStoreClient.java:open(285)) - Failed to connect to the MetaStore Server... 2013-07-10 14:18:32,830 ERROR service.CompositeService (CompositeService.java:start(74)) - Error starting services HiveServer2 org.apache.hive.service.ServiceException: Unable to connect to MetaStore! at org.apache.hive.service.cli.CLIService.start(CLIService.java:87) at org.apache.hive.service.CompositeService.start(CompositeService.java:70) at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:61) at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:208) Caused by: MetaException(message:Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused at org.apache.thrift.transport.TSocket.open(TSocket.java:185) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:277) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.init(HiveMetaStoreClient.java:163) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.init(HiveMetaStoreClient.java:103) at org.apache.hive.service.cli.CLIService.start(CLIService.java:84) at org.apache.hive.service.CompositeService.start(CompositeService.java:70) at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:61) at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:208) Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:529) at org.apache.thrift.transport.TSocket.open(TSocket.java:180)
Using INDEX inside SUBSTR
Hi All, One of my Teradata query is SUBSTR(PRESG_ID,INDEX(PRESG_ID,' ')+1,1) IN ('1','2','3') Any idea of the above to convert to hive, It seems to be a simple qus but am stuck...didn't get a chance to try it out in cluster :( -Thanks
Re: Using INDEX inside SUBSTR
rather than us just do the work for you show us your attempts to solve this. hint: did you look at this page? https://cwiki.apache.org/Hive/languagemanual-udf.html#LanguageManualUDF-StringFunctions On Wed, Jul 10, 2013 at 5:06 AM, dyuti a hadoop.hiv...@gmail.com wrote: Hi All, One of my Teradata query is SUBSTR(PRESG_ID,INDEX(PRESG_ID,' ')+1,1) IN ('1','2','3') Any idea of the above to convert to hive, It seems to be a simple qus but am stuck...didn't get a chance to try it out in cluster :( -Thanks
Re: export csv, use ',' as split
Hive does not have a output delimiter specifier yet (not sure if 0.11.x may have it) But for now please try the following hive -e myquery | sed 's/\t/,/g' result.csv Good luck Sanjay From: kentkong_work kentkong_w...@163.commailto:kentkong_w...@163.com Reply-To: user@hive.apache.orgmailto:user@hive.apache.org user@hive.apache.orgmailto:user@hive.apache.org Date: Tuesday, July 9, 2013 9:48 PM To: user user@hive.apache.orgmailto:user@hive.apache.org Subject: export csv, use ',' as split hi here, I create a table like this and put a lot data into it. then I export query result into csv file like this: hive -e myquery result.csv but the csv uses tab as split. how to make hive use ','? thanks! CREATE TABLE if not exists upload_users( username string, mobile string, id_type string, id_no string, email string, address string, validate_time string ) partitioned by (fileid string) row format delimited fields terminated by \,; CONFIDENTIALITY NOTICE == This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.
hive jdbc exception
Hi all, I am trying to execute a hiveql query from a java application with connection string jdbc:hive://localhost:1 but I get org.apache.transport.TTransportException. Have anyone faced this problem to give me a solution? Thanks
Re: hive jdbc exception
obvious question first. is your Hive Server running on port 1?to check: $ netstat -lanp | grep 1 (might need to run as root. show us the output) On Wed, Jul 10, 2013 at 1:04 PM, Κωνσταντίνος Αρετάκης kareta...@gmail.comwrote: Hi all, I am trying to execute a hiveql query from a java application with connection string jdbc:hive://localhost:1 but I get org.apache.transport.TTransportException. Have anyone faced this problem to give me a solution? Thanks
Re: hive jdbc exception
Thanks! It was the server not able to run at the default port 1! I did netstat and I saw a service running at 1 port and thought it was the hive server but it wasnt! I changed the port and it worked! Thanks again! K.A On 10 Ιουλ 2013, at 23:30, Stephen Sprague sprag...@gmail.com wrote: obvious question first. is your Hive Server running on port 1?to check: $ netstat -lanp | grep 1 (might need to run as root. show us the output) On Wed, Jul 10, 2013 at 1:04 PM, Κωνσταντίνος Αρετάκης kareta...@gmail.comwrote: Hi all, I am trying to execute a hiveql query from a java application with connection string jdbc:hive://localhost:1 but I get org.apache.transport.TTransportException. Have anyone faced this problem to give me a solution? Thanks
Re: Oracle to Hive
Untested: SELECT a.c100, a.c300, b.c400 FROM t1 a JOIN t2 b ON a.c200 = b.c200 JOIN (SELECT DISTINCT a.c100 FROM t1 a2 JOIN t2 b2 ON a2.c200 = b2.c200 WHERE b2.c400 = SYSDATE - 1) a3 ON a.c100 = a3.c100 WHERE b.c400 = SYSDATE - 1 AND a.c300 = 0 From: Raj Hadoop hadoop...@yahoo.com To: Hive user@hive.apache.org Sent: Wednesday, July 10, 2013 3:30 PM Subject: Oracle to Hive All, Can anyone give me tips on how to convert the following Oracle SQL to a Hive query. SELECT a.c100, a.c300, b.c400 FROM t1 a JOIN t2 b ON a.c200 = b.c200 WHERE a.c100 IN (SELECT DISTINCT a.c100 FROM t1 a JOIN t2 b ON a.c200 = b.c200 WHERE b.c400 = SYSDATE - 1) AND b.c400 = SYSDATE - 1 AND a.c300 = 0 The SYSDATE can be replaced by date_sub(FROM_UNIXTIME(UNIX_TIMESTAMP(),'-MM-dd') , 1) in Hive. But I wanted to know the rest of the query. Any pointers or tips so that I can start on my own. Thanks in advance. Regards, Raj
Re: export csv, use ',' as split
Fixed in hive-0.11.0 https://issues.apache.org/jira/browse/HIVE-3682 2013/7/11 Sanjay Subramanian sanjay.subraman...@wizecommerce.com: Hive does not have a output delimiter specifier yet (not sure if 0.11.x may have it) But for now please try the following hive -e myquery | sed 's/\t/,/g' result.csv Good luck Sanjay From: kentkong_work kentkong_w...@163.com Reply-To: user@hive.apache.org user@hive.apache.org Date: Tuesday, July 9, 2013 9:48 PM To: user user@hive.apache.org Subject: export csv, use ',' as split hi here, I create a table like this and put a lot data into it. then I export query result into csv file like this: hive -e myquery result.csv but the csv uses tab as split. how to make hive use ','? thanks! CREATE TABLE if not exists upload_users( username string, mobile string, id_type string, id_no string, email string, address string, validate_time string ) partitioned by (fileid string) row format delimited fields terminated by \,; CONFIDENTIALITY NOTICE == This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.
Re: HBase -- Hive / HCatalog -- PIG
Hi Rajesh, You might be interested in HIVE-4331 for the Pig integration. I think Viraj had tested this entire use case on a secure cluster. -Thiruvel From: Rajesh Balamohan rajesh.balamo...@gmail.commailto:rajesh.balamo...@gmail.com Reply-To: user@hive.apache.orgmailto:user@hive.apache.org user@hive.apache.orgmailto:user@hive.apache.org Date: Wednesday, July 10, 2013 5:30 PM To: user@hive.apache.orgmailto:user@hive.apache.org user@hive.apache.orgmailto:user@hive.apache.org Subject: HBase -- Hive / HCatalog -- PIG Hi All, Has anyone tried out the following usecase in security enabled hadoop cluster?. 1. Create a table in HBase 2. Create a table in Hive pointing to the HBase table created in #1 3. Since HCatalog uses hive metastore, this table will be visible to HCatalog as well. 4. Try to access hive table from PIG via HCatalog I am able to create a proxy table in Hive pointing to HBase. However, select * from hbase_test throws authentication error. Any help will be greatly appreciated. -- ~Rajesh.B
lot's of deprecated info in hive metastore log
i do not know why ,i have no mapred.reduce.tasks option defined in config file,anyone can help? hive-metastore.log:2013-07-10 10:10:34,890 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative hive-metastore.log:2013-07-10 10:23:57,068 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces hive-metastore.log:2013-07-10 10:23:57,068 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative hive-metastore.log:2013-07-10 10:54:33,110 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces hive-metastore.log:2013-07-10 10:54:33,111 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative hive-metastore.log:2013-07-10 14:12:14,995 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces hive-metastore.log:2013-07-10 14:12:14,995 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative hive-metastore.log:2013-07-10 14:18:34,874 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces hive-metastore.log:2013-07-10 14:18:34,875 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative hive-metastore.log:2013-07-10 15:25:12,803 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces hive-metastore.log:2013-07-10 15:25:12,804 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative hive-server2.log:2013-07-10 15:40:33,127 WARN conf.Configuration (Configuration.java:warnOnceIfDeprecated(824)) - mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces
Re: HBase -- Hive / HCatalog -- PIG
Thanks a lot Thiruvel. I will look into the JIRA. ~Rajesh.B On Thu, Jul 11, 2013 at 7:09 AM, Thiruvel Thirumoolan thiru...@yahoo-inc.com wrote: Hi Rajesh, You might be interested in HIVE-4331 for the Pig integration. I think Viraj had tested this entire use case on a secure cluster. -Thiruvel From: Rajesh Balamohan rajesh.balamo...@gmail.com Reply-To: user@hive.apache.org user@hive.apache.org Date: Wednesday, July 10, 2013 5:30 PM To: user@hive.apache.org user@hive.apache.org Subject: HBase -- Hive / HCatalog -- PIG Hi All, Has anyone tried out the following usecase in security enabled hadoop cluster?. 1. Create a table in HBase 2. Create a table in Hive pointing to the HBase table created in #1 3. Since HCatalog uses hive metastore, this table will be visible to HCatalog as well. 4. Try to access hive table from PIG via HCatalog I am able to create a proxy table in Hive pointing to HBase. However, select * from hbase_test throws authentication error. Any help will be greatly appreciated. -- ~Rajesh.B -- ~Rajesh.B
HiveServer2 JDBC Client- [Multithreaded connection]
Hi, I am attempting to create a JDBC Client to HiveServer2. I have set the following property to support concurrency property namehive.support.concurrency/name descriptionEnable Hive's Table Lock Manager Service/description valuetrue/value /property The JDBC client spawns multiple threads using a executor service and each thread tries to get a connection to the hiveserver2. After each thread gets a connection to the hiveserver2, I am attempting to execute queries independently on each of the thread. However I am not able to execute the queries on the threads. Any help/pointers would be appreciated. Here are the error messages that I see. org.apache.thrift.transport. TTransportException: SASL authentication not complete at org.apache.thrift.transport.TSaslTransport.write(TSaslTransport.java:444) at org.apache.thrift.transport.TSaslClientTransport.write(TSaslClientTransport.java:37) at org.apache.thrift.protocol.TBinaryProtocol.writeI32(TBinaryProtocol.java:163) at org.apache.thrift.protocol.TBinaryProtocol.writeMessageBegin(TBinaryProtocol.java:91) at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:62) at org.apache.hive.service.cli.thrift.TCLIService$Client.send_FetchResults(TCLIService.java:483) at org.apache.hive.service.cli.thrift.TCLIService$Client.FetchResults(TCLIService.java:475) at org.apache.hive.jdbc.HiveQueryResultSet.next(HiveQueryResultSet.java:225) at moz.jdbc.ParExec$MultiHiveConnections.call(ParExec.java:46) at moz.jdbc.ParExec$MultiHiveConnections.call(ParExec.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Exception in thread main java.util.concurrent.ExecutionException: java.sql.SQLException: Error retrieving next row at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) at java.util.concurrent.FutureTask.get(FutureTask.java:83) at moz.jdbc.ParExec.main(ParExec.java:108) Caused by: java.sql.SQLException: Error retrieving next row at org.apache.hive.jdbc.HiveQueryResultSet.next(HiveQueryResultSet.java:247) at moz.jdbc.ParExec$MultiHiveConnections.call(ParExec.java:46) at moz.jdbc.ParExec$MultiHiveConnections.call(ParExec.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) -- _ Regards, Varun