flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ufuk Celebi <...@apache.org>
Subject DataInputStream read vs. readFully
Date Wed, 28 Sep 2016 10:34:25 GMT
Hey devs,

had a quick discussion with Stephan about usage of DataInputStream
read and readFully. In most cases we want to use readFully, but it's
easy to accidentally use read instead (happened to me here for
example: https://issues.apache.org/jira/browse/FLINK-4332), which only
reads as many bytes as are available in the stream.

We asked ourselves whether it is possible to prevent read calls by
default and only allow them on a case by case basis. Unfortunately, I
couldn't find anything that could work.

Does someone else have an idea there?

– Ufuk

View raw message