org.apache.spark.streaming.mqtt
Class MQTTUtils
Object
org.apache.spark.streaming.mqtt.MQTTUtils
public class MQTTUtils
- extends Object
Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MQTTUtils
public MQTTUtils()
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 objectbrokerUrl
- Url of remote MQTT publishertopic
- Topic name to subscribe tostorageLevel
- 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 objectbrokerUrl
- Url of remote MQTT publishertopic
- 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 objectbrokerUrl
- Url of remote MQTT publishertopic
- Topic name to subscribe tostorageLevel
- RDD storage level.
- Returns:
- (undocumented)