@@ -0,0 +1,1601 @@
+/*%0A * PURPOSE%0A *  configurating a job for mapreduce.%0A *  but, it only uses a mapper.%0A */%0A%0Apackage driver;%0A%0Aimport hbase.counter.Mapper;%0Aimport hbase.dao.PostsDAO;%0A%0Aimport org.apache.hadoop.conf.Configuration;%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.lib.output.NullOutputFormat;%0Aimport org.apache.hadoop.mapreduce.Job;%0A%0Apublic class CounterDriver %7B%09%0A%09public static void main(String%5B%5D args) throws Exception %7B%0A%09%09%0A%09%09long start = System.currentTimeMillis();%0A%09%09Configuration conf = HBaseConfiguration.create();%0A%09%09Job job = Job.getInstance(conf, %22Ilbe Counter%22);%0A%09%09job.setJarByClass(CounterDriver.class);%0A%0A%09%09Scan scan = new Scan();%0A%09%09scan.addColumn(PostsDAO.INPUT_FAM, PostsDAO.INPUT_TITLECOL);%0A%09%09scan.addColumn(PostsDAO.INPUT_FAM, PostsDAO.INPUT_CONTENTCOL);%0A%0A%09%09TableMapReduceUtil.initTableMapperJob(%0A%09%09%09%09Bytes.toString(PostsDAO.INPUT_TABLE),%0A%09%09%09%09scan,%0A%09%09%09%09Mapper.class,%0A%09%09%09%09Text.class,%0A%09%09%09%09Put.class,%0A%09%09%09%09job);%0A%0A%09%09job.setOutputFormatClass(NullOutputFormat.class);%0A%09%09%0A%09%09/*%0A%09%09TableMapReduceUtil.initTableReducerJob(%0A%09%09%09%09Bytes.toString(CountersDAO.OUTPUT_TESTTABLE),%0A%09%09%09%09Reducer.class,%0A%09%09%09%09job);%0A%09%09*/%0A%09%09%0A%09%09job.setNumReduceTasks(0);%0A%09%09boolean result = job.waitForCompletion(true);  %0A%09%09System.out.println(%22the program takes %22 %0A%09%09%09%09%09%09   + (start - System.currentTimeMillis())%0A%09%09%09%09%09%09   + %22milliseconds%22);%0A%09%09System.exit(result ? 0 : 1);%0A%09%7D%0A%7D%0A

Create CounterDriver.java