Apache Bahirを使ってAkkaに接続する、Spark Streamingで簡単なプロセスをセットアップしようとしています。私はこのolder oneと一緒にtheir exampleに従おうとしました。Apache Bahir、ActorReceiverにものを送る
akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {
enabled-transports = ["akka.remote.netty.tcp"]
netty.tcp {
hostname = "localhost"
port = 7777
}
}
}
と私の問題は、次のとおりです:私は、単純なフォワーダ俳優
class ForwarderActor extends ActorReceiver {
def receive = {
case data: MyData => store(data)
}
}
を持っていると私は
val stream = AkkaUtils.createStream[RSVP](ssc, Props[ForwarderActor], actorName)
に構成されたストリームを作成するには、次のようになり、私はにメッセージを送信しますかフォワーダー俳優?この場合、Akka Remoteがどのように使われているのか分かりません。アプリを起動すると、私はログに
[akka.remote.Remoting] Remoting started; listening on addresses :[akka.tcp://[email protected]:7777]
を参照し、後で私は思わ
[akka.remote.Remoting] Remoting now listens on addresses: [akka.tcp://[email protected]:52369]
がScalaDocに説明を思い出させるために参照してください。
/**
* A default ActorSystem creator. It will use a unique system name
* (streaming-actor-system-<spark-task-attempt-id>) to start an ActorSystem that supports remote
* communication.
*/
すべてを、すべてのIに私がどのようにForwarderの俳優にメッセージを送ることになっているのか分かりません。助けてくれてありがとう!
@SaSarvesh Kumar Singh喜んでこれを見つけました。私は同じ問題を解決しようとしています。ここで私はあなたのコードを試しました。 'actorScelection'https://stackoverflow.com/questions/46724732/actorsystem-actorselection-is-not-working-for-remote-actors-where-actorof-is-worを使用しているときに、この問題を確認できますか? – Mahesh