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 7BC5110969 for ; Wed, 20 Nov 2013 18:14:50 +0000 (UTC) Received: (qmail 33038 invoked by uid 500); 20 Nov 2013 18:14:47 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 32991 invoked by uid 500); 20 Nov 2013 18:14:46 -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 32961 invoked by uid 99); 20 Nov 2013 18:14:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Nov 2013 18:14:46 +0000 Date: Wed, 20 Nov 2013 18:14:46 +0000 (UTC) From: "Eric Sirianni (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-5484) StorageType and State in DatanodeStorageInfo in NameNode is not accurate 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-5484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13827928#comment-13827928 ] Eric Sirianni commented on HDFS-5484: ------------------------------------- Sure. I will make those changes and re-upload the patch. > StorageType and State in DatanodeStorageInfo in NameNode is not accurate > ------------------------------------------------------------------------ > > Key: HDFS-5484 > URL: https://issues.apache.org/jira/browse/HDFS-5484 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: datanode > Affects Versions: Heterogeneous Storage (HDFS-2832) > Reporter: Eric Sirianni > Attachments: HDFS-5484-HDFS-2832.patch > > > The fields in DatanodeStorageInfo are updated from two distinct paths: > # block reports > # storage reports (via heartbeats) > The {{state}} and {{storageType}} fields are updated via the Block Report. However, as seen in the code blow, these fields are populated from a "dummy" {{DatanodeStorage}} object constructed in the DataNode: > {code} > BPServiceActor.blockReport() { > //... > // Dummy DatanodeStorage object just for sending the block report. > DatanodeStorage dnStorage = new DatanodeStorage(storageID); > //... > } > {code} > The net effect is that the {{state}} and {{storageType}} fields are always the default of {{NORMAL}} and {{DISK}} in the NameNode. > The recommended fix is to change {{FsDatasetSpi.getBlockReports()}} from: > {code} > public Map getBlockReports(String bpid); > {code} > to: > {code} > public Map getBlockReports(String bpid); > {code} > thereby allowing {{BPServiceActor}} to send the "real" {{DatanodeStorage}} object with the block report. -- This message was sent by Atlassian JIRA (v6.1#6144)