-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-17778][Tests]Mock SparkContext to reduce memory usage of BlockManagerSuite #15350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/cc @markhamstra could you try this patch, please? |
|
Test build #66336 has finished for PR 15350 at commit
|
|
retest this please |
|
Test build #66342 has finished for PR 15350 at commit
|
| conf.set("spark.driver.port", rpcEnv.address.port.toString) | ||
|
|
||
| sc = new SparkContext("local", "test", conf) | ||
| sc = mock(classOf[SparkContext]) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
|
Does this not defeat some of the purpose of testing, if it isn't using an actual SparkContext? |
|
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 |
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. |
|
@zsxwing |
|
Test build #66399 has finished for PR 15350 at commit
|
|
Thanks! Merging to master and 2.0 |
…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>
…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.
What changes were proposed in this pull request?
Mock SparkContext to reduce memory usage of BlockManagerSuite
How was this patch tested?
Jenkins