[
https://issues.apache.org/jira/browse/NUTCH-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16160974#comment-16160974
]
ASF GitHub Bot commented on NUTCH-2375:
---------------------------------------
sebastian-nagel commented on a change in pull request #221: NUTCH-2375
Upgrading nutch to use org.apache.hadoop.mapreduce
URL: https://github.com/apache/nutch/pull/221#discussion_r138007647
##########
File path: src/java/org/apache/nutch/crawl/CrawlDbReader.java
##########
@@ -368,41 +367,46 @@ public void close() {
closeReaders();
}
- private TreeMap<String, LongWritable> processStatJobHelper(String crawlDb,
Configuration config, boolean sort) throws IOException{
+ private TreeMap<String, LongWritable> processStatJobHelper(String crawlDb,
Configuration config, boolean sort)
+ throws IOException, InterruptedException, ClassNotFoundException{
Path tmpFolder = new Path(crawlDb, "stat_tmp" +
System.currentTimeMillis());
- JobConf job = new NutchJob(config);
+ Job job = NutchJob.getInstance(config);
+ config = job.getConfiguration();
job.setJobName("stats " + crawlDb);
- job.setBoolean("db.reader.stats.sort", sort);
+ config.setBoolean("db.reader.stats.sort", sort);
FileInputFormat.addInputPath(job, new Path(crawlDb,
CrawlDb.CURRENT_NAME));
- job.setInputFormat(SequenceFileInputFormat.class);
+ job.setInputFormatClass(SequenceFileInputFormat.class);
job.setMapperClass(CrawlDbStatMapper.class);
job.setCombinerClass(CrawlDbStatCombiner.class);
job.setReducerClass(CrawlDbStatReducer.class);
FileOutputFormat.setOutputPath(job, tmpFolder);
- job.setOutputFormat(SequenceFileOutputFormat.class);
+ job.setOutputFormatClass(SequenceFileOutputFormat.class);
Review comment:
If the job writes it's output to a sequence file ...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Upgrade the code base from org.apache.hadoop.mapred to
> org.apache.hadoop.mapreduce
> ----------------------------------------------------------------------------------
>
> Key: NUTCH-2375
> URL: https://issues.apache.org/jira/browse/NUTCH-2375
> Project: Nutch
> Issue Type: Improvement
> Components: deployment
> Reporter: Omkar Reddy
>
> Nutch is still using the deprecated org.apache.hadoop.mapred dependency which
> has been deprecated. It need to be updated to org.apache.hadoop.mapreduce
> dependency.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)