public void setConf(Configuration conf) {
super.setConf(conf);
this.conf = conf;
this.maxThreadsTotal = conf.getInt("fetcher.threads.fetch", 10);
this.proxyUsername = conf.get("http.proxy.username", "");
this.proxyPassword = conf.get("http.proxy.password", "");
this.proxyRealm = conf.get("http.proxy.realm", "");
agentHost = conf.get("http.agent.host", "");
authFile = conf.get("http.auth.file", "");
configureClient();
try {
setCredentials();
} catch (Exception ex) {
if (LOG.isFatalEnabled()) {
LOG.fatal("Could not read " + authFile + " : " + ex.getMessage());
ex.printStackTrace(LogUtil.getErrorStream(LOG));
}
}
}
Reads the configuration from the Nutch configuration files and sets
the configuration. |