I had a whole bunch of dependencies linked transitively from my custom comparator. I rewrote the custom comparator (and parts of my code) to not include anything other than the standard libraries. That way my deployment also becomes simpler and it also kept the string of dependencies off of the java lib folder. Am guessing one of the library dependencies was causing the erratic behaviour and now its working fine.
The constructor also works now after concatenating all fields into a single field in the write method. Thanks for your inputs.
Thanks,
Karthik Manimaran.
stack wrote:
On Thu, Nov 5, 2009 at 2:52 PM, Karthik Manimaran <
Filter is on both server and client side. I re-compiled Hbase and after
restart the looping ceased.
Why did you think you had to recompile?
However, am faced with a new problem.
I have an integer member in custom comparator class that am initialising in
a constructor . From the debug info in the logs, I see that the value of
this integer is always 0 instead having the value I used in the constructor.
Any ideas why this might be happening?
Have you added your integer member to the serialization (See Writables
readFields and write methods)?
St.Ack
Thanks,
Karthik.
stack wrote:
Filter is on both server and client-side? Can you add lot output to
figure
why its looping?
Thanks,
St.Ack
On Tue, Nov 3, 2009 at 6:17 PM, Karthik Manimaran <
[email protected]> wrote:
Hi,
I wrote a Custom Comparator that implements WritableByteArrayComparable
and
used it in SingleColumnValueFilter as follows:
new SingleColumnValueFilter(family,
column,CompareFilter.CompareOp.EQUAL,customComparator);
The code seems to be stuck in an endless loop calling the write method
over
and over. Any idea why this could be happening?
The same behavior occurs when I copy the exact code of
SubstringComparator
and use it with a different name. Am using Hbase version 0.20.1. I also
noticed that the SubstringComparator works fine when used as is.
Thanks,
Karthik Manimaran.