Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.5.0
-
None
-
None
Description
When downloading a file from the blob server that has a file size of 0 the following exception occurs on the server:
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)
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.