You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mrunit.apache.org by "Jim Donofrio (Resolved) (JIRA)" <ji...@apache.org> on 2012/03/10 08:00:58 UTC

[jira] [Resolved] (MRUNIT-77) cannot use serializations that do not clone into object, or serializations without no arg constructors with reduce driver

     [ https://issues.apache.org/jira/browse/MRUNIT-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Donofrio resolved MRUNIT-77.
--------------------------------

    Resolution: Fixed

added above test
set value to copy(next, value, conf) for serializations that do not change the copy argument
remove initialization of value by ReflectionUtil for classes without no arg constructors

committed in 1299156
                
> cannot use serializations that do not clone into object, or serializations without no arg constructors with reduce driver
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MRUNIT-77
>                 URL: https://issues.apache.org/jira/browse/MRUNIT-77
>             Project: MRUnit
>          Issue Type: Bug
>    Affects Versions: 0.8.1
>            Reporter: Jim Donofrio
>            Assignee: Jim Donofrio
>             Fix For: 1.0.0
>
>
>   @Test
>   public void testJavaSerialization() {
>     ReduceDriver<Integer, Integer, Integer, Integer> driver = ReduceDriver.newReduceDriver(new IdentityReducer<Integer, Integer>());
>     Configuration conf = new Configuration();
>     conf.set("io.serializations", "org.apache.hadoop.io.serializer.JavaSerialization");
>     driver.setConfiguration(conf);
>     driver.withInputKey(1)
>           .withInputValue(2)
>           .withInputValue(3)
>           .withInputValue(4)
>           .withOutput(1, 2)
>           .withOutput(1, 3)
>           .withOutput(1, 4)
>           .runTest();
>   }
> The above test fails because the result of copy(next, value, conf) needs to be reassigned to value for serializations such as java serialization that dont change the copy argument. This also fails because of the lack of a no arg constructor which breaks the call to ReflectionUtils.newInstance(klass, conf)

--
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