对象的结构值是对象本身. SerializableCoder应该仅用于具有正确Object#equals实现的对象.您可以为POJO实现自己的Coder. SerializableCoder不保证根据文档: SerializableCoder不保证确定性编码,因为Java 序列化可能会为两个等效项产生不同的二进制编码 对象. 本文详细介绍了自定义编码器. I was testing my Dataflow pipeline using DirectRunner from my Mac and got lots of "WARNING" message like this, may I know how to get rid of them because it is too much that I can not even see my debug message.ThanksApr 05, 2018 2:14:48 PM org.apache.beam.sdk.util.MutationDetectors$CodedValueMutationDetector verifyUnmodifiedThrowingCheckedExceptionsWARNING: Coder of type class org.apache.beam.sdk.coders.SerializableCoder has a #structuralValue method which does not return true when the encoding of the elements is equal. Element com.apigee.analytics.platform.core.service.schema.EventRow@4a590d0b 解决方案 It may help to ensure that all serialized values have proper equals() implementations since SerializableCoder expects them: The structural value of the object is the object itself. The SerializableCoder should be only used for objects with a proper Object#equals implementation.You can implement your own Coder for your POJOs. SerializableCoder does not guarantee a deterministic encoding according to docs: SerializableCoder does not guarantee a deterministic encoding, as Java serialization may produce different binary encodings for two equivalent objects.This article explains custom coders in details. 这篇关于使用DirectRunner测试数据流,并获得大量verifyUnmodifiedThrowingCheckedExceptions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-23 04:51