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 "Jordà Polo (JIRA)" <ji...@apache.org> on 2009/05/14 09:32:45 UTC

[jira] Issue Comment Edited: (HADOOP-5679) Resolve findbugs warnings in core/streaming/pipes/examples

    [ https://issues.apache.org/jira/browse/HADOOP-5679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709295#action_12709295 ] 

Jordà Polo edited comment on HADOOP-5679 at 5/14/09 12:31 AM:
--------------------------------------------------------------

Running local jobs seems to fail for me since this patch was applied ("Mkdirs failed to create...").

The new code checks if either mkdirs() on hadoop.tmp.dir failed OR if it isn't a directory... but it doesn't take into account that the directory may already exist. If the directory existed before, it will always fail and exit since mkdirs() only returns "true" if it is able to create the directory.

Wouldn't an AND be more appropriate here? I mean {{(!b && !tmpDir.isDirectory())}} instead of {{(!b || !tmpDir.isDirectory())}} in src/core/org/apache/hadoop/util/RunJar.java, line 111.

EDIT: The original code (before applying hadoop-5679.patch) looks fine to me too: {{(!tmpDir.isDirectory())}}.

      was (Author: jorda):
    Running local jobs seems to fail for me since this patch was applied ("Mkdirs failed to create...").

The new code checks if either mkdirs() on hadoop.tmp.dir failed OR if it isn't a directory... but it doesn't take into account that the directory may already exist. If the directory existed before, it will always fail and exit since mkdirs() only returns "true" if it is able to create the directory.

Wouldn't an AND be more appropriate here? I mean {{(!b && !tmpDir.isDirectory())}} instead of {{(!b || !tmpDir.isDirectory())}} in src/core/org/apache/hadoop/util/RunJar.java, line 111.
  
> Resolve findbugs warnings in core/streaming/pipes/examples
> ----------------------------------------------------------
>
>                 Key: HADOOP-5679
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5679
>             Project: Hadoop Core
>          Issue Type: Bug
>            Reporter: Jothi Padmanabhan
>            Assignee: Jothi Padmanabhan
>             Fix For: 0.21.0
>
>         Attachments: hadoop-5679.patch
>
>
> Towards a solution for HADOOP-5628, we need to resolve all findbugs warnings. This jira will try to resolve the findbugs warnings where ever possible and suppress them where resolution is not possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.