[
https://issues.apache.org/jira/browse/HADOOP-18327?focusedWorklogId=789564&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-789564
]
ASF GitHub Bot logged work on HADOOP-18327:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 11/Jul/22 13:45
Start Date: 11/Jul/22 13:45
Worklog Time Spent: 10m
Work Description: ashutoshcipher commented on PR #4536:
URL: https://github.com/apache/hadoop/pull/4536#issuecomment-1180429472
Thanks @iwasakims for your comments. I missed one change which I have added
in latest commit. After that change, it will work fine.
```
88665a380593:hadoop-3.3.3 ashugpt$ export
HADOOP_OPTS="-XX:OnOutOfMemoryError='kill -9 %p'"
88665a380593:hadoop-3.3.3 ashugpt$ echo $HADOOP_OPTS
-XX:OnOutOfMemoryError='kill -9 %p'
88665a380593:hadoop-3.3.3 ashugpt$ bin/hadoop version
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true
Hadoop 3.3.3
Source code repository https://github.com/apache/hadoop.git -r
d37586cbda38c338d9fe481addda5a05fb516f71
Compiled by stevel on 2022-05-09T16:36Z
Compiled with protoc 3.7.1
From source with checksum eb96dd4a797b6989ae0cdb9db6efc6
This command was run using
/Users/ashugpt/Downloads/hadoop-3.3.3/share/hadoop/common/hadoop-common-3.3.3.jar
```
Issue Time Tracking
-------------------
Worklog Id: (was: 789564)
Time Spent: 40m (was: 0.5h)
> 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: 40m
> 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: [email protected]
For additional commands, e-mail: [email protected]