Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 75CD41030D for ; Mon, 22 Apr 2013 10:37:18 +0000 (UTC) Received: (qmail 53233 invoked by uid 500); 22 Apr 2013 10:37:17 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 53074 invoked by uid 500); 22 Apr 2013 10:37:17 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 52355 invoked by uid 99); 22 Apr 2013 10:37:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Apr 2013 10:37:17 +0000 Date: Mon, 22 Apr 2013 10:37:16 +0000 (UTC) From: "Jonathan Barber (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HADOOP-9491) HOD fails to run under python 2.6.1 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/HADOOP-9491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Barber updated HADOOP-9491: ------------------------------------ Attachment: HADOOP-9491.patch Rename member ._dict to ._hod_dict to remove conflict with identically named ConfigParser member. > HOD fails to run under python 2.6.1 > ----------------------------------- > > Key: HADOOP-9491 > URL: https://issues.apache.org/jira/browse/HADOOP-9491 > Project: Hadoop Common > Issue Type: Bug > Components: contrib/hod > Affects Versions: 1.1.2 > Environment: RHEL6.4, python-2.6.6-36.el6.x86_64 > Reporter: Jonathan Barber > Priority: Critical > Fix For: 1.1.2 > > Attachments: HADOOP-9491.patch > > Original Estimate: 2h > Remaining Estimate: 2h > > Running HOD from the hadoop-1.1.2-bin.tar.gz distribution with python 2.6.6 on RHEL6.4 fails with the output: > $ ./contrib/hod/bin/hod -c contrib/hod/conf/hodrc list -d /tmp/hod-jbarber > /homes/jbarber/hadoop-1.1.2/contrib/hod/hodlib/Common/threads.py:19: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module. > from popen2 import Popen4, Popen3, MAXFD > Traceback (most recent call last): > File "hod", line 411, in > options=hodOptions) > File "/homes/jbarber/hadoop-1.1.2/contrib/hod/hodlib/Common/setup.py", line 449, in __init__ > self.read(configFile) > File "/usr/lib64/python2.6/ConfigParser.py", line 286, in read > self._read(fp, filename) > File "/usr/lib64/python2.6/ConfigParser.py", line 475, in _read > cursect = self._dict() > TypeError: 'dict' object is not callable > This error appears because the Hadoop "config" class is an instance of the python ConfigParser class with a class variable called ._dict. However, the internals of the ConfigParser class appears to have been changed with later versions of python to have a method called ._dict() which now conflicts with the "config" classes usage. > This can be fixed by changing all references in contrib/hod/hodlib/Common/setup.py from ._dict to ._hod_dict, e.g.: > sed -i 's/\._dict/._hod_dict/' contrib/hod/hodlib/Common/setup.py > I tested this change by repeating the hod "list" command successfully. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira