You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@livy.apache.org by lr...@apache.org on 2017/07/20 01:37:08 UTC

[22/50] [abbrv] incubator-livy-website git commit: [MINOR] Update Scaladoc in MQTTWordCount example

[MINOR] Update Scaladoc in MQTTWordCount example

to match the more descriptive text from the Python example

Closes #35


Project: http://git-wip-us.apache.org/repos/asf/incubator-livy-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-livy-website/commit/695ca982
Tree: http://git-wip-us.apache.org/repos/asf/incubator-livy-website/tree/695ca982
Diff: http://git-wip-us.apache.org/repos/asf/incubator-livy-website/diff/695ca982

Branch: refs/heads/master
Commit: 695ca982d2bb8606d7b40bbba11f3fe94ab5899e
Parents: cf0d740
Author: Prabeesh <pr...@gmail.com>
Authored: Fri Feb 3 02:21:32 2017 -0800
Committer: Christian Kadner <ck...@us.ibm.com>
Committed: Fri Feb 3 02:21:32 2017 -0800

----------------------------------------------------------------------
 .../examples/streaming/mqtt/MQTTWordCount.scala | 31 +++++++++++++-------
 1 file changed, 21 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-livy-website/blob/695ca982/streaming-mqtt/examples/src/main/scala/org/apache/spark/examples/streaming/mqtt/MQTTWordCount.scala
----------------------------------------------------------------------
diff --git a/streaming-mqtt/examples/src/main/scala/org/apache/spark/examples/streaming/mqtt/MQTTWordCount.scala b/streaming-mqtt/examples/src/main/scala/org/apache/spark/examples/streaming/mqtt/MQTTWordCount.scala
index e09e75e..bc41ffa 100644
--- a/streaming-mqtt/examples/src/main/scala/org/apache/spark/examples/streaming/mqtt/MQTTWordCount.scala
+++ b/streaming-mqtt/examples/src/main/scala/org/apache/spark/examples/streaming/mqtt/MQTTWordCount.scala
@@ -79,24 +79,35 @@ object MQTTPublisher {
 }
 
 /**
- * A sample wordcount with MqttStream stream
+ * A sample wordcount with MQTTInputDStream
  *
- * To work with Mqtt, Mqtt Message broker/server required.
- * Mosquitto (http://mosquitto.org/) is an open source Mqtt Broker
- * In ubuntu mosquitto can be installed using the command  `$ sudo apt-get install mosquitto`
- * Eclipse paho project provides Java library for Mqtt Client http://www.eclipse.org/paho/
- * Example Java code for Mqtt Publisher and Subscriber can be found here
- * https://bitbucket.org/mkjinesh/mqttclient
  * Usage: MQTTWordCount <MqttbrokerUrl> <topic>
- *   <MqttbrokerUrl> and <topic> describe where Mqtt publisher is running.
  *
- * To run this example locally, you may run publisher as
+ * To run this example on your local machine, you first need to setup a MQTT broker and publisher,
+ * like Mosquitto (http://mosquitto.org/) an easy to use and install open source MQTT Broker.
+ * On Mac OS, Mosquitto can be installed with Homebrew `$ brew install mosquitto`.
+ * On Ubuntu, Mosquitto can be installed with the command `$ sudo apt-get install mosquitto`.
+ *
+ * Alternatively, checkout the Eclipse paho project which provides a number of clients and utilities
+ * for working with MQTT (http://www.eclipse.org/paho/#getting-started).
+ *
+ * How to run this example locally:
+ *
+ * (1) Start a MQTT message broker/server, i.e. Mosquitto:
+ *
+ *    `$ mosquitto -p 1883`
+ *
+ * (2) Run the publisher:
+ *
  *    `$ bin/run-example \
  *      org.apache.spark.examples.streaming.mqtt.MQTTPublisher tcp://localhost:1883 foo`
- * and run the example as
+ *
+ * (3) Run the example:
+ *
  *    `$ bin/run-example \
  *      org.apache.spark.examples.streaming.mqtt.MQTTWordCount tcp://localhost:1883 foo`
  */
+
 object MQTTWordCount {
 
   def main(args: Array[String]) {