Yes i too have the same problem .. Can anyone tell me in detail how to
add new classes to the existing hbase jar or do we have a different
method to include our own classes in the program ..

On 7/24/09, bharath vissapragada <bharathvissapragada1...@gmail.com> wrote:
> Thanks it worked fine .. Do i need to update hbase-x.x.jar ?? or is there
> some other procedure to use it in my program ... because when i updated
> hbase-x.x.jar .. it gave me NoClassDefFoundError while running my program!!
>
>
>
> 2009/7/24 Doğacan Güney <doga...@gmail.com>
>
>> n Jul 24, 2009, at 1:00 PM, bharath vissapragada wrote:
>>
>>  Hi all,
>>>
>>> I wanted to implement TableMap interface so that "map" function can emit
>>> <Text,Text>.. I wrote the code as follows
>>>
>>> -------------------------------------------------------------------------------------------------------
>>> package org.apache.hadoop.hbase.mapred;
>>>
>>> import java.io.IOException;
>>> import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
>>> import org.apache.hadoop.hbase.io.RowResult;
>>> import org.apache.hadoop.io.Text;
>>> import org.apache.hadoop.mapred.JobConf;
>>> import org.apache.hadoop.mapred.MapReduceBase;
>>> import org.apache.hadoop.mapred.OutputCollector;
>>> import org.apache.hadoop.mapred.Reporter;
>>>
>>> public class MyTableMap
>>> extends MapReduceBase
>>> implements TableMap<ImmutableBytesWritable, RowResult> {
>>>
>>>  /** constructor */
>>>  public MyTableMap() {
>>>   super();
>>>  }
>>> @SuppressWarnings("unchecked")
>>>  public static void initJob(String table, String columns,
>>>   Class<? extends TableMap> mapper, JobConf job) {
>>>   TableMapReduceUtil.initTableMapJob(table, columns, mapper,
>>>     Text.class,
>>>     Text.class, job);
>>>  }
>>> public void map(ImmutableBytesWritable key, RowResult value,
>>>     OutputCollector<Text,Text> output,
>>>     @SuppressWarnings("unused") Reporter reporter) throws IOException {
>>>   output.collect(new Text("ss"), new Text("pp"));
>>>  }
>>> }
>>>
>>> When i compile this code .. i get the following error ....
>>>
>>> MyTableMap.java:35: org.apache.hadoop.hbase.mapred.MyTableMap is not
>>> abstract and does not override abstract method
>>>
>>> map(org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.io.RowResult,org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.io.RowResult>,org.apache.hadoop.mapred.Reporter)
>>> in org.apache.hadoop.mapred.Mapper
>>> public class MyTableMap
>>>      ^
>>> Can anyone help me out!!
>>>
>>
>> Your class should implement TableMap<Text, Text> not TableMap<IBW, RR>.
>>
>> --
>> Doğacan Güney
>

Reply via email to