[
https://issues.apache.org/jira/browse/HDFS-10637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Virajith Jalaparti updated HDFS-10637:
--------------------------------------
Attachment: HDFS-10637.009.patch
Thanks [~eddyxu] for the clarification. I am posting a new patch to address
your comments. I wanted to point out two in particular:
* Re {{FsDatasetSpi#getFileInFinalizedDir()}} - I removed this. In the test
cases where this was used (e.g. {{TestDirectoryScanner}}), I replaced the call
with {{FsVolumeImpl#getFinalizedDir}}. {{FsVolumeImpl#getFinalizedDir}} is
currently used only in the test cases, and is marked as such. Another way to
address this (given the way {{FsVolumeImpl#getFinalizedDir}} is used in the
test cases), could have been to add calls such as {{createBlock}} and
{{createBlockMetadata}} to {{FsVolumeImpl}}, which create files for the block
data and block metadata (respectively). The former re-uses existing functions,
and seems cleaner.
* Re {{currentDir}} in {{FsVolumeImpl}} - I have not removed this yet. It is a
private variable of {{FsVolumeImpl}}. I think having it makes the code simpler
-- if not, any use of {{currentDir}} needs to be replaced by something like
{{new File(StorageLocation.getFile(), STORAGE_DIR_CURRENT)}}. {{currentDir}} is
now just a private variable that holds this value. What do you think?
> 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]