mrunit-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Gevorkyan <>
Subject Serialization issue in MRUNIT 1.0.0 release.
Date Thu, 16 Jan 2014 01:13:39 GMT
Hi Guys,

When using the following artifact of MRUNIT:


I found a bug, basically that TupleWritable serialized inputs are not
working, because Copying doesn't properly work for them.

In order for me to double check that I have added a Unit test in the
See the code below:

    public void testTupleWritableCopyArgument() {
        final TupleWritable tupleWritable = new TupleWritable(new Text[] {
                new Text("Cg5AAVIFZW5fQ0F4AZgCAg=="),
                new Text("CAESBggCGAAgAA==")

        final Serialization serialization = new Serialization(new
        final TupleWritable copy = serialization.copy(tupleWritable, null);

        // The equality is not properly implemented in TupleWritable
        assertEquals(tupleWritable, copy);

*        // BOTH OF THESE FAIL, since Text("") is being returned.*
*        assertEquals(tupleWritable.get(0), copy.get(0));*
*        assertEquals(tupleWritable.get(1), copy.get(1));*

Note that mentioned issue is not visible in the "0.9.0-incubating" version,
addInput() method is implemented in a different manner, namely:

public void addInput(final K1 key, final V1 val) {
    *inputList.add(new Pair<K1, V1>(key, val));*

public void addInput(final K1 key, final V1 val) {
    *inputList.add(copyPair(key, val));*

As you can see latest release is using copyPair(), that's why serialization
issue is being revealed.

I have everything setup, however after spending an hour on this I realized
that you guys might help me easily track where the issue resides, rather
than me spending hours on that.
Please let me know what do you think and I would be more than happy to fix

David Gevorkyan

View raw message