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 07E2410EDF for ; Fri, 23 Oct 2015 18:48:41 +0000 (UTC) Received: (qmail 35327 invoked by uid 500); 23 Oct 2015 18:48:28 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 35206 invoked by uid 500); 23 Oct 2015 18:48:28 -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 34853 invoked by uid 99); 23 Oct 2015 18:48:28 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Oct 2015 18:48:28 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C28BD2C1F6C for ; Fri, 23 Oct 2015 18:48:27 +0000 (UTC) Date: Fri, 23 Oct 2015 18:48:27 +0000 (UTC) From: "Wei-Chiu Chuang (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-7284) Add more debug info to BlockInfoUnderConstruction#setGenerationStampAndVerifyReplicas 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-7284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei-Chiu Chuang updated HDFS-7284: ---------------------------------- Attachment: HDFS-7284.004.patch Thanks [~yzhangal] for the code review. I am attaching a new version with no log4 change. > Add more debug info to BlockInfoUnderConstruction#setGenerationStampAndVerifyReplicas > ------------------------------------------------------------------------------------- > > Key: HDFS-7284 > URL: https://issues.apache.org/jira/browse/HDFS-7284 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode > Affects Versions: 2.5.1 > Reporter: Hu Liu, > Assignee: Wei-Chiu Chuang > Labels: supportability > Attachments: HDFS-7284.001.patch, HDFS-7284.002.patch, HDFS-7284.003.patch, HDFS-7284.004.patch > > > When I was looking at some replica loss issue, I got the following info from log > {code} > 2014-10-13 01:54:53,104 INFO BlockStateChange: BLOCK* Removing stale replica from location x.x.x.x > {code} > I could just know that a replica is removed, but I don't know which block and its timestamp. I need to know the id and timestamp of the block from the log file. > So it's better to add more info including block id and timestamp to the code snippet > {code} > for (ReplicaUnderConstruction r : replicas) { > if (genStamp != r.getGenerationStamp()) { > r.getExpectedLocation().removeBlock(this); > NameNode.blockStateChangeLog.info("BLOCK* Removing stale replica " > + "from location: " + r.getExpectedLocation()); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)