Hadoop Common
  1. Hadoop Common
  2. HADOOP-5052

Add an example for computing exact digits of Pi

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      New example BaileyBorweinPlouffe computes digits of pi. (World record!)

      Description

      It would be useful to add an example showing how to use Hadoop to do scientific computing. We should add an example for computing exact digits of Pi.

      1. 5052_20090115_0.18.patch
        12 kB
        Tsz Wo Nicholas Sze
      2. 5052_20090117_0.18.patch
        16 kB
        Tsz Wo Nicholas Sze
      3. 5052_20090127.patch
        19 kB
        Tsz Wo Nicholas Sze
      4. 5052_20090203.patch
        20 kB
        Tsz Wo Nicholas Sze
      5. 5052_20090211.patch
        26 kB
        Tsz Wo Nicholas Sze
      6. 5052_20090219.patch
        25 kB
        Tsz Wo Nicholas Sze

        Issue Links

          Activity

          Hide
          Tsz Wo Nicholas Sze added a comment -

          5052_20090115_0.18.patch: for 0.18

          Here is a sample output:

          bash-3.2$ ./bin/hadoop jar build/hadoop-0.18.3-dev-examples.jar bbp 4 1000
          Number of Maps = 4
          Digits per Map = 1000
          Starting Job ...
          09/01/15 11:22:22 INFO mapred.FileInputFormat: Total input paths to process : 4
          09/01/15 11:22:22 INFO mapred.FileInputFormat: Total input paths to process : 4
          09/01/15 11:22:22 INFO mapred.JobClient: Running job: job_200901150913_0015
          09/01/15 11:22:23 INFO mapred.JobClient:  map 0% reduce 0%
          09/01/15 11:22:25 INFO mapred.JobClient:  map 25% reduce 0%
          09/01/15 11:22:28 INFO mapred.JobClient:  map 50% reduce 0%
          09/01/15 11:22:32 INFO mapred.JobClient:  map 75% reduce 0%
          09/01/15 11:22:36 INFO mapred.JobClient:  map 100% reduce 0%
          09/01/15 11:22:41 INFO mapred.JobClient: Job complete: job_200901150913_0015
          09/01/15 11:22:41 INFO mapred.JobClient: Counters: 16
          09/01/15 11:22:41 INFO mapred.JobClient:   File Systems
          09/01/15 11:22:41 INFO mapred.JobClient:     HDFS bytes read=452
          09/01/15 11:22:41 INFO mapred.JobClient:     HDFS bytes written=2143
          09/01/15 11:22:41 INFO mapred.JobClient:     Local bytes read=2094
          09/01/15 11:22:41 INFO mapred.JobClient:     Local bytes written=4374
          09/01/15 11:22:41 INFO mapred.JobClient:   Job Counters 
          09/01/15 11:22:41 INFO mapred.JobClient:     Launched reduce tasks=1
          09/01/15 11:22:41 INFO mapred.JobClient:     Launched map tasks=4
          09/01/15 11:22:41 INFO mapred.JobClient:     Data-local map tasks=4
          09/01/15 11:22:41 INFO mapred.JobClient:   Map-Reduce Framework
          09/01/15 11:22:41 INFO mapred.JobClient:     Reduce input groups=4
          09/01/15 11:22:41 INFO mapred.JobClient:     Combine output records=0
          09/01/15 11:22:41 INFO mapred.JobClient:     Map input records=4
          09/01/15 11:22:41 INFO mapred.JobClient:     Reduce output records=4
          09/01/15 11:22:41 INFO mapred.JobClient:     Map output bytes=2048
          09/01/15 11:22:41 INFO mapred.JobClient:     Map input bytes=80
          09/01/15 11:22:41 INFO mapred.JobClient:     Combine input records=0
          09/01/15 11:22:41 INFO mapred.JobClient:     Map output records=4
          09/01/15 11:22:41 INFO mapred.JobClient:     Reduce input records=4
          Job Finished in 19.859 seconds.
          
          Pi = 0x3.24 3f 6a 88 85 a3 08 d3 13 19 8a 2e 03 70 73 44 a4 09 38 22 29 9f 31 
                   d0 08 2e fa 98 ec 4e 6c 89 45 28 21 e6 38 d0 13 77 be 54 66 cf 34 e9 
                   0c 6c c0 ac 29 b7 c9 7c 50 dd 3f 84 d5 b5 b5 47 09 17 92 16 d5 d9 89 
                   79 fb 1b d1 31 0b a6 98 df b5 ac 2f fd 72 db d0 1a df b7 b8 e1 af ed 
                   6a 26 7e 96 ba 7c 90 45 f1 2c 7f 99 24 a1 99 47 b3 91 6c f7 08 01 f2 
                   e2 85 8e fc 16 63 69 20 d8 71 57 4e 69 a4 58 fe a3 f4 93 3d 7e 0d 95 
                   74 8f 72 8e b6 58 71 8b cd 58 82 15 4a ee 7b 54 a4 1d c2 5a 59 b5 9c 
                   30 d5 39 2a f2 60 13 c5 d1 b0 23 28 60 85 f0 ca 41 79 18 b8 db 38 ef 
                   8e 79 dc b0 60 3a 18 0e 6c 9e 0e 8b b0 1e 8a 3e d7 15 77 c1 bd 31 4b 
                   27 78 af 2f da 55 60 5c 60 e6 55 25 f3 aa 55 ab 94 57 48 98 62 63 e8 
                   14 40 55 ca 39 6a 2a ab 10 b6 b4 cc 5c 34 11 41 e8 ce a1 54 86 af 7c 
                   72 e9 93 b3 ee 14 11 63 6f bc 2a 2b a9 c5 5d 74 18 31 f6 ce 5c 3e 16 
                   9b 87 93 1e af d6 ba 33 6c 24 cf 5c 7a 32 53 81 28 95 86 77 3b 8f 48 
                   98 6b 4b b9 af c4 bf e8 1b 66 28 21 93 61 d8 09 cc fb 21 a9 91 48 7c 
                   ac 60 5d ec 80 32 ef 84 5d 5d e9 85 75 b1 dc 26 23 02 eb 65 1b 88 23 
                   89 3e 81 d3 96 ac c5 0f 6d 6f f3 83 f4 42 39 2e 0b 44 82 a4 84 20 04 
                   69 c8 f0 4a 9e 1f 9b 5e 21 c6 68 42 f6 e9 6c 9a 67 0c 9c 61 ab d3 88 
                   f0 6a 51 a0 d2 d8 54 2f 68 96 0f a7 28 ab 51 33 a3 6e ef 0b 6c 13 7a 
                   3b e4 ba 3b f0 50 7e fb 2a 98 a1 f1 65 1d 39 af 01 76 66 ca 59 3e 82 
                   43 0e 88 8c ee 86 19 45 6f 9f b4 7d 84 a5 c3 3b 8b 5e be e0 6f 75 d8 
                   85 c1 20 73 40 1a 44 9f 56 c1 6a a6 4e d3 aa 62 36 3f 77 06 1b fe df 
                   72 42 9b 02 3d 37 d0 d7 24 d0 0a 12 48 db 0f ea d3 49 f1 c0 9b 07 53 
                   72 c9 80 99 1b 7b 25 d4 79 d8 f6 e8 de f7 e3 fe 50 1a b6 79 4c 3b 97 
                   6c e0 bd 04 c0 06 ba c1 a9 4f b6 40 9f 60 c4 5e 5c 9e c2 19 6a 24 63 
                   68 fb 6f af 3e 6c 53 b5 13 39 b2 eb 3b 52 ec 6f 6d fc 51 1f 9b 30 95 
                   2c cc 81 45 44 af 5e bd 09 be e3 d0 04 de 33 4a fd 66 0f 28 07 19 2e 
                   4b b3 c0 cb a8 57 45 c8 74 0f d2 0b 5f 39 b9 d3 fb db 55 79 c0 bd 1a 
                   60 32 0a d6 a1 00 c6 40 2c 72 79 67 9f 25 fe fb 1f a3 cc 8e a5 e9 f8 
                   db 32 22 f8 3c 75 16 df fd 61 6b 15 2f 50 1e c8 ad 05 52 ab 32 3d b5 
                   fa fd 23 87 60 53 31 7b 48 3e 00 df 82 9e 5c 57 bb ca 6f 8c a0 1a 87 
                   56 2e df 17 69 db d5 42 a8 f6 28 7e ff c3 ac 67 32 c6 8c 4f 55 73 69 
                   5b 27 b0 bb ca 58 c8 e1 ff a3 5d b8 f0 11 a0 10 fa 3d 98 fd 21 83 b8 
                   4a fc b5 6c 2d d1 d3 5b 9a 53 e4 79 b6 f8 45 65 d2 8e 49 bc 4b fb 97 
                   90 e1 dd f2 da a4 cb 7e 33 62 fb 13 41 ce e4 c6 e8 ef 20 ca da 36 77 
                   4c 01 d0 7e 9e fe 2b f1 1f b4 95 db da 4d ae 90 91 98 ea ad 8e 71 6b 
                   93 d5 a0 d0 8e d1 d0 af c7 25 e0 8e 3c 5b 2f 8e 75 94 b7 8f f6 e2 fb 
                   f2 12 2b 64 88 88 b8 12 90 0d f0 1c 4f ad 5e a0 68 8f c3 1c d1 cf f1 
                   91 b3 a8 c1 ad 2f 2f 22 18 be 0e 17 77 ea 75 2d fe 8b 02 1f a1 e5 a0 
                   cc 0f b5 6f 74 e8 18 ac f3 d6 ce 89 e2 99 b4 a8 4f e0 fd 13 e0 b7 7c 
                   c4 3b 81 d2 ad a8 d9 16 5f a2 66 80 95 77 05 93 cc 73 14 21 1a 14 77 
                   e6 ad 20 65 77 b5 fa 86 c7 54 42 f5 fb 9d 35 cf eb cd af 0c 7b 3e 89 
                   a0 d6 41 1b d3 ae 1e 7e 49 00 25 0e 2d 20 71 b3 5e 22 68 00 bb 57 b8 
                   e0 af 24 64 36 9b f0 09 b9 1e 55 63 91 1d 59 df a6 aa 78 c1 43 89 d9 
                   5a 53 7f 20 7d 5b a2 02 e5 b9 c5 83 26 03 76 62 95 cf a9 11 c8 19 68 
                   4e 73 4a 41 b3 47 2d ca 7b 14 a9 4a 1b 51 00 52 9a 53 29 15 d6 0f 57 
                   3f bc 9b c6 e4 2b 60 a4 76 81 e6 74 00 08 ba 6f b5 57 1b e9 1f f2 96 
                   ec 6b 2a 0d d9 15 b6 63 65 21 e7 b9 f9 b6 ff 34 05 2e c5 85 56 64 53 
                   b0 2d 5d a9 9f 8f a1 08 ba 47 99 6e 85 07 6a 4b 7a 70 e9 b5 b3 29 44 
                   db 75 09 2e c4 19 26 23 ad 6e a6 b0 49 a7 df 7d 9c ee 60 b8 8f ed b2 
                   66 ec aa 8c 71 69 9a 17 ff 56 64 52 6c c2 b1 9e e1 19 36 02 a5 75 09 
                   4c 29 a0 59 13 40 e4 18 3a 3e 3f 54 98 9a 5b 42 9d 65 6b 8f e4 d6 99 
                   f7 3f d6 a1 d2 9c 07 ef e8 30 f5 4d 2d 38 e6 f0 25 5d c1 4c dd 20 86 
                   84 70 eb 26 63 82 e9 c6 02 1e cc 5e 09 68 6b 3f 3e ba ef c9 3c 97 18 
                   14 6b 6a 70 a1 68 7f 35 84 52 a0 e2 86 b7 9c 53 05 aa 50 07 37 3e 07 
                   84 1c 7f de ae 5c 8e 7d 44 ec 57 16 f2 b8 b0 3a da 37 f0 50 0c 0d f0 
                   1c 1f 04 02 00 b3 ff ae 0c f5 1a 3c b5 74 b2 25 83 7a 58 dc 09 21 bd 
                   d1 91 13 f9 7c a9 2f f6 94 32 47 73 22 f5 47 01 3a e5 e5 81 37 c2 da 
                   dc c8 b5 76 34 9a f3 dd a7 a9 44 61 46 0f d0 03 0e ec c8 c7 3e a4 75 
                   1e 41 e2 38 cd 99 3b ea 0e 2f 32 80 bb a1 18 3e b3 31 4e 54 8b 38 4f 
                   6d b9 08 6f 42 0d 03 f6 0a 04 bf 2c b8 12 90 24 97 7c 79 56 79 b0 72 
                   bc af 89 af de 9a 77 1f d9 93 08 10 b3 8b ae 12 dc cf 3f 2e 55 12 72 
                   1f 2e 6b 71 24 50 1a dd e6 9f 84 cd 87 7a 58 47 18 74 08 da 17 bc 9f 
                   9a bc e9 4b 7d 8c ec 7a ec 3a db 85 1d fa 63 09 43 66 c4 64 c3 d2 ef 
                   1c 18 47 32 15 d9 08 dd 43 3b 37 24 c2 ba 16 12 a1 4d 43 2a 65 c4 51 
                   50 94 00 02 13 3a e4 dd 71 df f8 9e 10 31 4e 55 81 ac 77 d6 5f 11 19 
                   9b 04 35 56 f1 d7 a3 c7 6b 3c 11 18 3b 59 24 a5 09 f2 8f e6 ed 97 f1 
                   fb fa 9e ba bf 2c 1e 15 3c 6e 86 e3 45 70 ea e9 6f b1 86 0e 5e 0a 5a 
                   3e 2a b3 77 1f e7 1c 4e 3d 06 fa 29 65 dc b9 99 e7 1d 0f 80 3e 89 d6 
                   52 66 c8 25 2e 4c c9 78 9c 10 b3 6a c6 15 0e ba 94 e2 ea 78 a5 fc 3c 
                   53 1e 0a 2d f4 f2 f7 4e a7 36 1d 2b 3d 19 39 26 0f 19 c2 79 60 52 23 
                   a7 08 f7 13 12 b6 eb ad fe 6e ea c3 1f 66 e3 bc 45 95 a6 7b c8 83 b1 
                   7f 37 d1 01 8c ff 28 c3 32 dd ef be 6c 5a a5 65 58 21 85 68 ab 98 02 
                   ee ce a5 0f db 2f 95 3b 2a ef 7d ad 5b 6e 2f 84 15 21 b6 28 29 07 61 
                   70 ec dd 47 75 61 9f 15 10 13 cc a8 30 eb 61 bd 96 03 34 fe 1e aa 03 
                   63 cf b5 73 5c 90 4c 70 a2 39 d5 9e 9e 0b cb aa de 14 ee cc 86 bc 60 
                   62 2c a7 9c ab 5c ab b2 f3 84 6e 64 8b 1e af 19 bd f0 ca a0 23 69 b9 
                   65 5a bb 50 40 68 5a 32 3c 2a b4 b3 31 9e e9 d5 c0 21 b8 f7 9b 54 0b 
                   19 87 5f a0 99 95 f7 99 7e 62 3d 7d a8 f8 37 88 9a 97 e3 2d 77 11 ed 
                   93 5f 16 68 12 81 0e 35 88 29 c7 e6 1f d6 96 de df a1 78 58 ba 99 57 
                   f5 84 a5 1b 22 72 63 9b 83 c3 ff 1a c2 46 96 cd b3 0a eb 53 2e 30 54 
                   8f d9 48 e4 6d bc 31 28 58 eb f2 ef 34 c6 ff ea fe 28 ed 61 ee 7c 3c 
                   73 5d 4a 14 d9 e8 64 b7 e3 42 10 5d 14 20 3e 13 e0 45 ee e2 b6 a3 aa 
                   ab ea db 6c 4f 15 fa cb 4f d0 c7 42 f4 42 ef 6a bb b5 65 4f 3b 1d 41 
                   cd 21 05 d8 1e 79 9e 86 85 4d c7 e4 4b 47 6a 3d 81 62 50 cf 62 a1 f2 
                   5b 8d 26 46 fc 88 83 a0 c1 c7 b6 a3 7f 15 24 c3 69 cb 74 92 47 84 8a 
                   0b 56 92 b2 85 09 5b bf 00 ad 19 48 9d 14 62 b1 74 23 82 0e 00 58 42 
                   8d 2a 0c 55 f5 ea 1d ad f4 3e 23 3f 70 61 33 72 f0 92 8d 93 7e 41 
          
          Total number of hex digits is 4000.
          
          Show
          Tsz Wo Nicholas Sze added a comment - 5052_20090115_0.18.patch: for 0.18 Here is a sample output: bash-3.2$ ./bin/hadoop jar build/hadoop-0.18.3-dev-examples.jar bbp 4 1000 Number of Maps = 4 Digits per Map = 1000 Starting Job ... 09/01/15 11:22:22 INFO mapred.FileInputFormat: Total input paths to process : 4 09/01/15 11:22:22 INFO mapred.FileInputFormat: Total input paths to process : 4 09/01/15 11:22:22 INFO mapred.JobClient: Running job: job_200901150913_0015 09/01/15 11:22:23 INFO mapred.JobClient: map 0% reduce 0% 09/01/15 11:22:25 INFO mapred.JobClient: map 25% reduce 0% 09/01/15 11:22:28 INFO mapred.JobClient: map 50% reduce 0% 09/01/15 11:22:32 INFO mapred.JobClient: map 75% reduce 0% 09/01/15 11:22:36 INFO mapred.JobClient: map 100% reduce 0% 09/01/15 11:22:41 INFO mapred.JobClient: Job complete: job_200901150913_0015 09/01/15 11:22:41 INFO mapred.JobClient: Counters: 16 09/01/15 11:22:41 INFO mapred.JobClient: File Systems 09/01/15 11:22:41 INFO mapred.JobClient: HDFS bytes read=452 09/01/15 11:22:41 INFO mapred.JobClient: HDFS bytes written=2143 09/01/15 11:22:41 INFO mapred.JobClient: Local bytes read=2094 09/01/15 11:22:41 INFO mapred.JobClient: Local bytes written=4374 09/01/15 11:22:41 INFO mapred.JobClient: Job Counters 09/01/15 11:22:41 INFO mapred.JobClient: Launched reduce tasks=1 09/01/15 11:22:41 INFO mapred.JobClient: Launched map tasks=4 09/01/15 11:22:41 INFO mapred.JobClient: Data-local map tasks=4 09/01/15 11:22:41 INFO mapred.JobClient: Map-Reduce Framework 09/01/15 11:22:41 INFO mapred.JobClient: Reduce input groups=4 09/01/15 11:22:41 INFO mapred.JobClient: Combine output records=0 09/01/15 11:22:41 INFO mapred.JobClient: Map input records=4 09/01/15 11:22:41 INFO mapred.JobClient: Reduce output records=4 09/01/15 11:22:41 INFO mapred.JobClient: Map output bytes=2048 09/01/15 11:22:41 INFO mapred.JobClient: Map input bytes=80 09/01/15 11:22:41 INFO mapred.JobClient: Combine input records=0 09/01/15 11:22:41 INFO mapred.JobClient: Map output records=4 09/01/15 11:22:41 INFO mapred.JobClient: Reduce input records=4 Job Finished in 19.859 seconds. Pi = 0x3.24 3f 6a 88 85 a3 08 d3 13 19 8a 2e 03 70 73 44 a4 09 38 22 29 9f 31 d0 08 2e fa 98 ec 4e 6c 89 45 28 21 e6 38 d0 13 77 be 54 66 cf 34 e9 0c 6c c0 ac 29 b7 c9 7c 50 dd 3f 84 d5 b5 b5 47 09 17 92 16 d5 d9 89 79 fb 1b d1 31 0b a6 98 df b5 ac 2f fd 72 db d0 1a df b7 b8 e1 af ed 6a 26 7e 96 ba 7c 90 45 f1 2c 7f 99 24 a1 99 47 b3 91 6c f7 08 01 f2 e2 85 8e fc 16 63 69 20 d8 71 57 4e 69 a4 58 fe a3 f4 93 3d 7e 0d 95 74 8f 72 8e b6 58 71 8b cd 58 82 15 4a ee 7b 54 a4 1d c2 5a 59 b5 9c 30 d5 39 2a f2 60 13 c5 d1 b0 23 28 60 85 f0 ca 41 79 18 b8 db 38 ef 8e 79 dc b0 60 3a 18 0e 6c 9e 0e 8b b0 1e 8a 3e d7 15 77 c1 bd 31 4b 27 78 af 2f da 55 60 5c 60 e6 55 25 f3 aa 55 ab 94 57 48 98 62 63 e8 14 40 55 ca 39 6a 2a ab 10 b6 b4 cc 5c 34 11 41 e8 ce a1 54 86 af 7c 72 e9 93 b3 ee 14 11 63 6f bc 2a 2b a9 c5 5d 74 18 31 f6 ce 5c 3e 16 9b 87 93 1e af d6 ba 33 6c 24 cf 5c 7a 32 53 81 28 95 86 77 3b 8f 48 98 6b 4b b9 af c4 bf e8 1b 66 28 21 93 61 d8 09 cc fb 21 a9 91 48 7c ac 60 5d ec 80 32 ef 84 5d 5d e9 85 75 b1 dc 26 23 02 eb 65 1b 88 23 89 3e 81 d3 96 ac c5 0f 6d 6f f3 83 f4 42 39 2e 0b 44 82 a4 84 20 04 69 c8 f0 4a 9e 1f 9b 5e 21 c6 68 42 f6 e9 6c 9a 67 0c 9c 61 ab d3 88 f0 6a 51 a0 d2 d8 54 2f 68 96 0f a7 28 ab 51 33 a3 6e ef 0b 6c 13 7a 3b e4 ba 3b f0 50 7e fb 2a 98 a1 f1 65 1d 39 af 01 76 66 ca 59 3e 82 43 0e 88 8c ee 86 19 45 6f 9f b4 7d 84 a5 c3 3b 8b 5e be e0 6f 75 d8 85 c1 20 73 40 1a 44 9f 56 c1 6a a6 4e d3 aa 62 36 3f 77 06 1b fe df 72 42 9b 02 3d 37 d0 d7 24 d0 0a 12 48 db 0f ea d3 49 f1 c0 9b 07 53 72 c9 80 99 1b 7b 25 d4 79 d8 f6 e8 de f7 e3 fe 50 1a b6 79 4c 3b 97 6c e0 bd 04 c0 06 ba c1 a9 4f b6 40 9f 60 c4 5e 5c 9e c2 19 6a 24 63 68 fb 6f af 3e 6c 53 b5 13 39 b2 eb 3b 52 ec 6f 6d fc 51 1f 9b 30 95 2c cc 81 45 44 af 5e bd 09 be e3 d0 04 de 33 4a fd 66 0f 28 07 19 2e 4b b3 c0 cb a8 57 45 c8 74 0f d2 0b 5f 39 b9 d3 fb db 55 79 c0 bd 1a 60 32 0a d6 a1 00 c6 40 2c 72 79 67 9f 25 fe fb 1f a3 cc 8e a5 e9 f8 db 32 22 f8 3c 75 16 df fd 61 6b 15 2f 50 1e c8 ad 05 52 ab 32 3d b5 fa fd 23 87 60 53 31 7b 48 3e 00 df 82 9e 5c 57 bb ca 6f 8c a0 1a 87 56 2e df 17 69 db d5 42 a8 f6 28 7e ff c3 ac 67 32 c6 8c 4f 55 73 69 5b 27 b0 bb ca 58 c8 e1 ff a3 5d b8 f0 11 a0 10 fa 3d 98 fd 21 83 b8 4a fc b5 6c 2d d1 d3 5b 9a 53 e4 79 b6 f8 45 65 d2 8e 49 bc 4b fb 97 90 e1 dd f2 da a4 cb 7e 33 62 fb 13 41 ce e4 c6 e8 ef 20 ca da 36 77 4c 01 d0 7e 9e fe 2b f1 1f b4 95 db da 4d ae 90 91 98 ea ad 8e 71 6b 93 d5 a0 d0 8e d1 d0 af c7 25 e0 8e 3c 5b 2f 8e 75 94 b7 8f f6 e2 fb f2 12 2b 64 88 88 b8 12 90 0d f0 1c 4f ad 5e a0 68 8f c3 1c d1 cf f1 91 b3 a8 c1 ad 2f 2f 22 18 be 0e 17 77 ea 75 2d fe 8b 02 1f a1 e5 a0 cc 0f b5 6f 74 e8 18 ac f3 d6 ce 89 e2 99 b4 a8 4f e0 fd 13 e0 b7 7c c4 3b 81 d2 ad a8 d9 16 5f a2 66 80 95 77 05 93 cc 73 14 21 1a 14 77 e6 ad 20 65 77 b5 fa 86 c7 54 42 f5 fb 9d 35 cf eb cd af 0c 7b 3e 89 a0 d6 41 1b d3 ae 1e 7e 49 00 25 0e 2d 20 71 b3 5e 22 68 00 bb 57 b8 e0 af 24 64 36 9b f0 09 b9 1e 55 63 91 1d 59 df a6 aa 78 c1 43 89 d9 5a 53 7f 20 7d 5b a2 02 e5 b9 c5 83 26 03 76 62 95 cf a9 11 c8 19 68 4e 73 4a 41 b3 47 2d ca 7b 14 a9 4a 1b 51 00 52 9a 53 29 15 d6 0f 57 3f bc 9b c6 e4 2b 60 a4 76 81 e6 74 00 08 ba 6f b5 57 1b e9 1f f2 96 ec 6b 2a 0d d9 15 b6 63 65 21 e7 b9 f9 b6 ff 34 05 2e c5 85 56 64 53 b0 2d 5d a9 9f 8f a1 08 ba 47 99 6e 85 07 6a 4b 7a 70 e9 b5 b3 29 44 db 75 09 2e c4 19 26 23 ad 6e a6 b0 49 a7 df 7d 9c ee 60 b8 8f ed b2 66 ec aa 8c 71 69 9a 17 ff 56 64 52 6c c2 b1 9e e1 19 36 02 a5 75 09 4c 29 a0 59 13 40 e4 18 3a 3e 3f 54 98 9a 5b 42 9d 65 6b 8f e4 d6 99 f7 3f d6 a1 d2 9c 07 ef e8 30 f5 4d 2d 38 e6 f0 25 5d c1 4c dd 20 86 84 70 eb 26 63 82 e9 c6 02 1e cc 5e 09 68 6b 3f 3e ba ef c9 3c 97 18 14 6b 6a 70 a1 68 7f 35 84 52 a0 e2 86 b7 9c 53 05 aa 50 07 37 3e 07 84 1c 7f de ae 5c 8e 7d 44 ec 57 16 f2 b8 b0 3a da 37 f0 50 0c 0d f0 1c 1f 04 02 00 b3 ff ae 0c f5 1a 3c b5 74 b2 25 83 7a 58 dc 09 21 bd d1 91 13 f9 7c a9 2f f6 94 32 47 73 22 f5 47 01 3a e5 e5 81 37 c2 da dc c8 b5 76 34 9a f3 dd a7 a9 44 61 46 0f d0 03 0e ec c8 c7 3e a4 75 1e 41 e2 38 cd 99 3b ea 0e 2f 32 80 bb a1 18 3e b3 31 4e 54 8b 38 4f 6d b9 08 6f 42 0d 03 f6 0a 04 bf 2c b8 12 90 24 97 7c 79 56 79 b0 72 bc af 89 af de 9a 77 1f d9 93 08 10 b3 8b ae 12 dc cf 3f 2e 55 12 72 1f 2e 6b 71 24 50 1a dd e6 9f 84 cd 87 7a 58 47 18 74 08 da 17 bc 9f 9a bc e9 4b 7d 8c ec 7a ec 3a db 85 1d fa 63 09 43 66 c4 64 c3 d2 ef 1c 18 47 32 15 d9 08 dd 43 3b 37 24 c2 ba 16 12 a1 4d 43 2a 65 c4 51 50 94 00 02 13 3a e4 dd 71 df f8 9e 10 31 4e 55 81 ac 77 d6 5f 11 19 9b 04 35 56 f1 d7 a3 c7 6b 3c 11 18 3b 59 24 a5 09 f2 8f e6 ed 97 f1 fb fa 9e ba bf 2c 1e 15 3c 6e 86 e3 45 70 ea e9 6f b1 86 0e 5e 0a 5a 3e 2a b3 77 1f e7 1c 4e 3d 06 fa 29 65 dc b9 99 e7 1d 0f 80 3e 89 d6 52 66 c8 25 2e 4c c9 78 9c 10 b3 6a c6 15 0e ba 94 e2 ea 78 a5 fc 3c 53 1e 0a 2d f4 f2 f7 4e a7 36 1d 2b 3d 19 39 26 0f 19 c2 79 60 52 23 a7 08 f7 13 12 b6 eb ad fe 6e ea c3 1f 66 e3 bc 45 95 a6 7b c8 83 b1 7f 37 d1 01 8c ff 28 c3 32 dd ef be 6c 5a a5 65 58 21 85 68 ab 98 02 ee ce a5 0f db 2f 95 3b 2a ef 7d ad 5b 6e 2f 84 15 21 b6 28 29 07 61 70 ec dd 47 75 61 9f 15 10 13 cc a8 30 eb 61 bd 96 03 34 fe 1e aa 03 63 cf b5 73 5c 90 4c 70 a2 39 d5 9e 9e 0b cb aa de 14 ee cc 86 bc 60 62 2c a7 9c ab 5c ab b2 f3 84 6e 64 8b 1e af 19 bd f0 ca a0 23 69 b9 65 5a bb 50 40 68 5a 32 3c 2a b4 b3 31 9e e9 d5 c0 21 b8 f7 9b 54 0b 19 87 5f a0 99 95 f7 99 7e 62 3d 7d a8 f8 37 88 9a 97 e3 2d 77 11 ed 93 5f 16 68 12 81 0e 35 88 29 c7 e6 1f d6 96 de df a1 78 58 ba 99 57 f5 84 a5 1b 22 72 63 9b 83 c3 ff 1a c2 46 96 cd b3 0a eb 53 2e 30 54 8f d9 48 e4 6d bc 31 28 58 eb f2 ef 34 c6 ff ea fe 28 ed 61 ee 7c 3c 73 5d 4a 14 d9 e8 64 b7 e3 42 10 5d 14 20 3e 13 e0 45 ee e2 b6 a3 aa ab ea db 6c 4f 15 fa cb 4f d0 c7 42 f4 42 ef 6a bb b5 65 4f 3b 1d 41 cd 21 05 d8 1e 79 9e 86 85 4d c7 e4 4b 47 6a 3d 81 62 50 cf 62 a1 f2 5b 8d 26 46 fc 88 83 a0 c1 c7 b6 a3 7f 15 24 c3 69 cb 74 92 47 84 8a 0b 56 92 b2 85 09 5b bf 00 ad 19 48 9d 14 62 b1 74 23 82 0e 00 58 42 8d 2a 0c 55 f5 ea 1d ad f4 3e 23 3f 70 61 33 72 f0 92 8d 93 7e 41 Total number of hex digits is 4000.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          5052_20090117_0.18.patch:

          • Partition the digits so that all map tasks take approximate the same execution time
            Number of Maps    = 10
            Number of Digits  = 1000
            Map #0: offset=0, size=464
            Map #1: offset=464, size=120
            Map #2: offset=584, size=84
            Map #3: offset=668, size=68
            Map #4: offset=736, size=56
            Map #5: offset=792, size=52
            Map #6: offset=844, size=44
            Map #7: offset=888, size=40
            Map #8: offset=928, size=36
            Map #9: offset=964, size=36
            
          • Convert hex representation of pi to decimal representation
            Pi = 3.1415926535 8979323846 2643383279 5028841971 6939937510
                   5820974944 5923078164 0628620899 8628034825 3421170679
                   8214808651 3282306647 0938446095 5058223172 5359408128
                   4811174502 8410270193 8521105559 6446229489 5493038196
                   4428810975 6659334461 2847564823 3786783165 2712019091
                   4564856692 3460348610 4543266482 1339360726 0249141273
                   7245870066 0631558817 4881520920 9628292540 9171536436
                   7892590360 0113305305 4882046652 1384146951 9415116094
                   3305727036 5759591953 0921861173 8193261179 3105118548
                   0744623799 6274956735 1885752724 8912279381 8301194912
                   9833673362 4406566430 8602139494 6395224737 1907021798
                   6094370277 0539217176 2931767523 8467481846 7669405132
                   0005681271 4526356082 7785771342 7577896091 7363717872
                   1468440901 2249534301 4654958537 1050792279 6892589235
                   4201995611 2129021960 8640344181 5981362977 4771309960
                   5187072113 4999999837 2978049951 0597317328 1609631859
                   5024459455 3469083026 4252230825 3344685035 2619311881
                   7101000313 7838752886 5875332083 8142061717 7669147303
                   5982534904 2875546873 1159562863 8823537875 9375195778
                   1857780532 1712268066 1300192787 6611195909 2164201989
            Total number of decimal digits is 1000.
            
          Show
          Tsz Wo Nicholas Sze added a comment - 5052_20090117_0.18.patch: Partition the digits so that all map tasks take approximate the same execution time Number of Maps = 10 Number of Digits = 1000 Map #0: offset=0, size=464 Map #1: offset=464, size=120 Map #2: offset=584, size=84 Map #3: offset=668, size=68 Map #4: offset=736, size=56 Map #5: offset=792, size=52 Map #6: offset=844, size=44 Map #7: offset=888, size=40 Map #8: offset=928, size=36 Map #9: offset=964, size=36 Convert hex representation of pi to decimal representation Pi = 3.1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 Total number of decimal digits is 1000.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          5052_20090127.patch:

          • used new map/reduce API (Thanks Chris for converting an earlier patch to the new API).
          • added an offset parameter.
          Show
          Tsz Wo Nicholas Sze added a comment - 5052_20090127.patch: used new map/reduce API (Thanks Chris for converting an earlier patch to the new API). added an offset parameter.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          5052_20090203.patch:

          • added IMPLEMENTATION_LIMIT, so that it won't return incorrect result
          • refactored some codes and added more comments
          Show
          Tsz Wo Nicholas Sze added a comment - 5052_20090203.patch: added IMPLEMENTATION_LIMIT, so that it won't return incorrect result refactored some codes and added more comments
          Hide
          Tsz Wo Nicholas Sze added a comment -

          5052_20090211.patch:

          • Defined a new InputFormat instead of using default (thanks Chris again for showing me how to do it).
          • Improved 20% performance.
          • Added unit tests.
          • Checked the results for the first 1 million digits and all 10^k th digits which supported by the implementation.
          Show
          Tsz Wo Nicholas Sze added a comment - 5052_20090211.patch: Defined a new InputFormat instead of using default (thanks Chris again for showing me how to do it). Improved 20% performance. Added unit tests. Checked the results for the first 1 million digits and all 10^k th digits which supported by the implementation.
          Hide
          Chris Douglas added a comment -

          The progress/logging thread should probably be removed. Though it's not obvious where one should report progress for this, a separate thread is definitely discouraged. If it's been useful for debugging, then it should at least be disabled by default (and named DebugThread or something).

          Otherwise this looks great. +1

          Show
          Chris Douglas added a comment - The progress/logging thread should probably be removed. Though it's not obvious where one should report progress for this, a separate thread is definitely discouraged. If it's been useful for debugging, then it should at least be disabled by default (and named DebugThread or something). Otherwise this looks great. +1
          Hide
          Tsz Wo Nicholas Sze added a comment -

          5052_20090219.patch: seems that the progress thread is not really a good idea. Removed it.

          Show
          Tsz Wo Nicholas Sze added a comment - 5052_20090219.patch: seems that the progress thread is not really a good idea. Removed it.
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12400566/5052_20090219.patch
          against trunk revision 746340.

          +1 @author. The patch does not contain any @author tags.

          +1 tests included. The patch appears to include 3 new or modified tests.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          +1 core tests. The patch passed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3892/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3892/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3892/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3892/console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12400566/5052_20090219.patch against trunk revision 746340. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 Eclipse classpath. The patch retains Eclipse classpath integrity. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3892/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3892/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3892/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3892/console This message is automatically generated.
          Hide
          Chris Douglas added a comment -

          I committed this. Thanks, Nicholas

          Show
          Chris Douglas added a comment - I committed this. Thanks, Nicholas
          Hide
          Hudson added a comment -

          Integrated in Hadoop-trunk #763 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/763/)
          . Add an example computing exact digits of pi using the
          Bailey-Borwein-Plouffe algorithm. Contributed by Tsz Wo (Nicholas), SZE

          Show
          Hudson added a comment - Integrated in Hadoop-trunk #763 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/763/ ) . Add an example computing exact digits of pi using the Bailey-Borwein-Plouffe algorithm. Contributed by Tsz Wo (Nicholas), SZE
          Hide
          Robert Chansler added a comment -

          Editorial pass over all release notes prior to publication of 0.21.

          Show
          Robert Chansler added a comment - Editorial pass over all release notes prior to publication of 0.21.

            People

            • Assignee:
              Tsz Wo Nicholas Sze
              Reporter:
              Tsz Wo Nicholas Sze
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development