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

Virajith Jalaparti commented on HDFS-10637:
-------------------------------------------

Hi [~eddyxu], 

bq. what about setting {{FsVolumeImpl#storageStorage}} as {{final}} ...

I assume you meant {{FsVolumeImpl#storageLocation}} here? Yes, I think this 
makes sense. So, the changes will be the following:
1) Have only one constructor for {{FsVolumeImpl}}, which takes in as input the 
{{StorageDirectory}}. This would involve moving the code in the {{private 
FsVolumeImpl(...String currentDir...StorageLocation storageLocation)}} to the 
{{FsVolumeImpl(...,StorageDirectory sd, ...)}} constructor. 

2) Declare both {{FsVolumeImpl#storageLocation}}, and 
{{FsVolumeImpl#currentDir}} as final.

The above changes will ensure that both are initialized consistently, and they 
are not modified again. 

Is this what you had in mind? 

I will post the updated patch soon. 






> Modifications to remove the assumption that FsVolumes are backed by 
> java.io.File.
> ---------------------------------------------------------------------------------
>
>                 Key: HDFS-10637
>                 URL: https://issues.apache.org/jira/browse/HDFS-10637
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, fs
>            Reporter: Virajith Jalaparti
>            Assignee: Virajith Jalaparti
>         Attachments: HDFS-10637.001.patch, HDFS-10637.002.patch, 
> HDFS-10637.003.patch, HDFS-10637.004.patch, HDFS-10637.005.patch, 
> HDFS-10637.006.patch, HDFS-10637.007.patch, HDFS-10637.008.patch, 
> HDFS-10637.009.patch
>
>
> Modifications to {{FsVolumeSpi}} and {{FsVolumeImpl}} to remove references to 
> {{java.io.File}}.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to