beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (BEAM-2249) AvroIO does not handle partial reads
Date Wed, 10 May 2017 17:19:04 GMT


ASF GitHub Bot commented on BEAM-2249:

GitHub user dhalperi opened a pull request:

    [BEAM-2249] Correctly handle partial reads in AvroSource

    R: @lukecwik 
    These were the only uses of `InputStream#read(byte[])` or `InputStream#read(byte[], int,
int)` that were clearly not handled correctly. All other uses:
    * ZipInputStream:
    * AvroSource:
    * ExposedByteArrayInputStream
    * Twice in StreamUtils:
    I believe these last are correct as they first assert bytes are available.

You can merge this pull request into a Git repository by running:

    $ git pull io-read-fully

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3050
commit da314112d262007266aece731bd3914cbe22b258
Author: Dan Halperin <>
Date:   2017-05-10T17:11:53Z

    [BEAM-2249] Correctly handle partial reads in AvroSource


> AvroIO does not handle partial reads
> ------------------------------------
>                 Key: BEAM-2249
>                 URL:
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Daniel Halperin
>            Assignee: Daniel Halperin
>             Fix For: 2.0.0
> Reported by a user using HDFS with AvroIO, they are hitting an exception here:
> Looks like this is because we are assuming the read will always return the right number
of bytes. We should be using {{IOUtils.readFully}} instead.

This message was sent by Atlassian JIRA

View raw message