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 E636819759 for ; Mon, 14 Mar 2016 07:14:34 +0000 (UTC) Received: (qmail 19247 invoked by uid 500); 14 Mar 2016 07:14:33 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 19102 invoked by uid 500); 14 Mar 2016 07:14:33 -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 19048 invoked by uid 99); 14 Mar 2016 07:14:33 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2016 07:14:33 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B1CD42C1F69 for ; Mon, 14 Mar 2016 07:14:33 +0000 (UTC) Date: Mon, 14 Mar 2016 07:14:33 +0000 (UTC) From: "Lin Yiqun (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-9951) Improve the Node key definition in OfflineImageReconstructor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Lin Yiqun created HDFS-9951: ------------------------------- Summary: Improve the Node key definition in OfflineImageReconstructor Key: HDFS-9951 URL: https://issues.apache.org/jira/browse/HDFS-9951 Project: Hadoop HDFS Issue Type: Improvement Reporter: Lin Yiqun Assignee: Lin Yiqun Priority: Minor In class {{OfflineImageReconstructor}}, it uses many {{SectionProcessors}} to process xml files and load the subtree of the XML into a Node structure. But there are lots of places that node removes key by directively writing value in methods rather than define them first. Like this: {code} Node expiration = directive.removeChild("expiration"); {code} We could improve this to define them in Node and them invoked like this way: {code} Node expiration=directive.removeChild(Node.CACHE_MANAGER_SECTION_EXPIRATION); {code} And it will be good to manager node key's name in the future. -- This message was sent by Atlassian JIRA (v6.3.4#6332)