nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NUTCH-2375) Upgrade the code base from org.apache.hadoop.mapred to org.apache.hadoop.mapreduce
Date Sun, 13 Aug 2017 11:14:00 GMT

    [ https://issues.apache.org/jira/browse/NUTCH-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16124880#comment-16124880
] 

ASF GitHub Bot commented on NUTCH-2375:
---------------------------------------

Omkar20895 commented on a change in pull request #188: NUTCH-2375 Upgrade the code base from
org.apache.hadoop.mapred to org.apache.hadoop.mapreduce
URL: https://github.com/apache/nutch/pull/188#discussion_r132838270
 
 

 ##########
 File path: src/java/org/apache/nutch/segment/SegmentMerger.java
 ##########
 @@ -174,47 +174,51 @@
           // ignore
         }
       }
-      final SequenceFileRecordReader<Text, Writable> splitReader = new SequenceFileRecordReader<>(
-          job, (FileSplit) split);
+      final SequenceFileRecordReader<Text, Writable> splitReader = new SequenceFileRecordReader<>();
 
-      try {
-        return new SequenceFileRecordReader<Text, MetaWrapper>(job, fSplit) {
+      return new SequenceFileRecordReader<Text, MetaWrapper>() {
+
+        public MetaWrapper wrapper;
 
-          public synchronized boolean next(Text key, MetaWrapper wrapper)
-              throws IOException {
-            LOG.debug("Running OIF.next()");
+        @Override
+        public synchronized boolean nextKeyValue()
+            throws IOException, InterruptedException {
+          try {
+            LOG.debug("Running OIF.nextKeyValue()");
 
-            boolean res = splitReader.next(key, w);
+            splitReader.initialize(split, context);
+            this.initialize(split,context);
+            boolean res = splitReader.nextKeyValue();
+            wrapper = this.getCurrentValue();
 
 Review comment:
   Hi @lewismc I think the TestSegmentMerger is failing here with a NullPointerException and
I think that it is because the sequenceFileRecordReader here is not being intialized as expected.
Please correct me if I am wrong. Thanks.
 
----------------------------------------------------------------
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:
users@infra.apache.org


> 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)

Mime
View raw message