Skip to content

Commit 0bb3307

Browse files
committed
Removing mentions in tests
1 parent 0d4886c commit 0bb3307

File tree

12 files changed

+2
-18
lines changed

12 files changed

+2
-18
lines changed

bagel/src/test/scala/org/apache/spark/bagel/BagelSuite.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class BagelSuite extends FunSuite with Assertions with BeforeAndAfter with Timeo
3838
}
3939
// To avoid Akka rebinding to the same port, since it doesn't unbind immediately on shutdown
4040
System.clearProperty("spark.driver.port")
41-
System.clearProperty("spark.hostPort")
4241
}
4342

4443
test("halting by voting") {

core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ private[spark] object CoarseGrainedExecutorBackend {
103103
indestructible = true, conf = new SparkConf)
104104
// set it
105105
val sparkHostPort = hostname + ":" + boundPort
106-
// conf.set("spark.hostPort", sparkHostPort)
107106
actorSystem.actorOf(
108107
Props(classOf[CoarseGrainedExecutorBackend], driverUrl, executorId, sparkHostPort, cores),
109108
name = "Executor")

core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class CoarseGrainedSchedulerBackend(scheduler: TaskSchedulerImpl, actorSystem: A
165165
override def start() {
166166
val properties = new ArrayBuffer[(String, String)]
167167
for ((key, value) <- scheduler.sc.conf.getAll) {
168-
if (key.startsWith("spark.") && !key.equals("spark.hostPort")) {
168+
if (key.startsWith("spark.")) {
169169
properties += ((key, value))
170170
}
171171
}

core/src/test/scala/org/apache/spark/LocalSparkContext.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ object LocalSparkContext {
5353
}
5454
// To avoid Akka rebinding to the same port, since it doesn't unbind immediately on shutdown
5555
System.clearProperty("spark.driver.port")
56-
System.clearProperty("spark.hostPort")
5756
}
5857

5958
/** Runs `f` by passing in `sc` and ensures that `sc` is stopped. */

core/src/test/scala/org/apache/spark/MapOutputTrackerSuite.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ class MapOutputTrackerSuite extends FunSuite with LocalSparkContext {
9999
val hostname = "localhost"
100100
val (actorSystem, boundPort) = AkkaUtils.createActorSystem("spark", hostname, 0, conf = conf)
101101
System.setProperty("spark.driver.port", boundPort.toString) // Will be cleared by LocalSparkContext
102-
System.setProperty("spark.hostPort", hostname + ":" + boundPort)
103102

104103
val masterTracker = new MapOutputTrackerMaster(conf)
105104
masterTracker.trackerActor = actorSystem.actorOf(

core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT
5353
val (actorSystem, boundPort) = AkkaUtils.createActorSystem("test", "localhost", 0, conf = conf)
5454
this.actorSystem = actorSystem
5555
conf.set("spark.driver.port", boundPort.toString)
56-
conf.set("spark.hostPort", "localhost:" + boundPort)
5756

5857
master = new BlockManagerMaster(
5958
actorSystem.actorOf(Props(new BlockManagerMasterActor(true, conf))), conf)
@@ -65,13 +64,10 @@ class BlockManagerSuite extends FunSuite with BeforeAndAfter with PrivateMethodT
6564
conf.set("spark.storage.disableBlockManagerHeartBeat", "true")
6665
val initialize = PrivateMethod[Unit]('initialize)
6766
SizeEstimator invokePrivate initialize()
68-
// Set some value ...
69-
conf.set("spark.hostPort", Utils.localHostName() + ":" + 1111)
7067
}
7168

7269
after {
7370
System.clearProperty("spark.driver.port")
74-
System.clearProperty("spark.hostPort")
7571

7672
if (store != null) {
7773
store.stop()

repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class ReplSuite extends FunSuite {
3535
}
3636
// To avoid Akka rebinding to the same port, since it doesn't unbind immediately on shutdown
3737
System.clearProperty("spark.driver.port")
38-
System.clearProperty("spark.hostPort")
3938
return out.toString
4039
}
4140

@@ -75,7 +74,6 @@ class ReplSuite extends FunSuite {
7574

7675
interp.sparkContext.stop()
7776
System.clearProperty("spark.driver.port")
78-
System.clearProperty("spark.hostPort")
7977
}
8078

8179
test("simple foreach with accumulator") {

streaming/src/main/scala/org/apache/spark/streaming/Checkpoint.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Checkpoint(@transient ssc: StreamingContext, val checkpointTime: Time)
4646

4747
// These should be unset when a checkpoint is deserialized,
4848
// otherwise the SparkContext won't initialize correctly.
49-
sparkConf.remove("spark.hostPort").remove("spark.driver.host").remove("spark.driver.port")
49+
sparkConf.remove("spark.driver.host").remove("spark.driver.port")
5050

5151
def validate() {
5252
assert(master != null, "Checkpoint.master is null")

streaming/src/main/scala/org/apache/spark/streaming/util/MasterFailureTest.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ object MasterFailureTest extends Logging {
186186

187187
// Setup the streaming computation with the given operation
188188
System.clearProperty("spark.driver.port")
189-
System.clearProperty("spark.hostPort")
190189
val ssc = new StreamingContext("local[4]", "MasterFailureTest", batchDuration, null, Nil, Map())
191190
ssc.checkpoint(checkpointDir.toString)
192191
val inputStream = ssc.textFileStream(testDir.toString)
@@ -233,7 +232,6 @@ object MasterFailureTest extends Logging {
233232
// (iii) Its not timed out yet
234233
System.clearProperty("spark.streaming.clock")
235234
System.clearProperty("spark.driver.port")
236-
System.clearProperty("spark.hostPort")
237235
ssc.start()
238236
val startTime = System.currentTimeMillis()
239237
while (!killed && !isLastOutputGenerated && !isTimedOut) {

streaming/src/test/java/org/apache/spark/streaming/LocalJavaStreamingContext.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public abstract class LocalJavaStreamingContext {
2828
@Before
2929
public void setUp() {
3030
System.clearProperty("spark.driver.port");
31-
System.clearProperty("spark.hostPort");
3231
System.setProperty("spark.streaming.clock", "org.apache.spark.streaming.util.ManualClock");
3332
ssc = new JavaStreamingContext("local[2]", "test", new Duration(1000));
3433
ssc.checkpoint("checkpoint");
@@ -41,6 +40,5 @@ public void tearDown() {
4140

4241
// To avoid Akka rebinding to the same port, since it doesn't unbind immediately on shutdown
4342
System.clearProperty("spark.driver.port");
44-
System.clearProperty("spark.hostPort");
4543
}
4644
}

0 commit comments

Comments
 (0)