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

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

                Author: ASF GitHub Bot
            Created on: 18/Mar/19 10:15
            Start Date: 18/Mar/19 10:15
    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-473849360
 
 
   Thanks! Just one more note - please, apply `gradlew spotlessApply`, 
otherwise `Spotless PreCommit` is failing
 
----------------------------------------------------------------
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: 214667)
    Time Spent: 50m  (was: 40m)

> 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: 50m
>  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)

Reply via email to