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 /docs/streaming-custom-receivers.md | |
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 'docs/streaming-custom-receivers.md')
-rw-r--r-- | docs/streaming-custom-receivers.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/streaming-custom-receivers.md b/docs/streaming-custom-receivers.md index a75587a92a..97db865daa 100644 --- a/docs/streaming-custom-receivers.md +++ b/docs/streaming-custom-receivers.md @@ -257,9 +257,9 @@ The following table summarizes the characteristics of both types of receivers ## Implementing and Using a Custom Actor-based Receiver -Custom [Akka Actors](http://doc.akka.io/docs/akka/2.2.4/scala/actors.html) can also be used to +Custom [Akka Actors](http://doc.akka.io/docs/akka/2.3.11/scala/actors.html) can also be used to receive data. The [`ActorHelper`](api/scala/index.html#org.apache.spark.streaming.receiver.ActorHelper) -trait can be applied on any Akka actor, which allows received data to be stored in Spark using +trait can be mixed in to any Akka actor, which allows received data to be stored in Spark using `store(...)` methods. The supervisor strategy of this actor can be configured to handle failures, etc. {% highlight scala %} @@ -273,8 +273,8 @@ class CustomActor extends Actor with ActorHelper { And a new input stream can be created with this custom actor as {% highlight scala %} -// Assuming ssc is the StreamingContext -val lines = ssc.actorStream[String](Props(new CustomActor()), "CustomReceiver") +val ssc: StreamingContext = ... +val lines = ssc.actorStream[String](Props[CustomActor], "CustomReceiver") {% endhighlight %} See [ActorWordCount.scala](https://github.com/apache/spark/blob/master/examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala) |