Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-1880

"java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result." while running "hadoop jar hadoop-0.20.1+169.89-examples.jar pi 4 30"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.20.1
    • 0.20.3, 0.21.0, 0.22.0
    • examples
    • ubuntu 10.04 lucid
      sun jdk 6
      hadoop packaged by cloudera

    • Reviewed

    Description

      If I run "hadoop jar hadoop-0.20.1+169.89-examples.jar pi 4 30", I get the following output:

      Number of Maps = 4
      Samples per Map = 30
      Wrote input for Map #0
      Wrote input for Map #1
      Wrote input for Map #2
      Wrote input for Map #3
      Starting Job
      10/06/19 21:50:34 INFO mapred.FileInputFormat: Total input paths to process : 4
      10/06/19 21:50:34 INFO mapred.JobClient: Running job: job_201006192101_0003
      10/06/19 21:50:35 INFO mapred.JobClient: map 0% reduce 0%
      10/06/19 21:50:45 INFO mapred.JobClient: map 50% reduce 0%
      10/06/19 21:50:51 INFO mapred.JobClient: map 100% reduce 0%
      10/06/19 21:51:00 INFO mapred.JobClient: map 100% reduce 100%
      10/06/19 21:51:02 INFO mapred.JobClient: Job complete: job_201006192101_0003
      10/06/19 21:51:02 INFO mapred.JobClient: Counters: 18
      10/06/19 21:51:02 INFO mapred.JobClient: Job Counters
      10/06/19 21:51:02 INFO mapred.JobClient: Launched reduce tasks=1
      10/06/19 21:51:02 INFO mapred.JobClient: Launched map tasks=4
      10/06/19 21:51:02 INFO mapred.JobClient: Data-local map tasks=4
      10/06/19 21:51:02 INFO mapred.JobClient: FileSystemCounters
      10/06/19 21:51:02 INFO mapred.JobClient: FILE_BYTES_READ=94
      10/06/19 21:51:02 INFO mapred.JobClient: HDFS_BYTES_READ=472
      10/06/19 21:51:02 INFO mapred.JobClient: FILE_BYTES_WRITTEN=334
      10/06/19 21:51:02 INFO mapred.JobClient: HDFS_BYTES_WRITTEN=215
      10/06/19 21:51:02 INFO mapred.JobClient: Map-Reduce Framework
      10/06/19 21:51:02 INFO mapred.JobClient: Reduce input groups=8
      10/06/19 21:51:02 INFO mapred.JobClient: Combine output records=0
      10/06/19 21:51:02 INFO mapred.JobClient: Map input records=4
      10/06/19 21:51:02 INFO mapred.JobClient: Reduce shuffle bytes=112
      10/06/19 21:51:02 INFO mapred.JobClient: Reduce output records=0
      10/06/19 21:51:02 INFO mapred.JobClient: Spilled Records=16
      10/06/19 21:51:02 INFO mapred.JobClient: Map output bytes=72
      10/06/19 21:51:02 INFO mapred.JobClient: Map input bytes=96
      10/06/19 21:51:02 INFO mapred.JobClient: Combine input records=0
      10/06/19 21:51:02 INFO mapred.JobClient: Map output records=8
      10/06/19 21:51:02 INFO mapred.JobClient: Reduce input records=8
      Job Finished in 28.593 seconds
      java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
      at java.math.BigDecimal.divide(BigDecimal.java:1603)
      at org.apache.hadoop.examples.PiEstimator.estimate(PiEstimator.java:313)
      at org.apache.hadoop.examples.PiEstimator.run(PiEstimator.java:342)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
      at org.apache.hadoop.examples.PiEstimator.main(PiEstimator.java:351)
      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:597)
      at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
      at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
      at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64)
      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:597)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

      "hadoop jar hadoop-0.20.1+169.89-examples.jar pi 2 10" finishes fine

      Attachments

        1. m1880_20100619_0.20.patch
          0.9 kB
          Tsz-wo Sze
        2. m1880_20100619b.patch
          2 kB
          Tsz-wo Sze
        3. m1880_20100619.patch
          1.0 kB
          Tsz-wo Sze

        Activity

          People

            szetszwo Tsz-wo Sze
            fossil Victor Pakhomov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: