hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Vigeant <mark.vige...@riskmetrics.com>
Subject RE: Map/Reduce with HTable Source
Date Wed, 14 Oct 2009 14:50:57 GMT
Never mind, I wrote my mapper incorrectly. Sorry to clog your inbox!

-----Original Message-----
From: Mark Vigeant [mailto:mark.vigeant@riskmetrics.com] 
Sent: Tuesday, October 13, 2009 4:27 PM
To: hbase-user@hadoop.apache.org
Subject: Map/Reduce with HTable Source

Hey-

So I'm writing a program to count the frequency of each value in an HTable, using RowCounter
as an example. My problem is, however, that when I use TableMapReduceUtil.initTableMapperJob
for some reason it doesn't use the mapper class specified. Instead it just prints out the
scan to a file...

Here's the snippet of code:
      public static Job createSubmittableJob(Configuration conf, String input,
                  String output) throws IOException {
            Job job = new Job(conf, NAME);
            job.setJarByClass(ErrorCount.class);
            Scan scan = new Scan();
            scan.addFamily(Bytes.toBytes("Message"));

            TableMapReduceUtil.initTableMapperJob(input, scan,
                        ErrorCounterMapper.class, ImmutableBytesWritable.class,
                        Result.class, job);
            job.setNumReduceTasks(0);
            FileOutputFormat.setOutputPath(job, new Path(output));
            return job;
      }
Any thoughts? Thanks a lot!

Mark Vigeant
RiskMetrics Group, Inc.


Mime
View raw message