hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: How to specify empty value in HBase shell
Date Fri, 21 Sep 2012 04:42:53 GMT
On Thu, Sep 20, 2012 at 7:31 AM, Jerry Lam <chilinglam@gmail.com> wrote:
> Hi HBase Community:
> I have been struggling to find a way to specify empty value/empty column
> qualifier in the hbase shell, but unsuccessful.
> I google it, nothing comes up. I don't know JRuby so that might be why. Do
> you know how?
> Example:
> scan 'Table',  {COLUMNS => 'cf:'} // note that the column family is cf and
> the column qualifier is empty (i.e. new byte[0])
> The above query will return all columns instead of the empty one.

Sounds like no qualifier means all columns to shell.

Do you have to use the 'empty qualifier'?  Thats a bit odd.  You
really need it in your model?

In the shell we are doing this:

        columns.each do |c|
          family, qualifier = parse_column_name(c.to_s)
          if qualifier
            scan.addColumn(family, qualifier)

If no qualifier, we think its a scan of the family.

I don't really have a good answer for you.  In shell, what would you
suggest we add so we do addColumn rather than addFamily if qualifier
is empty?


View raw message