集群运行脚本

来源:互联网 发布:校友会网站 源码 编辑:程序博客网 时间:2024/05/23 02:00

首先写一个脚本select_app02.sh如下:

#!bin/bash hive -e "drop table default.tbl_play_pt_small_0;create table default.tbl_play_pt_small_0 as select a.p1,a.p2,a.deviceid from data_raw.tbl_play_hour a where a.dt=20150322 and a.letv_cookie='-' and a.hour != 27;"if [ $? -ne 0 ] ;then  exit 1fi

然后在集群后台中运行如下:nohup sh select_app02.sh > lzy.log &
其中lzy.log 可以查看脚本的运行情况

0 0
原创粉丝点击