Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08F8C10232 for ; Fri, 29 Nov 2013 02:07:28 +0000 (UTC) Received: (qmail 8915 invoked by uid 500); 29 Nov 2013 02:07:23 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 8826 invoked by uid 500); 29 Nov 2013 02:07:23 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 8819 invoked by uid 99); 29 Nov 2013 02:07:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Nov 2013 02:07:23 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [202.39.229.125] (HELO wehq1.winbond.com) (202.39.229.125) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Nov 2013 02:07:18 +0000 Received: from mail.winbond.com (wectmlhub02.winbond.com [10.6.10.102]) by wehq1.winbond.com (Postfix) with ESMTP id 4FFA63423FD for ; Fri, 29 Nov 2013 10:06:56 +0800 (CST) From: Henry Hung To: "user@hadoop.apache.org" Date: Fri, 29 Nov 2013 10:06:52 +0800 Subject: hdfs getconf -excludeFile or -includeFile always failed Thread-Topic: hdfs getconf -excludeFile or -includeFile always failed Thread-Index: Ac7sp6uhfIEAwIDgT66gj2NWcmq02A== Message-ID: <53DC189E5FAEFA43BFA1BC02431031DB73FED1D563@WECTMLBOX.winbond.com.tw> Accept-Language: zh-TW, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: zh-TW, en-US Content-Type: multipart/alternative; boundary="_000_53DC189E5FAEFA43BFA1BC02431031DB73FED1D563WECTMLBOXwinb_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_53DC189E5FAEFA43BFA1BC02431031DB73FED1D563WECTMLBOXwinb_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable HI All, In hadoop-2.2.0, if you execute getconf for exclude and include file, it wi= ll return this error message: [hadoop@fphd1 hadoop-2.2.0]$ bin/hdfs getconf -excludeFile Configuration DFSConfigKeys.DFS_HOSTS_EXCLUDE is missing. [hadoop@fphd1 hadoop-2.2.0]$ bin/hdfs getconf -includeFile Configuration DFSConfigKeys.DFS_HOSTS is missing. I found out the root cause is very simple, it's because the source code of = org/apache/hadoop/hdfs/tools/GetConf.java hard coded it to "DFSConfigKeys.D= FS_HOSTS" and "DFSConfigKeys.DFS_HOSTS_EXCLUDE" map.put(INCLUDE_FILE.getName().toLowerCase(), new CommandHandler("DFSConfigKeys.DFS_HOSTS")); map.put(EXCLUDE_FILE.getName().toLowerCase(), new CommandHandler("DFSConfigKeys.DFS_HOSTS_EXCLUDE")); A simple fix would be to remove the quote: map.put(INCLUDE_FILE.getName().toLowerCase(), new CommandHandler(DFSConfigKeys.DFS_HOSTS)); map.put(EXCLUDE_FILE.getName().toLowerCase(), new CommandHandler(DFSConfigKeys.DFS_HOSTS_EXCLUDE)); I don't know if someone already post this issue in JIRA. If not, I will be = glad to open a request. Best regards, Henry ________________________________ The privileged confidential information contained in this email is intended= for use only by the addressees as indicated by the original sender of this= email. If you are not the addressee indicated in this email or are not res= ponsible for delivery of the email to such a person, please kindly reply to= the sender indicating this fact and delete all copies of it from your comp= uter and network server immediately. Your cooperation is highly appreciated= . It is advised that any unauthorized use of confidential information of Wi= nbond is strictly prohibited; and any information in this email irrelevant = to the official business of Winbond shall be deemed as neither given nor en= dorsed by Winbond. --_000_53DC189E5FAEFA43BFA1BC02431031DB73FED1D563WECTMLBOXwinb_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

HI All,

 

In hadoop-2.2.0, if you execute= getconf for exclude and include file, it will return this error message:

 

[hadoop@fphd1 hadoop-2.2.0]$ bi= n/hdfs getconf -excludeFile

Configuration DFSConfigKeys.DFS= _HOSTS_EXCLUDE is missing.

 

[hadoop@fphd1 hadoop-2.2.0]$ bi= n/hdfs getconf -includeFile

Configuration DFSConfigKeys.DFS= _HOSTS is missing.

 

I found out the root cause is v= ery simple, it’s because the source code of org/apache/hadoop/hdfs/to= ols/GetConf.java hard coded it to "DFSConfigKeys.DFS_HOSTS" and &= quot;DFSConfigKeys.DFS_HOSTS_EXCLUDE"

 

      = map.put(INCLUDE_FILE.getName().toLowerCase(),

     &= nbsp;    new CommandHandler("DFSConfigKeys.DFS_HOS= TS"));

      = map.put(EXCLUDE_FILE.getName().toLowerCase(),

     &= nbsp;    new CommandHandler("DFSConfigKeys.DFS_HOSTS_EX= CLUDE"));

 

A simple fix would be to remove= the quote:

 

      = map.put(INCLUDE_FILE.getName().toLowerCase(),

     &= nbsp;    new CommandHandler(DFSConfigKeys.DFS_HOSTS));<= o:p>

      = map.put(EXCLUDE_FILE.getName().toLowerCase(),

     &= nbsp;    new CommandHandler(DFSConfigKeys.DFS_HOSTS_EXCLUDE)= );

 

I don’t know if someone a= lready post this issue in JIRA. If not, I will be glad to open a request.

 

Best regards,=

Henry



The privileged confidential = information contained in this email is intended for use only by the address= ees as indicated by the original sender of this email. If you are not the a= ddressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly = reply to the sender indicating this fact and delete all copies of it from y= our computer and network server immediately. Your cooperation is highly app= reciated. It is advised that any unauthorized use of confidential information of Winbond is strictly prohib= ited; and any information in this email irrelevant to the official business= of Winbond shall be deemed as neither given nor endorsed by Winbond.
--_000_53DC189E5FAEFA43BFA1BC02431031DB73FED1D563WECTMLBOXwinb_--