hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Shvachko (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HDFS-680) Add new access method to a copy of a block's replica
Date Tue, 13 Oct 2009 02:18:31 GMT

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

Konstantin Shvachko updated HDFS-680:

    Attachment: replicaClone.patch

This patch 
- introduces a new method {{FSDataset.getReplicaClone()}}, which find a replica in data-node's
memory, clones it and returns the clone.
- This is done using copy constructors on different replica types. I considered using {{Object.clone()}}
in the beginning, but rejected it because clone returns Object, and we will have to convert
every time we use it. Doesn't look appealing to me.
- I removed all use cases of {{FSDataset.getReplica()}} but one in {{BlockSender}}. This should
be fixed by HDFS-698. I deprecated {{getReplica()}} for now.
- I was not sure whether {{getReplicaClone()}} belongs to {{FSDataset}} or {{DataNode}}. If
people think it should be in DataNode I can move it, let me know.

> Add new access method to a copy of a block's replica
> ----------------------------------------------------
>                 Key: HDFS-680
>                 URL: https://issues.apache.org/jira/browse/HDFS-680
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 0.21.0
>            Reporter: Konstantin Boudnik
>            Assignee: Konstantin Boudnik
>             Fix For: 0.21.0
>         Attachments: replicaClone.patch
> Sometimes tests (and perhaps other client applications) might need an access to the state
of a block's replica.
> Currently it is accessible through  {{FSDataset}} member of {{DataNode}} class. However,
{{FSDataset}} is an internal matter of {{DataNode}} and shouldn't be available externally.
> This JIRA will provide new getter method which will be returning a copy of a block's
replica instead of a reference to an actual replica. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message