[
https://issues.apache.org/jira/browse/HDFS-9809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15373485#comment-15373485
]
Virajith Jalaparti commented on HDFS-9809:
------------------------------------------
Hi [~eddyxu], Attached is a new patch (HDFS-9809.004.patch) which includes
changes based on your last comment (also rebased on latest trunk).
Apart from addressing the issues you pointed out, I made a few new changes to
enable plugging in a {{ProvidedReplica}} in HDFS-9806 into the datanode's
replication pipeline:
# Change the {{ReplicaInPipeline}} to {{LocalReplicaInPipeline}}, and change
{{ReplicaInPipelineInterface}} to {{ReplicaInPipeline}}.
# Add a {{getReplicaInfo}} function to the (new) {{ReplicaInPipeline}}
interface.
# Move the functions related to writer threads ({{stopWriter}},
{{attemptToSetWriter}}, {{interruptThread}} and {{setWriter}}) to the new
{{ReplicaInPipeline}} interface (i.e., the old {{ReplicaInPipelineInterface}}),
as only {{ReplicaInPipeline}} objects will be associated with writer threads.
The goal of adding (2) was to work around the fact that {{ReplicaInPipeline}}
objects are also treated as {{ReplicaInfo}} objects. An alternative would have
been to cast {{ReplicaInPipeline}} objects to {{ReplicaInfo}}.
With the above changes, a {{ProvidedReplica}} can extend {{ReplicaInfo}} and
implement {{ReplicaInPipeline}}, thereby being able to plug into the replica
management state machine maintained (implicitly) by {{FsDatasetImpl}}. Also,
{{FsVolumeImpl}} can still refer to {{LocalReplicaInPipeline}} indicating that
these replicas are backed by local files.
> Abstract implementation-specific details from the datanode
> ----------------------------------------------------------
>
> Key: HDFS-9809
> URL: https://issues.apache.org/jira/browse/HDFS-9809
> Project: Hadoop HDFS
> Issue Type: Task
> Components: datanode, fs
> Reporter: Virajith Jalaparti
> Assignee: Virajith Jalaparti
> Attachments: HDFS-9809.001.patch, HDFS-9809.002.patch,
> HDFS-9809.003.patch, HDFS-9809.004.patch
>
>
> Multiple parts of the Datanode (FsVolumeSpi, ReplicaInfo, FSVolumeImpl etc.)
> implicitly assume that blocks are stored in java.io.File(s) and that volumes
> are divided into directories. We propose to abstract these details, which
> would help in supporting other storages.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]