You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by Gaurav Dasgupta <gd...@gmail.com> on 2012/09/04 18:10:41 UTC

Pi Estimator failing to print output after finishing the job sucessfully

Hi All,

I am running the Pi Estimator from hadoop-examples.jar in my 11 node CDH3u4
cluster.

Initially I ran the job for 10 maps and 1000000 samples per map and it ran
fine and displayed the execution time and the pi value in the console.
Now again when I ran it for 88 maps and 1 trillion total samples (i.e.,
11363636364 samples per map), it executed the job sucessfully, but at end
gave the following error and could not display the "pi value" in the
console:

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:197)
Can anyone tell me where is it going wrong?
Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.

Thanks,
Gaurav Dasgupta

RE: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Jeffrey Buell <jb...@vmware.com>.
You didn't do anything wrong, this is just a bug in the Pi application.  The application _should_ be able to divide two numbers and not require an exact decimal result.  Everything you need to know is in the first line of the error message.  Try it with 100 maps and 10 billion samples per map, which will produce an exact decimal result.  There's no way to have the same number of maps on each of 11 nodes and get an exact result.

Jeff

From: Gaurav Dasgupta [mailto:gdsayshi@gmail.com]
Sent: Tuesday, September 04, 2012 9:11 AM
To: user@hadoop.apache.org
Subject: Pi Estimator failing to print output after finishing the job sucessfully

Hi All,

I am running the Pi Estimator from hadoop-examples.jar in my 11 node CDH3u4 cluster.

Initially I ran the job for 10 maps and 1000000 samples per map and it ran fine and displayed the execution time and the pi value in the console.
Now again when I ran it for 88 maps and 1 trillion total samples (i.e., 11363636364 samples per map), it executed the job sucessfully, but at end gave the following error and could not display the "pi value" in the console:

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:197)
Can anyone tell me where is it going wrong?
Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.

Thanks,
Gaurav Dasgupta



Re: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Gaurav Dasgupta <gd...@gmail.com>.
Thanks Jeff. I tried with 100 Maps and 10 Billion samples per map. And it
worked fine.

On Tue, Sep 4, 2012 at 10:06 PM, Michael Segel <mi...@hotmail.com>wrote:

> You blew out the stack?
> Or rather your number was too 'big'/'long'?
>
>
>  On Sep 4, 2012, at 11:10 AM, Gaurav Dasgupta <gd...@gmail.com> wrote:
>
>  Hi All,
>
> I am running the Pi Estimator from hadoop-examples.jar in my 11 node
> CDH3u4 cluster.
>
> Initially I ran the job for 10 maps and 1000000 samples per map and it
> ran fine and displayed the execution time and the pi value in the console.
> Now again when I ran it for 88 maps and 1 trillion total samples (i.e.,
> 11363636364 samples per map), it executed the job sucessfully, but at end
> gave the following error and could not display the "pi value" in the
> console:
>
> 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:197)
> Can anyone tell me where is it going wrong?
> Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.
>
> Thanks,
> Gaurav Dasgupta
>
>
>
>
>

Re: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Gaurav Dasgupta <gd...@gmail.com>.
Thanks Jeff. I tried with 100 Maps and 10 Billion samples per map. And it
worked fine.

On Tue, Sep 4, 2012 at 10:06 PM, Michael Segel <mi...@hotmail.com>wrote:

> You blew out the stack?
> Or rather your number was too 'big'/'long'?
>
>
>  On Sep 4, 2012, at 11:10 AM, Gaurav Dasgupta <gd...@gmail.com> wrote:
>
>  Hi All,
>
> I am running the Pi Estimator from hadoop-examples.jar in my 11 node
> CDH3u4 cluster.
>
> Initially I ran the job for 10 maps and 1000000 samples per map and it
> ran fine and displayed the execution time and the pi value in the console.
> Now again when I ran it for 88 maps and 1 trillion total samples (i.e.,
> 11363636364 samples per map), it executed the job sucessfully, but at end
> gave the following error and could not display the "pi value" in the
> console:
>
> 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:197)
> Can anyone tell me where is it going wrong?
> Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.
>
> Thanks,
> Gaurav Dasgupta
>
>
>
>
>

Re: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Gaurav Dasgupta <gd...@gmail.com>.
Thanks Jeff. I tried with 100 Maps and 10 Billion samples per map. And it
worked fine.

On Tue, Sep 4, 2012 at 10:06 PM, Michael Segel <mi...@hotmail.com>wrote:

> You blew out the stack?
> Or rather your number was too 'big'/'long'?
>
>
>  On Sep 4, 2012, at 11:10 AM, Gaurav Dasgupta <gd...@gmail.com> wrote:
>
>  Hi All,
>
> I am running the Pi Estimator from hadoop-examples.jar in my 11 node
> CDH3u4 cluster.
>
> Initially I ran the job for 10 maps and 1000000 samples per map and it
> ran fine and displayed the execution time and the pi value in the console.
> Now again when I ran it for 88 maps and 1 trillion total samples (i.e.,
> 11363636364 samples per map), it executed the job sucessfully, but at end
> gave the following error and could not display the "pi value" in the
> console:
>
> 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:197)
> Can anyone tell me where is it going wrong?
> Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.
>
> Thanks,
> Gaurav Dasgupta
>
>
>
>
>

Re: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Gaurav Dasgupta <gd...@gmail.com>.
Thanks Jeff. I tried with 100 Maps and 10 Billion samples per map. And it
worked fine.

On Tue, Sep 4, 2012 at 10:06 PM, Michael Segel <mi...@hotmail.com>wrote:

> You blew out the stack?
> Or rather your number was too 'big'/'long'?
>
>
>  On Sep 4, 2012, at 11:10 AM, Gaurav Dasgupta <gd...@gmail.com> wrote:
>
>  Hi All,
>
> I am running the Pi Estimator from hadoop-examples.jar in my 11 node
> CDH3u4 cluster.
>
> Initially I ran the job for 10 maps and 1000000 samples per map and it
> ran fine and displayed the execution time and the pi value in the console.
> Now again when I ran it for 88 maps and 1 trillion total samples (i.e.,
> 11363636364 samples per map), it executed the job sucessfully, but at end
> gave the following error and could not display the "pi value" in the
> console:
>
> 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:197)
> Can anyone tell me where is it going wrong?
> Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.
>
> Thanks,
> Gaurav Dasgupta
>
>
>
>
>

Re: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Michael Segel <mi...@hotmail.com>.
You blew out the stack? 
Or rather your number was too 'big'/'long'? 


On Sep 4, 2012, at 11:10 AM, Gaurav Dasgupta <gd...@gmail.com> wrote:

> Hi All,
>  
> I am running the Pi Estimator from hadoop-examples.jar in my 11 node CDH3u4 cluster.
>  
> Initially I ran the job for 10 maps and 1000000 samples per map and it ran fine and displayed the execution time and the pi value in the console.
> Now again when I ran it for 88 maps and 1 trillion total samples (i.e., 11363636364 samples per map), it executed the job sucessfully, but at end gave the following error and could not display the "pi value" in the console:
>  
> 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:197)
> Can anyone tell me where is it going wrong?
> Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.
>  
> Thanks,
> Gaurav Dasgupta
>  
>  


Re: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Michael Segel <mi...@hotmail.com>.
You blew out the stack? 
Or rather your number was too 'big'/'long'? 


On Sep 4, 2012, at 11:10 AM, Gaurav Dasgupta <gd...@gmail.com> wrote:

> Hi All,
>  
> I am running the Pi Estimator from hadoop-examples.jar in my 11 node CDH3u4 cluster.
>  
> Initially I ran the job for 10 maps and 1000000 samples per map and it ran fine and displayed the execution time and the pi value in the console.
> Now again when I ran it for 88 maps and 1 trillion total samples (i.e., 11363636364 samples per map), it executed the job sucessfully, but at end gave the following error and could not display the "pi value" in the console:
>  
> 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:197)
> Can anyone tell me where is it going wrong?
> Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.
>  
> Thanks,
> Gaurav Dasgupta
>  
>  


RE: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Jeffrey Buell <jb...@vmware.com>.
You didn't do anything wrong, this is just a bug in the Pi application.  The application _should_ be able to divide two numbers and not require an exact decimal result.  Everything you need to know is in the first line of the error message.  Try it with 100 maps and 10 billion samples per map, which will produce an exact decimal result.  There's no way to have the same number of maps on each of 11 nodes and get an exact result.

Jeff

From: Gaurav Dasgupta [mailto:gdsayshi@gmail.com]
Sent: Tuesday, September 04, 2012 9:11 AM
To: user@hadoop.apache.org
Subject: Pi Estimator failing to print output after finishing the job sucessfully

Hi All,

I am running the Pi Estimator from hadoop-examples.jar in my 11 node CDH3u4 cluster.

Initially I ran the job for 10 maps and 1000000 samples per map and it ran fine and displayed the execution time and the pi value in the console.
Now again when I ran it for 88 maps and 1 trillion total samples (i.e., 11363636364 samples per map), it executed the job sucessfully, but at end gave the following error and could not display the "pi value" in the console:

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:197)
Can anyone tell me where is it going wrong?
Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.

Thanks,
Gaurav Dasgupta



RE: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Jeffrey Buell <jb...@vmware.com>.
You didn't do anything wrong, this is just a bug in the Pi application.  The application _should_ be able to divide two numbers and not require an exact decimal result.  Everything you need to know is in the first line of the error message.  Try it with 100 maps and 10 billion samples per map, which will produce an exact decimal result.  There's no way to have the same number of maps on each of 11 nodes and get an exact result.

Jeff

From: Gaurav Dasgupta [mailto:gdsayshi@gmail.com]
Sent: Tuesday, September 04, 2012 9:11 AM
To: user@hadoop.apache.org
Subject: Pi Estimator failing to print output after finishing the job sucessfully

Hi All,

I am running the Pi Estimator from hadoop-examples.jar in my 11 node CDH3u4 cluster.

Initially I ran the job for 10 maps and 1000000 samples per map and it ran fine and displayed the execution time and the pi value in the console.
Now again when I ran it for 88 maps and 1 trillion total samples (i.e., 11363636364 samples per map), it executed the job sucessfully, but at end gave the following error and could not display the "pi value" in the console:

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:197)
Can anyone tell me where is it going wrong?
Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.

Thanks,
Gaurav Dasgupta



Re: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Michael Segel <mi...@hotmail.com>.
You blew out the stack? 
Or rather your number was too 'big'/'long'? 


On Sep 4, 2012, at 11:10 AM, Gaurav Dasgupta <gd...@gmail.com> wrote:

> Hi All,
>  
> I am running the Pi Estimator from hadoop-examples.jar in my 11 node CDH3u4 cluster.
>  
> Initially I ran the job for 10 maps and 1000000 samples per map and it ran fine and displayed the execution time and the pi value in the console.
> Now again when I ran it for 88 maps and 1 trillion total samples (i.e., 11363636364 samples per map), it executed the job sucessfully, but at end gave the following error and could not display the "pi value" in the console:
>  
> 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:197)
> Can anyone tell me where is it going wrong?
> Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.
>  
> Thanks,
> Gaurav Dasgupta
>  
>  


Re: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Michael Segel <mi...@hotmail.com>.
You blew out the stack? 
Or rather your number was too 'big'/'long'? 


On Sep 4, 2012, at 11:10 AM, Gaurav Dasgupta <gd...@gmail.com> wrote:

> Hi All,
>  
> I am running the Pi Estimator from hadoop-examples.jar in my 11 node CDH3u4 cluster.
>  
> Initially I ran the job for 10 maps and 1000000 samples per map and it ran fine and displayed the execution time and the pi value in the console.
> Now again when I ran it for 88 maps and 1 trillion total samples (i.e., 11363636364 samples per map), it executed the job sucessfully, but at end gave the following error and could not display the "pi value" in the console:
>  
> 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:197)
> Can anyone tell me where is it going wrong?
> Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.
>  
> Thanks,
> Gaurav Dasgupta
>  
>  


RE: Pi Estimator failing to print output after finishing the job sucessfully

Posted by Jeffrey Buell <jb...@vmware.com>.
You didn't do anything wrong, this is just a bug in the Pi application.  The application _should_ be able to divide two numbers and not require an exact decimal result.  Everything you need to know is in the first line of the error message.  Try it with 100 maps and 10 billion samples per map, which will produce an exact decimal result.  There's no way to have the same number of maps on each of 11 nodes and get an exact result.

Jeff

From: Gaurav Dasgupta [mailto:gdsayshi@gmail.com]
Sent: Tuesday, September 04, 2012 9:11 AM
To: user@hadoop.apache.org
Subject: Pi Estimator failing to print output after finishing the job sucessfully

Hi All,

I am running the Pi Estimator from hadoop-examples.jar in my 11 node CDH3u4 cluster.

Initially I ran the job for 10 maps and 1000000 samples per map and it ran fine and displayed the execution time and the pi value in the console.
Now again when I ran it for 88 maps and 1 trillion total samples (i.e., 11363636364 samples per map), it executed the job sucessfully, but at end gave the following error and could not display the "pi value" in the console:

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:197)
Can anyone tell me where is it going wrong?
Note: My Hadoop cluster (CDH3u4) contains all the necessary patches.

Thanks,
Gaurav Dasgupta