[
https://issues.apache.org/jira/browse/HDFS-509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741651#action_12741651
]
Konstantin Shvachko commented on HDFS-509:
------------------------------------------
# According to your comment in jira ReplicaWaitingToBeRecovered should be a
subclass of ReplicaInfo rather than ReplicaInPipeline as in the patch.
# ReplicaUnderRecovery.replica to ReplicaUnderRecovery.original
# ReplicaInPipeline.bytesAcked to ReplicaInPipeline.bytesAcknowledged, and
respective methods too.
# bumpGenerationStamp() should be an overload of setGenerationStamp(). Or use
setNewGenerationStamp().
# Comments like
{code}
/**
* @see ReplicaInfo#getVisibleLen()
*/
{code}
may be replaced by simply {{/** {...@inheritdoc} */}}. Or even no JavaDoc
comments, which will have the same effect.
# It would be nice to have @Override with a comment saying which class it
overloads. With so much inheritance this is particularly useful. E.g.
{...@override // ReplicaInfo}}
# {{ReplicaInfo.toString()}} would be useful to keep. It helps debugging.
# Add new line at the end of new files.
# I'd avoid introducing constructors that are not used at the moment. Say,
ReplicaBeingWritten has 5 constructors which are not used anywhere in the code.
We should be adding constructors as they are needed.
# Also it is better to define constructors using {{this.(...)}} going from most
general to more specific. That way the common code is implemented only once.
I cannot evaluate usability of your hierarchy of replica classes until there
are use cases for all of them. I think we will have to wait with that.
Right now it seems that FinalizedReplica can be merged with ReplicaInfo.
> Redesisn DataNode volumeMap to include all types of Replicas
> ------------------------------------------------------------
>
> Key: HDFS-509
> URL: https://issues.apache.org/jira/browse/HDFS-509
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: data-node
> Affects Versions: Append Branch
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: Append Branch
>
> Attachments: replicas.patch, replicas1.patch
>
>
> With the new append design, replicas at a DataNode could be in one of the
> five states: Finalized, ReplicaBeingWritten, ReplicaWaitingToBeRecovered,
> ReplicaUnderRecovery, and Temporay. This jira is to
> 1. define the in-memory representation of these five types of replicas
> 2. redefine volumeMap to include all five types of replicas and remove
> ongoingCreates map.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.