You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2019/09/29 02:49:00 UTC
[jira] [Updated] (FLINK-13827) shell variable should be escaped in
start-scala-shell.sh
[ https://issues.apache.org/jira/browse/FLINK-13827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jark Wu updated FLINK-13827:
----------------------------
Fix Version/s: (was: 1.9.1)
1.9.2
> shell variable should be escaped in start-scala-shell.sh
> --------------------------------------------------------
>
> Key: FLINK-13827
> URL: https://issues.apache.org/jira/browse/FLINK-13827
> Project: Flink
> Issue Type: Bug
> Components: Scala Shell
> Affects Versions: 1.9.0, 1.10.0
> Reporter: Zili Chen
> Priority: Major
> Fix For: 1.10.0, 1.9.2
>
>
> {code:java}
> diff --git a/flink-scala-shell/start-script/start-scala-shell.sh b/flink-scala-shell/start-script/start-scala-shell.sh
> index b6da81af72..65b9045584 100644
> --- a/flink-scala-shell/start-script/start-scala-shell.sh
> +++ b/flink-scala-shell/start-script/start-scala-shell.sh
> @@ -97,9 +97,9 @@ log_setting="-Dlog.file="$LOG" -Dlog4j.configuration=file:"$FLINK_CONF_DIR"/$LOG
>
> if ${EXTERNAL_LIB_FOUND}
> then
> - $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" $log_setting org.apache.flink.api.scala.FlinkShell $@ --addclasspath "$EXT_CLASSPATH"
> + $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" "$log_setting" org.apache.flink.api.scala.FlinkShell $@ --addclasspath "$EXT_CLASSPATH"
> else
> - $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" $log_setting org.apache.flink.api.scala.FlinkShell $@
> + $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" "$log_setting" org.apache.flink.api.scala.FlinkShell $@
> fi
>
> #restore echo
> {code}
> otherwise it is error prone when {{$log_setting}} contain arbitrary content.
> For example, if the parent dir contain whitespace, said {{flink-1.9.0 2}}, then {{bin/start-scala-shell.sh local}} will fail with
> {{Error: Could not find or load main class 2.log.flink\-\*\-scala\-shell\-local\-\*.log}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)