hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owen O'Malley" <o...@yahoo-inc.com>
Subject Re: svn commit: r376492 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobConf.java
Date Fri, 10 Feb 2006 00:55:46 GMT

On Feb 9, 2006, at 4:21 PM, Bryan A. Pendleton wrote:

> I agree that the first fix is better (handling the file: part of the 
> URL).
>
> I don't quite agree about not setting a Jar file masking the problem -
> certainly, testing things out in debugging environments makes it not
> guaranteed that there's a Jar there. In any case, it would certainly be
> better to fail-fast there, but, at this point, fail-fast by obscure NPE
> isn't necessarily better. Is there something better?

Given the problems with error checking, I'd suggest making the 
findContainingJar a public static method of JobConf, and letting the 
user application call it explicitly. Otherwise, we would need to throw 
an exception (RuntimeException?) with a message about the class not 
being found in a jar file.

The only case where not having the jar file works is either that both 
your map and reduce class are in hadoop.jar, which is how Grep worked, 
or you are using the local runner. So, you should pretty much always 
have a jar. *smile*

-- Owen


Mime
View raw message