Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-2101

KeyValueSortReducer collapses all values to last passed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.20.3, 0.90.0
    • None
    • None
    • Reviewed

    Description

      From mailing list by Ioannis Konstantinou:

      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.

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

      Attachments

        1. 2102.patch
          0.6 kB
          Michael Stack

        Activity

          People

            Unassigned Unassigned
            stack Michael Stack
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: