Details
-
New Feature
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.22.0
-
None
-
None
Description
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
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.