Skip to content

Conversation

@NicoK
Copy link
Contributor

@NicoK NicoK commented Jan 19, 2017

KvStateRequestSerializer#deserializeValue() deserializes a given byte array. This is used by clients and unit tests and it is fair to assume that these byte arrays represent a complete value since we do not offer a method to continue reading from the middle of the array anyway. Therefore, we can treat unconsumed bytes as errors, e.g. from a wrong serializer being used, and throw an IOException with an appropriate failure message.

Similarly, this adds a better failure message to exceptions in KvStateRequestSerializer#deserializeList() by wrapping the original IOException into a new one with an appropriate error message just as in #3172.

The new unit tests require #3171 to be accepted first on which this PR is also based.

Nico Kruber added 4 commits January 19, 2017 15:03
…nconsumed bytes

KvStateRequestSerializer#deserializeValue deserializes a given byte array. This is used by clients and unit tests and it is fair to assume that these byte arrays represent a complete value since we do not offer a method to continue reading from the middle of the array anyway. Therefore, we can treat unconsumed bytes as errors, e.g. from a wrong serializer being used, and throw a IOException with an appropriate failure message.
…uestSerializer#deserializeList()

As in FLINK-5559, wrap the original IOException into a new one with an
appropriate error message to better diagnose it.
…lizeList()

These tests ensure that some special cases not properly tested before are
handled correctly in future.
@asfgit asfgit closed this in 563c3a4 Jan 22, 2017
asfgit pushed a commit that referenced this pull request Jan 22, 2017
…zerTest

These tests ensure that some special cases not properly tested before are
handled correctly in future.

This closes #3174.
This closes #3139 (left over).
joseprupi pushed a commit to joseprupi/flink that referenced this pull request Feb 12, 2017
…zerTest

These tests ensure that some special cases not properly tested before are
handled correctly in future.

This closes apache#3174.
This closes apache#3139 (left over).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants