scwhittle commented on code in PR #33736:
URL: https://github.com/apache/beam/pull/33736#discussion_r1926644689
##########
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:
motivation for this?
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/Work.java:
##########
@@ -88,7 +87,7 @@ private Work(
this.watermarks = watermarks;
this.clock = clock;
this.startTime = clock.get();
- this.totalDurationPerState = new EnumMap<>(LatencyAttribution.State.class);
+ this.totalDurationPerState = new HashMap<>();
Review Comment:
Another idea where the map would still be stored as an array without hashing
is to have an empty static EnumMap that you construct the new map referencing.
Then it wouldn't have to recalculate the key universe
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/work/processing/StreamingWorkScheduler.java:
##########
@@ -300,6 +301,10 @@ private void processWork(ComputationState
computationState, Work work) {
}
}
+ private void processWork(ComputationState computationState, Work work) {
+ processWork(computationState, work, ImmutableList.of());
Review Comment:
instead of this delegating to the one with latencies how about that one
delegates to this?
--
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]