-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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-4608][Streaming] Reorganize StreamingContext implicit to improve API convenience #3464
Conversation
/cc @tdas |
Test build #23864 has started for PR 3464 at commit
|
Could you add a test to test that this actually works without importing StreamignContext._ ? |
Do you mean |
Done. |
@@ -66,7 +66,6 @@ main entry point for all streaming functionality. We create a local StreamingCon | |||
{% highlight scala %} | |||
import org.apache.spark._ | |||
import org.apache.spark.streaming._ | |||
import org.apache.spark.streaming.StreamingContext._ |
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.
Actually, on second thought, lets not remove it from the programming guide. People might see the programmign guide of one version and try it on an older version. I would say, key this, but add a comment not necessary in Spark 1.3+
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.
How about now?
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.
Looks good.
Test build #23871 has started for PR 3464 at commit
|
Test build #23872 has started for PR 3464 at commit
|
Test build #23864 has finished for PR 3464 at commit
|
Test FAILed. |
Some bug in the detecting codes? This PR doesn't add any class. |
Test build #23871 has finished for PR 3464 at commit
|
Test PASSed. |
Test build #23872 has finished for PR 3464 at commit
|
Test PASSed. |
Conflicts: streaming/src/main/scala/org/apache/spark/streaming/dstream/PairDStreamFunctions.scala streaming/src/test/scala/org/apache/spark/streaming/CheckpointSuite.scala
Test build #23887 has started for PR 3464 at commit
|
Test build #23887 has finished for PR 3464 at commit
|
Test PASSed. |
ping @tdas |
1 similar comment
ping @tdas |
def mockDStream[T]: org.apache.spark.streaming.dstream.DStream[T] = null | ||
|
||
def testToPairDStreamFunctions(): Unit = { | ||
val rdd: org.apache.spark.streaming.dstream.DStream[(Int, Int)] = mockDStream |
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.
I think this a copy-paste error ;) should be named dstream
instead of rdd
.
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.
Good catch. Done.
LGTM, except one comment. |
Test build #24826 has started for PR 3464 at commit
|
Test build #24826 has finished for PR 3464 at commit
|
Test PASSed. |
Merging this. Thanks @zsxwing! |
There is only one implicit function
toPairDStreamFunctions
inStreamingContext
. This PR did similar reorganization like SPARK-4397.Compiled the following codes with Spark Streaming 1.1.0 and ran it with this PR. Everything is fine.