keith-turner commented on code in PR #5906:
URL: https://github.com/apache/accumulo/pull/5906#discussion_r2365717202


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TableOperationsImpl.java:
##########
@@ -572,15 +574,15 @@ public void putSplits(String tableName, 
SortedMap<Text,TabletMergeability> split
             throw new CompletionException(e);
           }
           // wait for the fate operation to complete in a separate thread pool
-        }, startExecutor).thenApplyAsync(pair -> {
-          final TFateId opid = pair.getFirst();
-          final List<Pair<Text,TabletMergeability>> completedSplits = 
pair.getSecond();
+        }, startExecutor).thenApplyAsync(fateSplits -> {
 
           try {
-            String status = handleFateOperation(() -> 
waitForFateOperation(opid), tableName);
+            String status =
+                handleFateOperation(() -> 
waitForFateOperation(fateSplits.opid()), tableName);
 
             if (SPLIT_SUCCESS_MSG.equals(status)) {
-              
completedSplits.stream().map(Pair::getFirst).forEach(splitsTodo::remove);

Review Comment:
   Removing this call to getFirst in this streaming code is what I see as the 
main benefit of this change.  So its a lot of effort for this one benefit.  
Other places where pair is used may have more usage of getFirst and getSecond, 
the more those are used the more readable the code would be w/ a record.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to