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

liaoyuxiangqin updated HDFS-13859:
----------------------------------
    Attachment: HDFS-13859.001.patch

> Add update replicaInfo's volume  in LocalReplica#updateWithReplica
> ------------------------------------------------------------------
>
>                 Key: HDFS-13859
>                 URL: https://issues.apache.org/jira/browse/HDFS-13859
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: datanode
>    Affects Versions: 3.2.0
>            Reporter: liaoyuxiangqin
>            Assignee: liaoyuxiangqin
>            Priority: Major
>         Attachments: HDFS-13859.001.patch
>
>
>     When DirectoryScanner used diff ScanInfo to check and update with 
> memBlock, i found the LocalReplica#updateWithReplica only update the diskfile 
> path but without replicaInfo's volume. And may be the memblock ' volume is 
> diff with the diskfile path before directory scan, so i think need to update 
> the volume meanwhile,so the replicaInfo's meminfo is consistent with disk 
> storage。The relation code as follows:
> {code:java}
> public void updateWithReplica(StorageLocation replicaLocation) {
>     // for local replicas, the replica location is assumed to be a file.
>     File diskFile = null;
>     try {
>       diskFile = new File(replicaLocation.getUri());
>     } catch (IllegalArgumentException e) {
>       diskFile = null;
>     }
>     if (null == diskFile) {
>       setDirInternal(null);
>     } else {
>       setDirInternal(diskFile.getParentFile());
>     }
>   }
> {code}
> Thanks all!



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

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

Reply via email to