beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neville Li (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BEAM-2658) SerializableCoder has higher precedence over ProtoCoder in CoderRegistry#getCoder
Date Sat, 22 Jul 2017 07:00:01 GMT

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

Neville Li updated BEAM-2658:
-----------------------------
    Description: 
{code}
import com.google.protobuf.Timestamp;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.coders.CannotProvideCoderException;
import org.apache.beam.sdk.coders.Coder;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;

public class CoderTest {
  public static void main(String[] args) throws CannotProvideCoderException {
    PipelineOptions options = PipelineOptionsFactory.fromArgs(args).create();
    Pipeline pipeline = Pipeline.create(options);

    Coder<Timestamp> coder = pipeline.getCoderRegistry().getCoder(Timestamp.class);

    // class org.apache.beam.sdk.coders.SerializableCoder
    System.out.println(coder.getClass());
  }
}
{code}

  was:
{code}
public class CoderTest {
  public static void main(String[] args) throws CannotProvideCoderException {
    PipelineOptions options = PipelineOptionsFactory.fromArgs(args).create();
    Pipeline pipeline = Pipeline.create(options);

    Coder<Timestamp> coder = pipeline.getCoderRegistry().getCoder(Timestamp.class);

    // class org.apache.beam.sdk.coders.SerializableCoder
    System.out.println(coder.getClass());
  }
}
{code}


> SerializableCoder has higher precedence over ProtoCoder in CoderRegistry#getCoder
> ---------------------------------------------------------------------------------
>
>                 Key: BEAM-2658
>                 URL: https://issues.apache.org/jira/browse/BEAM-2658
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>    Affects Versions: 2.0.0
>            Reporter: Neville Li
>            Assignee: Davor Bonaci
>            Priority: Minor
>
> {code}
> import com.google.protobuf.Timestamp;
> import org.apache.beam.sdk.Pipeline;
> import org.apache.beam.sdk.coders.CannotProvideCoderException;
> import org.apache.beam.sdk.coders.Coder;
> import org.apache.beam.sdk.options.PipelineOptions;
> import org.apache.beam.sdk.options.PipelineOptionsFactory;
> public class CoderTest {
>   public static void main(String[] args) throws CannotProvideCoderException {
>     PipelineOptions options = PipelineOptionsFactory.fromArgs(args).create();
>     Pipeline pipeline = Pipeline.create(options);
>     Coder<Timestamp> coder = pipeline.getCoderRegistry().getCoder(Timestamp.class);
>     // class org.apache.beam.sdk.coders.SerializableCoder
>     System.out.println(coder.getClass());
>   }
> }
> {code}



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

Mime
View raw message