Reputation: 1279
I'm trying to set up Presto and a standalone Hive metastore to query some data in S3. I've downloaded the hive "standalone metastore" package, installed and started MySQL, initialized and started the metastore, and started Presto.
It looks like I can connect to the Metastore from Presto. With this config in etc/catalog/s3.properties
:
connector.name=hive-hadoop2
hive.metastore.uri=thrift://localhost:9083
I can run a query like
presto:default> select * from my_table;
Query <query id> failed: line 1:15: Table s3.default.my_table does not exist
(the table doesn't exist, but it seems to be able to connect to the metastore correctly; I get a completely different error if the metastore isn't started). I also see the metastore in LISTEN state on port 9083.
However, if I try to run Beeline, I get:
beeline> !connect jdbc:hive2://localhost:9083
Connecting to jdbc:hive2://localhost:9083
Enter username for jdbc:hive2://localhost:9083: [empty]
Enter password for jdbc:hive2://localhost:9083: [empty]
20/10/01 14:40:21 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:9083
Unexpected end of file when reading from HS2 server. The root cause might be too many concurrent connections. Please ask the administrator to check the number of active connections, and adjust hive.server2.thrift.max.worker.threads if applicable.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:9083: null (state=08S01,code=0)
This happens even if I stop Presto, in which case there should be no active connections. I've also set hive.server2.thrift.max.worker.threads
to 200.
I'm not sure what to try or where to look from there, any suggestions would be greatly appreciated.
Upvotes: 0
Views: 1089
Reputation: 20770
Beeline talks to HiveServer2 (typically runs on port 10000), which is a separate service from Hive Metastore (typically runs on port 9083).
Upvotes: 3