Skip to content

Conversation

@zsxwing
Copy link
Member

@zsxwing zsxwing commented Oct 4, 2016

What changes were proposed in this pull request?

Mock SparkContext to reduce memory usage of BlockManagerSuite

How was this patch tested?

Jenkins

@zsxwing
Copy link
Member Author

zsxwing commented Oct 4, 2016

/cc @markhamstra could you try this patch, please?

@SparkQA
Copy link

SparkQA commented Oct 4, 2016

Test build #66336 has finished for PR 15350 at commit a8201b9.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@zsxwing
Copy link
Member Author

zsxwing commented Oct 4, 2016

retest this please

@SparkQA
Copy link

SparkQA commented Oct 5, 2016

Test build #66342 has finished for PR 15350 at commit a8201b9.

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

conf.set("spark.driver.port", rpcEnv.address.port.toString)

sc = new SparkContext("local", "test", conf)
sc = mock(classOf[SparkContext])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to comment on the reason for this change too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to comment on the reason for this change too

Added

@srowen
Copy link
Member

srowen commented Oct 5, 2016

Does this not defeat some of the purpose of testing, if it isn't using an actual SparkContext?

@andrewor14
Copy link
Contributor

I think that's OK. This is supposed to be a unit test for the BlockManager, not how BlockManager interacts with the rest of the system. LGTM

@zsxwing
Copy link
Member Author

zsxwing commented Oct 5, 2016

Does this not defeat some of the purpose of testing, if it isn't using an actual SparkContext?

The only reason we need to create a SparkContext is to initialize LiveListenerBus. There was no SparkContext in this file before we added a configuration to LiveListenerBus.

@markhamstra
Copy link
Contributor

@zsxwing build/mvn -U -Pyarn -Phadoop-2.7 -Pkinesis-asl -Phive -Phive-thriftserver -Dpyspark -Dsparkr test completely succeeded on one of my machines where it was previously failing.

@SparkQA
Copy link

SparkQA commented Oct 5, 2016

Test build #66399 has finished for PR 15350 at commit 6a27d2a.

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

@zsxwing
Copy link
Member Author

zsxwing commented Oct 5, 2016

Thanks! Merging to master and 2.0

asfgit pushed a commit that referenced this pull request Oct 5, 2016
…kManagerSuite

## What changes were proposed in this pull request?

Mock SparkContext to reduce memory usage of BlockManagerSuite

## How was this patch tested?

Jenkins

Author: Shixiong Zhu <shixiong@databricks.com>

Closes #15350 from zsxwing/SPARK-17778.

(cherry picked from commit 221b418)
Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
@asfgit asfgit closed this in 221b418 Oct 5, 2016
@zsxwing zsxwing deleted the SPARK-17778 branch October 5, 2016 21:58
uzadude pushed a commit to uzadude/spark that referenced this pull request Jan 27, 2017
…kManagerSuite

## What changes were proposed in this pull request?

Mock SparkContext to reduce memory usage of BlockManagerSuite

## How was this patch tested?

Jenkins

Author: Shixiong Zhu <shixiong@databricks.com>

Closes apache#15350 from zsxwing/SPARK-17778.
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.

6 participants