flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamie Grier <ja...@data-artisans.com>
Subject Re: keyBy called twice. Second time, INetAddress and Array[Byte] are empty
Date Tue, 10 Jan 2017 20:58:06 GMT
Hi Jonas,

The issue has to do with serializing/deserializing InetAddress.  If you
look at the InetAddress class the data members that hold the actual ip
address are transient fields and such are not serialized/deserialized in
the way that you would expect.  This is what is causing the issue.

I suggest you simply do not use InetAddress in your Person data type but
rather a simple string or other properly serializable type for instance.


On Mon, Jan 9, 2017 at 9:46 AM, Jonas <jonas@huntun.de> wrote:

> So I created a minimal working example where this behaviour can still be
> seen. It is 15 LOC and can be downloaded here:
> https://github.com/JonasGroeger/flink-inetaddress-zeroed
> To run it, use sbt:
> If you don't want to do the above fear not, here is the code:
> For some reason, java.net.InetAddress objects get zeroed. Why is that?
> --
> View this message in context: http://apache-flink-user-
> mailing-list-archive.2336050.n4.nabble.com/keyBy-called-
> twice-Second-time-INetAddress-and-Array-Byte-are-empty-tp10907p10947.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive
> at Nabble.com.


Jamie Grier
data Artisans, Director of Applications Engineering
@jamiegrier <https://twitter.com/jamiegrier>

View raw message