liaoyuxiangqin created HDFS-13859:
-------------------------------------
Summary: 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
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: [email protected]
For additional commands, e-mail: [email protected]