gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alfonso Nishikawa (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GORA-187) HBase always writing column when dirty, even if value is default or null
Date Tue, 20 Nov 2012 07:20:58 GMT

    [ https://issues.apache.org/jira/browse/GORA-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500883#comment-13500883

Alfonso Nishikawa commented on GORA-187:

Hi, Ferdy.
Currently happens that when you load a row from HBase (you get the instance of the subclass
of Persistent) you get a pseudo-"default" (not the default from the .avsc) value for nonexistant
columns: 0 for numerics, null for instances like String or other classes.
I notice that if you write back that instance to HBase without touching anything (and strings
filled, otherwise will get a NPE), the numerics don't get written. But if you write a 1 and
then a 0 in one numeric column, that column gets written.

I expect:
- Only write nondefault values, so saves space and allows a way to delete a column in HBase
related to the Persistent class.
- Delete a column when dirty and default value (so changed to the default).
- When reading from HBase, load the default value if the columns does not exists.

I think this is a good aproach transparent to the other backends, without having to create
new methods in Persistent to delete columns, etc...
Maybe this should go in the "Description" :P
Thanks for your question (very productive!). If this is not enough clear, ask and I will explain
more :)
> HBase always writing column when dirty, even if value is default or null
> ------------------------------------------------------------------------
>                 Key: GORA-187
>                 URL: https://issues.apache.org/jira/browse/GORA-187
>             Project: Apache Gora
>          Issue Type: Improvement
>          Components: storage-hbase
>    Affects Versions: 0.2.1
>         Environment: Ubuntu 12.04, HBase 0.92.0
>            Reporter: Alfonso Nishikawa
>            Priority: Minor
> When writing a field (tested with 'long' default '0'), if it is not dirty when saving,
will not write the column. If setted to 1 and back to 0, saving will write that default value.
> With strings, after fixing [GORA-183], noticed that null values are too written (being
default or not).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message