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 BF8E810A7B for ; Tue, 7 Jan 2014 00:45:00 +0000 (UTC) Received: (qmail 27442 invoked by uid 500); 7 Jan 2014 00:45:00 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 27404 invoked by uid 500); 7 Jan 2014 00:45:00 -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 27394 invoked by uid 99); 7 Jan 2014 00:45:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jan 2014 00:45:00 +0000 Date: Tue, 7 Jan 2014 00:45:00 +0000 (UTC) From: "Arpit Agarwal (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HDFS-5667) Include DatanodeStorage in StorageReport 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-5667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arpit Agarwal updated HDFS-5667: -------------------------------- Target Version/s: 2.4.0 (was: Heterogeneous Storage (HDFS-2832)) Fix Version/s: 2.4.0 Merged to branch-2. Target version set to 2.4.0. > Include DatanodeStorage in StorageReport > ---------------------------------------- > > Key: HDFS-5667 > URL: https://issues.apache.org/jira/browse/HDFS-5667 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: datanode > Affects Versions: 3.0.0 > Reporter: Eric Sirianni > Assignee: Arpit Agarwal > Fix For: 3.0.0, 2.4.0 > > Attachments: h5667.02.patch, h5667.03.patch, h5667.04.patch, h5667.05.patch > > > The fix for HDFS-5484 was accidentally regressed by the following change made via HDFS-5542 > {code} > + DatanodeStorageInfo updateStorage(DatanodeStorage s) { > synchronized (storageMap) { > DatanodeStorageInfo storage = storageMap.get(s.getStorageID()); > if (storage == null) { > @@ -670,8 +658,6 @@ > " for DN " + getXferAddr()); > storage = new DatanodeStorageInfo(this, s); > storageMap.put(s.getStorageID(), storage); > - } else { > - storage.setState(s.getState()); > } > return storage; > } > {code} > By removing the 'else' and no longer updating the state in the BlockReport processing path, we effectively get the bogus state & type that is set via the first heartbeat (see the fix for HDFS-5455): > {code} > + if (storage == null) { > + // This is seen during cluster initialization when the heartbeat > + // is received before the initial block reports from each storage. > + storage = updateStorage(new DatanodeStorage(report.getStorageID())); > {code} > Even reverting the change and reintroducing the 'else' leaves the state & type temporarily inaccurate until the first block report. > As discussed with [~arpitagarwal], a better fix would be to simply include the full {{DatanodeStorage}} object in the {{StorageReport}} (as opposed to only the Storage ID). This requires adding the {{DatanodeStorage}} object to {{StorageReportProto}}. It needs to be a new optional field and we cannot remove the existing {{StorageUuid}} for protocol compatibility. -- This message was sent by Atlassian JIRA (v6.1.5#6160)