I faced this weird problem while writing a mapreduce job for Hbase in Scala. The problem is that my scala class lets say ScalaMapReducer has to extends the following class http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/mapreduce/TableMapper.html
But when i do so and 'override' the map method (inherited form superclass Mapper of TableMapper), scala complains with error 'map overrides nothing' and fails to compile, while i can do so without any problems in Java.
I found the following workarounds:
1) Define a Dummy Java class which extends the TableMapper class and override the map with some empty implementation. And now from scala extend this Dummy class.
2) I found this on goole workaround which defines a Mappers trait.
ALthough i am guessing this may have something to do with Inner classes but i dont really have any more clue and explaination.
(This is intended to be a general Scala question)
EDIT: Sample Code from my scala class,
class ScalaMapReducer extends TableMapper[Text,IntWritable]
{
override def map(row:ImmutableBytesWritable,result:Result,context:Context):Unit =
{
//..some code
}
}