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 1267618D9F for ; Wed, 6 May 2015 12:37:02 +0000 (UTC) Received: (qmail 88283 invoked by uid 500); 6 May 2015 12:37:01 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 88235 invoked by uid 500); 6 May 2015 12:37:01 -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 88223 invoked by uid 99); 6 May 2015 12:37:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2015 12:37:01 +0000 Date: Wed, 6 May 2015 12:37:01 +0000 (UTC) From: "Walter Su (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-7980) Incremental BlockReport will dramatically slow down the startup of a namenode 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-7980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Walter Su updated HDFS-7980: ---------------------------- Attachment: HDFS-7980.004.repost.patch > Incremental BlockReport will dramatically slow down the startup of a namenode > ------------------------------------------------------------------------------ > > Key: HDFS-7980 > URL: https://issues.apache.org/jira/browse/HDFS-7980 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Hui Zheng > Assignee: Walter Su > Labels: BB2015-05-TBR > Attachments: HDFS-7980.001.patch, HDFS-7980.002.patch, HDFS-7980.003.patch, HDFS-7980.004.patch, HDFS-7980.004.repost.patch > > > In the current implementation the datanode will call the reportReceivedDeletedBlocks() method that is a IncrementalBlockReport before calling the bpNamenode.blockReport() method. So in a large(several thousands of datanodes) and busy cluster it will slow down(more than one hour) the startup of namenode. > {code} > List blockReport() throws IOException { > // send block report if timer has expired. > final long startTime = now(); > if (startTime - lastBlockReport <= dnConf.blockReportInterval) { > return null; > } > final ArrayList cmds = new ArrayList(); > // Flush any block information that precedes the block report. Otherwise > // we have a chance that we will miss the delHint information > // or we will report an RBW replica after the BlockReport already reports > // a FINALIZED one. > reportReceivedDeletedBlocks(); > lastDeletedReport = startTime; > ......... > // Send the reports to the NN. > int numReportsSent = 0; > int numRPCs = 0; > boolean success = false; > long brSendStartTime = now(); > try { > if (totalBlockCount < dnConf.blockReportSplitThreshold) { > // Below split threshold, send all reports in a single message. > DatanodeCommand cmd = bpNamenode.blockReport( > bpRegistration, bpos.getBlockPoolId(), reports); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)