@@ -0,0 +1,1401 @@
+/*%0A * PURPOSE%0A * %09the driver for test mapreduce.%0A * %09executing a series of steps for mapreduce. %0A */%0A%0Apackage ztest.counter;%0A%0Aimport org.apache.hadoop.hbase.HBaseConfiguration;%0Aimport org.apache.hadoop.hbase.client.Put;%0Aimport org.apache.hadoop.hbase.client.Scan;%0Aimport org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil;%0Aimport org.apache.hadoop.hbase.util.Bytes;%0Aimport org.apache.hadoop.io.Text;%0Aimport org.apache.hadoop.mapreduce.Job;%0Aimport org.apache.hadoop.mapreduce.lib.output.NullOutputFormat;%0A%0Apublic class TestCounterDriver %7B%0A%09public static void main(String%5B%5D args) throws Exception %7B%0A%09%09%0A%09%09// steps for executing mapreduce%0A%09%09Job job = Job.getInstance(HBaseConfiguration.create(), %0A%09%09%09%09%09%09%09%09  %22Ilbe Counter Test%22);%0A%09%09job.setJarByClass(TestCounterDriver.class);%0A%0A%09%09Scan scan = new Scan();%0A%09%09scan.addColumn(%22p%22.getBytes(), %22title%22.getBytes());%0A%09%09scan.addColumn(%22p%22.getBytes(), %22content%22.getBytes());%0A%0A%09%09TableMapReduceUtil.initTableMapperJob(%0A%09%09%09%09Bytes.toString(%22counterTestInput%22.getBytes()),%0A%09%09%09%09scan,%0A%09%09%09%09ztest.counter.TestMapper.class,%0A%09%09%09%09Text.class,%0A%09%09%09%09Put.class,%0A%09%09%09%09job);%0A%09%09%0A%09%09// not using a reducer.%0A%09%09job.setOutputFormatClass(NullOutputFormat.class);%0A%0A/*%09%09%0A%09%09TableMapReduceUtil.initTableReducerJob(%0A%09%09%09%09Bytes.toString(%22counterTestOutput%22.getBytes()),%0A%09%09%09%09counter.test.Reducer.class,%0A%09%09%09%09job);%0A*/%0A%09%09job.setNumReduceTasks(0);%0A%09%09System.exit(job.waitForCompletion(true) ? 0 : 1);%0A%09%7D%0A%7D%0A

Create TestCounterDriver.java