vincentpoon commented on a change in pull request #469: PHOENIX-5156 Consistent 
Global Indexes for Non-Transactional Tables
URL: https://github.com/apache/phoenix/pull/469#discussion_r287130252
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/builder/IndexBuildManager.java
 ##########
 @@ -79,15 +79,15 @@ public IndexMetaData 
getIndexMetaData(MiniBatchOperationInProgress<Mutation> min
       return this.delegate.getIndexMetaData(miniBatchOp);
   }
 
-  public Collection<Pair<Mutation, byte[]>> getIndexUpdate(
+  public Collection<Pair<Pair<Mutation, byte[]>, byte[]>> getGlobalIndexUpdate(
       MiniBatchOperationInProgress<Mutation> miniBatchOp,
       Collection<? extends Mutation> mutations) throws Throwable {
     // notify the delegate that we have started processing a batch
     final IndexMetaData indexMetaData = 
this.delegate.getIndexMetaData(miniBatchOp);
     this.delegate.batchStarted(miniBatchOp, indexMetaData);
 
     // Avoid the Object overhead of the executor when it's not actually 
parallelizing anything.
-    ArrayList<Pair<Mutation, byte[]>> results = new 
ArrayList<>(mutations.size());
+    ArrayList<Pair<Pair<Mutation, byte[]>, byte[]>> results = new 
ArrayList<>(mutations.size());
 
 Review comment:
   You don't have to change it now, but I find the `Pair<Pair>` hard to follow 
and read, especially at the callsite where we do things like 
`next.getFirst().getSecond()`.
   It seems maybe we're missing an abstraction here - perhaps something like a 
`TableUpdate` object which holds table name, rowkey, Mutation

----------------------------------------------------------------
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