Skip to content
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

[SPARK-4964] [Streaming] refactor createRDD to take leaders via map instead of array #4511

Closed
wants to merge 5 commits into from

Conversation

koeninger
Copy link
Contributor

No description provided.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@srowen
Copy link
Member

srowen commented Feb 10, 2015

OK to test

override def toString(): String = {
s"Broker($host, $port)"
}

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: extra space

@tdas
Copy link
Contributor

tdas commented Feb 10, 2015

I was surprised to see that the KafkaRDDSuite was not modified, then i realized that the KafkaRDDSuite doesnot use the public API to create RDDs. Can you please update KafkaRDDSuite to do that, so that the public APIs get tested?

@@ -40,43 +41,70 @@ class KafkaRDDSuite extends KafkaStreamSuiteBase with BeforeAndAfter {
tearDownKafka()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make both tests reuse the kafka? All you need to do is setup and tear down Kafka in beforeAll and afterAll, respectively. This is for speed, setting up kafka takes painfully long time increasing test times.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, but I think there are two bigger things that could be done here

  1. Change the thread sleep in setupKafka to polling using eventually
  2. Change this group of tests to use nested suites, so kafka / zk setup is only done once

Copy link
Contributor

Choose a reason for hiding this comment

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

True. But, ....

1 is a riskier change, that should be done later (not for this release), dont want to introduce flakiness
2. is a greater refactoring, that is definitely not worth doing now. I am not sure though nested testsuites are a good idea or not. Stickign all the Kafka tests in a single testsuite is something that we can consider, there are pros and cons.

For now at least we should reuse the kafka harness within the same testsuite. I did that for the other Kafka testsuites. The bigger question we can address in separate PRs meant for next release cycle.

@tdas
Copy link
Contributor

tdas commented Feb 11, 2015

Generally look pretty good. Just one major comment about reuseing the kafka harness across tests. Other than that, minor nits. Will merge once these are done and tests pass.

@tdas
Copy link
Contributor

tdas commented Feb 11, 2015

ok to test.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/27251/
Test FAILed.

@tdas
Copy link
Contributor

tdas commented Feb 11, 2015

test this.

@SparkQA
Copy link

SparkQA commented Feb 11, 2015

Test build #597 has started for PR 4511 at commit 6f8680b.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Feb 11, 2015

Test build #27269 has started for PR 4511 at commit f7151d4.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Feb 11, 2015

Test build #597 has finished for PR 4511 at commit 6f8680b.

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

@SparkQA
Copy link

SparkQA commented Feb 11, 2015

Test build #27269 has finished for PR 4511 at commit f7151d4.

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

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/27269/
Test PASSed.

@asfgit asfgit closed this in 658687b Feb 11, 2015
asfgit pushed a commit that referenced this pull request Feb 11, 2015
…nstead of array

Author: cody koeninger <[email protected]>

Closes #4511 from koeninger/kafkaRdd-leader-to-broker and squashes the following commits:

f7151d4 [cody koeninger] [SPARK-4964] test refactoring
6f8680b [cody koeninger] [SPARK-4964] add test of the scala api for KafkaUtils.createRDD
f81e016 [cody koeninger] [SPARK-4964] leave KafkaStreamSuite host and port as private
5173f3f [cody koeninger] [SPARK-4964] test the Java variations of createRDD
e9cece4 [cody koeninger] [SPARK-4964] pass leaders as a map to ensure 1 leader per TopicPartition

(cherry picked from commit 658687b)
Signed-off-by: Tathagata Das <[email protected]>
@tdas
Copy link
Contributor

tdas commented Feb 11, 2015

Thanks @koeninger I have merged this!

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.

5 participants