You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/07/07 21:08:00 UTC
[jira] [Updated] (HADOOP-18327) Fix eval expression in hadoop-functions.sh
[ https://issues.apache.org/jira/browse/HADOOP-18327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated HADOOP-18327:
------------------------------------
Labels: pull-request-available (was: )
> Fix eval expression in hadoop-functions.sh
> ------------------------------------------
>
> Key: HADOOP-18327
> URL: https://issues.apache.org/jira/browse/HADOOP-18327
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 3.3.3
> Reporter: Ashutosh Gupta
> Assignee: Ashutosh Gupta
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Need to fix the eval expression. We can relace single quote with escape-char and a double quote.
>
> HADOOP_OPTS can contain -XX:OnOutOfMemoryError='kill -9 %p', this leads to following invalid eval expression - eval $HADOOP_OPTS='foo_bar -XX:OnOutOfMemoryError='kill -9 %p''
> Replacing with escape-char and a double quote should works fine.
>
> eval "$1"="'${!1} $3'" -> eval "$1"="\"${!1} $3\""
> eval "$1"="'${!1# }'" -> eval "$1"="\"${!1# }\""
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org