You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2014/01/11 08:25:27 UTC

[1/2] git commit: Change clientId to random clientId

Updated Branches:
  refs/heads/master 0b5ce7af1 -> 92ad18b00


Change clientId to random clientId 

Returns a randomly generated client identifier based on the current user's login name and the system time.

Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/645f5e83
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/645f5e83
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/645f5e83

Branch: refs/heads/master
Commit: 645f5e83ee38a329332850bf44ea67b0711a705c
Parents: 4b074fa
Author: Prabeesh K <pr...@gmail.com>
Authored: Fri Jan 10 09:33:31 2014 +0530
Committer: Prabeesh K <pr...@gmail.com>
Committed: Fri Jan 10 09:33:31 2014 +0530

----------------------------------------------------------------------
 .../scala/org/apache/spark/streaming/mqtt/MQTTInputDStream.scala   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/645f5e83/external/mqtt/src/main/scala/org/apache/spark/streaming/mqtt/MQTTInputDStream.scala
----------------------------------------------------------------------
diff --git a/external/mqtt/src/main/scala/org/apache/spark/streaming/mqtt/MQTTInputDStream.scala b/external/mqtt/src/main/scala/org/apache/spark/streaming/mqtt/MQTTInputDStream.scala
index c8987a3..41e813d 100644
--- a/external/mqtt/src/main/scala/org/apache/spark/streaming/mqtt/MQTTInputDStream.scala
+++ b/external/mqtt/src/main/scala/org/apache/spark/streaming/mqtt/MQTTInputDStream.scala
@@ -80,7 +80,7 @@ class MQTTReceiver(brokerUrl: String,
     var peristance: MqttClientPersistence = new MemoryPersistence()
 
     // Initializing Mqtt Client specifying brokerUrl, clientID and MqttClientPersistance
-    var client: MqttClient = new MqttClient(brokerUrl, "MQTTSub", peristance)
+    var client: MqttClient = new MqttClient(brokerUrl, MqttClient.generateClientId(), peristance)
 
     // Connect to MqttBroker    
     client.connect()


[2/2] git commit: Merge pull request #376 from prabeesh/master

Posted by rx...@apache.org.
Merge pull request #376 from prabeesh/master

Change clientId to random clientId

The client identifier should be unique across all clients connecting to the same server. A convenience method is provided to generate a random client id that should satisfy this criteria - generateClientId(). Returns a randomly generated client identifier based on the current user's login name and the system time. As the client identifier is used by the server to identify a client when it reconnects, the client must use the same identifier between connections if durable subscriptions are to be used.


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/92ad18b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/92ad18b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/92ad18b0

Branch: refs/heads/master
Commit: 92ad18b00e9c6a667723b93b9d2139248de333b4
Parents: 0b5ce7a 645f5e8
Author: Reynold Xin <rx...@apache.org>
Authored: Fri Jan 10 23:25:15 2014 -0800
Committer: Reynold Xin <rx...@apache.org>
Committed: Fri Jan 10 23:25:15 2014 -0800

----------------------------------------------------------------------
 .../scala/org/apache/spark/streaming/mqtt/MQTTInputDStream.scala   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------