hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shradha Revankar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8943) Read apis in ByteRangeInputStream does not read all the bytes specified when chunked transfer-encoding is used in the server
Date Tue, 25 Aug 2015 03:36:45 GMT

    [ https://issues.apache.org/jira/browse/HDFS-8943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14710527#comment-14710527
] 

Shradha Revankar commented on HDFS-8943:
----------------------------------------

The loop will only read upto len bytes. Unfortunately, not having the loop breaks things when
chunked-encoding is used. For eg. hbase expects the exact number of bytes to be read  https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java#L1446-L1450


> Read apis in ByteRangeInputStream does not read all the bytes specified when chunked
transfer-encoding is used in the server
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-8943
>                 URL: https://issues.apache.org/jira/browse/HDFS-8943
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>    Affects Versions: 2.7.1
>            Reporter: Shradha Revankar
>            Assignee: Shradha Revankar
>         Attachments: HDFS-8943.000.patch
>
>
> With the default Webhdfs server implementation the read apis in ByteRangeInputStream
work as expected reading the correct number of bytes for these apis :
> {{public int read(byte b[], int off, int len)}}
> {{public int read(long position, byte[] buffer, int offset, int length)}}
> But when a custom Webhdfs server implementation is plugged in which uses chunked Transfer-encoding,
these apis read only the first chunk. Simple fix would be to loop and read till bytes specified
similar to {{readfully()}}



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

Mime
View raw message