Select one server as the hive server in the Hadoop cluster. Main configuration hive, after configuration, start the server's Meterstore, and configure
<!--configuration enables remote clients to connect hive servers bidev-cdh005-->
<property>
<name>hive.metastore.uris</name >
<value>thrift://bidev-cdh005:9083</value>
</property>
At the same time, configure MySQL's storage hive metadata.
[hadoop@bidev-cdh005 ~]$ ps aux | grep Metastore
To be able to find the appropriate process, with records indicating success
Once successful, the hive server's associated Hive tool installation package is replicated to other Hadoop nodes, Hive.metastore.uris This configuration, so that other Hadoop nodes can also serve as hive clients.
Use of Beeline:
Prerequisite: The Hiveserver2 service for any one hive client (Hadoop node) is turned on, and the default port is 10000
Can pass NETSTAT-NLTP | grep 10000 Determines whether this Hiveserver2 is started. You can also pass
PS aux | grep HiveServer2 (note case, you can use grep-i case insensitive)
Start the beeline script in the Hive Bin directory. After/beeline
And then enter. Connect jdbc:hive2://localhost:10000 Kaikai Kaikai (password after first account name)
JP on the line as long as the start of the HiveServer2, you can make username,passwd all empty landing, but no data query permissions
Note that the usage of Linux command grep and Netstat is summarized