hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Walter Su (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8909) Erasure coding: update BlockInfoContiguousUC and BlockInfoStripedUC to use BlockUnderConstructionFeature
Date Sat, 22 Aug 2015 09:31:46 GMT

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

Walter Su commented on HDFS-8909:
---------------------------------

bq. separate ReplicaUnderConstruction
1. Instead of exposing {{replicas}} of {{UCFeature}}, I think it's a little better to move
{{setGenerationStampAndVerifyReplicas}}'s {{VerifyReplicas}} part inside UCFeature, but you
have to pass in the UCFeature's parent BI. UCFeature won't call BI's API ,just knows the BI
exist.
Or add {{getExpectedStorageLocationsOfStaleReplicas(GS)}} API in {{UCFeature}}.

2. The comment should point out "striped" block.
{code}
// when creating a new block we simply sequentially assign block index to
// each storage
Block replicaBlock = isStriped ?
  new Block(block.getBlockId() + i, 0, block.getGenerationStamp()) :
  block;
{code}

3. {{setBlockId}} is useless, it covers up the defect that {{replicas}} get cleared by {{StripedDataStreamer#updatePipiline}}.
Thank to [~szetszwo] he already fixed that at HDFS-8838.
{code}
if (expected == storage) {
  replicas[i].setBlockId(reportedBlock.getBlockId());
  replicas[i].setGenerationStamp(reportedBlock.getGenerationStamp());
{code}
bq. I think addReplicaIfNotPresent and setExpectedLocations are the only methods requiring
different contiguous/striped logics.
After removes {{setBlockId}}, I think {{addReplicaIfNotPresent}} is the same for both.

> Erasure coding: update BlockInfoContiguousUC and BlockInfoStripedUC to use BlockUnderConstructionFeature
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-8909
>                 URL: https://issues.apache.org/jira/browse/HDFS-8909
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: HDFS-7285
>            Reporter: Zhe Zhang
>            Assignee: Jing Zhao
>         Attachments: HDFS-8909.000.patch, HDFS-8909.001.patch, HDFS-8909.002.patch
>
>
> HDFS-8801 converts {{BlockInfoUC}} as a feature. We should consolidate {{BlockInfoContiguousUC}}
and {{BlockInfoStripedUC}} logics to use this feature.



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

Mime
View raw message