hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "liaoyuxiangqin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-13036) Reusing the volume storage ID obtained by replicaInfo
Date Fri, 19 Jan 2018 03:04:00 GMT

     [ https://issues.apache.org/jira/browse/HDFS-13036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

liaoyuxiangqin updated HDFS-13036:
----------------------------------
    Description: 
When i read the getBlockReports() of FsDatasetImpl class in datanode, i found the following case
code could be more simplify and need't to obtained volume storage ID by replicaInfo again
and again, because the vol id have get by above code.Thanks.
{code:java|title=FsDatasetImpl.java|borderStyle=solid}
switch(b.getState()) {
case FINALIZED:
case RBW:
case RWR:
 builders.get(b.getVolume().getStorageID()).add(b);
 break;
case RUR:
 ReplicaInfo orig = b.getOriginalReplica();
 builders.get(b.getVolume().getStorageID()).add(orig);
 break;
case TEMPORARY:
 break;
default:
 assert false : "Illegal ReplicaInfo state.";
}

{code}

  was:
When i read the getBlockReports() of FsDatasetImpl class in datanode, i found the following case
code could be more simplify and need't to obtained volume storage ID by replicaInfo again
and again.Thanks.
{code:java|title=FsDatasetImpl.java|borderStyle=solid}
switch(b.getState()) {
case FINALIZED:
case RBW:
case RWR:
 builders.get(b.getVolume().getStorageID()).add(b);
 break;
case RUR:
 ReplicaInfo orig = b.getOriginalReplica();
 builders.get(b.getVolume().getStorageID()).add(orig);
 break;
case TEMPORARY:
 break;
default:
 assert false : "Illegal ReplicaInfo state.";
}

{code}


> Reusing the volume storage ID obtained by replicaInfo
> -----------------------------------------------------
>
>                 Key: HDFS-13036
>                 URL: https://issues.apache.org/jira/browse/HDFS-13036
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>    Affects Versions: 3.1.0
>            Reporter: liaoyuxiangqin
>            Assignee: liaoyuxiangqin
>            Priority: Major
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> When i read the getBlockReports() of FsDatasetImpl class in datanode, i found the
following case code could be more simplify and need't to obtained volume storage ID by replicaInfo
again and again, because the vol id have get by above code.Thanks.
> {code:java|title=FsDatasetImpl.java|borderStyle=solid}
> switch(b.getState()) {
> case FINALIZED:
> case RBW:
> case RWR:
>  builders.get(b.getVolume().getStorageID()).add(b);
>  break;
> case RUR:
>  ReplicaInfo orig = b.getOriginalReplica();
>  builders.get(b.getVolume().getStorageID()).add(orig);
>  break;
> case TEMPORARY:
>  break;
> default:
>  assert false : "Illegal ReplicaInfo state.";
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message