Uploaded image for project: 'Apache Gora'
  1. Apache Gora
  2. GORA-419

AccumuloStore.put deletes entire row when updating map/array field

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 0.5, 0.6
    • 0.6.1
    • gora-accumulo
    • None
    •     Gora 0.5
          Accumulo 1.5.1
          Zookeeper 3.4.6
          Hadoop 1.2.1
    • Patch

    Description

      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

      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
      

      As a result, the query is not restricted to any field and the entire row is deleted.

      Attachments

        Activity

          gerhard.gossen Gerhard Gossen created issue -
          gerhard.gossen Gerhard Gossen made changes -
          Field Original Value New Value
          Flags Patch [ 10430 ]
          Affects Version/s 0.5 [ 12324408 ]
          Description 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}
          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}

          As a result, the query is not restricted to any field and the *entire row is deleted*.
          Environment     Gora 0.5
              Accumulo 1.5.1
              Zookeeper 3.4.6
              Hadoop 1.2.1
          Priority Major [ 3 ] Critical [ 2 ]
          Summary putMap and putArray use column instead of field name to deleteByQuery AccumuloStore.put deletes entire row when updating map/array field
          lewismc Lewis John McGibbney made changes -
          Assignee Gerhard Gossen [ gerhard.gossen ]
          lewismc Lewis John McGibbney made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          gerhard.gossen Gerhard Gossen made changes -
          Fix Version/s 0.6.1 [ 12329560 ]

          People

            gerhard.gossen Gerhard Gossen
            gerhard.gossen Gerhard Gossen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: