hadoop 数据抽取

#!/bin/bash

if [ ! -z $2 ]; then
start_time=$1
end_time=KaTeX parse error: Got function '\`' with no arguments as argument to '\=' at position 27: … starttime\=\̲`̲date +%Y%m%d%H%…{starttime:0:10}
startmi=`expr ${starttime:10:2} / 15 * 15`
if [ KaTeX parse error: Can't use function '\]' in math mode at position 14: startmi != 0 \̲]̲;then …startdayKaTeX parse error: Expected group as argument to '\=' at end of input: … start\_time\=startday"00"
fi
#结束时间
endtime=`date +%Y%m%d%H%M`
endday=${endtime:0:10}
endmi=`expr ${endtime:10:2} / 15 * 15`
if [ KaTeX parse error: Can't use function '\]' in math mode at position 12: endmi != 0 \̲]̲;then …enddayKaTeX parse error: Expected group as argument to '\=' at end of input: … end\_time\=endday"00"
fi

fi
echo “数据时间为: s t a r t _ t i m e − − start\_time-- start_timeend_time”
#创建目录
hadoop fs -mkdir cache/O_RE_ST_XDR_PS_GN_HTTP/KaTeX parse error: Expected 'EOF', got '#' at position 13: start\_time #̲上传数据时间段数据 for f…{start_time:0:4}- s t a r t _ t i m e : 4 : 2 − {start\_time:4:2}- start_time:4:2{start_time:6:2}/*${start_time:0:10}*.CHK`
do
#351_TM07_PSGnHTTPEvent201410021235_3720202.CHK
#351_TM07_PSGnHTTPEvent201410021235_3720202.AVL
basefile=`basename KaTeX parse error: Expected group as argument to '\`' at position 7: file\` ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲date\={basefile:22:12}
if [ $date -ge $start_time ] && [ $date -lt KaTeX parse error: Can't use function '\]' in math mode at position 11: end\_time \̲]̲;then …{file/%CHK/AVL}
echo $avlfile
cp $avlfile /opt8/gz_data_temp/http/
#hadoop fs -put a v l f i l e c a c h e / O _ R E _ S T _ X D R _ P S _ G N _ H T T P / avlfile cache/O\_RE\_ST\_XDR\_PS\_GN\_HTTP/ avlfilecache/O_RE_ST_XDR_PS_GN_HTTP/{start_time}/
fi
done
#cat /opt8/gz_data_temp/http/*_*.AVL>/opt8/gz_data_temp/http/KaTeX parse error: Expected 'EOF', got '#' at position 17: …tart\_time.AVL #̲split -b 512m /…start_time.AVL /opt8/gz_data_temp/http/KaTeX parse error: Expected 'EOF', got '#' at position 18: …art\_time.AVL. #̲echo \`ls /opt8…start_time.AVL`
#rm -f /opt8/gz_data_temp/http/*.AVL
`hadoop fs -put /opt8/gz_data_temp/http/*.AVL cache/O_RE_ST_XDR_PS_GN_HTTP/${start_time}/`
rm -f /opt8/gz_data_temp/http/*.AVL
echo “oozie–job-http-start!”
cd /home/boco/program
echo `java -cp .:…/oozie/libserver/* com.boco.BSSystem.schedule.OozieRunner job_ods_a_xdr_ps_gn_http ${start_time}`

转载于:https://www.cnblogs.com/jack-Star/p/4221584.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值