From 0c2234fd8e8c13e74b5142f02ad864bd781e3441 Mon Sep 17 00:00:00 2001 From: Hui Fei Date: Wed, 3 Feb 2021 20:00:45 +0800 Subject: [PATCH] HDFS-15803. EC: Remove unnecessary method (getWeight) in StripedReconstructionInfo. Contributed by huhaiyang (cherry picked from commit 66ecee333e0aeeaba3467a425cedcae3ab790739) --- .../erasurecode/StripedReconstructionInfo.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedReconstructionInfo.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedReconstructionInfo.java index 0a3e12546d..c166f5ec03 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedReconstructionInfo.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/StripedReconstructionInfo.java @@ -104,19 +104,5 @@ String[] getTargetStorageIds() { return targetStorageIds; } - /** - * Return the weight of this EC reconstruction task. - * - * DN uses it to coordinate with NN to adjust the speed of scheduling the - * reconstructions tasks to this DN. - * - * @return the weight of this reconstruction task. - * @see HDFS-12044 - */ - int getWeight() { - // See HDFS-12044. The weight of a RS(n, k) is calculated by the network - // connections it opens. - return sources.length + targets.length; - } }