You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Lucian Iordache <lu...@gmail.com> on 2011/05/20 17:24:05 UTC

TableSplit not implementing "hashCode" problem

Hi guys,

I've just found a problem with the class TableSplit. It implements "equals",
but it does not implement hashCode also, as it should have.
I've discovered it by trying to use a HashSet of TableSplit's, and I've
noticed that some duplicate splits are added to the set.

The only option I have for now is to extend TableSplit and to use the
subclass.
I use cloudera hbase cdh3u0 version.

Do you know about this problem? Should I open a Jira issue for that, or it
already exists?

Thanks,
Lucian

Re: TableSplit not implementing "hashCode" problem

Posted by Daniel Iancu <da...@1and1.ro>.
  I've created https://issues.apache.org/jira/browse/HBASE-3908 for 
Lucian, we'll submit the patch on Monday

On 05/20/2011 06:41 PM, Lars George wrote:
> Yes please, plus a patch would be awesome :)
>
> On Fri, May 20, 2011 at 5:24 PM, Lucian Iordache
> <lu...@gmail.com>  wrote:
>> Hi guys,
>>
>> I've just found a problem with the class TableSplit. It implements "equals",
>> but it does not implement hashCode also, as it should have.
>> I've discovered it by trying to use a HashSet of TableSplit's, and I've
>> noticed that some duplicate splits are added to the set.
>>
>> The only option I have for now is to extend TableSplit and to use the
>> subclass.
>> I use cloudera hbase cdh3u0 version.
>>
>> Do you know about this problem? Should I open a Jira issue for that, or it
>> already exists?
>>
>> Thanks,
>> Lucian
>>

-- 
Daniel Iancu
Java Developer,Web Components Romania
1&1 Internet Development srl.
18 Mircea Eliade St
Sect 1, Bucharest
RO Bucharest, 012015
www.1and1.ro
Phone:+40-031-223-9081




Re: TableSplit not implementing "hashCode" problem

Posted by Lars George <la...@gmail.com>.
Yes please, plus a patch would be awesome :)

On Fri, May 20, 2011 at 5:24 PM, Lucian Iordache
<lu...@gmail.com> wrote:
> Hi guys,
>
> I've just found a problem with the class TableSplit. It implements "equals",
> but it does not implement hashCode also, as it should have.
> I've discovered it by trying to use a HashSet of TableSplit's, and I've
> noticed that some duplicate splits are added to the set.
>
> The only option I have for now is to extend TableSplit and to use the
> subclass.
> I use cloudera hbase cdh3u0 version.
>
> Do you know about this problem? Should I open a Jira issue for that, or it
> already exists?
>
> Thanks,
> Lucian
>