You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2015/11/30 18:24:11 UTC
[jira] [Updated] (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 ]
Ted Yu updated FLINK-3014:
--------------------------
Description:
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.
was:
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.
> 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)