From 62c9e7fa99da1b1c8af222436102b8dea02fcde8 Mon Sep 17 00:00:00 2001 From: Chen Liang Date: Fri, 19 Jan 2018 17:51:53 -0800 Subject: [PATCH] HDFS-13036. Reusing the volume storage ID obtained by replicaInfo. Contributed by liaoyuxiangqin. --- .../hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java index d9071dd444e..e0f780917b1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java @@ -1777,11 +1777,11 @@ class FsDatasetImpl implements FsDatasetSpi { case FINALIZED: case RBW: case RWR: - builders.get(b.getVolume().getStorageID()).add(b); + builders.get(volStorageID).add(b); break; case RUR: ReplicaInfo orig = b.getOriginalReplica(); - builders.get(b.getVolume().getStorageID()).add(orig); + builders.get(volStorageID).add(orig); break; case TEMPORARY: break;