org.apache.spark.streaming.mqtt
Class MQTTUtils

Object
  extended by org.apache.spark.streaming.mqtt.MQTTUtils

public class MQTTUtils
extends Object


Constructor Summary
MQTTUtils()
           
 
Method Summary
static JavaReceiverInputDStream<String> createStream(JavaStreamingContext jssc, String brokerUrl, String topic)
          Create an input stream that receives messages pushed by a MQTT publisher.
static JavaReceiverInputDStream<String> createStream(JavaStreamingContext jssc, String brokerUrl, String topic, StorageLevel storageLevel)
          Create an input stream that receives messages pushed by a MQTT publisher.
static ReceiverInputDStream<String> createStream(StreamingContext ssc, String brokerUrl, String topic, StorageLevel storageLevel)
          Create an input stream that receives messages pushed by a MQTT publisher.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MQTTUtils

public MQTTUtils()
Method Detail

createStream

public static ReceiverInputDStream<String> createStream(StreamingContext ssc,
                                                        String brokerUrl,
                                                        String topic,
                                                        StorageLevel storageLevel)
Create an input stream that receives messages pushed by a MQTT publisher.

Parameters:
ssc - StreamingContext object
brokerUrl - Url of remote MQTT publisher
topic - Topic name to subscribe to
storageLevel - RDD storage level. Defaults to StorageLevel.MEMORY_AND_DISK_SER_2.
Returns:
(undocumented)

createStream

public static JavaReceiverInputDStream<String> createStream(JavaStreamingContext jssc,
                                                            String brokerUrl,
                                                            String topic)
Create an input stream that receives messages pushed by a MQTT publisher. Storage level of the data will be the default StorageLevel.MEMORY_AND_DISK_SER_2.

Parameters:
jssc - JavaStreamingContext object
brokerUrl - Url of remote MQTT publisher
topic - Topic name to subscribe to
Returns:
(undocumented)

createStream

public static JavaReceiverInputDStream<String> createStream(JavaStreamingContext jssc,
                                                            String brokerUrl,
                                                            String topic,
                                                            StorageLevel storageLevel)
Create an input stream that receives messages pushed by a MQTT publisher.

Parameters:
jssc - JavaStreamingContext object
brokerUrl - Url of remote MQTT publisher
topic - Topic name to subscribe to
storageLevel - RDD storage level.
Returns:
(undocumented)