hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Hadoop Wiki] Trivial Update of "TaskExecutionEnvironment" by AndyPavlo
Date Fri, 16 May 2008 17:06:39 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.

The following page has been changed by AndyPavlo:
http://wiki.apache.org/hadoop/TaskExecutionEnvironment

The comment on the change is:
Fixed formatting

------------------------------------------------------------------------------
  
  public class Map extends MapReduceBase implements Mapper<Text, Text, Text, IntWritable>
{
     protected Integer MIN_VALUE = null;
-    protected static final String MIN_VALUE_KEY = "test.minvalue";
+    public static final String MIN_VALUE_KEY = "test.minvalue";
  
     // Set the MIN_VALUE property
     public void configure(JobConf job) {
@@ -82, +82 @@

        // If it was not set, then the resulting value will be null
        String property = job.get(Map.MIN_VALUE_KEY);
        if (property == null) {
-          System.err.println("ERROR: The property '" + this.MIN_VALUE_KEY + "' was not set");
+          System.err.println("ERROR: The property '" + Map.MIN_VALUE_KEY + "' was not set");
           System.exit(1);
        }
        this.MIN_VALUE = Integer.parseInt(property);
     }
  
     // Check whether the value is greater than our MIN_VALUE
-    public void map(Text key, Text value, OutputCollector<Text, IntWritable> output,
Reporter reporter) throws IOException {
+    public void map(Text key,
+                    Text value,
+                    OutputCollector<Text, IntWritable> output,
+                    Reporter reporter) throws IOException {
        Integer temp = Integer.valueOf(value.toString());
        if (temp > this.MIN_VALUE) {
           output.collect(key, new IntWritable(temp));

Mime
View raw message