hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yi Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6813) WebHdfsFileSystem#OffsetUrlInputStream should implement PositionedReadable with thead-safe.
Date Mon, 04 Aug 2014 14:57:14 GMT

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

Yi Liu commented on HDFS-6813:
------------------------------

Hi [~szetszwo], thanks for your comments. I think the original intention in {{DFSInputStream}}
is to make thread-safe for PositionedReadable implementation, we can see there are *synchronized*
for other methods; normal read is synchronized, and there is no reason that positioned read
is not synchronized (few object variables are used in this method, maybe forget to synchronize?).
 I have checked other inputstreams in Hadoop which implement PositionedReadable almost are
thread-safe. If we don't want thread-safe, it's better to remove synchronized, then it's a
bit more efficient.

What's your suggestion about this?

> WebHdfsFileSystem#OffsetUrlInputStream should implement PositionedReadable with thead-safe.
> -------------------------------------------------------------------------------------------
>
>                 Key: HDFS-6813
>                 URL: https://issues.apache.org/jira/browse/HDFS-6813
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>    Affects Versions: 2.6.0
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>         Attachments: HDFS-6813.001.patch
>
>
> {{PositionedReadable}} definition requires the implementations for its interfaces should
be thread-safe.
> OffsetUrlInputStream(WebHdfsFileSystem inputstream) doesn't implement these interfaces
with tread-safe, this JIRA is to fix this.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message