You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by an...@apache.org on 2015/01/09 23:45:31 UTC
spark git commit: [Minor] Fix import order and other coding style
Repository: spark
Updated Branches:
refs/heads/master ae628725a -> 4e1f12d99
[Minor] Fix import order and other coding style
fixed import order and other coding style
Author: bilna <bi...@am.amrita.edu>
Author: Bilna P <bi...@gmail.com>
Closes #3966 from Bilna/master and squashes the following commits:
5e76f04 [bilna] fix import order and other coding style
5718d66 [bilna] Merge remote-tracking branch 'upstream/master'
ae56514 [bilna] Merge remote-tracking branch 'upstream/master'
acea3a3 [bilna] Adding dependency with scope test
28681fa [bilna] Merge remote-tracking branch 'upstream/master'
fac3904 [bilna] Correction in Indentation and coding style
ed9db4c [bilna] Merge remote-tracking branch 'upstream/master'
4b34ee7 [Bilna P] Update MQTTStreamSuite.scala
04503cf [bilna] Added embedded broker service for mqtt test
89d804e [bilna] Merge remote-tracking branch 'upstream/master'
fc8eb28 [bilna] Merge remote-tracking branch 'upstream/master'
4b58094 [Bilna P] Update MQTTStreamSuite.scala
b1ac4ad [bilna] Added BeforeAndAfter
5f6bfd2 [bilna] Added BeforeAndAfter
e8b6623 [Bilna P] Update MQTTStreamSuite.scala
5ca6691 [Bilna P] Update MQTTStreamSuite.scala
8616495 [bilna] [SPARK-4631] unit test for MQTT
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4e1f12d9
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4e1f12d9
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4e1f12d9
Branch: refs/heads/master
Commit: 4e1f12d997426560226648d62ee17c90352613e7
Parents: ae62872
Author: bilna <bi...@am.amrita.edu>
Authored: Fri Jan 9 14:45:28 2015 -0800
Committer: Andrew Or <an...@databricks.com>
Committed: Fri Jan 9 14:45:28 2015 -0800
----------------------------------------------------------------------
.../spark/streaming/mqtt/MQTTStreamSuite.scala | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/4e1f12d9/external/mqtt/src/test/scala/org/apache/spark/streaming/mqtt/MQTTStreamSuite.scala
----------------------------------------------------------------------
diff --git a/external/mqtt/src/test/scala/org/apache/spark/streaming/mqtt/MQTTStreamSuite.scala b/external/mqtt/src/test/scala/org/apache/spark/streaming/mqtt/MQTTStreamSuite.scala
index 98fe6cb..39eb8b1 100644
--- a/external/mqtt/src/test/scala/org/apache/spark/streaming/mqtt/MQTTStreamSuite.scala
+++ b/external/mqtt/src/test/scala/org/apache/spark/streaming/mqtt/MQTTStreamSuite.scala
@@ -19,16 +19,19 @@ package org.apache.spark.streaming.mqtt
import java.net.{URI, ServerSocket}
+import scala.concurrent.duration._
+
import org.apache.activemq.broker.{TransportConnector, BrokerService}
-import org.apache.spark.util.Utils
+import org.eclipse.paho.client.mqttv3._
+import org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence
+
import org.scalatest.{BeforeAndAfter, FunSuite}
import org.scalatest.concurrent.Eventually
-import scala.concurrent.duration._
+
import org.apache.spark.streaming.{Milliseconds, StreamingContext}
import org.apache.spark.storage.StorageLevel
import org.apache.spark.streaming.dstream.ReceiverInputDStream
-import org.eclipse.paho.client.mqttv3._
-import org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence
+import org.apache.spark.util.Utils
class MQTTStreamSuite extends FunSuite with Eventually with BeforeAndAfter {
@@ -38,8 +41,9 @@ class MQTTStreamSuite extends FunSuite with Eventually with BeforeAndAfter {
private val freePort = findFreePort()
private val brokerUri = "//localhost:" + freePort
private val topic = "def"
- private var ssc: StreamingContext = _
private val persistenceDir = Utils.createTempDir()
+
+ private var ssc: StreamingContext = _
private var broker: BrokerService = _
private var connector: TransportConnector = _
@@ -115,8 +119,9 @@ class MQTTStreamSuite extends FunSuite with Eventually with BeforeAndAfter {
val message: MqttMessage = new MqttMessage(data.getBytes("utf-8"))
message.setQos(1)
message.setRetained(true)
- for (i <- 0 to 100)
+ for (i <- 0 to 100) {
msgTopic.publish(message)
+ }
}
} finally {
client.disconnect()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org