Github user tdas commented on a diff in the pull request: https://github.com/apache/spark/pull/3947#discussion_r22707523 --- Diff: examples/src/main/scala/org/apache/spark/examples/streaming/MQTTWordCount.scala --- @@ -42,25 +41,34 @@ object MQTTPublisher { StreamingExamples.setStreamingLogLevels() val Seq(brokerUrl, topic) = args.toSeq + val tempDir = Utils.createTempDir() + + var client: MqttClient = null try { - var peristance:MqttClientPersistence =new MqttDefaultFilePersistence("/tmp") + val peristance:MqttClientPersistence = new MqttDefaultFilePersistence(tempDir.getAbsolutePath) client = new MqttClient(brokerUrl, MqttClient.generateClientId(), peristance) - } catch { - case e: MqttException => println("Exception Caught: " + e) - } - client.connect() + client.connect() + + val msgtopic: MqttTopic = client.getTopic(topic) --- End diff -- Same comment as above. `val msgTopic = client.getTopic(topic)`
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org