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 "Suresh Srinivas (JIRA)" <ji...@apache.org> on 2008/09/24 01:05:46 UTC

[jira] Created: (HADOOP-4253) Fix warnings generated by FindBugs

Fix warnings generated by FindBugs
----------------------------------

                 Key: HADOOP-4253
                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
             Project: Hadoop Core
          Issue Type: Bug
            Reporter: Suresh Srinivas
            Assignee: Suresh Srinivas
             Fix For: 0.19.0
         Attachments: HADOOP-4253.patch

Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Updated: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Robert Chansler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Chansler updated HADOOP-4253:
------------------------------------

    Release Note: Removed  from class org.apache.hadoop.fs.RawLocalFileSystem deprecated methods public String getName(), public void lock(Path p, boolean shared) and public void release(Path p).  (was: Removed  from class org.apache.hadoop.fs.RawLocalFileSystem deprecated methods public String getName(), public void lock(Path p, boolean shared) and public void release(Path p).
)
    Hadoop Flags: [Incompatible change, Reviewed]  (was: [Reviewed, Incompatible change])

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Updated: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HADOOP-4253:
-------------------------------------------

    Hadoop Flags: [Incompatible change, Reviewed]

+1 Patch looks good.

Need release note since it removed some (deprecated) public APIs

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.19.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Updated: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Johan Oskarsson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Oskarsson updated HADOOP-4253:
------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Incompatible change, Reviewed]  (was: [Reviewed, Incompatible change])
          Status: Resolved  (was: Patch Available)

I just committed this. Thanks, Suresh!

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Updated: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Owen O'Malley updated HADOOP-4253:
----------------------------------

    Fix Version/s:     (was: 0.19.0)
                   0.20.0
           Status: Open  (was: Patch Available)

Let's just change this in 0.20.

Other comments:
  * In JarBuilder, I think it is better to just remove the in.close() from addFileStream, since the addNamedStream already closes it.
  * The TaskTracker threads, I'd use this.getName() rather that super.getName(). I think it is clearer what the intent is.

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Updated: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tsz Wo (Nicholas), SZE updated HADOOP-4253:
-------------------------------------------

    Component/s: record
                 mapred
                 fs
                 dfs
                 contrib/streaming
                 conf

The patch span over various components including conf, fs, dfs, mapred, record and streaming.  I think it is better to divide this issue into sub-issues.

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.19.0
>
>         Attachments: HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Updated: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-4253:
------------------------------------

    Attachment: HADOOP-4253.patch

Thanks for the comments. I have attached a new patch that incorporates the suggested changes.

BTW changing to this.getName() still results in findbugs warnings. Method call this.getName() should be attributed only to the super class in this case and cannot refer to the outer class. I have reported this as a findbugs bug to keep track of this.

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Updated: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-4253:
------------------------------------

    Attachment: HADOOP-4253.patch

Incorporated the following changes suggest by Chris and Nicholas:
- Reverted few of the files as the changes were not simple. They will be addressed separately.
- RawLocalFileSystem deprectated method lock, release and related data are removed.
- TaskTracker.MapEventFetcherThread prints the super class Thread.getName() instead of enclosing class TaskTracker.getName().


> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.19.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Commented: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636073#action_12636073 ] 

Hadoop QA commented on HADOOP-4253:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12391226/HADOOP-4253.patch
  against trunk revision 700628.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no tests are needed for this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3412/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3412/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3412/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3412/console

This message is automatically generated.

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Updated: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-4253:
------------------------------------

    Release Note: 
Following are the incompatible changes:
- Following deprectated methods in org.apache.hadoop.fs.RawLocalFileSystem are removed:
  public String getName() 
  public void lock(Path p, boolean shared)
  public void release(Path p)

    Hadoop Flags: [Incompatible change, Reviewed]  (was: [Reviewed, Incompatible change])
          Status: Patch Available  (was: Open)

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.19.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Updated: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-4253:
------------------------------------

    Attachment: HADOOP-4253.patch

Changes to fix the following findbugs warnings:
- Move Stream creation to try block and ensure the stream is closed in finally block
- DateFormat is not thread safe. Adding synchronization to avoid threading issues.
- Added synchronized blocks to fix synchronization issues flagged by findbugs
- Added retrun value checks in some cases to ensure the error returned by calling a method is handled.
- In TaskTracker, the inner class MapEventsFetcherThread that extends Thread has ambiguous method getName() called. The method getName() is available in the super class Thread and the enclosing class TaskTracker. To avoid the ambiguity, calling the getName() method of the enclosing class.


> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.19.0
>
>         Attachments: HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Commented: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635583#action_12635583 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-4253:
------------------------------------------------

> The TaskTracker threads, I'd use this.getName() rather that super.getName(). I think it is clearer what the intent is.

this.getName() still generates a findbugs warning.

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Commented: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637477#action_12637477 ] 

Hudson commented on HADOOP-4253:
--------------------------------

Integrated in Hadoop-trunk #626 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/626/])
    

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Updated: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Robert Chansler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Chansler updated HADOOP-4253:
------------------------------------

    Release Note: 
Removed  from class org.apache.hadoop.fs.RawLocalFileSystem deprecated methods public String getName(), public void lock(Path p, boolean shared) and public void release(Path p).


  was:
Incompatible changes:
- Following deprecated methods in org.apache.hadoop.fs.RawLocalFileSystem are removed:
  public String getName() 
  public void lock(Path p, boolean shared)
  public void release(Path p)


    Hadoop Flags: [Incompatible change, Reviewed]  (was: [Reviewed, Incompatible change])

Edit release note for publication.

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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


[jira] Updated: (HADOOP-4253) Fix warnings generated by FindBugs

Posted by "Suresh Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Srinivas updated HADOOP-4253:
------------------------------------

    Release Note: 
Incompatible changes:
- Following deprecated methods in org.apache.hadoop.fs.RawLocalFileSystem are removed:
  public String getName() 
  public void lock(Path p, boolean shared)
  public void release(Path p)


  was:
Following are the incompatible changes:
- Following deprectated methods in org.apache.hadoop.fs.RawLocalFileSystem are removed:
  public String getName() 
  public void lock(Path p, boolean shared)
  public void release(Path p)


    Hadoop Flags: [Incompatible change, Reviewed]  (was: [Reviewed, Incompatible change])
          Status: Patch Available  (was: Open)

> Fix warnings generated by FindBugs
> ----------------------------------
>
>                 Key: HADOOP-4253
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4253
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: conf, contrib/streaming, dfs, fs, mapred, record
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-4253.patch, HADOOP-4253.patch, HADOOP-4253.patch
>
>
> Findbugs generates several errors related to unused return values, thread synchronization and ambiguous method calls

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