hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abhinit <abhinit.ku...@gmail.com>
Subject implementing selection/projection using mapreduce
Date Thu, 04 Dec 2008 11:45:16 GMT
Hi,

I am implementing basic selection/projection using mapreduce on an HBase
table.

I have an outer class SelectProject which implements the tool interface and
my mapper class,
SelectProjectOperator extends TableMap.

In my run method, I am parsing the command line argument for things like
column names
and predicate condition(say key = 10000 etc.) and I have to use these values
inside the map
method of my mapper class. All the variables to be used in the map function
for selection/projection
are static variables of the enclosing outer class(SelectProject). I et these
variables in run method
after parsing the comman-line arguments.

However, in the map method I get a NullPointerException because non-of those
static member variables
are created. I understand this is not exactlt an HBase related issue and has
something to do with java inner classes.
But I thought this can be a very common case in mapreduce programming
(passing a condition variable from the
outer class to enclosed mapper class' map method).

Thanks a lot for help.
-Abhinit

-- 
Abhinit Kumar
MSE, Computer & Information Science
Class of 2009
University of Pennsylvania
1-215-796-5136

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