Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-9347

BlobServerConnection throws misleading exception for empty files

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.5.0
    • None
    • Runtime / Task
    • 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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            chesnay Chesnay Schepler

            Dates

              Created:
              Updated:

              Slack

                Issue deployment