[ 
https://issues.apache.org/jira/browse/BEAM-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16081641#comment-16081641
 ] 

ASF GitHub Bot commented on BEAM-2353:
--------------------------------------

GitHub user reuvenlax opened a pull request:

    https://github.com/apache/beam/pull/3539

    [BEAM-2353] Unbundle Context and WindowedContext.

    Remove the unnecessary classes, and inline the parameters. This is not a 
backwards-compatible change, however these classes are marked as @Experimental.
    
    R: @kennknowles 


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/reuvenlax/incubator-beam 
unbundle_filename_policy_context

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/beam/pull/3539.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3539
    
----

----


> FileNamePolicy context parameters allow backwards compatibility where we 
> really don't want any
> ----------------------------------------------------------------------------------------------
>
>                 Key: BEAM-2353
>                 URL: https://issues.apache.org/jira/browse/BEAM-2353
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Kenneth Knowles
>            Assignee: Reuven Lax
>             Fix For: 2.2.0
>
>
> Currently, in {{FileBasedSink}} the {{FileNamePolicy}} object accepts 
> parameters of type {{Context}} and {{WindowedContext}} respectively.
> These contexts are a coding technique to allow easy backwards compatibility 
> when adding new parameters. However, if a new parameter is added to the file 
> name policy it is likely data loss for the user to not incorporate it, so in 
> fact that is never a safe backwards compatible change.
> These are brand-new APIs and marked experimental. This is important enough I 
> think we should make the breaking change.
> We should inline all the parameters of the context, so that we _cannot_ add 
> parameters and maintain compatibility. Instead, if we have new ones we want 
> to add, it will have to be a new method or some such.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to