[ https://issues.apache.org/jira/browse/HDFS-10636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15486024#comment-15486024 ]
Virajith Jalaparti commented on HDFS-10636: ------------------------------------------- Hi [~eddyxu], That is a very valid concern. Our solution is to have a {{ProvidedReplica}} class which inherits {{ReplicaInfo}}, and then have {{ProvidedFinalizedReplica}} inherit {{ProvidedReplica}}. Not only this, we will need to have a hierarchy for {{ProvidedReplica}} that mirrors the hierarchy for {{LocalReplica}} in the patch. This is somewhat forced on us as different classes are used to implicitly implement the replica state machine (for example, {{ReplicaInfo::getBytesOnDisk()}} must resolve correctly in {{FsDatasetImpl}}). Thus, we will also need to have {{ProvidedReplicaInPipeline}}, {{ProvidedReplicaUnderRecovery}} and others which inherit {{ProvidedReplica}}. One way to avoid implementing such shadow classes for {{ProvidedReplica}} would be to explicitly implement a state machine for the replicas. This would be a much more disruptive change, with significant amount of new code and changes required to several parts of {{FsDatasetImpl}}, and {{FsVolumeImpl}}. The current patch keeps most of the code paths intact with relatively minor changes to the APIs of {{ReplicaInfo}}. > 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, HDFS-10636.005.patch, > HDFS-10636.006.patch, HDFS-10636.007.patch, HDFS-10636.008.patch, > HDFS-10636.009.patch, HDFS-10636.010.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-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org