-
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-5155] [PySpark] [Streaming] Mqtt streaming support in Python #4229
Conversation
Test build #26174 has finished for PR 4229 at commit
|
jlevel = ssc._sc._getJavaStorageLevel(storageLevel) | ||
|
||
def getClassByName(name): | ||
return ssc._jvm.org.apache.spark.util.Utils.classForName(name) |
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.
getClassByName is not used anywhere, please remove it.
Test build #26182 has finished for PR 4229 at commit
|
Test build #26663 has finished for PR 4229 at commit
|
Test build #26665 has finished for PR 4229 at commit
|
baeba95
to
3810c7d
Compare
Test build #26666 has finished for PR 4229 at commit
|
Test build #26668 has finished for PR 4229 at commit
|
Mosquitto (http://mosquitto.org/) is an open source Mqtt Broker | ||
In ubuntu mosquitto can be installed using the command `$ sudo apt-get install mosquitto` | ||
Run Mqtt publisher as | ||
`$ bin/run-example \ |
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.
This should be ran inside of mosquitto, could you mention that?
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.
Can we modify like this ?
Publisher publishes data to mosquitto broker set in local host. Run Mqtt publisher as
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.
bin/run-example is also inside spark, I misunderstood that, sorry.
never-mind.
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.
Ya it is actually running the Scala publisher inside the Scala streaming word count example
Test build #26857 has finished for PR 4229 at commit
|
@tdas please review this |
Will do as soon as I get some Spark 1.3 release stuff out of the way. On Fri, Feb 20, 2015 at 10:02 AM, Prabeesh K notifications@github.com
|
Test build #29304 has finished for PR 4229 at commit
|
Test build #29366 has finished for PR 4229 at commit
|
Test build #30666 has finished for PR 4229 at commit
|
Test build #30752 has finished for PR 4229 at commit
|
@tdas please take a look |
`$ bin/run-example \ | ||
org.apache.spark.examples.streaming.MQTTPublisher tcp://localhost:1883 foo` | ||
and then run the example as | ||
`$ bin/spark-submit --driver-class-path external/mqtt-assembly/target/scala-*/\ |
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.
Could you change --driver-class-path
to --jars
? It may mislead the user. MQTT libraries should be put both in the driver and executors. Using --driver-class-path
only works in the local mode.
In ubuntu mosquitto can be installed using the command `$ sudo apt-get install mosquitto` | ||
Run Mqtt publisher as | ||
`$ bin/run-example \ | ||
org.apache.spark.examples.streaming.MQTTPublisher tcp://localhost:1883 foo` |
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.
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 that's fine. We can also add something to highlight this MQTTPublisher
is only for demo / example.
Test build #38462 has finished for PR 4229 at commit
|
retest this please |
Test build #109 has finished for PR 4229 at commit
|
Test build #38474 has finished for PR 4229 at commit
|
retest this please |
Test build #116 has finished for PR 4229 at commit
|
Test build #38554 has finished for PR 4229 at commit
|
Test build #39036 has finished for PR 4229 at commit
|
Test build #39437 has finished for PR 4229 at commit
|
@tdas please have a look. |
welcome @zsxwing thanks for your great help |
@prabeesh thanks for your contribution again. Actually, you don't need to update this PR. When #7833 is merged by @tdas , he will set the author to you and you will see it in the master and 1.5 branch. (The merge script will automatically choose the one with the most commits of a PR as the major author. ) |
I am not going to update this PR again. Can I close this PR or it automatically closes after #7833 merge ? |
You can close this PR :) |
This PR is based on #4229, thanks prabeesh. Closes #4229 Author: Prabeesh K <prabsmails@gmail.com> Author: zsxwing <zsxwing@gmail.com> Author: prabs <prabsmails@gmail.com> Author: Prabeesh K <prabeesh.k@namshi.com> Closes #7833 from zsxwing/pr4229 and squashes the following commits: 9570bec [zsxwing] Fix the variable name and check null in finally 4a9c79e [zsxwing] Fix pom.xml indentation abf5f18 [zsxwing] Merge branch 'master' into pr4229 935615c [zsxwing] Fix the flaky MQTT tests 47278c5 [zsxwing] Include the project class files 478f844 [zsxwing] Add unpack 5f8a1d4 [zsxwing] Make the maven build generate the test jar for Python MQTT tests 734db99 [zsxwing] Merge branch 'master' into pr4229 126608a [Prabeesh K] address the comments b90b709 [Prabeesh K] Merge pull request #1 from zsxwing/pr4229 d07f454 [zsxwing] Register StreamingListerner before starting StreamingContext; Revert unncessary changes; fix the python unit test a6747cb [Prabeesh K] wait for starting the receiver before publishing data 87fc677 [Prabeesh K] address the comments: 97244ec [zsxwing] Make sbt build the assembly test jar for streaming mqtt 80474d1 [Prabeesh K] fix 1f0cfe9 [Prabeesh K] python style fix e1ee016 [Prabeesh K] scala style fix a5a8f9f [Prabeesh K] added Python test 9767d82 [Prabeesh K] implemented Python-friendly class a11968b [Prabeesh K] fixed python style 795ec27 [Prabeesh K] address comments ee387ae [Prabeesh K] Fix assembly jar location of mqtt-assembly 3f4df12 [Prabeesh K] updated version b34c3c1 [prabs] adress comments 3aa7fff [prabs] Added Python streaming mqtt word count example b7d42ff [prabs] Mqtt streaming support in Python (cherry picked from commit 853809e) Signed-off-by: Tathagata Das <tathagata.das1565@gmail.com>
This PR is based on #4229, thanks prabeesh. Closes #4229 Author: Prabeesh K <prabsmails@gmail.com> Author: zsxwing <zsxwing@gmail.com> Author: prabs <prabsmails@gmail.com> Author: Prabeesh K <prabeesh.k@namshi.com> Closes #7833 from zsxwing/pr4229 and squashes the following commits: 9570bec [zsxwing] Fix the variable name and check null in finally 4a9c79e [zsxwing] Fix pom.xml indentation abf5f18 [zsxwing] Merge branch 'master' into pr4229 935615c [zsxwing] Fix the flaky MQTT tests 47278c5 [zsxwing] Include the project class files 478f844 [zsxwing] Add unpack 5f8a1d4 [zsxwing] Make the maven build generate the test jar for Python MQTT tests 734db99 [zsxwing] Merge branch 'master' into pr4229 126608a [Prabeesh K] address the comments b90b709 [Prabeesh K] Merge pull request #1 from zsxwing/pr4229 d07f454 [zsxwing] Register StreamingListerner before starting StreamingContext; Revert unncessary changes; fix the python unit test a6747cb [Prabeesh K] wait for starting the receiver before publishing data 87fc677 [Prabeesh K] address the comments: 97244ec [zsxwing] Make sbt build the assembly test jar for streaming mqtt 80474d1 [Prabeesh K] fix 1f0cfe9 [Prabeesh K] python style fix e1ee016 [Prabeesh K] scala style fix a5a8f9f [Prabeesh K] added Python test 9767d82 [Prabeesh K] implemented Python-friendly class a11968b [Prabeesh K] fixed python style 795ec27 [Prabeesh K] address comments ee387ae [Prabeesh K] Fix assembly jar location of mqtt-assembly 3f4df12 [Prabeesh K] updated version b34c3c1 [prabs] adress comments 3aa7fff [prabs] Added Python streaming mqtt word count example b7d42ff [prabs] Mqtt streaming support in Python
This PR is based on apache#4229, thanks prabeesh. Closes apache#4229 Author: Prabeesh K <prabsmails@gmail.com> Author: zsxwing <zsxwing@gmail.com> Author: prabs <prabsmails@gmail.com> Author: Prabeesh K <prabeesh.k@namshi.com> Closes apache#7833 from zsxwing/pr4229 and squashes the following commits: 9570bec [zsxwing] Fix the variable name and check null in finally 4a9c79e [zsxwing] Fix pom.xml indentation abf5f18 [zsxwing] Merge branch 'master' into pr4229 935615c [zsxwing] Fix the flaky MQTT tests 47278c5 [zsxwing] Include the project class files 478f844 [zsxwing] Add unpack 5f8a1d4 [zsxwing] Make the maven build generate the test jar for Python MQTT tests 734db99 [zsxwing] Merge branch 'master' into pr4229 126608a [Prabeesh K] address the comments b90b709 [Prabeesh K] Merge pull request #1 from zsxwing/pr4229 d07f454 [zsxwing] Register StreamingListerner before starting StreamingContext; Revert unncessary changes; fix the python unit test a6747cb [Prabeesh K] wait for starting the receiver before publishing data 87fc677 [Prabeesh K] address the comments: 97244ec [zsxwing] Make sbt build the assembly test jar for streaming mqtt 80474d1 [Prabeesh K] fix 1f0cfe9 [Prabeesh K] python style fix e1ee016 [Prabeesh K] scala style fix a5a8f9f [Prabeesh K] added Python test 9767d82 [Prabeesh K] implemented Python-friendly class a11968b [Prabeesh K] fixed python style 795ec27 [Prabeesh K] address comments ee387ae [Prabeesh K] Fix assembly jar location of mqtt-assembly 3f4df12 [Prabeesh K] updated version b34c3c1 [prabs] adress comments 3aa7fff [prabs] Added Python streaming mqtt word count example b7d42ff [prabs] Mqtt streaming support in Python
Python API for MQTT, with a word count example and Python unit test.