hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Virajith Jalaparti (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-10637) Modifications to remove the assumption that FsVolumes are backed by java.io.File.
Date Mon, 26 Sep 2016 22:34:21 GMT

     [ 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,
> Modifications to {{FsVolumeSpi}} and {{FsVolumeImpl}} to remove references to {{java.io.File}}.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org

View raw message