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 Sat, 22 Sep 2012 05:41:15 GMT
On Fri, Sep 21, 2012 at 7:33 AM, Jerry Lam <chilinglam@gmail.com> wrote:
> Hi St.Ack:
>
> I made some dirty changes to the script yesterday to work for me.
> Basically, I changed the parse_column_name(column) function to:
>
> def parse_column_name(column)
>       split =
> org.apache.hadoop.hbase.KeyValue.parseColumn(column.to_java_bytes)
>       return split[0], (split.length > 1) ? split[1] :
> (org.apache.hadoop.hbase.KeyValue.getDelimiter(column.to_java_bytes, 0,
> column.to_java_bytes.length(), 58) > 0) ? ''.to_java_bytes : nil
> end
>
> Not sure if it makes sense as the general solution to the problem but at
> least it seems to do the job.

Seems reasonable to me.
St.Ack

Mime
View raw message