Github user tdas commented on a diff in the pull request:
https://github.com/apache/spark/pull/10744#discussion_r50062625
--- Diff:
examples/src/main/java/org/apache/spark/examples/streaming/JavaActorWordCount.java
---
@@ -100,18 +108,21 @@ public static void main(String[] args) {
String feederActorURI = "akka.tcp://test@" + host + ":" + port +
"/user/FeederActor";
/*
- * Following is the use of actorStream to plug in custom actor as
receiver
+ * Following is the use of AkkaUtils.createStream to plug in custom
actor as receiver
*
* An important point to note:
* Since Actor may exist outside the spark framework, It is thus
user's responsibility
* to ensure the type safety, i.e type of data received and
InputDstream
* should be same.
*
- * For example: Both actorStream and JavaSampleActorReceiver are
parameterized
+ * For example: Both AkkaUtils.createStream and
JavaSampleActorReceiver are parameterized
* to same type to ensure type safety.
*/
- JavaDStream<String> lines = jssc.actorStream(
- Props.create(JavaSampleActorReceiver.class, feederActorURI),
"SampleReceiver");
+ JavaDStream<String> lines = AkkaUtils.createStream(
+ jssc,
+ new WordcountActorSystemCreator(),
+ Props.create(JavaSampleActorReceiver.class, feederActorURI),
+ "SampleReceiver");
--- End diff --
indent.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]