hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jaehong choi (JIRA)" <j...@apache.org>
Subject [jira] Created: (HBASE-1593) TableMap's generic type inconsistcy with Hadoop
Date Tue, 30 Jun 2009 16:42:47 GMT
TableMap's generic type inconsistcy with Hadoop

                 Key: HBASE-1593
                 URL: https://issues.apache.org/jira/browse/HBASE-1593
             Project: Hadoop HBase
          Issue Type: Bug
          Components: mapred
            Reporter: jaehong choi


I've been trying to global sort rows whose key is LongWritable and value is Text type.
Since there are a few result files after finishing a mapreduce job, I need to do a merge sort
on them. 

I want to sort rows in a decreasing order, but ImmutableBytesWritable only supports increasing
So, I assign LongWritable.DecreasingComparator on JobConf.setOutputKeyComparatorClass() in
order that output keys are in decreasing order.

However, There is a big problem. As you see, TableMap requires K must implement or extend
WritableComparable<K>, but LongWritable only implements WritableComparable, not WritableComparable<LongWritable>.
This makes a compilation time error.  

I think we should come up with an idea to solve this one. 

public interface TableMap<K extends WritableComparable<K>, V extends Writable>
extends Mapper<ImmutableBytesWritable, Result, K, V> {
public class LongWritable implements WritableComparable

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

View raw message