arunpandianp commented on code in PR #33736:
URL: https://github.com/apache/beam/pull/33736#discussion_r1926662161


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/common/worker/OutputReceiver.java:
##########
@@ -27,7 +28,7 @@
  */
 public class OutputReceiver implements Receiver {
   private final List<Receiver> outputs = new ArrayList<>();
-  private final HashMap<String, ElementCounter> outputCounters = new 
HashMap<>();
+  private final HashMap<String, ElementCounter> outputCounters = new 
LinkedHashMap<>();

Review Comment:
   the map's values are iterated twice for every element in `proces()` below. 
Changed to LinkedHashmap since it is iteration friendly.
   
   <img width="1700" alt="Screenshot 2025-01-23 at 1 35 14 AM" 
src="https://github.com/user-attachments/assets/c09fd669-acea-4dd7-8e41-f814d4d408e4";
 />
   



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