Skip to content

Commit

Permalink
[hotfix-#1043][bin] allow user to submit job in local mode while rema…
Browse files Browse the repository at this point in the history
…ining empty environment config of FLINK_HOME and HADOOP_HOME and fix bug in standalone mode that parameters were not tranfered.
  • Loading branch information
lvyanquan committed Jul 13, 2022
1 parent a554aa9 commit 38f5853
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/chunjun-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ done
bin=`dirname "$target"`

# get flink config
. "$bin"/submit.sh
. "$bin"/submit.sh $@
17 changes: 16 additions & 1 deletion bin/submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,19 @@ echo "FLINK_HOME is $FLINK_HOME"
echo "HADOOP_HOME is $HADOOP_HOME"
echo "ChunJun starting ..."

$JAVA_RUN -cp $JAR_DIR $CLASS_NAME $ARGS -mode $MODE -jobType $JOBTYPE -chunjunDistDir $CHUNJUN_HOME -flinkConfDir $FLINK_HOME/conf -flinkLibDir $FLINK_HOME/lib -hadoopConfDir $HADOOP_HOME/etc/hadoop
# basic parameters for all jobs
PARAMS="$ARGS -mode $MODE -jobType $JOBTYPE -chunjunDistDir $CHUNJUN_HOME"

# if FLINK_HOME is not set or not a directory, ignore flinkConfDir parameter
if [ ! -z $FLINK_HOME ] && [ -d $FLINK_HOME ];then
PARAMS="$PARAMS -flinkConfDir $FLINK_HOME/conf -flinkLibDir $FLINK_HOME/lib"
fi

# if HADOOP_HOME is not set or not a directory, ignore hadoopConfDir parameter
if [ ! -z $HADOOP_HOME ] && [ -d $HADOOP_HOME ];then
PARAMS="$PARAMS -hadoopConfDir $HADOOP_HOME/etc/hadoop"
fi

echo "start command: $JAVA_RUN -cp $JAR_DIR $CLASS_NAME $PARAMS"

$JAVA_RUN -cp $JAR_DIR $CLASS_NAME $PARAMS

0 comments on commit 38f5853

Please sign in to comment.