Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-1013

ArithmeticException when number of racks is zero

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.11.0
    • 0.11.2
    • None
    • None
    • EC2

    Description

      It seems that if something is wrong in the configuration that results in the number of racks being zero, the symptom is a divide-by-zero exception.

      [root@domU-12-31-34-00-03-2F ~]# cd /usr/local/hadoop-0.11.0/
      [root@domU-12-31-34-00-03-2F hadoop-0.11.0]# bin/hadoop jar hadoop-0.11.0-examples.jar pi 10 10000000
      Number of Maps = 10 Samples per Map = 10000000
      org.apache.hadoop.ipc.RemoteException: java.io.IOException: java.lang.ArithmeticException: / by zero
      at org.apache.hadoop.dfs.FSNamesystem$Replicator.chooseTarget(FSNamesystem.java:2593)
      at org.apache.hadoop.dfs.FSNamesystem$Replicator.chooseTarget(FSNamesystem.java:2555)
      at org.apache.hadoop.dfs.FSNamesystem.startFile(FSNamesystem.java:684)
      at org.apache.hadoop.dfs.NameNode.create(NameNode.java:248)
      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:337)
      at org.apache.hadoop.ipc.Server$Handler.run(Server.java:538)

      at org.apache.hadoop.ipc.Client.call(Client.java:467)
      at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:164)
      at org.apache.hadoop.dfs.$Proxy0.create(Unknown Source)
      at org.apache.hadoop.dfs.DFSClient$DFSOutputStream.locateNewBlock(DFSClient.java:1091)
      at org.apache.hadoop.dfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:1031)
      at org.apache.hadoop.dfs.DFSClient$DFSOutputStream.endBlock(DFSClient.java:1255)
      at org.apache.hadoop.dfs.DFSClient$DFSOutputStream.close(DFSClient.java:1345)
      at java.io.FilterOutputStream.close(FilterOutputStream.java:143)
      at java.io.FilterOutputStream.close(FilterOutputStream.java:143)
      at java.io.FilterOutputStream.close(FilterOutputStream.java:143)
      at org.apache.hadoop.fs.FSDataOutputStream$Summer.close(FSDataOutputStream.java:98)
      at java.io.FilterOutputStream.close(FilterOutputStream.java:143)
      at java.io.FilterOutputStream.close(FilterOutputStream.java:143)
      at java.io.FilterOutputStream.close(FilterOutputStream.java:143)
      at org.apache.hadoop.io.SequenceFile$Writer.close(SequenceFile.java:724)
      at org.apache.hadoop.examples.PiEstimator.launch(PiEstimator.java:185)
      at org.apache.hadoop.examples.PiEstimator.main(PiEstimator.java:226)
      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.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:71)
      at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:143)
      at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:40)
      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.util.RunJar.main(RunJar.java:155)
      [root@domU-12-31-34-00-03-2F hadoop-0.11.0]#

      Attachments

        Issue Links

          Activity

            People

              hairong Hairong Kuang
              jimwhite James P. White
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: