Github user tdas commented on a diff in the pull request: https://github.com/apache/spark/pull/3947#discussion_r22707509 --- 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) --- End diff -- Its more scala-like to not have the type in case of a val. So `val peristance = new MqttDefaultFi....` Also, peristance --> persistence !!!!
--- 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