You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "liaoyuxiangqin (JIRA)" <ji...@apache.org> on 2018/08/23 09:05:00 UTC
[jira] [Created] (HDFS-13859) Add update replicaInfo's volume in
LocalReplica#updateWithReplica
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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org