Tandoy opened a new issue #6021:
URL: https://github.com/apache/dolphinscheduler/issues/6021


   **Steps to reproduce the behavior**
   Use shell script to encapsulate spark-submit command to submit spark task to 
yarn
   
   **Describe the question**
   A shell script is used to encapsulate the spark-submit command to execute a 
spark task. Some tasks are executed successfully but the dolphinscheduler 
returns a status of failure. But there are also some tasks in the workflow that 
dolphinscheduler returns successfully. And using the same shell script to 
execute hive tasks does not exist.
   
   **Environment Description:**
   dolphinscheduler:1.3.2
   Hadoop version : 2.6.0-cdh5.13.3
   Hive version : 1.1.0-cdh5.13.3
   yarn.resourcemanager:single
   Storage (HDFS/S3/GCS..) : HDFS
   Running on Docker? (yes/no) :no
   
   **common.properties**
   
![企业微信截图_16296892829673](https://user-images.githubusercontent.com/56899730/130386217-86da5bc2-5dcc-4133-a3ba-1aea5886c188.png)
   
   **shell script**
   #!/bin/bash
   sqlfile_name=$1
   data_date=$2
   curDay=`echo $data_date | cut -c 7-8`
   curMonth=`echo $data_date | cut -c 5-6`
   curYear=`echo $data_date |cut -c 1-4`
   curCal=`cal $curMonth $curYear`
   endDay=`echo $curCal | awk '{print $NF}'`
   #echo $endDay
   if [ "$curDay" -eq "$endDay" ]
           then
           echo "开始执行.sql文件"
   spark2-submit \
   --class com.wecreditlife.framework.SparkExecSqlResApp \
   --master yarn \
   --deploy-mode cluster \
   --driver-memory 1G \
   --num-executors 2 \
   --executor-memory 1G \
   --executor-cores 4 \
   --conf spark.yarn.executor.memoryOverhead=512 \
   --conf spark.yarn.driver.memoryOverhead=512 \
   /opt/xysh/xysh-udf-project-1.0-SNAPSHOT.jar ${sqlfile_name} ${data_date}
           echo "执行完毕"
           else
           echo "ignore"
   fi
   
   **Additional context:**
   
![企业微信截图_16296380722407](https://user-images.githubusercontent.com/56899730/130386359-edb64cbd-7ba0-48f0-bafc-4a83eaef6446.png)
   
![企业微信截图_16296895235811](https://user-images.githubusercontent.com/56899730/130386454-a79e3bf7-a22b-4d40-bac0-985ff9838d16.png)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to