Hadoop生態圈-Azkaban實現hive腳本執行


                Hadoop生態圈-Azkaban實現hive腳本執行

                                      作者:尹正傑

版權聲明:原創作品,謝絕轉載!否則將追究法律責任。

 

 

   本篇博客中在HDFS分布式系統取的數據,而這個數據的是有之前我通過MapReduce生產的數據,詳情請參考:https://www.cnblogs.com/yinzhengjie/p/9233393.html

 

 

1>.創建job文件

use yinzhengjie;
create table if not exists az_wc(word string, count int) row format delimited fields terminated by '\t';
load data inpath '/azkaban_out/part-r-00000' into table az_wc;
create table if not exists az_top3 like az_wc;
insert overwrite table az_top3 select * from az_wc order by count desc limit 3;
創建SQL文件(hive.sql)
type=command
command=hive -f hive.sql
創建hive的job文件用來調用SQL文件(hive.job)

2>.壓縮配置文件

3>.將壓縮后的job文件上傳到azkaban的WEB界面中

 

4>.執行hive任務

 

5>.點擊Execute

6>.點擊繼續

7>.等待執行結束

8>.查看執行狀態

 

9>. 任務執行成功

10>.登錄到hive服務器中,查看是否成功將數據導入到hive中

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM