许家凯 4 年 前
コミット
58b4d763d0

+ 1 - 1
src/main/java/com/winhc/dataworks/flow/touch/Main.java

@@ -86,7 +86,7 @@ public class Main {
                 } else {
                     log.info("company表{}分区数据不为空.", ds);
                 }
-                return;
+                System.exit(0);
             }
             verify(commandLine);
             String bizDate = commandLine.getOptionValue("b", DateUtils.getYesterday());

+ 10 - 0
src/main/resources/task-step03.yaml

@@ -17,3 +17,13 @@ job:
         param:
           - _nodeId: 700003430766
             project: winhc_eci_dev
+
+  - project: winhc_eci
+    flow: 案源机会_新增公司
+    task:
+      - taskName: 案源机会_新增公司
+        param:
+          - _nodeId: 700003425850
+            project: winhc_eci_dev
+          - _nodeId: 700003425854
+            project: winhc_eci_dev

+ 22 - 20
start.sh

@@ -3,7 +3,9 @@
 export JAVA_HOME=/root/jdk1.8.0_181
 export PATH=$JAVA_HOME/bin:$PATH
 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
-#!/usr/bin/env bash
+
+
+bashPath=/root/maxcompute_job/flow
 
 if [ $# -eq 0 ];then
         echo "---------------------------------------------------------------------------"
@@ -33,7 +35,7 @@ if [ $# -eq 0 ];then
         echo "---------------------------------------------------------------------------"
 fi
 
-java -jar DataWorks-flow-touch.jar -q
+java -jar $bashPath/DataWorks-flow-touch.jar -q
 
 if [ $? -eq 0 ]; then
      echo "company is not empty!"
@@ -42,7 +44,7 @@ else
      exit $?
 fi
 
-java -jar DataWorks-flow-touch.jar -f jobs/task-step02.yaml
+java -jar $bashPath/DataWorks-flow-touch.jar -f $bashPath/jobs/task-step02.yaml
 
 if [ $? -eq 0 ]; then
      echo "step02 succeed"
@@ -51,23 +53,23 @@ else
      exit $?
 fi
 
-#java -jar DataWorks-flow-touch.jar -f jobs/task-step03.yaml -d
-#
-#if [ $? -eq 0 ]; then
-#     echo "step03 succeed"
-#else
-#     echo "step03 failed"
-#     exit $?
-#fi
-#
-#java -jar DataWorks-flow-touch.jar -f jobs/task-step04.yaml -d
-#
-#if [ $? -eq 0 ]; then
-#     echo "step04 succeed"
-#else
-#     echo "step04 failed"
-#     exit $?
-#fi
+java -jar $bashPath/DataWorks-flow-touch.jar -f $bashPath/jobs/task-step03.yaml
+
+if [ $? -eq 0 ]; then
+     echo "step03 succeed"
+else
+     echo "step03 failed"
+     exit $?
+fi
+
+java -jar $bashPath/DataWorks-flow-touch.jar -f $bashPath/jobs/task-step04.yaml
+
+if [ $? -eq 0 ]; then
+     echo "step04 succeed"
+else
+     echo "step04 failed"
+     exit $?
+fi
 
 echo "end"