Reputation: 334
I am new with bigdata , hive and hadoop. i have just installed hadoop and hive on my ubuntu machine following the steps given by https://www.edureka.co/blog/install-hadoop-single-node-hadoop-cluster
Currently how i connect to hive is by going to hive directory and using cmd : hive
This will then allow me to create my db and tables.
i am also unsure if im having hiveserver2 but currently i installed hadoop 2.7 and hive 2.1 on my ubuntu machine
i did not install sql or oracle db as im just using hive, should i install this to connect with beeline?
What i am trying to achieve is by connecting to my hive using beeline. I was wondering if there is any additional steps needed or should there be any configuration needed. What i am trying now is
1.) after start-all.dfs 2.) i will then run this command : beeline -u jdbc:hive2://localhost:10000/default
But i am getting this error on connection refused.
1.) should i change my localhost to my machine ip address, i check ifconfig , my inet is e.g inet 192.168.1.222
2.) should i change beeline -u jdbc:hive2:/hadooplocalhost/default to my hadoop localhost
i am using Single Node Hadoop Cluster for study and practice purpose i am trying to connect to my hive using beeline. but im unsure on how can this be done. Is there step by step tutorial on how i can connect using beeline after hadoop and hive installation
Upvotes: 0
Views: 644
Reputation: 133
Most probably your HS2 isn't running. In case you haven't already initialised metastore with some other RDBMS(MySql/Oracle/Postgres etc), you can try derby: Do:
bin/schematool -dbType derby -initSchema
Then if you want to run in embedded mode:
beeline -u jdbc:hive2://
Else, If you want to launch Hs2:
bin/hiveServer2 &
And then you can use your same beeline command:
bin/beeline -u jdbc:hive2://localhost:10000
Make sure to have properly configured HIVE_HOME & the hive configs...
Upvotes: 0
Reputation: 590
You can just use either of the following to connect without specifying any ip's.
!connect jdbc:hive2:// [Or]
hive/bin/beeline -u jdbc:hive2://
When it asks for username and password just press enter.
Upvotes: 0