in hbase-client/src/main/java/org/apache/omid/transaction/SnapshotFilterImpl.java [321:367]
private void buildFamilyDeletionCache(HBaseTransaction transaction, List<Cell> rawCells, Map<String, Long> familyDeletionCache, Map<Long, Long> commitCache, Map<String,byte[]> attributeMap) throws IOException {
for (Cell cell : rawCells) {
if (CellUtils.isFamilyDeleteCell(cell)) {
String key = getRowFamilyString(cell);
if (familyDeletionCache.containsKey(key))
return;
Optional<Long> commitTimeStamp = getTSIfInTransaction(cell, transaction);
if (!commitTimeStamp.isPresent()) {
commitTimeStamp = getTSIfInSnapshot(cell, transaction, commitCache);
}
if (commitTimeStamp.isPresent()) {
familyDeletionCache.put(key, commitTimeStamp.get());
} else {
Cell lastCell = cell;
Map<Long, Long> cmtCache;
boolean foundCommittedFamilyDeletion = false;
while (!foundCommittedFamilyDeletion) {
Get g = createPendingGet(lastCell, 3);
Result result = tableAccessWrapper.get(g);
List<Cell> resultCells = result.listCells();
if (resultCells == null) {
break;
}
cmtCache = buildCommitCache(resultCells);
for (Cell c : resultCells) {
if (CellUtils.isFamilyDeleteCell(c)) {
commitTimeStamp = getTSIfInSnapshot(c, transaction, cmtCache);
if (commitTimeStamp.isPresent()) {
familyDeletionCache.put(key, commitTimeStamp.get());
foundCommittedFamilyDeletion = true;
break;
}
lastCell = c;
}
}
}
}
}
}
}