| 
					
				 | 
			
			
				@@ -49,7 +49,7 @@ max_minute=20 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 global_init() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     # 获取当前小时,确定需要使用的数据分区范围 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     local current_hour=$(date +%H) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    if [ $current_hour -lt 08 ]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    # if [ $current_hour -lt 08 ]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         train_begin_str=${today_early_1}14 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         train_end_str=${today_early_1}21 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         predict_begin_str=${today_early_1}22 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -60,24 +60,24 @@ global_init() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         local_model_file_path=${MODEL_HOME}/${train_end_str}.txt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         local_change_model_file_path=${MODEL_HOME}/${train_end_str}_change.txt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        max_hour=05 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    elif [ $current_hour -ge 20 ]; then  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        train_begin_str=${today_early_1}22 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        train_end_str=${today}13 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        predict_begin_str=${today}14 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        predict_end_str=${today}15 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        trainBucketFeaturePath=${bucketFeatureSavePathHome}/${today}/train 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        predictBucketFeaturePath=${bucketFeatureSavePathHome}/${today}/predict 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        local_model_file_path=${MODEL_HOME}/${train_end_str}.txt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        local_change_model_file_path=${MODEL_HOME}/${train_end_str}_change.txt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        max_hour=21 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        echo "当前时间段异常: 退出任务" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        max_hour=12 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    # elif [ $current_hour -ge 20 ]; then  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    #     train_begin_str=${today_early_1}22 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    #     train_end_str=${today}13 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    #     predict_begin_str=${today}14 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    #     predict_end_str=${today}15 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    #     trainBucketFeaturePath=${bucketFeatureSavePathHome}/${today}/train 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    #     predictBucketFeaturePath=${bucketFeatureSavePathHome}/${today}/predict 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    #     local_model_file_path=${MODEL_HOME}/${train_end_str}.txt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    #     local_change_model_file_path=${MODEL_HOME}/${train_end_str}_change.txt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    #     max_hour=21 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    # else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    #     echo "当前时间段异常: 退出任务" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    #     exit 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    # fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     # 删除HDFS目录,保证本次任务运行时目录干净 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     $HADOOP fs -rm -r -skipTrash ${trainBucketFeaturePath} 
			 |