Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
bce4089f
Commit
bce4089f
authored
12 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Patches
Plain Diff
Fix BlockManagerSuite to deal with clearing spark.hostPort
parent
68c07ea1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/test/scala/spark/storage/BlockManagerSuite.scala
+11
-1
11 additions, 1 deletion
core/src/test/scala/spark/storage/BlockManagerSuite.scala
with
11 additions
and
1 deletion
core/src/test/scala/spark/storage/BlockManagerSuite.scala
+
11
−
1
View file @
bce4089f
...
@@ -15,6 +15,8 @@ import org.scalatest.time.SpanSugar._
...
@@ -15,6 +15,8 @@ import org.scalatest.time.SpanSugar._
import
spark.JavaSerializer
import
spark.JavaSerializer
import
spark.KryoSerializer
import
spark.KryoSerializer
import
spark.SizeEstimator
import
spark.SizeEstimator
import
spark.Utils
import
spark.util.AkkaUtils
import
spark.util.ByteBufferInputStream
import
spark.util.ByteBufferInputStream
class
BlockManagerSuite
extends
FunSuite
with
BeforeAndAfter
with
PrivateMethodTester
{
class
BlockManagerSuite
extends
FunSuite
with
BeforeAndAfter
with
PrivateMethodTester
{
...
@@ -31,7 +33,12 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT
...
@@ -31,7 +33,12 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT
val
serializer
=
new
KryoSerializer
val
serializer
=
new
KryoSerializer
before
{
before
{
actorSystem
=
ActorSystem
(
"test"
)
val
hostname
=
Utils
.
localHostName
val
(
actorSystem
,
boundPort
)
=
AkkaUtils
.
createActorSystem
(
"test"
,
hostname
,
0
)
this
.
actorSystem
=
actorSystem
System
.
setProperty
(
"spark.driver.port"
,
boundPort
.
toString
)
System
.
setProperty
(
"spark.hostPort"
,
hostname
+
":"
+
boundPort
)
master
=
new
BlockManagerMaster
(
master
=
new
BlockManagerMaster
(
actorSystem
.
actorOf
(
Props
(
new
spark
.
storage
.
BlockManagerMasterActor
(
true
))))
actorSystem
.
actorOf
(
Props
(
new
spark
.
storage
.
BlockManagerMasterActor
(
true
))))
...
@@ -44,6 +51,9 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT
...
@@ -44,6 +51,9 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT
}
}
after
{
after
{
System
.
clearProperty
(
"spark.driver.port"
)
System
.
clearProperty
(
"spark.hostPort"
)
if
(
store
!=
null
)
{
if
(
store
!=
null
)
{
store
.
stop
()
store
.
stop
()
store
=
null
store
=
null
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment