You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "Alfonso Nishikawa (JIRA)" <ji...@apache.org> on 2012/11/19 18:20:01 UTC

[jira] [Created] (GORA-187) HBase always writing column when dirty, even if value is default or null

Alfonso Nishikawa created GORA-187:
--------------------------------------

             Summary: 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

[jira] [Commented] (GORA-187) gora-hbase always writing column when dirty, even if value is default or null

Posted by "Ferdy Galema (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GORA-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500919#comment-13500919 ] 

Ferdy Galema commented on GORA-187:
-----------------------------------

Thanks for you explanation. It's perfectly clear now.

I agree that it is a good idea to remove fields when they are set to their default values, instead of writing the default value. It should make no difference for clients either way.

If you make a proposal patch, I'll be happy to review it.
                
> gora-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

[jira] [Updated] (GORA-187) gora-hbase always writing column when dirty, even if value is default or null

Posted by "Alfonso Nishikawa (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alfonso Nishikawa updated GORA-187:
-----------------------------------

    Summary: gora-hbase always writing column when dirty, even if value is default or null  (was: HBase always writing column when dirty, even if value is default or null)
    
> gora-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

[jira] [Updated] (GORA-187) gora-hbase always writing column when dirty, even if value is default or null

Posted by "Lewis John McGibbney (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GORA-187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lewis John McGibbney updated GORA-187:
--------------------------------------

    Fix Version/s: 0.3
    
> gora-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
>             Fix For: 0.3
>
>
> 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

[jira] [Commented] (GORA-187) HBase always writing column when dirty, even if value is default or null

Posted by "Alfonso Nishikawa (JIRA)" <ji...@apache.org>.
    [ 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

[jira] [Comment Edited] (GORA-187) gora-hbase always writing column when dirty, even if value is default or null

Posted by "Alfonso Nishikawa (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GORA-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500883#comment-13500883 ] 

Alfonso Nishikawa edited comment on GORA-187 at 11/20/12 7:23 AM:
------------------------------------------------------------------

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 column does not exist.

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 :)
                
      was (Author: alfonso.nishikawa):
    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 :)
                  
> gora-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

[jira] [Comment Edited] (GORA-187) gora-hbase always writing column when dirty, even if value is default or null

Posted by "Alfonso Nishikawa (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GORA-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500883#comment-13500883 ] 

Alfonso Nishikawa edited comment on GORA-187 at 11/20/12 7:23 AM:
------------------------------------------------------------------

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 column 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 :)
                
      was (Author: alfonso.nishikawa):
    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 column does not exist.

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 :)
                  
> gora-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

[jira] [Commented] (GORA-187) HBase always writing column when dirty, even if value is default or null

Posted by "Ferdy Galema (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GORA-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500874#comment-13500874 ] 

Ferdy Galema commented on GORA-187:
-----------------------------------

Hi,

Could you clarify a bit? What is the current behaviour? What do you expect it to be?
                
> 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