[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Newbie question about Perl programs



On Tue, Mar 21, 2006 at 06:41:56PM +0000, Matt Hope wrote:
> 
> > Is this why there is a separate Java universe?  Is it otherwise
> > difficult to submit a job with executable "java.exe", and program name
> > and command line parameters as arguments?
> 
> Basically in one way yes - I don't think *nix defines a nice sha-bang
> style behaviour for java, though I could be wrong.
> There are other ereasons for this though - condor runs things via a
> wrapper class which executes your classes main method. This in theory
> provides all sorts of possibilites (like transparent checkpointing /
> nice signalling etc.[1]) in practice it pretty much just nicely avoids
> a lot of the hassles that otherwise would have to be dealt with
> regarding java command line params, spotting which version was
> running, where the java home dir was etc...
> 

Actually, the biggest reason is we can use the wrapper to distinguish
between failures of the Java interperter and of the job. If we just look
at the return from waitpid() we don't know if it's because of a segfault
in /usr/bin/java, or a Null Pointer Exception in userjob.class. The 
wrapper class lets us figure that out. If the job fails because /usr/bin/java
crashed, we re-run the job. If the job exited with a Null Pointer Excption,
it leaves the queue.

It also abstracts away all of the Java startup routines, so you don't need
to know that IBM jikes takes -Xsomemagicflag, and the Sun JVM takes some
-XslightDifferentMagicFlag

-Erik