You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "Lewis John McGibbney (JIRA)" <ji...@apache.org> on 2013/02/09 23:13:12 UTC

[jira] [Updated] (GORA-204) Don't store empty arrays in CassandraClient#addGenericArray(), addStatefulHashMap() and CassandraStore#addOrUpdateField()

     [ https://issues.apache.org/jira/browse/GORA-204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lewis John McGibbney updated GORA-204:
--------------------------------------

    Summary: Don't store empty arrays in CassandraClient#addGenericArray(), addStatefulHashMap() and CassandraStore#addOrUpdateField()  (was: Don't store empty arrays in CassandraClient#addGenericArray() & addStatefulHashMap())
    
> Don't store empty arrays in CassandraClient#addGenericArray(), addStatefulHashMap() and CassandraStore#addOrUpdateField()
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GORA-204
>                 URL: https://issues.apache.org/jira/browse/GORA-204
>             Project: Apache Gora
>          Issue Type: Improvement
>          Components: avro, storage-cassandra
>    Affects Versions: 0.2.1
>            Reporter: Lewis John McGibbney
>            Priority: Minor
>             Fix For: 0.4
>
>
> We have two TODO's in this issue.
> Namely 
> {code}
>         // TODO: hack, do not store empty arrays
>         if (itemValue instanceof GenericArray<?>) {
>           if (((GenericArray)itemValue).size() == 0) {
>             continue;
>           }
>         } else if (itemValue instanceof StatefulHashMap<?,?>) {
>           if (((StatefulHashMap)itemValue).size() == 0) {
>             continue;
>           }
>         }
> {code}
> and 
> {code}
>         // TODO: hack, do not store empty arrays
>         Object mapValue = map.get(mapKey);
>         if (mapValue instanceof GenericArray<?>) {
>           if (((GenericArray)mapValue).size() == 0) {
>             continue;
>           }
>         } else if (mapValue instanceof StatefulHashMap<?,?>) {
>           if (((StatefulHashMap)mapValue).size() == 0) {
>             continue;
>           }
>         }
> {code}
> in assGenericArray and addStateulHashMap respectively.

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