On Thu, Sep 20, 2012 at 7:31 AM, Jerry Lam <[email protected]> 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)
else
scan.addFamily(family)
end
end
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?
St.Ack