hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naama Kraus" <naamakr...@gmail.com>
Subject Map Reduce over HBase - sample code
Date Thu, 19 Jun 2008 12:03:11 GMT

I was trying to figure out how to write a MapReduce job above HBase but
couldn't find a complete example. What I did, I fished pieces from various
sources (HBase tests, examples, source code ...) and came up with a program
that worked for me.
First, I thought to share it with this forum, in case anyone else would find
it useful. Second, I'd very much appreciate any comments/feedback on the
code (two Java files attached).

The MR job input is an HBase table (GradesTable.java) where student names
are row keys, and columns are course names. Cells contain the student's
grade in the corresponding course. The MR job (GradesTableMapReduce.java)
computes for each student his average grade in courses and puts it in a new
column in the original table.

I used hbase-0.1.1, local mode, for testing the code.

Thanks for any input,

oo 00 oo 00 oo 00 oo 00 oo 00 oo 00 oo 00 oo 00 oo 00 oo 00 oo 00 oo 00 oo
00 oo 00 oo
"If you want your children to be intelligent, read them fairy tales. If you
want them to be more intelligent, read them more fairy tales." (Albert

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message