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

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_r138929207
 
 

 ##########
 File path: src/java/org/apache/nutch/scoring/webgraph/NodeDumper.java
 ##########
 @@ -159,31 +181,17 @@ public void reduce(FloatWritable key, Iterator<Text> 
values,
    * of either the number of inlinks, the number of outlinks or the score. The
    * computed value is then either the sum of all parts or the top value.
    */
-  public static class Dumper extends Configured implements
-      Mapper<Text, Node, Text, FloatWritable>,
-      Reducer<Text, FloatWritable, Text, FloatWritable> {
-
-    private JobConf conf;
-    private boolean inlinks = false;
-    private boolean outlinks = false;
-    private boolean scores = false;
-    private long topn = Long.MAX_VALUE;
-    private boolean host = false;
-    private boolean domain = false;
-    private boolean sum = false;
-    private boolean max = false;
-
-    public void configure(JobConf conf) {
-      this.conf = conf;
-      this.inlinks = conf.getBoolean("inlinks", false);
-      this.outlinks = conf.getBoolean("outlinks", false);
-      this.scores = conf.getBoolean("scores", true);
-      this.topn = conf.getLong("topn", Long.MAX_VALUE);
-      this.host = conf.getBoolean("host", false);
-      this.domain = conf.getBoolean("domain", false);
-      this.sum = conf.getBoolean("sum", false);
-      this.max = conf.getBoolean("max", false);
-    }
+  public static class Dumper extends Configured {
+
+    private static Configuration conf;
+    private static boolean inlinks = false;
+    private static boolean outlinks = false;
+    private static boolean scores = false;
+    private static long topn = Long.MAX_VALUE;
+    private static boolean host = false;
+    private static boolean domain = false;
+    private static boolean sum = false;
+    private static boolean max = false;
 
 Review comment:
   See comments in Generator etc. regarding static variables shared between 
mapper and reducer classes.
 
----------------------------------------------------------------
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)

Reply via email to