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 "Allen Wittenauer (JIRA)" <ji...@apache.org> on 2014/11/24 21:40:13 UTC
[jira] [Commented] (HADOOP-10993) Dump java command line to *.out
file
[ https://issues.apache.org/jira/browse/HADOOP-10993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14223475#comment-14223475 ]
Allen Wittenauer commented on HADOOP-10993:
-------------------------------------------
Since this was filed, the --debug option has been added which effectively does this feature:
{code}
function hadoop_java_exec
{
# run a java command. this is used for
# non-daemons
local command=$1
local class=$2
shift 2
hadoop_debug "Final CLASSPATH: ${CLASSPATH}"
hadoop_debug "Final HADOOP_OPTS: ${HADOOP_OPTS}"
export CLASSPATH
#shellcheck disable=SC2086
exec "${JAVA}" "-Dproc_${command}" ${HADOOP_OPTS} "${class}" "$@"
}
{code}
... and similar code in the *_daemon equivalents.
At the time, I opted not to put the entire java command line because:
* The entire command line is exceedingly long. It pretty much requires breaking it up for readability.
* The CLASSPATH and HADOOP_OPTS are significantly more interesting than the class and arguments 99% of the time
So that leaves a few things that should probably added to the --debug output for this JIRA:
* JAVA_HOME and/or JAVA
* command line options
* class name
So these days, we should probably log
> Dump java command line to *.out file
> ------------------------------------
>
> Key: HADOOP-10993
> URL: https://issues.apache.org/jira/browse/HADOOP-10993
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Allen Wittenauer
> Assignee: Sankara Reddy Telukutla
> Priority: Minor
> Labels: newbie
>
> It might be a nice enhancement to print the contents of the java command line to the out file during daemon startup to help with debugging.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)