On Mon, Jan 18, 2010 at 2:52 AM, Steve Loughran <ste...@apache.org> wrote:
> Tarandeep Singh wrote: > >> Hi, >> >> I am running a MR job that requires usage of some java.awt.* classes, that >> can't be run in headless mode. >> >> Right now, I am running Hadoop in a single node cluster (my laptop) which >> has X11 server running. I have set up my ssh server and client to do X11 >> forwarding. >> >> I ran the following java program to ensure that X11 forwarding is working- >> > > the problem here is that you need to tell AWT to run headless instead of > expecting an X11 server to hand. Which means setting java.awt.headless=true > in the processes that are using AWT to do bitmap rendering. > > see http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/for > details > > I am using Frame class and it can't be run in headless mode. Suggestion of Brien is useful (running x virtual frame buffer) and I guess I am going to do the same on my servers but right now I am testing on my laptop which is running X server. The problem here is, the test program runs over ssh without any problem but when I run the map reduce program I keep getting error. Both the standalone program and MR program are run as the same user. I followed Todd's suggestion and checked the value of XAUTHORITY environment variable. It turns out, the value of this variable is not set when I do ssh. So I am trying to see if I can set its value and if the MR program runs after that. But if this is the problem then the standalone program should also not run. Thanks, Tarandeep