使用DirectRunner测试数据流,并获得大量verifyUnmodifiedThrowingCheckedExceptions [英] Test Dataflow with DirectRunner and got lots of verifyUnmodifiedThrowingCheckedExceptions
问题描述
我正在Mac上使用DirectRunner测试数据流管道,并收到很多类似这样的警告"消息,也许我知道如何摆脱它们,因为它太多了,我什至看不到调试消息./p>
谢谢
Apr 05, 2018 2:14:48 PM org.apache.beam.sdk.util.MutationDetectors$CodedValueMutationDetector verifyUnmodifiedThrowingCheckedExceptions
WARNING: 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
自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.
Thanks
Apr 05, 2018 2:14:48 PM org.apache.beam.sdk.util.MutationDetectors$CodedValueMutationDetector verifyUnmodifiedThrowingCheckedExceptions
WARNING: 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 properObject#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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!