Hive provides three types of client-side access interfaces:
1) Hive CLI (Hive command line,hive command-line), the client can operate directly in the command line mode.
2 hwi (Hive Web Interface,hive Web Interface), Hive provides a more intuitive web interface
3 Hiveserver,hive provides thrift service, thrift client currently supports C++/java/php/python/ruby.
Let's try each of these three interface access methods separately:
I. Hive CLI
You can enter CLI mode by typing the hive command directly:
[Cloud@cloud01 lib]$ Hive
hive History file=/tmp/cloud/hive_job_log_cloud_201110311056_1009535967.txt
> Show tables;
OK
testhivedrivertable time
taken:3.038 seconds
hive>select*from testhivedrivertable;
OK time
taken:0.905 seconds
hive> quit;[ CLOUD@CLOUD01 lib]$
For more command options, see official Wiki,hive Cli
Second, Hive Hwi
Hive Hwi provides a more intuitive web interface that is more convenient to use.
1) Start Hive Hwi
[Cloud@cloud01 ~]$ hive--service hwi 11/10/3110:14:11
INFO hwi. Hwiserver:hwi is starting up
11/10/3110:14:11 INFO mortbay.log:Logging to Org.slf4j.impl.Log4jLoggerAdapter ( Org.mortbay.log via org.mortbay.log.slf4jlog11/10/3110:14:11 info mortbay.log:jetty-6.1.1411/10/3110:14:11 info Mortbay.log:Extract jar:file:/data/cloud/hive-0.7.1/lib/hive-hwi-0.7.1.war!/to/tmp/jetty_0_0_0_0_9999_ Hive.hwi.0.7.1.war__hwi__.hf8ccz/webapp
11/10/3110:14:12 INFO mortbay.log:startedsocketconnector@0.0.0.0 : 9999
2) access to hive via HWI approach
My hive is deployed on the 10.46.169.101 machine, hive The default HWI port is 9999. We can access it by typing http://10.46.169.101:9999/hwi/in the browser.