beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Halperin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BEAM-887) Make FileBasedSink.getWriterResultCoder abstract
Date Wed, 02 Nov 2016 23:14:58 GMT

     [ https://issues.apache.org/jira/browse/BEAM-887?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Halperin updated BEAM-887:
---------------------------------
    Description: 
FileBasedSink has this function:

{code}
    /**
      * Returns a coder for the writer result type.
      */
    public Coder<WriteT> getWriterResultCoder() {
      return null;
    }
{code}

It returns {{null}} by default, but in practice if this happens then building the pipeline
will crash with a {{NullPointerException}}. Now that we can make backward-incompatible changes,
just make it abstract and force implementations to add this method. (All existing implementations
override it already.)

  was:
FileBasedSink has this function:

{code}
     /**
       * Returns a coder for the writer result type.
       */
    public Coder<WriteT> getWriterResultCoder() {
      return null;
    }
{code}

It returns {{null}} by default, but in practice if this happens then building the pipeline
will crash with a {{NullPointerException}}. Now that we can make backward-incompatible changes,
just make it abstract and force implementations to add this method. (All implementations already
implement it already.)


> Make FileBasedSink.getWriterResultCoder abstract
> ------------------------------------------------
>
>                 Key: BEAM-887
>                 URL: https://issues.apache.org/jira/browse/BEAM-887
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>    Affects Versions: Not applicable
>            Reporter: Daniel Halperin
>            Assignee: Kenneth Knowles
>              Labels: backward-incompatible
>             Fix For: 0.4.0-incubating
>
>
> FileBasedSink has this function:
> {code}
>     /**
>       * Returns a coder for the writer result type.
>       */
>     public Coder<WriteT> getWriterResultCoder() {
>       return null;
>     }
> {code}
> It returns {{null}} by default, but in practice if this happens then building the pipeline
will crash with a {{NullPointerException}}. Now that we can make backward-incompatible changes,
just make it abstract and force implementations to add this method. (All existing implementations
override it already.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message