[
https://issues.apache.org/jira/browse/MRUNIT-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226111#comment-13226111
]
Goir Riog commented on MRUNIT-70:
---------------------------------
I'm getting
12/03/09 15:39:57 INFO junit.TestRunner: java.lang.NullPointerException
at
org.apache.hadoop.io.serializer.SerializationFactory.getSerializer(SerializationFactory.java:73)
at org.apache.hadoop.mrunit.Serialization.copy(Serialization.java:42)
at org.apache.hadoop.mrunit.Serialization.copy(Serialization.java:61)
at
org.apache.hadoop.mrunit.mapreduce.mock.MockContextWrapper$4.answer(MockContextWrapper.java:74)
at
org.mockito.internal.stubbing.StubbedInvocationMatcher.answer(StubbedInvocationMatcher.java:29)
at org.mockito.internal.MockHandler.handle(MockHandler.java:95)
at
org.mockito.internal.creation.MethodInterceptorFilter.intercept(MethodInterceptorFilter.java:47)
at
org.apache.hadoop.mapreduce.Reducer$Context$$EnhancerByMockitoWithCGLIB$$2bef43d9.write(<generated>)
since copy is still "null" on line 51 in Serialization.java ?!
But i have no idea how to fix it.
> copy(orig, conf) in Serialization shouldn't require objects to have a no-args
> constructor, and copy(orig, copy, conf) seems to violate contract for
> deserializer.deserialize()
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MRUNIT-70
> URL: https://issues.apache.org/jira/browse/MRUNIT-70
> Project: MRUnit
> Issue Type: Bug
> Affects Versions: 0.8.0
> Reporter: Meloss Xeloss
> Priority: Minor
> Attachments: MRUNIT-70-1.patch
>
>
> The copy(orig, conf) method requires objects to have a no-args constructor,
> which is non-ideal, since it passes on to Deserializer.deserialize, which can
> create a new object if passed in null. Additionally, the contract for
> deserialize only _can_ fill in the object passed in, so the copy method will
> not perform as expected if it does not.
> http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/io/serializer/Deserializer.html#deserialize%28T%29
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira