hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-13017) verify implementations of IOStream.read(buffer, offset, bytes) fail fast if the bytes==0
Date Mon, 11 Apr 2016 21:40:25 GMT

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

Steve Loughran updated HADOOP-13017:
------------------------------------
    Description: 
HDFS-10277 showed that HDFS was return -1 on read(buf[], 0, 0) when there was no data left
in the stream; Java IO says 

bq. If {{len}} is zero, then no bytes are read and {{0}} is returned; otherwise, there is
an attempt to read at least one byte.

Review the implementations of {{IOStream.read

  was:
HDFS-10277 showed that HDFS was return -1 on read(buf[], 0, 0) when there was no data left
in the stream; Java IO says 

bq. If {{len}} is zero, then no bytes are read and {{0}} is returned; otherwise, there is
an attempt to read at least one byte.

This patch clarifies the fsinputstream specification, and fixes {{DFSInputStream}} to address
this


> verify implementations of IOStream.read(buffer, offset, bytes) fail fast if the bytes==0
> ----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-13017
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13017
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: io
>    Affects Versions: 2.8.0
>            Reporter: Steve Loughran
>
> HDFS-10277 showed that HDFS was return -1 on read(buf[], 0, 0) when there was no data
left in the stream; Java IO says 
> bq. If {{len}} is zero, then no bytes are read and {{0}} is returned; otherwise, there
is an attempt to read at least one byte.
> Review the implementations of {{IOStream.read



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message