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 (Created) (JIRA)" <ji...@apache.org> on 2012/03/10 07:46:59 UTC

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

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

        

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

Posted by "Brock Noland (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MRUNIT-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13226782#comment-13226782 ] 

Brock Noland commented on MRUNIT-77:
------------------------------------

This is great work! Thank you for fixing my bugs!
                
> 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

        

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

Posted by "Jim Donofrio (Resolved) (JIRA)" <ji...@apache.org>.
     [ 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