Hive Connector - Fails to connect to external hive.metastore.uri

63 views
Skip to first unread message

Deepthi Potluri

unread,
May 16, 2016, 4:14:40 PM5/16/16
to Presto
I am running a Presto on cloud (EC2 instance that is running Cloudera installation) and trying to connect to the Hadoop cluster on premise. 

Both the Presto and on premise clusters use the Cloudera cdh5.5 installation. 

In the hive connection properties trying to connect to the meta-store of the premise.

No execptions are noticed during the instance start up but however the queries do error out with the following reason:

presto> select count(1) from hive.<schema_name>.<table_name>;

Query 20160516_193039_00005_98t53 failed: <thrift server hostname>: null

Any suggestions?

Akshat Nair

unread,
May 16, 2016, 7:09:19 PM5/16/16
to Presto
You should try running the CLI with --debug to get more detailed error

Also verify that the property in /etc/presto/catalog/hive.properties has the correct information for hive.metastore.uri

thanks
Akshat

Harihar Nahak

unread,
Oct 27, 2016, 12:31:56 AM10/27/16
to Presto
Hi I just started with Presto,
I'm connecting Mysql with Hive. I added mysql and hive catalog with required details. from Presto CLI I can query to mysql but Hive catalog giving errors.

As per guidance I added core-site and hdfs-site xml to the catalog properties but still Hive catalog unable to reach.

Here are my logs :

presto> show catalogs;
Catalog
---------
jmx
mysql
system


presto> show tables from mysql.test;
Table
------------------------------
batch_control
batch_log
batch_xml_to_mysql
customer_mysql
rto_scheduler
streaming_xml_to_mysql_kafka
(6 rows)


presto> show tables from hive.test;
Query 20161027_043124_00009_52hwh failed: line 1:1: Schema 'test' does not exist
com.facebook.presto.sql.analyzer.SemanticException: line 1:1: Schema 'test' does not exist
at com.facebook.presto.sql.rewrite.ShowQueriesRewrite$Visitor.visitShowTables(ShowQueriesRewrite.java:177)
at com.facebook.presto.sql.rewrite.ShowQueriesRewrite$Visitor.visitShowTables(ShowQueriesRewrite.java:144)
at com.facebook.presto.sql.tree.ShowTables.accept(ShowTables.java:61)
at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:22)
at com.facebook.presto.sql.rewrite.ShowQueriesRewrite.rewrite(ShowQueriesRewrite.java:141)
at com.facebook.presto.sql.rewrite.StatementRewrite.rewrite(StatementRewrite.java:51)
at com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:67)
at com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:62)
at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:284)
at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:270)
at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:228)
at com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
show tables from hive.test


Any Help or pointer please let me know.

Rickman, Brian T

unread,
Oct 27, 2016, 9:02:11 AM10/27/16
to presto...@googlegroups.com
Hive is not listed when you execute "show catalogs." That means Presto is not reading your hive.properties file. You need to make sure the same hive.properties file is on all nodes of your cluster, and then restart all nodes.
--
You received this message because you are subscribed to the Google Groups "Presto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to presto-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages