Repository: phoenix
Updated Branches:
  refs/heads/master 3c7d72541 -> 96f2c8b3b


PHOENIX-4659 Use coprocessor API to write local transactional indexes (addendum)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/96f2c8b3
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/96f2c8b3
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/96f2c8b3

Branch: refs/heads/master
Commit: 96f2c8b3b88c57018f8c8fe1ba2bb9846e865eb2
Parents: 3c7d725
Author: James Taylor <jtay...@salesforce.com>
Authored: Fri Mar 23 17:09:17 2018 -0700
Committer: James Taylor <jtay...@salesforce.com>
Committed: Fri Mar 23 17:11:16 2018 -0700

----------------------------------------------------------------------
 .../org/apache/phoenix/util/TransactionUtil.java     | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/96f2c8b3/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
index 8f02adc..8cedb1c 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
@@ -100,8 +100,9 @@ public class TransactionUtil {
        public static Mutation convertIfDelete(Mutation mutation) throws 
IOException {
         if (mutation instanceof Delete) {
             Put deleteMarker = null;
-            for (byte[] family : mutation.getFamilyCellMap().keySet()) {
-                List<Cell> familyCells = 
mutation.getFamilyCellMap().get(family);
+            for (Map.Entry<byte[],List<Cell>> entry : 
mutation.getFamilyCellMap().entrySet()) {
+                byte[] family = entry.getKey();
+                List<Cell> familyCells = entry.getValue();
                 if (familyCells.size() == 1) {
                     if (CellUtil.isDeleteFamily(familyCells.get(0))) {
                         if (deleteMarker == null) {
@@ -126,12 +127,12 @@ public class TransactionUtil {
                         }
                     }
                 }
-                if (deleteMarker != null) {
-                    for (Map.Entry<String, byte[]> entry : 
mutation.getAttributesMap().entrySet()) {
-                        deleteMarker.setAttribute(entry.getKey(), 
entry.getValue());
-                    }
-                    mutation = deleteMarker;
+            }
+            if (deleteMarker != null) {
+                for (Map.Entry<String, byte[]> entry : 
mutation.getAttributesMap().entrySet()) {
+                    deleteMarker.setAttribute(entry.getKey(), 
entry.getValue());
                 }
+                mutation = deleteMarker;
             }
         }
         return mutation;

Reply via email to