使用 DirectRunner 测试数据流并获得大量 verifyUnmodifiedThrowingCheckedExceptions [英] Test Dataflow with DirectRunner and got lots of verifyUnmodifiedThrowingCheckedExceptions

查看:16
本文介绍了使用 DirectRunner 测试数据流并获得大量 verifyUnmodifiedThrowingCheckedExceptions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Mac 上的 DirectRunner 测试我的数据流管道,并收到了很多这样的警告"消息,我是否知道如何摆脱它们,因为太多了,我什至看不到我的调试消息.

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.

谢谢

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 应该只用于具有正确 Object#equals 实现的对象.

The structural value of the object is the object itself. The SerializableCoder should be only used for objects with a proper Object#equals implementation.

您可以为您的 POJO 实现您自己的 Coder.根据 文档:

You can implement your own Coder for your POJOs. SerializableCoder does not guarantee a deterministic encoding according to docs:

SerializableCoder 不保证确定性编码,因为 Java序列化可能会为两个等价物产生不同的二进制编码对象.

SerializableCoder does not guarantee a deterministic encoding, as Java serialization may produce different binary encodings for two equivalent objects.

本文详细介绍了自定义编码器.

这篇关于使用 DirectRunner 测试数据流并获得大量 verifyUnmodifiedThrowingCheckedExceptions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆