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