You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Hans Uhlig (JIRA)" <ji...@apache.org> on 2013/06/07 10:31:20 UTC

[jira] [Updated] (FLUME-2074) ResettableInputStream returns -1 when parsing binary stream 0xff

     [ https://issues.apache.org/jira/browse/FLUME-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hans Uhlig updated FLUME-2074:
------------------------------

    Description: 
ResettableInputStream returns signed values( -128 - 127 ) when reading data, specifically -1 when file stream contains 0xFF rather than unsigned data (0-255) and negative control signals. This causes a premature EOF to be detected by deserializers written to obey defined control signals.

ResettableInputStream.read() returns an integer and should be returning the unsigned value of the byte (0 - 255) with -1 as en EOF rather than the signed value of (-128 - 127). 

  was:
ResettableInputStream returns -1 when parsing binary stream 0xff which causes deserializers using -1 to indicate EOF to truncate prematurely. 

ResettableInputStream.read() returns an int and should be returning the unsigned value of the byte (0 - 255) with -1 as en EOF rather than the signed value of (-128 - 127). 

    
> ResettableInputStream returns -1 when parsing binary stream 0xff
> ----------------------------------------------------------------
>
>                 Key: FLUME-2074
>                 URL: https://issues.apache.org/jira/browse/FLUME-2074
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.4.0
>            Reporter: Hans Uhlig
>            Priority: Critical
>
> ResettableInputStream returns signed values( -128 - 127 ) when reading data, specifically -1 when file stream contains 0xFF rather than unsigned data (0-255) and negative control signals. This causes a premature EOF to be detected by deserializers written to obey defined control signals.
> ResettableInputStream.read() returns an integer and should be returning the unsigned value of the byte (0 - 255) with -1 as en EOF rather than the signed value of (-128 - 127). 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira