Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B3373D86D for ; Tue, 4 Sep 2012 16:36:47 +0000 (UTC) Received: (qmail 19918 invoked by uid 500); 4 Sep 2012 16:36:43 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 19647 invoked by uid 500); 4 Sep 2012 16:36:42 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 19638 invoked by uid 99); 4 Sep 2012 16:36:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2012 16:36:42 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.91.2.13] (HELO smtp-outbound-2.vmware.com) (208.91.2.13) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2012 16:36:34 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 328BC28311 for ; Tue, 4 Sep 2012 09:36:13 -0700 (PDT) Received: from sc9-exht07.vmware.com (sc9-exht07.vmware.com [10.113.190.37]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id 2AEB5183B2 for ; Tue, 4 Sep 2012 09:36:13 -0700 (PDT) Received: from exch-mbx-112.vmware.com ([10.113.190.112]) by sc9-exht07.vmware.com ([10.113.190.37]) with mapi; Tue, 4 Sep 2012 09:36:13 -0700 From: Jeffrey Buell To: "user@hadoop.apache.org" Date: Tue, 4 Sep 2012 09:36:12 -0700 Subject: RE: Pi Estimator failing to print output after finishing the job sucessfully Thread-Topic: Pi Estimator failing to print output after finishing the job sucessfully Thread-Index: Ac2Kt+j3AhA+yW1CSh6bWseqhOHwmAAAkJAg Message-ID: <71707C6AD2C02B4087F9E1BCA9EC816513C9E1A1FA@exch-mbx-112.vmware.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_71707C6AD2C02B4087F9E1BCA9EC816513C9E1A1FAexchmbx112vmw_" MIME-Version: 1.0 --_000_71707C6AD2C02B4087F9E1BCA9EC816513C9E1A1FAexchmbx112vmw_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable You didn't do anything wrong, this is just a bug in the Pi application. Th= e application _should_ be able to divide two numbers and not require an exa= ct 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 num= ber 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 suces= sfully 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., 113= 63636364 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.ja= va:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso= rImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramD= river.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.ja= va:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso= rImpl.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 --_000_71707C6AD2C02B4087F9E1BCA9EC816513C9E1A1FAexchmbx112vmw_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

You didn&= #8217;t do anything wrong, this is just a bug in the Pi application.  = The application _should_ be able to divide two numbers and not requi= re an exact decimal result.  Everything you need to know is in the fir= st line of the error message.  Try it with 100 maps and 10 billion sam= ples 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 ex= act 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 CD= H3u4 cluster.

 

Initially I ran the job for 10 maps a= nd 1000= 000 samples per map and it ran fine and displayed the execution time and th= e pi value in the console.

No= w 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 g= ave the following error and could not display the "pi value" in t= he console:

 

java.lang.ArithmeticException: Non-term= inating 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 o= rg.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
 at org.ap= ache.hadoop.examples.PiEstimator.main(PiEstimator.java:351)
 at sun= .reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.re= flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
=  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc= cessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java= :597)
 at org.apache.hadoop.util.ProgramDriver$ProgramDescription.i= nvoke(ProgramDriver.java:68)
 at org.apache.hadoop.util.ProgramDriv= er.driver(ProgramDriver.java:139)
 at org.apache.hadoop.examples.Ex= ampleDriver.main(ExampleDriver.java:64)
 at sun.reflect.NativeMetho= dAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAc= cessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect= .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<= br> at java.lang.reflect.Method.invoke(Method.java:597)
 at or= g.apache.hadoop.util.RunJar.main(RunJar.java:197)

Can anyone tell me where is it going wrong?

Note: My Hadoop cluster (CDH3u4) conta= ins all the necessary patches.

 

Thanks,

Gaurav Dasgupta

 

 

= --_000_71707C6AD2C02B4087F9E1BCA9EC816513C9E1A1FAexchmbx112vmw_--