Ashutosh Gupta created HADOOP-18327:
---------------------------------------

             Summary: 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


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-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-dev-h...@hadoop.apache.org

Reply via email to