diff options
author | Henry Saputra <hsaputra@apache.org> | 2014-02-02 21:51:17 -0800 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-02-02 21:51:17 -0800 |
commit | 0386f42e383dc01b8df33c4a70b024e7902b5fdd (patch) | |
tree | f5f2152d661ca67dacb81788236548219264d3bb /external/zeromq/src/main/scala | |
parent | a8cf3ec157fc9a512421b319cfffc5e4f07cf1f3 (diff) | |
download | spark-0386f42e383dc01b8df33c4a70b024e7902b5fdd.tar.gz spark-0386f42e383dc01b8df33c4a70b024e7902b5fdd.tar.bz2 spark-0386f42e383dc01b8df33c4a70b024e7902b5fdd.zip |
Merge pull request #529 from hsaputra/cleanup_right_arrowop_scala
Change the ⇒ character (maybe from scalariform) to => in Scala code for style consistency
Looks like there are some ⇒ Unicode character (maybe from scalariform) in Scala code.
This PR is to change it to => to get some consistency on the Scala code.
If we want to use ⇒ as default we could use sbt plugin scalariform to make sure all Scala code has ⇒ instead of =>
And remove unused imports found in TwitterInputDStream.scala while I was there =)
Author: Henry Saputra <hsaputra@apache.org>
== Merge branch commits ==
commit 29c1771d346dff901b0b778f764e6b4409900234
Author: Henry Saputra <hsaputra@apache.org>
Date: Sat Feb 1 22:05:16 2014 -0800
Change the ⇒ character (maybe from scalariform) to => in Scala code for style consistency.
Diffstat (limited to 'external/zeromq/src/main/scala')
-rw-r--r-- | external/zeromq/src/main/scala/org/apache/spark/streaming/zeromq/ZeroMQReceiver.scala | 8 | ||||
-rw-r--r-- | external/zeromq/src/main/scala/org/apache/spark/streaming/zeromq/ZeroMQUtils.scala | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/external/zeromq/src/main/scala/org/apache/spark/streaming/zeromq/ZeroMQReceiver.scala b/external/zeromq/src/main/scala/org/apache/spark/streaming/zeromq/ZeroMQReceiver.scala index 769761e3b8..960c6a389e 100644 --- a/external/zeromq/src/main/scala/org/apache/spark/streaming/zeromq/ZeroMQReceiver.scala +++ b/external/zeromq/src/main/scala/org/apache/spark/streaming/zeromq/ZeroMQReceiver.scala @@ -31,7 +31,7 @@ import org.apache.spark.streaming.receivers._ */ private[streaming] class ZeroMQReceiver[T: ClassTag](publisherUrl: String, subscribe: Subscribe, - bytesToObjects: Seq[ByteString] ⇒ Iterator[T]) + bytesToObjects: Seq[ByteString] => Iterator[T]) extends Actor with Receiver with Logging { override def preStart() = ZeroMQExtension(context.system).newSocket(SocketType.Sub, Listener(self), @@ -39,16 +39,16 @@ private[streaming] class ZeroMQReceiver[T: ClassTag](publisherUrl: String, def receive: Receive = { - case Connecting ⇒ logInfo("connecting ...") + case Connecting => logInfo("connecting ...") - case m: ZMQMessage ⇒ + case m: ZMQMessage => logDebug("Received message for:" + m.frame(0)) //We ignore first frame for processing as it is the topic val bytes = m.frames.tail pushBlock(bytesToObjects(bytes)) - case Closed ⇒ logInfo("received closed ") + case Closed => logInfo("received closed ") } } diff --git a/external/zeromq/src/main/scala/org/apache/spark/streaming/zeromq/ZeroMQUtils.scala b/external/zeromq/src/main/scala/org/apache/spark/streaming/zeromq/ZeroMQUtils.scala index 7a14b3d2bf..b47d786986 100644 --- a/external/zeromq/src/main/scala/org/apache/spark/streaming/zeromq/ZeroMQUtils.scala +++ b/external/zeromq/src/main/scala/org/apache/spark/streaming/zeromq/ZeroMQUtils.scala @@ -46,7 +46,7 @@ object ZeroMQUtils { ssc: StreamingContext, publisherUrl: String, subscribe: Subscribe, - bytesToObjects: Seq[ByteString] ⇒ Iterator[T], + bytesToObjects: Seq[ByteString] => Iterator[T], storageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK_SER_2, supervisorStrategy: SupervisorStrategy = ReceiverSupervisorStrategy.defaultStrategy ): DStream[T] = { |