[STREAMING][DOCS][EXAMPLES] Minor fixes Author: Jacek Laskowski <ja...@japila.pl>
Closes #10603 from jaceklaskowski/streaming-actor-custom-receiver. Project: http://git-wip-us.apache.org/repos/asf/bahir/repo Commit: http://git-wip-us.apache.org/repos/asf/bahir/commit/67f0c90c Tree: http://git-wip-us.apache.org/repos/asf/bahir/tree/67f0c90c Diff: http://git-wip-us.apache.org/repos/asf/bahir/diff/67f0c90c Branch: refs/heads/master Commit: 67f0c90ca46fdec7dfbd84b02f153bf45ed1b225 Parents: 289c340 Author: Jacek Laskowski <ja...@japila.pl> Authored: Thu Jan 7 00:27:13 2016 -0800 Committer: Reynold Xin <r...@databricks.com> Committed: Thu Jan 7 00:27:13 2016 -0800 ---------------------------------------------------------------------- .../spark/examples/streaming/akka/ActorWordCount.scala | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bahir/blob/67f0c90c/streaming-akka/examples/src/main/scala/org/apache/spark/examples/streaming/akka/ActorWordCount.scala ---------------------------------------------------------------------- diff --git a/streaming-akka/examples/src/main/scala/org/apache/spark/examples/streaming/akka/ActorWordCount.scala b/streaming-akka/examples/src/main/scala/org/apache/spark/examples/streaming/akka/ActorWordCount.scala index 8b8dae0..a47fb7b 100644 --- a/streaming-akka/examples/src/main/scala/org/apache/spark/examples/streaming/akka/ActorWordCount.scala +++ b/streaming-akka/examples/src/main/scala/org/apache/spark/examples/streaming/akka/ActorWordCount.scala @@ -62,15 +62,13 @@ class FeederActor extends Actor { }.start() def receive: Receive = { - case SubscribeReceiver(receiverActor: ActorRef) => println("received subscribe from %s".format(receiverActor.toString)) - receivers = LinkedList(receiverActor) ++ receivers + receivers = LinkedList(receiverActor) ++ receivers case UnsubscribeReceiver(receiverActor: ActorRef) => println("received unsubscribe from %s".format(receiverActor.toString)) - receivers = receivers.dropWhile(x => x eq receiverActor) - + receivers = receivers.dropWhile(x => x eq receiverActor) } } @@ -129,9 +127,9 @@ object FeederActor { * <hostname> and <port> describe the AkkaSystem that Spark Sample feeder is running on. * * To run this example locally, you may run Feeder Actor as - * `$ bin/run-example org.apache.spark.examples.streaming.FeederActor 127.0.1.1 9999` + * `$ bin/run-example org.apache.spark.examples.streaming.FeederActor 127.0.0.1 9999` * and then run the example - * `$ bin/run-example org.apache.spark.examples.streaming.ActorWordCount 127.0.1.1 9999` + * `$ bin/run-example org.apache.spark.examples.streaming.ActorWordCount 127.0.0.1 9999` */ object ActorWordCount { def main(args: Array[String]) {