Re: Possibly unnecessary check in Result.getColumnLatest(byte[] family, byte[] qualifier)

2014-12-12 Thread Stack
Hello Eric: Do you have some sample data that has the binarySearch go off the rails so we can try and figure how it is broke? Thanks, St.Ack On Thu, Dec 11, 2014 at 1:20 PM, Minor, Eric (NE) wrote: > Anil, > > I agree with you that the check you refer to is problematic. In fact, it > seems t

Possibly unnecessary check in Result.getColumnLatest(byte[] family, byte[] qualifier)

2014-12-11 Thread Minor, Eric (NE)
Anil, I agree with you that the check you refer to is problematic. In fact, it seems to be a cover for faulty behavior from the binarySearch() method which baffled me for about 6 hours last night. In short, when testing my mapper in MrUnit, the binarySearch() method does not return the proper

Re: Possibly unnecessary check in Result.getColumnLatest(byte[] family, byte[] qualifier)

2013-01-22 Thread anil gupta
Inline. On Tue, Jan 22, 2013 at 3:19 PM, Ted Yu wrote: > KeyValue.KVComparator in 0.94 looks similar to that in trunk. > > Here is the compare() method: > > public int compare(final KeyValue left, final KeyValue right) { > > int ret = getRawComparator().compare(left.getBuffer(), > >

Re: Possibly unnecessary check in Result.getColumnLatest(byte[] family, byte[] qualifier)

2013-01-22 Thread Ted Yu
KeyValue.KVComparator in 0.94 looks similar to that in trunk. Here is the compare() method: public int compare(final KeyValue left, final KeyValue right) { int ret = getRawComparator().compare(left.getBuffer(), left.getOffset() + ROW_OFFSET, left.getKeyLength(), r

Re: Possibly unnecessary check in Result.getColumnLatest(byte[] family, byte[] qualifier)

2013-01-22 Thread anil gupta
Hi Ted, Maybe it is out of sync with trunk. Here is the svn link for Result.java in HBase0.94.3: http://svn.apache.org/repos/asf/hbase/tags/0.94.3/src/main/java/org/apache/hadoop/hbase/client/Result.java ~Anil On Tue, Jan 22, 2013 at 10:18 AM, Ted Yu wrote: > I am looking at trunk code. > > b

Re: Possibly unnecessary check in Result.getColumnLatest(byte[] family, byte[] qualifier)

2013-01-22 Thread Ted Yu
I am looking at trunk code. binarySearch() calls this method: int pos = Arrays.binarySearch(kvs, searchTerm, KeyValue.COMPARATOR); Here is the compare() method of KVComparator: public int compare(final KeyValue left, final KeyValue right) { int ret = getRawComparator().compare(lef

Possibly unnecessary check in Result.getColumnLatest(byte[] family, byte[] qualifier)

2013-01-22 Thread anil gupta
Hi All, I was looking into the code of Result.getColumnLatest(byte[] family, byte[] qualifier) in HBase0.94.3 tag. I feel like the following check is unnecessary on line #245 since we have already got the right column by preforming binary search previously: if (kv.matchingColumn(family, qualif