You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2010/01/09 20:23:54 UTC

[jira] Created: (HBASE-2101) KeyValueSortReducer collapses all values to last passed

KeyValueSortReducer collapses all values to last passed
-------------------------------------------------------

                 Key: HBASE-2101
                 URL: https://issues.apache.org/jira/browse/HBASE-2101
             Project: Hadoop HBase
          Issue Type: Bug
            Reporter: stack
             Fix For: 0.20.3, 0.20.4, 0.21.0


>From mailing list by Ioannis Konstantinou:

{code}The problem is in the class org.apache.hadoop.hbase.mapreduce.KeyValueSortReducer. 
When you add keyvalues to the treeset for sorting, you need to add keyvalue clones instead of just references. What happens now, is that in every iteration, the value that exists in the treeset gets replaced with the new value.


So, you need to replace line 41 ( map.add(kv);) 
with this line:   map.add(kv.clone())

in this case, the treeset populates correcty.{code}

I filed this against 0.20.3 so if we have to cut a new RC, we can include this fix too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-2101) KeyValueSortReducer collapses all values to last passed

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-2101:
-------------------------

    Status: Patch Available  (was: Open)

> KeyValueSortReducer collapses all values to last passed
> -------------------------------------------------------
>
>                 Key: HBASE-2101
>                 URL: https://issues.apache.org/jira/browse/HBASE-2101
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>             Fix For: 0.20.3, 0.20.4, 0.21.0
>
>         Attachments: 2102.patch
>
>
> From mailing list by Ioannis Konstantinou:
> {code}The problem is in the class org.apache.hadoop.hbase.mapreduce.KeyValueSortReducer. 
> When you add keyvalues to the treeset for sorting, you need to add keyvalue clones instead of just references. What happens now, is that in every iteration, the value that exists in the treeset gets replaced with the new value.
> So, you need to replace line 41 ( map.add(kv);) 
> with this line:   map.add(kv.clone())
> in this case, the treeset populates correcty.{code}
> I filed this against 0.20.3 so if we have to cut a new RC, we can include this fix too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-2101) KeyValueSortReducer collapses all values to last passed

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-2101:
-------------------------

    Attachment: 2102.patch

> KeyValueSortReducer collapses all values to last passed
> -------------------------------------------------------
>
>                 Key: HBASE-2101
>                 URL: https://issues.apache.org/jira/browse/HBASE-2101
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>             Fix For: 0.20.3, 0.20.4, 0.21.0
>
>         Attachments: 2102.patch
>
>
> From mailing list by Ioannis Konstantinou:
> {code}The problem is in the class org.apache.hadoop.hbase.mapreduce.KeyValueSortReducer. 
> When you add keyvalues to the treeset for sorting, you need to add keyvalue clones instead of just references. What happens now, is that in every iteration, the value that exists in the treeset gets replaced with the new value.
> So, you need to replace line 41 ( map.add(kv);) 
> with this line:   map.add(kv.clone())
> in this case, the treeset populates correcty.{code}
> I filed this against 0.20.3 so if we have to cut a new RC, we can include this fix too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-2101) KeyValueSortReducer collapses all values to last passed

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-2101:
-------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

Committed to trunk and branch.

> KeyValueSortReducer collapses all values to last passed
> -------------------------------------------------------
>
>                 Key: HBASE-2101
>                 URL: https://issues.apache.org/jira/browse/HBASE-2101
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: stack
>             Fix For: 0.20.3, 0.20.4, 0.21.0
>
>         Attachments: 2102.patch
>
>
> From mailing list by Ioannis Konstantinou:
> {code}The problem is in the class org.apache.hadoop.hbase.mapreduce.KeyValueSortReducer. 
> When you add keyvalues to the treeset for sorting, you need to add keyvalue clones instead of just references. What happens now, is that in every iteration, the value that exists in the treeset gets replaced with the new value.
> So, you need to replace line 41 ( map.add(kv);) 
> with this line:   map.add(kv.clone())
> in this case, the treeset populates correcty.{code}
> I filed this against 0.20.3 so if we have to cut a new RC, we can include this fix too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.