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 "dhruba borthakur (JIRA)" <ji...@apache.org> on 2007/03/15 21:29:09 UTC

[jira] Created: (HADOOP-1122) Null pointer exception in chooseTarget

Null pointer exception in chooseTarget
--------------------------------------

                 Key: HADOOP-1122
                 URL: https://issues.apache.org/jira/browse/HADOOP-1122
             Project: Hadoop
          Issue Type: Bug
          Components: dfs
            Reporter: dhruba borthakur
         Assigned To: dhruba borthakur



2007-03-15 20:18:02,542 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 8020 call error: java.io.IOException: java.lang.ArithmeticException: / by zero
java.io.IOException: java.lang.ArithmeticException: / by zero
    at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2809)
    at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2773)
    at org.apache.hadoop.dfs.FSNamesystem.startFile(FSNamesystem.java:724)
    at org.apache.hadoop.dfs.NameNode.create(NameNode.java:283)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:336)
    at org.apache.hadoop.ipc.Server$Handler.run(Server.java:559)


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


[jira] Updated: (HADOOP-1122) Divide-by-zero exception in chooseTarget

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

dhruba borthakur updated HADOOP-1122:
-------------------------------------

    Attachment: chooseTargetNPE2.patch

Check to see that clustermap has no leaves and exit chooseTarget early.

> Divide-by-zero exception in chooseTarget
> ----------------------------------------
>
>                 Key: HADOOP-1122
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1122
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: dhruba borthakur
>         Assigned To: dhruba borthakur
>         Attachments: chooseTargetNPE2.patch
>
>
> 2007-03-15 20:18:02,542 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 8020 call error: java.io.IOException: java.lang.ArithmeticException: / by zero
> java.io.IOException: java.lang.ArithmeticException: / by zero
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2809)
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2773)
>     at org.apache.hadoop.dfs.FSNamesystem.startFile(FSNamesystem.java:724)
>     at org.apache.hadoop.dfs.NameNode.create(NameNode.java:283)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:336)
>     at org.apache.hadoop.ipc.Server$Handler.run(Server.java:559)

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


[jira] Updated: (HADOOP-1122) Null pointer exception in chooseTarget

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

dhruba borthakur updated HADOOP-1122:
-------------------------------------

    Attachment: chooseTargetNPE.patch

Prevent the divide-by-zero exception by checking to see if the number of racks is zero. (No datanodes had checked in with the namenode).

> Null pointer exception in chooseTarget
> --------------------------------------
>
>                 Key: HADOOP-1122
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1122
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: dhruba borthakur
>         Assigned To: dhruba borthakur
>         Attachments: chooseTargetNPE.patch
>
>
> 2007-03-15 20:18:02,542 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 8020 call error: java.io.IOException: java.lang.ArithmeticException: / by zero
> java.io.IOException: java.lang.ArithmeticException: / by zero
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2809)
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2773)
>     at org.apache.hadoop.dfs.FSNamesystem.startFile(FSNamesystem.java:724)
>     at org.apache.hadoop.dfs.NameNode.create(NameNode.java:283)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:336)
>     at org.apache.hadoop.ipc.Server$Handler.run(Server.java:559)

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


[jira] Updated: (HADOOP-1122) Divide-by-zero exception in chooseTarget

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

dhruba borthakur updated HADOOP-1122:
-------------------------------------

    Status: Patch Available  (was: Open)

> Divide-by-zero exception in chooseTarget
> ----------------------------------------
>
>                 Key: HADOOP-1122
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1122
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: dhruba borthakur
>         Assigned To: dhruba borthakur
>         Attachments: chooseTargetNPE2.patch
>
>
> 2007-03-15 20:18:02,542 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 8020 call error: java.io.IOException: java.lang.ArithmeticException: / by zero
> java.io.IOException: java.lang.ArithmeticException: / by zero
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2809)
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2773)
>     at org.apache.hadoop.dfs.FSNamesystem.startFile(FSNamesystem.java:724)
>     at org.apache.hadoop.dfs.NameNode.create(NameNode.java:283)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:336)
>     at org.apache.hadoop.ipc.Server$Handler.run(Server.java:559)

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


[jira] Updated: (HADOOP-1122) Divide-by-zero exception in chooseTarget

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

dhruba borthakur updated HADOOP-1122:
-------------------------------------

    Attachment:     (was: chooseTargetNPE.patch)

> Divide-by-zero exception in chooseTarget
> ----------------------------------------
>
>                 Key: HADOOP-1122
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1122
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: dhruba borthakur
>         Assigned To: dhruba borthakur
>
> 2007-03-15 20:18:02,542 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 8020 call error: java.io.IOException: java.lang.ArithmeticException: / by zero
> java.io.IOException: java.lang.ArithmeticException: / by zero
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2809)
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2773)
>     at org.apache.hadoop.dfs.FSNamesystem.startFile(FSNamesystem.java:724)
>     at org.apache.hadoop.dfs.NameNode.create(NameNode.java:283)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:336)
>     at org.apache.hadoop.ipc.Server$Handler.run(Server.java:559)

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


[jira] Commented: (HADOOP-1122) Divide-by-zero exception in chooseTarget

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

Hairong Kuang commented on HADOOP-1122:
---------------------------------------

We need to do more investigation on this issue.

The rack-aware patch enforces that each datanode belongs to a rack. So when the number of datanode is not zero, the number of racks should not be zero either.

> Divide-by-zero exception in chooseTarget
> ----------------------------------------
>
>                 Key: HADOOP-1122
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1122
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: dhruba borthakur
>         Assigned To: dhruba borthakur
>         Attachments: chooseTargetNPE.patch
>
>
> 2007-03-15 20:18:02,542 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 8020 call error: java.io.IOException: java.lang.ArithmeticException: / by zero
> java.io.IOException: java.lang.ArithmeticException: / by zero
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2809)
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2773)
>     at org.apache.hadoop.dfs.FSNamesystem.startFile(FSNamesystem.java:724)
>     at org.apache.hadoop.dfs.NameNode.create(NameNode.java:283)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:336)
>     at org.apache.hadoop.ipc.Server$Handler.run(Server.java:559)

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


[jira] Updated: (HADOOP-1122) Divide-by-zero exception in chooseTarget

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

dhruba borthakur updated HADOOP-1122:
-------------------------------------

    Summary: Divide-by-zero exception in chooseTarget  (was: Null pointer exception in chooseTarget)

> Divide-by-zero exception in chooseTarget
> ----------------------------------------
>
>                 Key: HADOOP-1122
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1122
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: dhruba borthakur
>         Assigned To: dhruba borthakur
>         Attachments: chooseTargetNPE.patch
>
>
> 2007-03-15 20:18:02,542 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 8020 call error: java.io.IOException: java.lang.ArithmeticException: / by zero
> java.io.IOException: java.lang.ArithmeticException: / by zero
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2809)
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2773)
>     at org.apache.hadoop.dfs.FSNamesystem.startFile(FSNamesystem.java:724)
>     at org.apache.hadoop.dfs.NameNode.create(NameNode.java:283)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:336)
>     at org.apache.hadoop.ipc.Server$Handler.run(Server.java:559)

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


[jira] Commented: (HADOOP-1122) Divide-by-zero exception in chooseTarget

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

dhruba borthakur commented on HADOOP-1122:
------------------------------------------

In my test case, there no datanodes registered with the namenode. It was a brand-new cluster. Hence the problem.

> Divide-by-zero exception in chooseTarget
> ----------------------------------------
>
>                 Key: HADOOP-1122
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1122
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: dhruba borthakur
>         Assigned To: dhruba borthakur
>         Attachments: chooseTargetNPE.patch
>
>
> 2007-03-15 20:18:02,542 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 8020 call error: java.io.IOException: java.lang.ArithmeticException: / by zero
> java.io.IOException: java.lang.ArithmeticException: / by zero
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2809)
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2773)
>     at org.apache.hadoop.dfs.FSNamesystem.startFile(FSNamesystem.java:724)
>     at org.apache.hadoop.dfs.NameNode.create(NameNode.java:283)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:336)
>     at org.apache.hadoop.ipc.Server$Handler.run(Server.java:559)

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


[jira] Updated: (HADOOP-1122) Divide-by-zero exception in chooseTarget

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

Tom White updated HADOOP-1122:
------------------------------

       Resolution: Fixed
    Fix Version/s: 0.13.0
           Status: Resolved  (was: Patch Available)

I've just committed this. Thanks Dhruba!

> Divide-by-zero exception in chooseTarget
> ----------------------------------------
>
>                 Key: HADOOP-1122
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1122
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>            Reporter: dhruba borthakur
>         Assigned To: dhruba borthakur
>             Fix For: 0.13.0
>
>         Attachments: chooseTargetNPE2.patch
>
>
> 2007-03-15 20:18:02,542 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 8020 call error: java.io.IOException: java.lang.ArithmeticException: / by zero
> java.io.IOException: java.lang.ArithmeticException: / by zero
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2809)
>     at org.apache.hadoop.dfs.FSNamesystem$ReplicationTargetChooser.chooseTarget(FSNamesystem.java:2773)
>     at org.apache.hadoop.dfs.FSNamesystem.startFile(FSNamesystem.java:724)
>     at org.apache.hadoop.dfs.NameNode.create(NameNode.java:283)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:336)
>     at org.apache.hadoop.ipc.Server$Handler.run(Server.java:559)

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