Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 98516 invoked from network); 23 Jan 2009 09:53:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Jan 2009 09:53:30 -0000 Received: (qmail 15730 invoked by uid 500); 23 Jan 2009 09:53:23 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 15719 invoked by uid 500); 23 Jan 2009 09:53:23 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 15708 invoked by uid 99); 23 Jan 2009 09:53:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jan 2009 01:53:23 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jan 2009 09:53:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BA90F234C4A9 for ; Fri, 23 Jan 2009 01:52:59 -0800 (PST) Message-ID: <1313305591.1232704379762.JavaMail.jira@brutus> Date: Fri, 23 Jan 2009 01:52:59 -0800 (PST) From: "Peeyush Bishnoi (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Assigned: (HADOOP-5113) logcondense should delete hod logs for a user , whose username has any of the characters in the value passed to "-l" options In-Reply-To: <1787954100.1232697059785.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-5113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Peeyush Bishnoi reassigned HADOOP-5113: --------------------------------------- Assignee: Peeyush Bishnoi Example for 'lstrip' illustration : Suppose there is file on HDFS : > filename='/user/shum/test.txt' we need to strip off the '/user' from filename , > filename=filename.lstrip('/user') if we print the above statement , the output would be : > hum/test.txt instead of > shum/test.txt here lstrip method has strip off value and produce the incorrect output . So we need to use len method for correct strip off the value. > filename=filename[len('/user'):] output of above statement would be : > /shum/test.txt --- > logcondense should delete hod logs for a user , whose username has any of the characters in the value passed to "-l" options > ----------------------------------------------------------------------------------------------------------------------------- > > Key: HADOOP-5113 > URL: https://issues.apache.org/jira/browse/HADOOP-5113 > Project: Hadoop Core > Issue Type: Bug > Components: contrib/hod > Reporter: Peeyush Bishnoi > Assignee: Peeyush Bishnoi > Fix For: 0.21.0 > > > Logcondense script is not able to delete the hod-logs inside HDFS for the the users , whose username has any of the characters , in the value passed to "-l" options or in '/user' as set default . This happened because logcondense script use python 'lstrip' method , which returns copy of the string after removing leading characters in the value passed to "-l" options or in "/user" instead of just stripping value from the given string . -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.