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 "Ray Chiang (JIRA)" <ji...@apache.org> on 2014/12/15 19:53:13 UTC
[jira] [Updated] (MAPREDUCE-6196) Fix BigDecimal
ArithmeticException in PiEstimator
[ https://issues.apache.org/jira/browse/MAPREDUCE-6196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ray Chiang updated MAPREDUCE-6196:
----------------------------------
Attachment: MAPREDUCE-6196.001.patch
First attempt at a branch-1 patch.
> Fix BigDecimal ArithmeticException in PiEstimator
> -------------------------------------------------
>
> Key: MAPREDUCE-6196
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-6196
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Affects Versions: 1.2.1
> Reporter: Ray Chiang
> Assignee: Ray Chiang
> Priority: Minor
> Labels: supportability
> Attachments: MAPREDUCE-6196.001.patch
>
>
> Certain combinations of arguments to PiEstimator cause the following exception:
> 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:70)
> 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:72)
> at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:144)
> 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:208)
> The calls to the BigDecimal methods should have some large default precision to prevent this exception.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)