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

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

                Author: ASF GitHub Bot
            Created on: 27/Jan/21 02:42
            Start Date: 27/Jan/21 02:42
    Worklog Time Spent: 10m 
      Work Description: steveniemitz commented on a change in pull request 
#13802:
URL: https://github.com/apache/beam/pull/13802#discussion_r564985266



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/state/MapState.java
##########
@@ -77,6 +84,17 @@
    */
   ReadableState<V> get(K key);
 
+  /**
+   * A deferred lookup.
+   *
+   * <p>A user is encouraged to call {@code get} for all relevant keys and 
call {@code readLater()}
+   * on the results.
+   *
+   * <p>When {@code read()} is called, a particular state implementation is 
encouraged to perform
+   * all pending reads in a single batch.
+   */
+  ReadableState<V> getOrDefault(K key, @Nullable V defaultValue);

Review comment:
       wdyt about replacing this with either `computeIfAbsent` or 
`getOrDefault(K key, Supplier<V> defaultValue)`?
   
   Either would allow users to avoid allocating throw-away defaultValues for 
every `getOrDefault` operation.




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

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


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

    Worklog Id:     (was: 542592)
    Time Spent: 3.5h  (was: 3h 20m)

> Support MapState in DataflowRunner
> ----------------------------------
>
>                 Key: BEAM-1474
>                 URL: https://issues.apache.org/jira/browse/BEAM-1474
>             Project: Beam
>          Issue Type: New Feature
>          Components: runner-dataflow
>            Reporter: Kenneth Knowles
>            Priority: P3
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to