You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Virajith Jalaparti (JIRA)" <ji...@apache.org> on 2016/08/05 00:45:20 UTC

[jira] [Commented] (HDFS-10636) Modify ReplicaInfo to remove the assumption that replica metadata and data are stored in java.io.File.

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

Virajith Jalaparti commented on HDFS-10636:
-------------------------------------------

Thanks [~chris.douglas] for the comments and fixing the checkstyle/findbugs. 

I am attaching a new patch to address the above comments.

bq. Breaking up the switch statement in build() avoids a checkstyle complaint? This might be more legible if each (fairly long) case stmt were in a private method.

Addressed in the patch -- moved each case statement to a private function.

bq. Is {{DataStorage::getTrashDirectoryForBlockFile}} now unused, except by tests? 

Yes, it is no longer used/required. I modified the tests that access {{DataStorage::getTrashDirectoryForBlockFile}}, to ensure that it is no longer needed and removed this function. I also modified tests that access {{BlockPoolSliceStorage::getTrashDirectory(File)}} to access {{BlockPoolSliceStorage::getTrashDirectory(ReplicaInfo)}}, and made the former a private function in {{BlockPoolSliceStorage}}.

bq. the call to {{Storage::nativeCopyFileUnbuffered}} is removed, so there's no path to the {{NativeIO}} libraries. This should be maintained.
Agree. I have restored this by adding two new abstract functions to {{ReplicaInfo}}: {{copyMetadata}} and {{copyBlockdata}}, and implementing them in {{LocalReplica}} to use {{Storage::nativeCopyFileUnbuffered}}.

> Modify ReplicaInfo to remove the assumption that replica metadata and data are stored in java.io.File.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-10636
>                 URL: https://issues.apache.org/jira/browse/HDFS-10636
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, fs
>            Reporter: Virajith Jalaparti
>            Assignee: Virajith Jalaparti
>         Attachments: HDFS-10636.001.patch, HDFS-10636.002.patch, HDFS-10636.003.patch, HDFS-10636.004.patch
>
>
> Replace java.io.File related APIs from {{ReplicaInfo}}, and enable the definition of new {{ReplicaInfo}} sub-classes whose metadata and data can be present on external storages (HDFS-9806). 



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

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