[
https://issues.apache.org/jira/browse/BEAM-5115?focusedWorklogId=213936&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-213936
]
ASF GitHub Bot logged work on BEAM-5115:
----------------------------------------
Author: ASF GitHub Bot
Created on: 15/Mar/19 18:17
Start Date: 15/Mar/19 18:17
Worklog Time Spent: 10m
Work Description: aromanenko-dev commented on issue #8068: [BEAM-5115]
Make ValueProvider API consistent between XmlIO and XmlSource
URL: https://github.com/apache/beam/pull/8068#issuecomment-473392378
Thanks, LGTM in general.
Could you add a unit test that uses this new added public method
`from(ValueProvider<String>)`?
----------------------------------------------------------------
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: 213936)
Time Spent: 0.5h (was: 20m)
> Inconsistent use of ValueProvider between XmlSource and XmlIO
> -------------------------------------------------------------
>
> Key: BEAM-5115
> URL: https://issues.apache.org/jira/browse/BEAM-5115
> Project: Beam
> Issue Type: Improvement
> Components: io-java-text
> Affects Versions: 2.6.0
> Reporter: Sigmund Hansen
> Assignee: Ismaël Mejía
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> XmlIO.Read.from takes a String as an argument, which is then used to create a
> StaticValueProvider for the XmlSource that is built later on. As XmlSource
> takes a ValueProvider<String> to specify the file source(s) to read from.
> I would suggest to store a ValueProvider<String> in XmlIO.Read.Builder
> instead of a String, and overload from with two implementations. One being a
> wrapper creating a StaticValueProvider, i.e.
> {code:java}
> public Read<T> from(String fileOrPatternSpec) {
> return from(StaticValueProvider.of(fileOrPatternSpec));
> }
> public Read<T> from(ValueProvider<String> fileOrPatternSpec) {
> return toBuilder().setFileOrPatternSpec(fileOrPatternSpec).build();
> }{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)