From common-issues-return-230195-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Wed Aug 25 06:53:25 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id B1215180654 for ; Wed, 25 Aug 2021 08:53:25 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id F2BEC61E1F for ; Wed, 25 Aug 2021 06:53:24 +0000 (UTC) Received: (qmail 52190 invoked by uid 500); 25 Aug 2021 06:53:23 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 52178 invoked by uid 99); 25 Aug 2021 06:53:23 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Aug 2021 06:53:23 +0000 From: =?utf-8?q?GitBox?= To: common-issues@hadoop.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bhadoop=5D_Neilxzn_commented_on_a_change_in_pull_re?= =?utf-8?q?quest_=233320=3A_HDFS-16182=2EnumOfReplicas_is_given_the_wrong_va?= =?utf-8?q?lue_in_BlockPlacementPolicyDefault=24chooseTarget_can_cause_DataS?= =?utf-8?q?treamer_to_fail_with_Heterogeneous_Storage=2E?= Message-ID: <162987440305.16310.8002391255683611100.asfpy@gitbox.apache.org> Date: Wed, 25 Aug 2021 06:53:23 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: Neilxzn commented on a change in pull request #3320: URL: https://github.com/apache/hadoop/pull/3320#discussion_r695451621 ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java ########## @@ -469,7 +469,7 @@ private Node chooseTarget(int numOfReplicas, LOG.trace("storageTypes={}", storageTypes); try { - if ((numOfReplicas = requiredStorageTypes.size()) == 0) { Review comment: done. Declare numOfReplicas a final variable at line 438. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org