[
http://issues.apache.org/jira/browse/NUTCH-186?page=comments#action_12363903 ]
Gal Nitzan commented on NUTCH-186:
----------------------------------
ok, JobConf extends NutchConf and in the (JobConf) constructor it adds the
mapred-default.xml resource.
the call to add resource in NutchConf actually inserts any resource file before
the nutch-site.xml so there is no way to override it. look at the code at the
bottom.
the only thing required is to change line 85 in NutchConf to be:
resourceNames.add(name); // add resouce name
instead of
resourceNames.add(resourceNames.size()-1, name); // add second to last
and add one more line to JobConf constructor
addConfResource("mapred-site.xml");
This way nutch-site.xml overides nutch-default.xml but other added resources
can override nutch-site.xml which in my opinion is reasonable.
If acceptable I will create the patch.
--------------------------------- current code in ButchConf.Java
-------------------------------------
public synchronized void addConfResource(File file) {
addConfResourceInternal(file);
}
private synchronized void addConfResourceInternal(Object name) {
resourceNames.add(resourceNames.size()-1, name); // add second to last
properties = null; // trigger reload
}
> mapred-default.xml is over ridden by nutch-site.xml
> ---------------------------------------------------
>
> Key: NUTCH-186
> URL: http://issues.apache.org/jira/browse/NUTCH-186
> Project: Nutch
> Type: Bug
> Versions: 0.8-dev
> Environment: All
> Reporter: Gal Nitzan
> Priority: Minor
>
> If mapred.map.tasks and mapred.reduce.tasks are defined in nutch-site.xml and
> also in mapred-default.xml the definitions from nutch-site.xml are those that
> will take effect.
> So if a user mistakenly copies those entries into nutch-site.xml from the
> nutch-default.xml she will not understand what happens.
> I would like to propose removing these setting completely from the
> nutch-default.xml and put it only in mapred-default.xml where it belongs.
> I will be happy to supply a patch for that if the proposition accepted.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Nutch-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-developers