Add a command-line diagnostics entry point
------------------------------------------
Key: HADOOP-6474
URL: https://issues.apache.org/jira/browse/HADOOP-6474
Project: Hadoop Common
Issue Type: New Feature
Components: util
Affects Versions: 0.22.0
Reporter: Steve Loughran
Priority: Minor
We could extend the conf/ servlet idea with a command line option to dump out
the local settings/jvm state for:
# End users to debug problems themselves
# Attachment to bug report
# Something for Hadoop to collect and mine
# An entry point we can use in tests such as HADOOP-6453
Ant's {{ant -diagnostics}} is the basic idea and starting point; that code
would be the foundation:
[Diagnostics.java|http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Diagnostics.java?view=markup]
I'm keeping this separate from the more complex challenge of per-service
diagnostics, HADOOP-6473, which could be added later. Here I propose starting
with the common basic things you need to look at:
* JVM properties
* Env variables
* XML and XSL Factories and features
* Logging option -and if set to log4j, the log4j options
* Local Hadoop configuration
* java.io.tmpdir: writeability. Ant looks for clock drift, which is overkill
here but matters for a build tool
* local networking state: local hostname, what that hostname resolves to, proxy
settings.
* Maybe have a list of classes to look for and try and load (HDFS, Hive,
MapReduce entry points), and log the JARs that host them, plus any errors if
loading fails. By looking for all the standard filesystems, the diagnostics
would pick up on missing dependency JARs.
The output could be changed to generate and an-memory tree of (name,value)
pairs put together; this could then be printed as XML or JSON.
Testing? TestCLI, obviously.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.