hadoop-mapreduce-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ray Chiang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MAPREDUCE-6196) Fix BigDecimal ArithmeticException in PiEstimator
Date Mon, 15 Dec 2014 18:51:13 GMT
Ray Chiang created MAPREDUCE-6196:
-------------------------------------

             Summary: 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


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