I need to add the -Djava.awt.headless=true
to ALL of Hadoop's Java processes. Otherwise, the process is killed for trying to access the window server.
I have tried everywhere and cannot find where these flags should be applied. I've managed to get it running for most of the base processes, but one process is eluding me. That process is MRAppMaster.
No matter what I do, MRAppMaster runs without the headless flag. The documentation, being as horrific as it is, has nothing to say about this as far as I can tell.
If there's a location this flag can be applied, I would appreciate it. I'm running Hadoop 2.2.0 on Mac OS 10.9.
MRAppMaster is YARN-specific. Anyway, you can pass java opts to the application master through a property called yarn.app.mapreduce.am.command-opts
. You can set it in the map reduce config file, mapred-site.xml
(and notyarn-site.xml
, as one may guess).
From here:
yarn.app.mapreduce.am.command-opts
Java opts for the MR App Master processes.