[ 
https://issues.apache.org/jira/browse/BEAM-13015?focusedWorklogId=770415&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-770415
 ]

ASF GitHub Bot logged work on BEAM-13015:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/May/22 22:55
            Start Date: 13/May/22 22:55
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on code in PR #17327:
URL: https://github.com/apache/beam/pull/17327#discussion_r872882433


##########
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/PrecombineGroupingTable.java:
##########
@@ -223,27 +323,26 @@ public void put(
       throws Exception {
     // Ignore timestamp for grouping purposes.
     // The Pre-combine output will inherit the timestamp of one of its inputs.
-    WindowedValue<Object> groupingKey =
-        WindowedValue.of(
-            keyCoder.structuralValue(value.getValue().getKey()),
-            IGNORED,
-            value.getWindows(),
-            value.getPane());
-
-    GroupingTableEntry entry =
-        lruMap.compute(
-            groupingKey,
-            (key, tableEntry) -> {
-              if (tableEntry == null) {
-                tableEntry =
-                    new GroupingTableEntry(
-                        groupingKey, value.getValue().getKey(), 
value.getValue().getValue());
-              } else {
-                tableEntry.add(value.getValue().getValue());
-              }
-              return tableEntry;
-            });
-    weight += entry.getWeight();
+    GroupingTableKey groupingKey =
+        new GroupingTableKey(
+            value.getValue().getKey(), value.getWindows(), value.getPane(), 
keyCoder, keySizer);
+
+    lruMap.compute(
+        groupingKey,
+        (key, tableEntry) -> {
+          if (tableEntry == null) {
+            weight += groupingKey.getWeight();

Review Comment:
   this adds the weight of the key, and not the value





Issue Time Tracking
-------------------

    Worklog Id:     (was: 770415)
    Time Spent: 80.5h  (was: 80h 20m)

> Optimize Java SDK harness
> -------------------------
>
>                 Key: BEAM-13015
>                 URL: https://issues.apache.org/jira/browse/BEAM-13015
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-harness
>            Reporter: Luke Cwik
>            Assignee: Luke Cwik
>            Priority: P2
>          Time Spent: 80.5h
>  Remaining Estimate: 0h
>
> Use profiling tools to remove bundle processing overhead in the SDK harness.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to