Hi Jared, I briefly had a look into this and I am still trying to properly understand it. Do you have some suggestion(s) as to answering your own questions if you've maybe thought about it a bit more? Lewis
On Sun, Sep 27, 2015 at 1:53 AM, Jared Wong <jw...@pinterest.com> wrote: > Hi, > > Why does gora process the deletes after the puts? Could this cause a > potential problem when processing MAP types because MAP types have their > column or column family deleted while adding new content? > > In put: > if (put.size() > 0) { > table.put(put); > } > if (delete.size() > 0) { > table.delete(delete); > table.delete(delete); > table.delete(delete); // HBase sometimes does not delete arbitrarily > } > > In addPutsAndDeletes: > case MAP: > // if it's a map that has been modified, then the content should be > replaced by the new one > // This is because we don't know if the content has changed or not. > if (qualifier == null) { > delete.deleteFamily(hcol.getFamily()); > } else { > delete.deleteColumn(hcol.getFamily(), qualifier); > } > @SuppressWarnings({ "rawtypes", "unchecked" }) > Set<Entry> set = ((Map) o).entrySet(); > for (@SuppressWarnings("rawtypes") Entry entry : set) { > byte[] qual = toBytes(entry.getKey()); > addPutsAndDeletes(put, delete, entry.getValue(), schema.getValueType() > .getType(), schema.getValueType(), hcol, qual); > } > break; > > > https://github.com/apache/gora/blob/master/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java#L253 > > Best, > Jared > -- *Lewis*