-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-3054][STREAMING] Add unit tests for Spark Sink. #1958
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
This patch adds unit tests for Spark Sink. It also removes the private[flume] for Spark Sink, since the sink is instantiated from Flume configuration (looks like this is ignored by reflection which is used by Flume, but we should still remove it anyway).
QA tests have started for PR 1958. This patch merges cleanly. |
QA results for PR 1958: |
|
||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more |
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.
Hey Hari, ASF header should be at the top of file :).
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.
Thanks! Done.
QA tests have started for PR 1958 at commit
|
Jenkins, test this please |
QA tests have started for PR 1958 at commit
|
QA tests have finished for PR 1958 at commit
|
Failure is unrelated: Failures are in the SparkSubmitSuite: |
QA tests have started for PR 1958 at commit
|
QA tests have finished for PR 1958 at commit
|
Same failures as before - not caused by this patch |
Jenkins, test this please |
QA tests have started for PR 1958 at commit
|
QA tests have finished for PR 1958 at commit
|
@@ -53,7 +53,6 @@ import org.apache.flume.sink.AbstractSink | |||
* | |||
*/ | |||
|
|||
private[flume] |
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.
Why was this removed? We dont want to expose this as a public class as this class will then appear in the Scala docs.
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.
Since this class would be called from Flume. Flume will create an instance of this class to run the sink - so theoretically it should not be private to this package.
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.
In that case, can you add a line right at the top that this class is not intended to be used inside Spark application. Just in case it appears in the scala docs / java docs. I will try to see how to eliminate this module from appearing in the docs.
QA tests have started for PR 1958 at commit
|
QA tests have finished for PR 1958 at commit
|
unit test is failing. |
transAndClient.foreach(x => x._1.close()) | ||
} | ||
|
||
def initializeChannelAndSink(overrides: Option[Map[String, String]]): (MemoryChannel, |
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.
nit: This is a little weird. Option is not necessary (add None and Some unnecessarily increases verbosity), as it can simply be def initializeChannelAndSink(overrides: Map[String, String] = Map.empty)
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.
Also, add private
to keep it consistent to other methods.
Looks like the tests have passed. |
Right, good. But I want to run it another couple of times to test its flakiness. |
QA tests have finished for PR 1958 at commit
|
Jenkins, test this. |
Jenkins, test this please |
1 similar comment
Jenkins, test this please |
QA tests have started for PR 1958 at commit
|
QA tests have finished for PR 1958 at commit
|
Could not find Apache license headers in the following files: No idea what is happening here. |
Jenkins, test this please. |
QA tests have started for PR 1958 at commit
|
QA tests have finished for PR 1958 at commit
|
Jenkins, test this please. |
QA tests have started for PR 1958 at commit
|
QA tests have finished for PR 1958 at commit
|
Alright, I am merging this. |
This patch adds unit tests for Spark Sink. It also removes the private[flume] for Spark Sink, since the sink is instantiated from Flume configuration (looks like this is ignored by reflection which is used by Flume, but we should still remove it anyway). Author: Hari Shreedharan <hshreedharan@apache.org> Author: Hari Shreedharan <hshreedharan@cloudera.com> Closes #1958 from harishreedharan/spark-sink-test and squashes the following commits: e3110b9 [Hari Shreedharan] Add a sleep to allow sink to commit the transactions 120b81e [Hari Shreedharan] Fix complexity in threading model in test 4df5be6 [Hari Shreedharan] Merge remote-tracking branch 'asf/master' into spark-sink-test c9190d1 [Hari Shreedharan] Indentation and spaces changes 7fedc5a [Hari Shreedharan] Merge remote-tracking branch 'asf/master' into spark-sink-test abc20cb [Hari Shreedharan] Minor test changes 7b9b649 [Hari Shreedharan] Merge branch 'master' into spark-sink-test f2c56c9 [Hari Shreedharan] Update SparkSinkSuite.scala a24aac8 [Hari Shreedharan] Remove unused var c86d615 [Hari Shreedharan] [SPARK-3054][STREAMING] Add unit tests for Spark Sink. (cherry picked from commit 8c5a222) Signed-off-by: Tathagata Das <tathagata.das1565@gmail.com>
@tdas @harishreedharan This is causing yarn builds to fail on branch-1.1. I think you are missing commit: 95470a0#diff-74323d4d6986ea21770bf3f49c091e5b /external/flume-sink/src/test/scala/org/apache/spark/streaming/flume/sink/SparkSinkSuite.scala:66: value getPort is not a member of org.apache.spark.streaming.flume.sink.SparkSink |
Correct. This patch uses a method which was introduced in that one. |
I see @pwendell temporarily removed the test: 1d5e84a#diff-d41d8cd98f00b204e9800998ecf8427e @tdas @harishreedharan can the other commit go in or can you please file jira to followup. |
I believe the commit which added the |
I have backported this to branch-1.1. However @pwendell still found some TD On Thu, Aug 21, 2014 at 10:37 AM, Hari Shreedharan <notifications@github.com
|
This patch adds unit tests for Spark Sink. It also removes the private[flume] for Spark Sink, since the sink is instantiated from Flume configuration (looks like this is ignored by reflection which is used by Flume, but we should still remove it anyway). Author: Hari Shreedharan <hshreedharan@apache.org> Author: Hari Shreedharan <hshreedharan@cloudera.com> Closes apache#1958 from harishreedharan/spark-sink-test and squashes the following commits: e3110b9 [Hari Shreedharan] Add a sleep to allow sink to commit the transactions 120b81e [Hari Shreedharan] Fix complexity in threading model in test 4df5be6 [Hari Shreedharan] Merge remote-tracking branch 'asf/master' into spark-sink-test c9190d1 [Hari Shreedharan] Indentation and spaces changes 7fedc5a [Hari Shreedharan] Merge remote-tracking branch 'asf/master' into spark-sink-test abc20cb [Hari Shreedharan] Minor test changes 7b9b649 [Hari Shreedharan] Merge branch 'master' into spark-sink-test f2c56c9 [Hari Shreedharan] Update SparkSinkSuite.scala a24aac8 [Hari Shreedharan] Remove unused var c86d615 [Hari Shreedharan] [SPARK-3054][STREAMING] Add unit tests for Spark Sink.
* rdar://127304026 Update UC-Spark-Authz Plugin to 0.2.1 * rdar://127304026 Update UC-Spark-Authz Plugin to 0.2.2
This patch adds unit tests for Spark Sink.
It also removes the private[flume] for Spark Sink,
since the sink is instantiated from Flume configuration (looks like this is ignored by reflection which is used by
Flume, but we should still remove it anyway).