[
https://issues.apache.org/jira/browse/OMID-74?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16108667#comment-16108667
]
ASF GitHub Bot commented on OMID-74:
------------------------------------
Github user ebortnik commented on a diff in the pull request:
https://github.com/apache/incubator-omid/pull/13#discussion_r130564921
--- Diff:
hbase-client/src/main/java/org/apache/omid/transaction/TTable.java ---
@@ -396,20 +443,48 @@ public ResultScanner getScanner(Transaction tx, Scan
scan) throws IOException {
return commitCache;
}
- private boolean isCellInSnapshot(Cell kv, HBaseTransaction
transaction, Map<Long, Long> commitCache)
- throws IOException {
+ private void buildFamilyDeletionCache(List<Cell> rawCells, Map<String,
List<Cell>> familyDeletionCache) {
- long startTimestamp = transaction.getStartTimestamp();
+ for (Cell cell : rawCells) {
+ if (CellUtil.matchingQualifier(cell,
CellUtils.FAMILY_DELETE_QUALIFIER) &&
+ CellUtil.matchingValue(cell,
HConstants.EMPTY_BYTE_ARRAY)) {
+
+ String row = Bytes.toString(cell.getRow());
+ List<Cell> cells = familyDeletionCache.get(row);
+ if (cells == null) {
+ cells = new ArrayList<>();
+ familyDeletionCache.put(row, cells);
+ }
- if (kv.getTimestamp() == startTimestamp) {
- return true;
+ cells.add(cell);
+ }
}
- Optional<Long> commitTimestamp =
-
tryToLocateCellCommitTimestamp(transaction.getTransactionManager(),
transaction.getEpoch(), kv,
- commitCache);
+ }
- return commitTimestamp.isPresent() && commitTimestamp.get() <
startTimestamp;
+ private Optional<Long> getCommitTimestamp(Cell kv, HBaseTransaction
transaction, Map<Long, Long> commitCache)
+ throws IOException {
+
+ long startTimestamp = transaction.getStartTimestamp();
+
+ if (kv.getTimestamp() == startTimestamp) {
+ return Optional.of(startTimestamp);
+ }
+
+ Optional<Long> commitTimestamp =
--- End diff --
You can just return the result, no need in the variable
> Efficient column family deletion in Row level conflict analysis
> ---------------------------------------------------------------
>
> Key: OMID-74
> URL: https://issues.apache.org/jira/browse/OMID-74
> Project: Apache Omid
> Issue Type: New Feature
> Reporter: Ohad Shacham
>
> The idea is to use a qualifier to denote that all the columns of a specific
> family were deleted.
> Current implementation reads from HBase the entire family and then writes a
> tombstone to each one of its cells. The new implementation does not need to
> perform the read and only writes the qualifier to denote that the family was
> deleted. This is true only for Row level conflict detection since in Cell
> level we need to read the cells and add these to the write set.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)