Hive學習筆記1--------Hive入門

(轉自淘寶數據平臺團隊)

 Hive 是什麼

在接觸一個新的事物首先要回到的問題是:這是什麼?

這裏引用 Hive wiki 上的介紹:

Hive is a data warehouse infrastructure built on top of Hadoop. It provides tools to enable easy data ETL, a mechanism to put structures on the data, and the capability to querying and analysis of large data sets stored in Hadoop files. Hive defines a simple SQL-like query language, called QL, that enables users familiar with SQL to query the data. At the same time, this language also allows programmers who are familiar with the MapReduce fromwork to be able to plug in their custom mappers and reducers to perform more sophisticated analysis that may not be supported by the built-in capabilities of the language.

Hive 是建立在 Hadoop 上的數據倉庫基礎構架。它提供了一系列的工具,可以用來進行數據提取轉化加載(ETL),這是一種可以存儲、查詢和分析存儲在 Hadoop 中的大規模數據的機制。Hive 定義了簡單的類 SQL 查詢語言,稱爲 QL,它允許熟悉 SQL 的用戶查詢數據。同時,這個語言也允許熟悉 MapReduce 開發者的開發自定義的 mapper 和 reducer 來處理內建的 mapper 和 reducer 無法完成的複雜的分析工作。

Hive does not mandate read or written data be in the “Hive format”—there is no such thing. Hive works equally well on Thrift, control delimited, or your specialized data formats. Please see File Format and SerDe in Developer Guide for details.

Hive 沒有專門的數據格式。 Hive 可以很好的工作在 Thrift 之上,控制分隔符,也允許用戶指定數據格式。

Hive 資源

Hive 本身提供了較豐富的文檔,以下鏈接提供了 Hive 的一些基礎文檔:

FaceBook 鏡像(被牆):[[http://mirror.facebook.com/facebook/hive]]
Wiki 頁面:[[http://wiki.apache.org/hadoop/Hive]]
入門指南:[[http://wiki.apache.org/hadoop/Hive/GettingStarted]]
查詢語言指南:[[http://wiki.apache.org/hadoop/Hive/HiveQL]]
演示文稿:[[http://wiki.apache.org/hadoop/Hive/Presentations]]
藍圖:[[http://wiki.apache.org/hadoop/Hive/Roadmap]]
大多數有關 Hive 的使用和特性的問題可以從以上的鏈接中尋找到答案。當然,由於 Hive 本身在不斷的發展中,文檔的更新速度很多時候都趕不上 Hive 本身的更新速度,若希望瞭解 Hive 的最新動態或者遇到 Bug,可以加入 Hive 的郵件列表:
* User: [email protected]
* Developer: [email protected]

Hive 的下載配置安裝
請參考入門指南, 這裏給出最基本的提綱:

安裝配置 Hadoop。
安裝配置數據庫(mysql 等)。
獲得 Hive 源碼或者可執行代碼。wget http://www.apache.org/dist/hadoop/hive/hive-0.5.0/hive-0.5.0-bin.tar.gz
tar xzf hive-0.5.0-bin.tar.gz
cd hive-0.5.0-bin
配置 Hive 如何訪問數據庫,如何訪問 Hadoop。
運行 Hive。
當看到 Hive 提示符‘Hive>’的時候,恭喜,你可以開始你的 Hive 之旅了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章