hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Kanter (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MAPREDUCE-6196) Fix BigDecimal ArithmeticException in PiEstimator
Date Tue, 16 Dec 2014 01:58:13 GMT

     [ https://issues.apache.org/jira/browse/MAPREDUCE-6196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Robert Kanter updated MAPREDUCE-6196:
-------------------------------------
          Resolution: Fixed
       Fix Version/s: 1.3.0
    Target Version/s: 1.3.0  (was: 1.2.2)
        Hadoop Flags: Reviewed
              Status: Resolved  (was: Patch Available)

Thanks Ray.  Committed to branch-1!

> 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: pi_example, supportability
>             Fix For: 1.3.0
>
>         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)

Mime
View raw message