码迷,mamicode.com
首页 > 其他好文 > 详细

12_Azkaban案例实践5_Command操作Hive脚本任务

时间:2018-07-16 19:35:37      阅读:607      评论:0      收藏:0      [点我收藏+]

标签:mina   hadoop   job   技术   class   name   NPU   test   family   

HIVE脚本任务

  hadoop fs -mkdir -p /aztest/hiveinput

  hadoop fs -put az.data /aztest/hiveinput/

  l 创建job描述文件和hive脚本

    Hive脚本: test.sql

use default;
drop table aztest;
create table aztest(id int,name string) row format delimited fields terminated by ‘,‘;
load data inpath ‘/aztest/hiveinput‘ into table aztest;
create table azres as select * from aztest;
insert overwrite directory ‘/aztest/hiveoutput‘ select count(1) from aztest; 

    Job描述文件:hivef.job  

#hivef.job
type=command
command=/usr/local/src/hive-1.2.1/bin/hive -f ‘test.sql‘

  2、将所有job资源文件打到一个zip包中

  技术分享图片

  3、在azkaban的web管理界面创建工程并上传zip包

  4、启动job

  技术分享图片

  技术分享图片

 

12_Azkaban案例实践5_Command操作Hive脚本任务

标签:mina   hadoop   job   技术   class   name   NPU   test   family   

原文地址:https://www.cnblogs.com/yaboya/p/9319117.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!