package nz.org.hikari.cat.ncdc_count;

// Mapper for NCDC record count MapReduce job, called from NcdcRecordCount
// driver class

import java.io.IOException;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

public class NcdcRecordCountMapper
		extends Mapper<LongWritable, Text, Text, LongWritable> {
	
	@Override
	public void map(LongWritable key, Text value, Context context)
			throws IOException, InterruptedException {
		String line = value.toString();
		String id = line.substring(4, 10) + "-" + line.substring(10, 15);
		context.write(new Text(id), new LongWritable(1L));
	}

}

@@ -369,16 +369,71 @@
 le%3E %7B%0A%09%0A
+%09static final LongWritable one = new LongWritable(1);%0A%0A
 %09@Overri
@@ -681,28 +681,11 @@
 d), 
+o
 ne
-w LongWritable(1L)
 );%0A%09

Create static LongWritable(1) outside mapper