Skip to content

Conversation

@yanghaogn
Copy link
Contributor

@yanghaogn yanghaogn commented Jun 26, 2016

What changes were proposed in this pull request?

reduce the denominator of SparkPi by 1

How was this patch tested?

integration tests

@yanghaogn
Copy link
Contributor Author

yanghaogn commented Jun 26, 2016

As the iteration number is n - 1, the denominator would also be n,

@yanghaogn yanghaogn changed the title make rdd count be n make SparkPi iteration time correct Jun 26, 2016
@HyukjinKwon
Copy link
Member

HyukjinKwon commented Jun 26, 2016

Get ready to receive a comment suggesting following https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark..

I believe this is not a [MINOR] because it is not virtually the same.

trivial changes, where the what should change is virtually the same as the how it should change do not require a JIRA.

@srowen
Copy link
Member

srowen commented Jun 26, 2016

Nah @HyukjinKwon I think this is a simple fix that's self-contained here. Either the iterations or the estimate formula is wrong here and that's all there is to it. (0 until n) would be fine too.

@srowen
Copy link
Member

srowen commented Jun 26, 2016

@yanghaogn since you already made a JIRA, connect it in the title please. It is not resolved

@yanghaogn yanghaogn changed the title make SparkPi iteration time correct make SparkPi iteration number correct Jun 26, 2016
@srowen
Copy link
Member

srowen commented Jun 26, 2016

Jenkins test this please

@yanghaogn
Copy link
Contributor Author

@srowen It's been related now

@srowen
Copy link
Member

srowen commented Jun 26, 2016

@SparkQA
Copy link

SparkQA commented Jun 26, 2016

Test build #61261 has finished for PR 13910 at commit f91e55e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

As explained in #2874

```
The max size of the input seq was Int.MaxValue - 1
```
@yanghaogn
Copy link
Contributor Author

As explained in #2874

The max size of the input seq was Int.MaxValue - 1

This change may cause a bug. For the input is very big and It can be treated as not a problem. But then it's hard to understand the logic if users have not read the #2874

@srowen
Copy link
Member

srowen commented Jun 26, 2016

I see, maybe better to just fix the denominator then.

@yanghaogn yanghaogn changed the title make SparkPi iteration number correct [SPARK-16214] [Examples] make SparkPi iteration number correct Jun 26, 2016
change the denominator
@yanghaogn yanghaogn changed the title [SPARK-16214] [Examples] make SparkPi iteration number correct [SPARK-16214] [Examples] fix the denominator of SparkPi Jun 26, 2016
@srowen
Copy link
Member

srowen commented Jun 26, 2016

Jenkins retest this please

@SparkQA
Copy link

SparkQA commented Jun 26, 2016

Test build #61268 has finished for PR 13910 at commit 1cfbea2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

asfgit pushed a commit that referenced this pull request Jun 27, 2016
## What changes were proposed in this pull request?

reduce the denominator of SparkPi by 1

## How was this patch tested?

  integration tests

Author: 杨浩 <[email protected]>

Closes #13910 from yanghaogn/patch-1.

(cherry picked from commit b452026)
Signed-off-by: Sean Owen <[email protected]>
asfgit pushed a commit that referenced this pull request Jun 27, 2016
## What changes were proposed in this pull request?

reduce the denominator of SparkPi by 1

## How was this patch tested?

  integration tests

Author: 杨浩 <[email protected]>

Closes #13910 from yanghaogn/patch-1.

(cherry picked from commit b452026)
Signed-off-by: Sean Owen <[email protected]>
@srowen
Copy link
Member

srowen commented Jun 27, 2016

Merged to master/2.0/1.6

@asfgit asfgit closed this in b452026 Jun 27, 2016
zzcclp pushed a commit to zzcclp/spark that referenced this pull request Jun 27, 2016
## What changes were proposed in this pull request?

reduce the denominator of SparkPi by 1

## How was this patch tested?

  integration tests

Author: 杨浩 <[email protected]>

Closes apache#13910 from yanghaogn/patch-1.

(cherry picked from commit b452026)
Signed-off-by: Sean Owen <[email protected]>
(cherry picked from commit 22a496d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants