You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org> on 2010/06/19 23:27:24 UTC
[jira] Commented: (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"
[ https://issues.apache.org/jira/browse/MAPREDUCE-1880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880555#action_12880555 ]
Tsz Wo (Nicholas), SZE commented on MAPREDUCE-1880:
---------------------------------------------------
Tested manually, the patch works.
{noformat}
-bash-3.1$ hadoop jar ~/hadoop-examples-0.20.3-SNAPSHOT.jar pi -Dmapred.job.queue.name=xxx 4 30
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:14:31 INFO mapred.FileInputFormat: Total input paths to process : 4
10/06/19 21:14:31 INFO mapred.JobClient: Running job: job_201006110238_70224
10/06/19 21:14:32 INFO mapred.JobClient: map 0% reduce 0%
10/06/19 21:14:38 INFO mapred.JobClient: map 25% reduce 0%
10/06/19 21:14:40 INFO mapred.JobClient: map 100% reduce 0%
10/06/19 21:18:43 INFO mapred.JobClient: map 100% reduce 100%
10/06/19 21:18:44 INFO mapred.JobClient: Job complete: job_201006110238_70224
10/06/19 21:18:44 INFO mapred.JobClient: Counters: 22
10/06/19 21:18:44 INFO mapred.JobClient: Job Counters
10/06/19 21:18:44 INFO mapred.JobClient: Launched reduce tasks=1
10/06/19 21:18:44 INFO mapred.JobClient: SLOTS_MILLIS_MAPS=11243
10/06/19 21:18:44 INFO mapred.JobClient: Total time spent by all reduces waiting after reserving slots (ms)=0
10/06/19 21:18:44 INFO mapred.JobClient: Total time spent by all maps waiting after reserving slots (ms)=0
10/06/19 21:18:44 INFO mapred.JobClient: Rack-local map tasks=1
10/06/19 21:18:44 INFO mapred.JobClient: Launched map tasks=4
10/06/19 21:18:44 INFO mapred.JobClient: SLOTS_MILLIS_REDUCES=14263
10/06/19 21:18:44 INFO mapred.JobClient: FileSystemCounters
10/06/19 21:18:44 INFO mapred.JobClient: FILE_BYTES_READ=68
10/06/19 21:18:44 INFO mapred.JobClient: HDFS_BYTES_READ=472
10/06/19 21:18:44 INFO mapred.JobClient: FILE_BYTES_WRITTEN=348
10/06/19 21:18:44 INFO mapred.JobClient: HDFS_BYTES_WRITTEN=215
10/06/19 21:18:44 INFO mapred.JobClient: Map-Reduce Framework
10/06/19 21:18:44 INFO mapred.JobClient: Reduce input groups=8
10/06/19 21:18:44 INFO mapred.JobClient: Combine output records=0
10/06/19 21:18:44 INFO mapred.JobClient: Map input records=4
10/06/19 21:18:44 INFO mapred.JobClient: Reduce shuffle bytes=152
10/06/19 21:18:44 INFO mapred.JobClient: Reduce output records=0
10/06/19 21:18:44 INFO mapred.JobClient: Spilled Records=16
10/06/19 21:18:44 INFO mapred.JobClient: Map output bytes=72
10/06/19 21:18:44 INFO mapred.JobClient: Map input bytes=96
10/06/19 21:18:44 INFO mapred.JobClient: Combine input records=0
10/06/19 21:18:44 INFO mapred.JobClient: Map output records=8
10/06/19 21:18:44 INFO mapred.JobClient: Reduce input records=8
Job Finished in 253.059 seconds
Estimated value of Pi is 3.13333333333333333333
{noformat}
> "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"
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MAPREDUCE-1880
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1880
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: examples
> Affects Versions: 0.20.1
> Environment: ubuntu 10.04 lucid
> sun jdk 6
> hadoop packaged by cloudera
> Reporter: Victor Pakhomov
> Assignee: Tsz Wo (Nicholas), SZE
> Priority: Minor
> Fix For: 0.20.1
>
> Attachments: m1880_20100619_0.20.patch
>
>
> 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.