编写hadoop中补数离线运行脚本
来源:互联网 发布:php用逗号分割字符串 编辑:程序博客网 时间:2024/06/18 10:51
本文地址:http://blog.csdn.net/hblfyla/article/details/71709252 ,转载请标记原文地址
范例一:
#!/bin/shif [ $# -ne 2 ];then startdate=`date --date='1 days ago' +%Y-%m-%d` enddate=`date +%Y-%m-%d`else startdate=$1 enddate=$2fiwhile [[ $startdate < $enddate ]]do echo "########$startdate#########" echo "clean data" hadoop jar xxxx.jar $startdate hive -e "xxxxxxxxxxxxxxxxxxxxxx"done
范例二:
#!/bin/shif [ $# -ne 2 ];then startdate=`date --date='1 days ago' +%Y-%m-%d` enddate=`date +%Y-%m-%d`else startdate=$1 enddate=$2fiwhile [[ $startdate < $enddate ]]do echo "########$startdate#########" #日期转换 hdfsstart=`date -d ${startdate} +%Y/%m/%d` hdfsend=`date -d "-1 day ago ${hdfsstart}" +%Y/%m/%d`java -jar xxxxx.jar ${hdfsstart} ${hdfsend}sh xxxxx/xxxxxx.sh ${startdate}hadoop jar xxxxxxxxx ${startdate}hive -e "xxxxxxxxxxxxxxxxxxxxxxxxxxxx" startdate=`date -d "+1 day $startdate" +%Y-%m-%d`done
0 0
- 编写hadoop中补数离线运行脚本
- hadoop完全分布式编写脚本
- monkey离线运行之shell脚本实现
- 编写运行hadoop mapreduce程序
- Powershell 编写和运行脚本
- Hadoop大数据离线项目的运行流程图
- 【Hadoop】编写和运行WordCount.java
- Windows下编写的脚本无法运行?
- Shell 脚本基础——编写运行
- 从编写到运行:unix脚本
- Mac下编写bash脚本并运行
- 自己编写的shell脚本开机运行
- 在Hadoop上运行Python脚本
- 编写一键安装伪分布式Hadoop的脚本
- 编写自己的hadoop程序并打包运行
- windows下编写的shell脚本如何在Linux运行
- windows下编写shell脚本放到linux运行问题
- windows下编写shell脚本运行出错问题
- tensorflow实现基于深度学习的图像补全
- Glide 初探
- 【怎样写代码】参数化类型 -- 泛型(四):泛型之类型参数约束
- hightcharts 设置重最边缘开始
- eclipse Cannot create a server using the selected type
- 编写hadoop中补数离线运行脚本
- 基于阿里云Centos6.8 x64编译安装网站生产环境
- lintcode[190]:下一个排列
- list和array的区别
- React组件间通信
- textarea中多出N多莫名空格的解决方法
- 12个非常有用的JavaScript技巧
- 上传自己代码到Cocoapods
- C#字符串格式