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

Lei (Eddy) Xu updated HDFS-7758:
--------------------------------
    Attachment: HDFS-7758.001.patch

Thanks for reviewing this, [~cmccabe]. 

bq. Do we have a plan for removing FsDatasetSpi#getVolume? It seems that this 
interface has a lot of the same issues as FsDatasetImpl#getVolumes. 

I will file a follow up JIRA to retire {{FsDatasetSpi#getVolume}}. 

bq. I don't think we should have a FsDatasetSpi#getNumVolumes method.

I removed it in this patch.

bq.  Instead of doing this, just add an FSDatasetSpi method to select a random 
volume (that returns a ref).

All of these selecting a random volume is in tests, so I put this logic into 
tests themselves. 

Would you give another look?



> Retire FsDatasetSpi#getVolumes() and use FsDatasetSpi#getVolumeRefs() instead
> -----------------------------------------------------------------------------
>
>                 Key: HDFS-7758
>                 URL: https://issues.apache.org/jira/browse/HDFS-7758
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>    Affects Versions: 2.6.0
>            Reporter: Lei (Eddy) Xu
>            Assignee: Lei (Eddy) Xu
>         Attachments: HDFS-7758.000.patch, HDFS-7758.001.patch
>
>
> HDFS-7496 introduced reference-counting  the volume instances being used to 
> prevent race condition when hot swapping a volume.
> However, {{FsDatasetSpi#getVolumes()}} can still leak the volume instance 
> without increasing its reference count. In this JIRA, we retire the 
> {{FsDatasetSpi#getVolumes()}} and propose {{FsDatasetSpi#getVolumeRefs()}} 
> and etc. method to access {{FsVolume}}. Thus it makes sure that the consumer 
> of {{FsVolume}} always has correct reference count.



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

Reply via email to