vprun.sh

sh vprun.sh 20130101 20130102

说明:参数为开始日期和结束日期,如果开始日期和结束日期是一样的话,那就是跑一天的数据

#!/bin/bash
#Filename: vprun.sh
ct=0
date=`date -d "${1} ${ct} days" +%Y%m%d`
while [[ ${2} > ${date} ]] || [[ ${2} == ${date} ]]
	do
		hadoop jar /home/yda/tianhailong/vp-0.0.1-SNAPSHOT.jar com.youku.vp.userindex.day.calculators.TDVUserVideoJoin -libjars /home/yda/tianhailong/json-lib-2.3-jdk15.jar,/home/yda/tianhailong/ezmorph-1.0.6.jar,/home/yda/tianhailong/kfs-0.3.jar,/home/yda/tianhailong/redis-0.0.1.jar,/home/yda/tianhailong/jedis-2.0.0.jar,/work/yda/video_profile/dataUtil.jar /commons/common_data/user/hive/tudou:/commons/common_data/t_dlord_info/hive:/commons/common_data/t_vuser/hive:/commons/common_data/video/hive/tudou /commons/web/vuser-video/$date/tudou $date
	let "ct += 1"
	date=`date -d "${1} ${ct} days" +%Y%m%d`
	done