Skip to content

Commit

Permalink
[SPARK-4964] leave KafkaStreamSuite host and port as private
Browse files Browse the repository at this point in the history
  • Loading branch information
koeninger committed Feb 10, 2015
1 parent 5173f3f commit f81e016
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ final class Broker private(
val host: String,
/** Broker's port */
val port: Int) extends Serializable {

override def equals(obj: Any): Boolean = obj match {
case that: Broker =>
this.host == that.host &&
Expand All @@ -45,7 +44,6 @@ final class Broker private(
override def toString(): String = {
s"Broker($host, $port)"
}

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ public void testKafkaRDD() throws InterruptedException {

HashMap<TopicAndPartition, Broker> emptyLeaders = new HashMap();
HashMap<TopicAndPartition, Broker> leaders = new HashMap();
Broker broker = Broker.create(suiteBase.brokerHost(), suiteBase.brokerPort());
String[] hostAndPort = suiteBase.brokerAddress().split(":");
Broker broker = Broker.create(hostAndPort[0], Integer.parseInt(hostAndPort[1]));
leaders.put(new TopicAndPartition(topic1, 0), broker);
leaders.put(new TopicAndPartition(topic2, 0), broker);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ abstract class KafkaStreamSuiteBase extends FunSuite with Eventually with Loggin
private val zkConnectionTimeout = 6000
private val zkSessionTimeout = 6000
private var zookeeper: EmbeddedZookeeper = _
protected val brokerHost = "localhost"
protected var brokerPort = 9092
private val brokerHost = "localhost"
private var brokerPort = 9092
private var brokerConf: KafkaConfig = _
private var server: KafkaServer = _
private var producer: Producer[String, String] = _
Expand Down

0 comments on commit f81e016

Please sign in to comment.