hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Hbase: Is possible to filter by integer value if the value is saved as string?
Date Thu, 18 Jul 2013 20:24:50 GMT
Looks like you should be able to do so by passing your own comparator to:

  public SingleColumnValueFilter(final byte [] family, final byte []
qualifier,

      final CompareOp compareOp, final ByteArrayComparable comparator) {
Cheers

On Thu, Jul 18, 2013 at 1:20 PM, Frank Luo <jluo@merkleinc.com> wrote:

> I don't think it is possible, but would like to confirm with smart folks
> out there.
>
> Supposing I have a cell storing an integer but in string presentation. For
> example, here is how I put a value of 200:
>
>         put.add(family, qualifier, Bytes.toBytes("200"));
>
> Now, I want to scan with a filter that only return if the value is larger
> than 250. Is that possible?
>
> Thanks in advance
>
> Frank
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message