[ https://issues.apache.org/jira/browse/HADOOP-9455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13628194#comment-13628194 ]
Chris Nauroth commented on HADOOP-9455: --------------------------------------- Eli, thank you for taking a look. {quote} Wouldn't it be better to only append HADOOP_CLIENT_OPTS once in hadoop-env.sh rather than in each per-project bin script? {quote} This would cause a subtle change in behavior. Right now, the hdfs script only appends HADOOP_CLIENT_OPTS for a subset of the interactive commands: dfs, dfsadmin, haadmin, and fsck. This is not done for the daemon commands: namenode, datanode, secondarynamenode, etc. It appears that the intent is that when you want to override options to a daemon, you use the daemon-specific environment variable instead: HADOOP_NAMENODE_OPTS, HADOOP_DATANODE_OPTS, HADOOP_SECONDARYNAMENODE_OPTS, etc. It could be erroneous to combine options set in HADOOP_CLIENT_OPTS with options set for a daemon. For example, I could imagine an operator wanting to maintain a single hadoop-env.sh that sets both HADOOP_NAMENODE_OPTS and HADOOP_CLIENT_OPTS, but set different values for max heap size within each one. > HADOOP_CLIENT_OPTS is appended twice, causing JVM failures > ---------------------------------------------------------- > > Key: HADOOP-9455 > URL: https://issues.apache.org/jira/browse/HADOOP-9455 > Project: Hadoop Common > Issue Type: Bug > Components: bin > Affects Versions: 3.0.0, 2.0.3-alpha > Reporter: Sangjin Lee > Assignee: Chris Nauroth > Priority: Minor > Attachments: HADOOP-9455.1.patch > > > If you set HADOOP_CLIENT_OPTS and run hadoop, you'll find that the > HADOOP_CLIENT_OPTS value gets appended twice, and leads to JVM start failures > for cases like adding debug flags. > For example, > {noformat} > HADOOP_CLIENT_OPTS='-agentlib:jdwp=transport=dt_socket,address=localhost:9009,server=y,suspend=y' > hadoop jar anything > ERROR: Cannot load this JVM TI agent twice, check your java command line for > duplicate jdwp options. > Error occurred during initialization of VM > agent library failed to init: jdwp > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira