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

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

                Author: ASF GitHub Bot
            Created on: 19/May/20 18:45
            Start Date: 19/May/20 18:45
    Worklog Time Spent: 10m 
      Work Description: pabloem commented on a change in pull request #11596:
URL: https://github.com/apache/beam/pull/11596#discussion_r427506366



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/HL7v2IO.java
##########
@@ -431,25 +455,70 @@ private Message fetchMessage(HealthcareApiClient client, 
String msgId)
       this.filter = filter.get();
     }
 
+    /**
+     * Instantiates a new List hl 7 v 2 messages.
+     *
+     * @param hl7v2Stores the hl 7 v 2 stores
+     * @param filter the filter
+     * @param initialSplitDuration the initial split duration for sendTime 
dimension splits
+     */
+    ListHL7v2Messages(
+        ValueProvider<List<String>> hl7v2Stores,
+        ValueProvider<String> filter,
+        Duration initialSplitDuration) {
+      this.hl7v2Stores = hl7v2Stores.get();
+      this.filter = filter.get();
+      this.initialSplitDuration = initialSplitDuration;

Review comment:
       `ValueProvider` arguments are usually not known at pipeline construction 
time, so it is not useful to call `get` on them when you create the 
PCollection. The usual method is to have ValueProvider attributes for the class 
- when you get String arguments, you would wrap them with `StaticValueProvider` 
- and in the execution-time methods (e.g. processelement, finish/startbundle), 
you would call `get` on the valueproviders. I seem to have missed this point 
earlier. sorry about that.




----------------------------------------------------------------
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: 435112)
    Time Spent: 4h 50m  (was: 4h 40m)

> HL7v2IO.ListHL7v2Messages should be refactored to support more parallelization
> ------------------------------------------------------------------------------
>
>                 Key: BEAM-9856
>                 URL: https://issues.apache.org/jira/browse/BEAM-9856
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-gcp
>            Reporter: Jacob Ferriero
>            Assignee: Jacob Ferriero
>            Priority: P3
>          Time Spent: 4h 50m
>  Remaining Estimate: 0h
>
> Currently the List Messages API paginates through in a single ProcessElement 
> Call.
> However we could get a restriction based on createTime using Messages.List 
> filter and orderby.
>  
> This is inline with the future roadmap of  HL7v2 bulk export API becomes 
> available that should allow splitting on (e.g. create time dimension). 
> Leveraging this bulk export might be  a future optimization to explore.
>  
> This could take one of two forms:
> 1. dyanmically splitable via splitable DoFn (sexy, beam idiomatic: make 
> optimization the runner's problem, potentially unnecessarily complex for this 
> use case )
> 2. static splitting on some time partition e.g. finding the earliest 
> createTime and emitting a PCollection of 1 hour partitions and paginating 
> through each hour of data w/ in the time frame that the store spans, in a 
> separate ProcessElement. (easy to implement but will likely have hot keys / 
> stragglers based on "busy hours")
>  



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

Reply via email to