hbase-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/HBASE-1593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725699#action_12725699

Lars George commented on HBASE-1593:

Hi Jaehong,

Please see HBASE-1385 which Stack is just committing. I removed this specialization on the
generics. So you should be fine once you get the new mapreduce package. But it means to leave
the old mapred package behind. I guess you do not mind since it also has your time range in
it etc.

I had the same issue where you could not even use Text properly although it being of the right
type by the looks.


> 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
> Hello~
> 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. 
> TableMap.java
> public interface TableMap<K extends WritableComparable<K>, V extends Writable>
> extends Mapper<ImmutableBytesWritable, Result, K, V> {
> }
> LongWritable.java
> 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