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

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

                Author: ASF GitHub Bot
            Created on: 18/Mar/22 18:48
            Start Date: 18/Mar/22 18:48
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on a change in pull request #17121:
URL: https://github.com/apache/beam/pull/17121#discussion_r830260789



##########
File path: 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/StateFetchingIterators.java
##########
@@ -84,10 +83,7 @@ private StateFetchingIterators() {}
       StateRequest stateRequestForFirstChunk,
       Coder<T> valueCoder) {
     return new CachingStateIterable<>(
-        (Cache<StateKey, Blocks<T>>) cache,
-        beamFnStateClient,
-        stateRequestForFirstChunk,
-        valueCoder);
+        (Cache<Object, Blocks<T>>) cache, beamFnStateClient, 
stateRequestForFirstChunk, valueCoder);

Review comment:
       I would suggest using a static object that is weighted that is internal. 
Using `null` hides useful information when debugging the caches contents. 
Please also update the method comment saying that the state cache should be 
namespaced for this object to prevent collisions (like BagUserState).
   
   Like 
   ```
   private static class IterableCacheKey implements Weighted {
     static INSTANCE = new IterableCacheKey();
     getWeight() {
       return 0;
     }
   }
   ```




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


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

    Worklog Id:     (was: 744325)
    Time Spent: 69h 40m  (was: 69.5h)

> 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: 69h 40m
>  Remaining Estimate: 0h
>
> Use profiling tools to remove bundle processing overhead in the SDK harness.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to