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 "Nigel Daley (JIRA)" <ji...@apache.org> on 2007/05/15 00:08:16 UTC

[jira] Created: (HADOOP-1359) Variable dereferenced then later checked for null

Variable dereferenced then later checked for null
-------------------------------------------------

                 Key: HADOOP-1359
                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
             Project: Hadoop
          Issue Type: Bug
          Components: dfs
    Affects Versions: 0.12.3
            Reporter: Nigel Daley
            Priority: Blocker
             Fix For: 0.13.0


NamenodeFsck.java
line 174 dereferences the variable 'locs'
line 191 checks if 'locs' is null


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


[jira] Updated: (HADOOP-1359) Variable dereferenced then later checked for null

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

Doug Cutting updated HADOOP-1359:
---------------------------------

    Fix Version/s:     (was: 0.13.0)
                   0.14.0
         Priority: Minor  (was: Blocker)

> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>         Assigned To: Hairong Kuang
>            Priority: Minor
>             Fix For: 0.14.0
>
>         Attachments: fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Commented: (HADOOP-1359) Variable dereferenced then later checked for null

Posted by "Hairong Kuang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496157 ] 

Hairong Kuang commented on HADOOP-1359:
---------------------------------------

The constructor LocatedBlock(blk, locs) does allow "locs" to be a null pointer. If LocatedBlock does not expect 'locs' to be null, it needs to do an argument check in the constructor.

> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>         Assigned To: Hairong Kuang
>            Priority: Minor
>             Fix For: 0.14.0
>
>         Attachments: fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Commented: (HADOOP-1359) Variable dereferenced then later checked for null

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495799 ] 

Doug Cutting commented on HADOOP-1359:
--------------------------------------

Why is this a Blocker?

> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>            Priority: Blocker
>             Fix For: 0.13.0
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Updated: (HADOOP-1359) Variable dereferenced then later checked for null

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

Hairong Kuang updated HADOOP-1359:
----------------------------------

    Attachment: fsck.patch

> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>            Priority: Blocker
>             Fix For: 0.13.0
>
>         Attachments: fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Updated: (HADOOP-1359) Variable dereferenced then later checked for null

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

Doug Cutting updated HADOOP-1359:
---------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I just committed this.  Thanks, Hairong!

> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>         Assigned To: Hairong Kuang
>            Priority: Minor
>             Fix For: 0.14.0
>
>         Attachments: fsck.patch, fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Assigned: (HADOOP-1359) Variable dereferenced then later checked for null

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

Hairong Kuang reassigned HADOOP-1359:
-------------------------------------

    Assignee: Hairong Kuang

> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>         Assigned To: Hairong Kuang
>            Priority: Blocker
>             Fix For: 0.13.0
>
>         Attachments: fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Commented: (HADOOP-1359) Variable dereferenced then later checked for null

Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496148 ] 

Raghu Angadi commented on HADOOP-1359:
--------------------------------------

Certainly not a blocker. I think the fix should be to remove the null check on line 191.



> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>         Assigned To: Hairong Kuang
>            Priority: Blocker
>             Fix For: 0.13.0
>
>         Attachments: fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Commented: (HADOOP-1359) Variable dereferenced then later checked for null

Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496142 ] 

Raghu Angadi commented on HADOOP-1359:
--------------------------------------

I don't think null check is even required. LocatedBlock does not expect 'locs' to be null. For e.g. LocatedBlock.write() does not check for null.



> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>         Assigned To: Hairong Kuang
>            Priority: Blocker
>             Fix For: 0.13.0
>
>         Attachments: fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Updated: (HADOOP-1359) Variable dereferenced then later checked for null

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

Hairong Kuang updated HADOOP-1359:
----------------------------------

    Status: Patch Available  (was: Open)

> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>         Assigned To: Hairong Kuang
>            Priority: Minor
>             Fix For: 0.14.0
>
>         Attachments: fsck.patch, fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Updated: (HADOOP-1359) Variable dereferenced then later checked for null

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

Hairong Kuang updated HADOOP-1359:
----------------------------------

    Attachment: fsck.patch

> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>         Assigned To: Hairong Kuang
>            Priority: Minor
>             Fix For: 0.14.0
>
>         Attachments: fsck.patch, fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Commented: (HADOOP-1359) Variable dereferenced then later checked for null

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

Hadoop QA commented on HADOOP-1359:
-----------------------------------

Integrated in Hadoop-Nightly #93 (See http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Nightly/93/)

> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>         Assigned To: Hairong Kuang
>            Priority: Minor
>             Fix For: 0.14.0
>
>         Attachments: fsck.patch, fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Commented: (HADOOP-1359) Variable dereferenced then later checked for null

Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496161 ] 

Raghu Angadi commented on HADOOP-1359:
--------------------------------------

+1. Looks good.


> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>         Assigned To: Hairong Kuang
>            Priority: Minor
>             Fix For: 0.14.0
>
>         Attachments: fsck.patch, fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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


[jira] Commented: (HADOOP-1359) Variable dereferenced then later checked for null

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

Hadoop QA commented on HADOOP-1359:
-----------------------------------

+1

http://issues.apache.org/jira/secure/attachment/12357431/fsck.patch applied and successfully tested against trunk revision r538318.

Test results:   http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/147/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/147/console

> Variable dereferenced then later checked for null
> -------------------------------------------------
>
>                 Key: HADOOP-1359
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1359
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.12.3
>            Reporter: Nigel Daley
>         Assigned To: Hairong Kuang
>            Priority: Minor
>             Fix For: 0.14.0
>
>         Attachments: fsck.patch, fsck.patch
>
>
> NamenodeFsck.java
> line 174 dereferences the variable 'locs'
> line 191 checks if 'locs' is null

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