Chesnay Schepler created FLINK-9347:
---------------------------------------

             Summary: BlobServerConnection throws misleading exception for 
empty files
                 Key: FLINK-9347
                 URL: https://issues.apache.org/jira/browse/FLINK-9347
             Project: Flink
          Issue Type: Improvement
          Components: Local Runtime
    Affects Versions: 1.5.0
            Reporter: Chesnay Schepler


When downloading a file from the blob server that has a file size of 0 the 
following exception occurs on the server:
{code}
java.io.EOFException: Received invalid result value. -1
        at 
org.apache.flink.runtime.blob.BlobServerConnection.get(BlobServerConnection.java:275)
        at 
org.apache.flink.runtime.blob.BlobServerConnection.run(BlobServerConnection.java:117)
{code}

The reason is that the client cannot differentiate between a download with no 
more available data and an empty file, causing it to exit early in 
{{BlobInputStream#read}} without writing back {{RETURN_OKAY}}.

This isn't necessarily a _problem_ in that sense as the file is properly 
created on the client, but the exception is a tad misleading and may lead 
debugging efforts down the wrong track (as has happened to me...).

We should either fail early for empty files, fix the behavior, or at the very 
least at some warning log messages.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to