Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5BCA518757 for ; Tue, 14 Jul 2015 02:39:05 +0000 (UTC) Received: (qmail 49251 invoked by uid 500); 14 Jul 2015 02:39:05 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 49176 invoked by uid 500); 14 Jul 2015 02:39:05 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 49163 invoked by uid 99); 14 Jul 2015 02:39:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jul 2015 02:39:05 +0000 Date: Tue, 14 Jul 2015 02:39:05 +0000 (UTC) From: "Walter Su (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-8702) Erasure coding: update BlockManager.blockHasEnoughRacks(..) logic for striped block MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-8702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14625718#comment-14625718 ] Walter Su commented on HDFS-8702: --------------------------------- bq. We should continue use the passed-in parameter "expectedStorageNum", and we only need to make sure its value is derived from BlockManager#getExpectedReplicaNum which correctly handles striped blocks with different size. Assume contiguous block: the pass-in expectedStorageNum only used to test is it need to check enough racks. {code} if (expectedStorageNum == 1 || (expectedStorageNum > 1 {code} See, expectedStorageNum=3 has no difference with expectedStorageNum=4. The expected number of rack, which is 2, has no relationship with the expectedStorageNum. As for striped block, expectedStorageNum is useless. Because it always bigger than 1. 1. I think we can use getRealDataBlockNum(); 2. activeRacks is useless. 3. It would be better to move the comment to the javadoc of the function. 4. line margin is 80 characters. 5. Indent 4 blank character is enough( Since the function name is long) {code} + Collection corruptNodes) { {code} > Erasure coding: update BlockManager.blockHasEnoughRacks(..) logic for striped block > ----------------------------------------------------------------------------------- > > Key: HDFS-8702 > URL: https://issues.apache.org/jira/browse/HDFS-8702 > Project: Hadoop HDFS > Issue Type: Sub-task > Reporter: Walter Su > Assignee: Kai Sasaki > Attachments: HDFS-8702-HDFS-7285.00.patch, HDFS-8702-HDFS-7285.01.patch, HDFS-8702-HDFS-7285.02.patch > > > Currently blockHasEnoughRacks(..) only guarantees 2 racks. Logic needs updated for striped blocks. -- This message was sent by Atlassian JIRA (v6.3.4#6332)