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

ASF GitHub Bot commented on GORA-419:
-------------------------------------

Github user gerhardgossen commented on the pull request:

    https://github.com/apache/gora/pull/23#issuecomment-93663873
  
    @renato2099: you need to distinguish between the *field name* (e.g. 
'content') that is used in the external API (for example as members of the 
value objects) and the *column name* (e.g. 'f:cnt') that is used in the data 
store (in this case Accumulo). The mapping between both is specified in the 
`gora-*-mapping.xml` files.
    
    `deleteByQuery` is part of the external API and therefore receives field 
name values (as part of the query parameter). If we change this method it would 
break user code that tries to delete a map/array field. As a map is represented 
in Accumulo as a collection of fields, we would also need to delete `cf:*` 
instead of a single `cf:qualifier`.


> putMap and putArray use column instead of field name to deleteByQuery
> ---------------------------------------------------------------------
>
>                 Key: GORA-419
>                 URL: https://issues.apache.org/jira/browse/GORA-419
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: gora-accumulo
>    Affects Versions: 0.6
>            Reporter: Gerhard Gossen
>
> In {{AccumuloStore.put(k, v)}} fields of type MAP or ARRAY are cleared first 
> before they are set to the new value. This is done in the methods 
> {{putMap}}/{{putArray}} using a call to {{deleteByQuery(q)}}. The name for 
> fields to be deleted is taken from the current column. However, 
> {{deleteByQuery}} tries to translate the field names of the query to column 
> names again, which fails with a log message like
> {code}
> 2015-04-13 13:43:35.084 ERROR 16733 --- [ool-46-thread-1] 
> o.a.gora.accumulo.store.AccumuloStore    : Mapping not found for field: ol
> 2015-04-13 13:43:35.104 ERROR 16733 --- [ool-46-thread-1] 
> o.a.gora.accumulo.store.AccumuloStore    : Mapping not found for field: mk
> 2015-04-13 13:43:35.115 ERROR 16733 --- [ool-46-thread-1] 
> o.a.gora.accumulo.store.AccumuloStore    : Mapping not found for field: mtdt
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to