Setting up local debug environment with Hive metastore
See original GitHub issueI was trying to setup local debug environment with Presto source code and I was following instructions in README.md
.
I have setup IntelliJ and ran PrestoServer
as advised. README advises that when I don’t have Hive metastore, -Dhive.metastore.uri=thrift://localhost:9083
as VM option should work. However, with that setup, metastore connection does not work.
$ $PRESTO_HOME/presto-cli/target/presto-cli-*-executable.jar --server localhost:8080 --catalog hive
presto> show schemas;
Query 20190303_205534_00000_wrjah failed: Failed connecting to Hive metastore: [localhost:9083]
In order to workaround this problem, I setup local Derby-based metastore in Hive and tried hooking that up. That “partially” worked.
$ ${HIVE_HOME}/bin/schematool -initSchema -dbType derby
$ $HIVE_HOME/bin/hive
hive> #Created table namesdata and inserted data through Hive
$ $HIVE_HOME/bin/hive --service metastore -p 9080 &
2019-03-03 22:01:15: Starting Hive Metastore Server
$ # Added -Dhive.metastore.uri=thrift://localhost:9080 in IntelliJ
$ $PRESTO_HOME/presto-cli/target/presto-cli-*-executable.jar --server localhost:8080 --catalog hive
presto> show schemas;
Schema
--------------------
default
information_schema
(2 rows)
Query 20190303_210236_00000_8u9zb, FINISHED, 1 node
Splits: 19 total, 19 done (100.00%)
0:01 [2 rows, 35B] [1 rows/s, 30B/s]
presto> show tables in default; # This is weird problem
Query 20190303_210253_00002_8u9zb failed: localhost:9080: java.net.SocketTimeoutException: Read timed out
presto> select * from default.namesdata limit 5;
state | gender | year | name | number
-------+--------+------+---------+--------
AK | F | 1910 | Dorothy | 5
AK | F | 1910 | Annie | 12
AL | F | 1910 | Louise | 138
AL | F | 1910 | Alice | 112
AL | F | 1910 | Ida | 95
(5 rows)
Query 20190303_210329_00003_8u9zb, FINISHED, 1 node
Splits: 18 total, 18 done (100.00%)
0:01 [16K rows, 303KB] [14.7K rows/s, 279KB/s]
Can you please tell why show tables
failed but the select
query did not? Also, is there more elegant way to setup development environment locally?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Configuring the Hive Metastore for CDH | 6.3.x
Open the Cloudera Manager Admin Console and go to the Hive-1 service. Click the Configuration tab. Select Category > Hive Metastore Database.
Read more >GettingStarted - Apache Software Foundation
The location of the Hive configuration directory can be changed by setting the HIVE_CONF_DIR environment variable. Configuration variables can be changed by (re ......
Read more >The Hive MetaStore and Local Development - Pivotal BI
In this next post in our series focussing on Databricks development, we'll look at how to create our own Hive metastore locally using...
Read more >how to run hive in debug mode - Stack Overflow
You better start hive shell by switching logger mode to DEBUG as follows, I hope you could find something useful from there.
Read more >External Apache Hive metastore | Databricks on AWS
External Apache Hive metastore · Hive metastore deployment modes · Network setup · Cluster configurations · Set up an external metastore using the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wenleix Thanks for the suggestion. I just tried
HiveQueryRunner
. With that,show tables
works, butselect
queries do not.Although, good news is that, I could create another table and
select
worked for that table@ssaumitra : Looks like this issue is resolved. Feel free to reopen it if you have any further question 😃