You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (JIRA)" <ji...@apache.org> on 2016/01/20 07:27:39 UTC
[jira] [Closed] (FLINK-3014) Return code from InputStream#read()
should be checked in PythonStreamer#sendBroadCastVariables
[ https://issues.apache.org/jira/browse/FLINK-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chesnay Schepler closed FLINK-3014.
-----------------------------------
Resolution: Fixed
Fixed in c7ada8d785087e0209071a8219ff841006b96639
> Return code from InputStream#read() should be checked in PythonStreamer#sendBroadCastVariables
> ----------------------------------------------------------------------------------------------
>
> Key: FLINK-3014
> URL: https://issues.apache.org/jira/browse/FLINK-3014
> Project: Flink
> Issue Type: Bug
> Reporter: Ted Yu
> Assignee: Chesnay Schepler
> Priority: Minor
>
> Here is related code (there're 3 occurrences in the method):
> {code}
> in.read(buffer, 0, 4);
> checkForError();
> {code}
> java.io.InputStream.read(byte[], int, int) returns the number of bytes read.
> The return value should be checked because checkForError() does this:
> {code}
> if (getInt(buffer, 0) == -2) {
> try { //wait before terminating to ensure that the complete error message is printed
> {code}
> Incorrect result may be returned if fewer than 4 bytes of data are read.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)