gokceni commented on a change in pull request #625: PHOENIX-5565 Unify index 
update structures in IndexRegionObserver and…
URL: https://github.com/apache/phoenix/pull/625#discussion_r344819053
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
 ##########
 @@ -512,86 +515,84 @@ public static void removeEmptyColumn(Mutation m, byte[] 
emptyCF, byte[] emptyCQ)
       }
   }
 
+  private void 
handleLocalIndexUpdates(ObserverContext<RegionCoprocessorEnvironment> c,
+                                       MiniBatchOperationInProgress<Mutation> 
miniBatchOp,
+                                       ListMultimap<HTableInterfaceReference, 
Pair<Mutation, byte[]>> indexUpdates) {
+      byte[] tableName = 
c.getEnvironment().getRegion().getTableDescriptor().getTableName().getName();
+      HTableInterfaceReference hTableInterfaceReference =
+                          new HTableInterfaceReference(new 
ImmutableBytesPtr(tableName));
+      List<Pair<Mutation, byte[]>> localIndexUpdates = 
indexUpdates.removeAll(hTableInterfaceReference);
+      if (localIndexUpdates == null) {
 
 Review comment:
   I think removeAll will return an empty list rather than null. Let's add a 
size check here as well

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to