Hi all,

I have a mapper's Value type which comes from a record like this one:
================================
module org.... {

  class Something {
        AnotherRecord aRecord;
        int number1;
        int number2;
  }
}
================================

So, i'm creating one of this Something objects and pass it to the output.collect(keyClass, Something). Sometimes i do not need the AnotherRecord object, so i tried to pass it a null object instead an empty AnotherRecord object, but at runtime i get a NullPointerException, which comes from Hadoop serializer trying to serialize the AnotherRecord field, which is null.

Is there any way to achieve this without having to mess with Hadoop's RccCompiler code? Or maybe this is a question for the dev mailing list?

I've been googling, but i really haven't been able to find an answer to this, and i think it's quite strange that Hadoop's serialization does not provide null objects support.

thanks in advance,

--
Marc de Palol

Java Developer @ Last.fm
http://last.fm/user/grindthemall

Reply via email to