You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Peeyush Bishnoi (JIRA)" <ji...@apache.org> on 2009/01/23 10:52:59 UTC

[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

     [ 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.