9

I just installed presto and when I use the presto-cli to query hive data, I get the following error:

$ ./presto --server node6:8080 --catalog hive --schema default
presto:default> show tables;
Query 20131113_150006_00002_u8uyp failed: Table hive.information_schema.tables does not exist

The config.properties is:

coordinator=true
datasources=jmx,hive
http-server.http.port=8080
presto-metastore.db.type=h2
presto-metastore.db.filename=/root/h2
task.max-memory=1GB
discovery-server.enabled=true
discovery.uri=`http://node6:8080`

And the hive.properties is:

connector.name=hive-cdh4
hive.metastore.uri=thrift://node6:9083

The hadoop distribution I used is CDH 4.4. I believe it's properly installed and hive can process queries successfully on its own.

Can anyone help me work it out? Any ideas will be appreciated.

slm
  • 15,396
  • 12
  • 109
  • 124
Rui Li
  • 141
  • 1
  • 2
  • 6

3 Answers3

2

As recommended by the Getting Started, I created a controller (jmx only) and a separate worker (jmx,hive), each on separate machines.

What finally solved this for me was to specify the worker's hostname and http-server.http.port as the --server argument to presto. When specifying the controller, it didn't work.

This all makes sense, but I am still wondering what will happen when I have two Presto-Hive workers...

itzg
  • 1,081
  • 2
  • 13
  • 11
  • If I understand correctly, you should specify the coordinator's (controller) host name and http.port in the discovery.uri of the worker. Then you can start presto with the --server pointing to the coordinator. Anyway that's what I did and it worked for me. – Rui Li Nov 18 '13 at 01:17
  • I'm not sure what changed. I double checked the `discovery.uri` setting and it was already correct. I restarted the coordinator and worker and now I can query using the presto-cli pointing to the coordinator. – itzg Nov 18 '13 at 20:21
0

Add more line to etc/catalog/hive.properties "hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop/conf/hdfs-site.xml" ofcourse check values of path before do it.

presto-metastore.db.filename= <- is this the value for Hive Warehouse Directory ? => this presto's metastore,not hive.

kyo88
  • 1
  • 1
    My problem is that I configured a wrong hive-metastore for Presto. Silly mistake... Thanks for your help anyway – Rui Li Nov 15 '13 at 08:50
0

I just figured out what was wrong in my case: you also have to add following line to $HIVE_HOME/conf/hive-env.sh for informing hive to open thrift port(same as mentioned under hive.metastore.uris property in hive-site.xml file). This port is used by hive client to connect to Metastore through RPC.

export METASTORE_PORT=9084

in the hive-env.sh file in the conf folder. This should sync your hive with presto.

Anuvrat Tiku
  • 1,616
  • 2
  • 17
  • 25