[ 
https://issues.apache.org/jira/browse/HADOOP-18327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ashutosh Gupta updated HADOOP-18327:
------------------------------------
    Description: 
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''

 

  was:
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# }\""


> 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: 50m
>  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''
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to