Hive的提供者

來源:互聯網
上載者:User

Hive提供了三種用戶端提供者:

1)Hive CLI(Hive Command Line,Hive命令列),用戶端可以直接在命令列模式下進行操作。

2)hwi(Hive Web Interface,Hive Web介面),Hive提供了更直觀的Web介面

3)hiveserver,Hive提供了Thrift服務,Thrift用戶端目前支援C++/Java/PHP/Python/Ruby。

下面我們來分別嘗試下這三種介面訪問方式:

一、Hive CLI

直接鍵入hive命令即可進入CLI模式:

[cloud@cloud01 lib]$ hiveHive history file=/tmp/cloud/hive_job_log_cloud_201110311056_1009535967.txthive> show tables;OKtesthivedrivertableTime taken:3.038 secondshive>select*from testhivedrivertable;OKTime taken:0.905 secondshive> quit;[cloud@cloud01 lib]$

更多的命令選項,參見官方wiki,Hive Cli

二、Hive hwi

Hive hwi提供了一個更直觀的web介面,使用起來更方便。

1)啟動hive hwi

[cloud@cloud01 ~]$ hive --service hwi11/10/3110:14:11 INFO hwi.HWIServer: HWI is starting up11/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/webapp11/10/3110:14:12 INFO mortbay.log:StartedSocketConnector@0.0.0.0:9999

2)通過hwi方式訪問Hive

我的Hive部署在10.46.169.101機器上,hive預設hwi連接埠為9999。我們在瀏覽器中鍵入http://10.46.169.101:9999/hwi/ 就可以訪問了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.