Github user ebortnik commented on a diff in the pull request:

    https://github.com/apache/incubator-omid/pull/13#discussion_r130567034
  
    --- Diff: 
hbase-client/src/main/java/org/apache/omid/transaction/TTable.java ---
    @@ -794,13 +871,24 @@ private HBaseTransaction 
enforceHBaseTransactionAsParam(Transaction tx) {
             }
         }
     
    -    static ImmutableList<Collection<Cell>> 
groupCellsByColumnFilteringShadowCells(List<Cell> rawCells) {
    +    private HBaseTransactionManager 
enforceHBaseTransactionManagerAsParam(TransactionManager tm) {
    +        if (tm instanceof HBaseTransactionManager) {
    +            return (HBaseTransactionManager) tm;
    +        } else {
    +            throw new IllegalArgumentException(
    +                String.format("The transaction manager object passed %s is 
not an instance of HBaseTransactionManager ",
    +                              tm.getClass().getName()));
    +        }
    +    }
    +
    +    static ImmutableList<Collection<Cell>> 
groupCellsByColumnFilteringShadowCellsAndFamilyDeletion(List<Cell> rawCells) {
     
    -        Predicate<Cell> shadowCellFilter = new Predicate<Cell>() {
    +        Predicate<Cell> shadowCellAndFamilyDeletionFilter = new 
Predicate<Cell>() {
     
                 @Override
                 public boolean apply(Cell cell) {
    -                return cell != null && !CellUtils.isShadowCell(cell);
    +                return cell != null && !CellUtils.isShadowCell(cell) && 
    +                        !(CellUtil.matchingQualifier(cell, 
CellUtils.FAMILY_DELETE_QUALIFIER) && CellUtil.matchingValue(cell, 
HConstants.EMPTY_BYTE_ARRAY));
    --- End diff --
    
    Maybe makes sense to store the last predicate in a variable, for 
readability. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to