diff options
author | Jacek Laskowski <jacek@japila.pl> | 2016-01-07 00:27:13 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-01-07 00:27:13 -0800 |
commit | 8113dbda0bd51fdbe20dbfad466b8d25304a01f4 (patch) | |
tree | 93e15a189697f67cc2c9c7961ecf9b52eb61511a /examples/src | |
parent | fd1dcfaf2608c2cc3a439ed3ca044ae655982306 (diff) | |
download | spark-8113dbda0bd51fdbe20dbfad466b8d25304a01f4.tar.gz spark-8113dbda0bd51fdbe20dbfad466b8d25304a01f4.tar.bz2 spark-8113dbda0bd51fdbe20dbfad466b8d25304a01f4.zip |
[STREAMING][DOCS][EXAMPLES] Minor fixes
Author: Jacek Laskowski <jacek@japila.pl>
Closes #10603 from jaceklaskowski/streaming-actor-custom-receiver.
Diffstat (limited to 'examples/src')
-rw-r--r-- | examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala b/examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala index 8b8dae0be6..a47fb7b7d7 100644 --- a/examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala +++ b/examples/src/main/scala/org/apache/spark/examples/streaming/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]) { |