You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zsxwing <gi...@git.apache.org> on 2016/01/13 23:48:24 UTC

[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

GitHub user zsxwing opened a pull request:

    https://github.com/apache/spark/pull/10744

    [SPARK-7799][Streaming]Add "streaming-akka" project

    Include the following changes:
    
    1. Add "streaming-akka" project and org.apache.spark.streaming.akka.AkkaUtils for creating an actorStream
    2. Remove "StreamingContext.actorStream" and "JavaStreamingContext.actorStream"
    3. Update the ActorWordCount example and add the JavaActorWordCount example
    4. Make "streaming-zeromq" depend on "streaming-akka" and update the codes accordingly

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zsxwing/spark streaming-akka-2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/10744.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #10744
    
----
commit a5ec6444ba8c7824de949d478d9c888e8939248b
Author: Shixiong Zhu <sh...@databricks.com>
Date:   2016-01-13T21:22:48Z

    Add "streaming-akka" project
    
    Include the following changes:
    
    1. Add "streaming-akka" project and org.apache.spark.streaming.akka.AkkaUtils for creating an actorStream
    2. Remove "StreamingContext.actorStream" and "JavaStreamingContext.actorStream"
    3. Update the ActorWordCount example and add the JavaActorWordCount example
    4. Make "streaming-zeromq" depend on "streaming-akka" and update the codes accordingly

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-171467356
  
    **[Test build #49340 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49340/consoleFull)** for PR 10744 at commit [`a5ec644`](https://github.com/apache/spark/commit/a5ec6444ba8c7824de949d478d9c888e8939248b).
     * This patch **fails MiMa tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172997406
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50038319
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/AkkaUtils.scala ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.streaming.akka
    +
    +import scala.reflect.ClassTag
    +
    +import akka.actor.{ActorSystem, Props, SupervisorStrategy}
    +
    +import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.StreamingContext
    +import org.apache.spark.streaming.api.java.{JavaReceiverInputDStream, JavaStreamingContext}
    +import org.apache.spark.streaming.dstream.ReceiverInputDStream
    +
    +/**
    + * Factory interface for creating a new ActorSystem in executors.
    + */
    +trait ActorSystemFactory extends Serializable {
    +  def create(): ActorSystem
    +}
    +
    +object AkkaUtils {
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    +   * Find more details at: http://spark.apache.org/docs/latest/streaming-custom-receivers.html
    +   *
    +   * @param ssc the StreamingContext instance
    +   * @param actorSystemCreator a function to create ActorSystem in executors
    +   * @param props Props object defining creation of the actor
    +   * @param name Name of the actor
    +   * @param storageLevel RDD storage level (default: StorageLevel.MEMORY_AND_DISK_SER_2)
    +   * @param supervisorStrategy the supervisor strategy (default:
    +   *                           ActorSupervisorStrategy.defaultStrategy)
    +   *
    +   * @note 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 parametrized type of data received and actorStream
    +   *       should be same.
    +   */
    +  def actorStream[T: ClassTag](
    +      ssc: StreamingContext,
    +      actorSystemCreator: () => ActorSystem,
    +      props: Props,
    +      name: String,
    +      storageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK_SER_2,
    +      supervisorStrategy: SupervisorStrategy = ActorSupervisorStrategy.defaultStrategy
    +      ): ReceiverInputDStream[T] = ssc.withNamedScope("actor stream") {
    --- 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50063573
  
    --- Diff: docs/streaming-custom-receivers.md ---
    @@ -257,25 +257,52 @@ The following table summarizes the characteristics of both types of receivers
     
     ## Implementing and Using a Custom Actor-based Receiver
     
    +<div class="codetabs">
    +<div data-lang="scala"  markdown="1" >
    +
     Custom [Akka Actors](http://doc.akka.io/docs/akka/2.3.11/scala/actors.html) can also be used to
    --- End diff --
    
    Done


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173058134
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49742/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172699870
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49649/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-171467394
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50038560
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/AkkaUtils.scala ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.streaming.akka
    +
    +import scala.reflect.ClassTag
    +
    +import akka.actor.{ActorSystem, Props, SupervisorStrategy}
    +
    +import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.StreamingContext
    +import org.apache.spark.streaming.api.java.{JavaReceiverInputDStream, JavaStreamingContext}
    +import org.apache.spark.streaming.dstream.ReceiverInputDStream
    +
    +/**
    + * Factory interface for creating a new ActorSystem in executors.
    + */
    +trait ActorSystemFactory extends Serializable {
    +  def create(): ActorSystem
    +}
    +
    +object AkkaUtils {
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    +   * Find more details at: http://spark.apache.org/docs/latest/streaming-custom-receivers.html
    +   *
    +   * @param ssc the StreamingContext instance
    +   * @param actorSystemCreator a function to create ActorSystem in executors
    +   * @param props Props object defining creation of the actor
    +   * @param name Name of the actor
    +   * @param storageLevel RDD storage level (default: StorageLevel.MEMORY_AND_DISK_SER_2)
    +   * @param supervisorStrategy the supervisor strategy (default:
    +   *                           ActorSupervisorStrategy.defaultStrategy)
    +   *
    +   * @note 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 parametrized type of data received and actorStream
    +   *       should be same.
    +   */
    +  def actorStream[T: ClassTag](
    +      ssc: StreamingContext,
    +      actorSystemCreator: () => ActorSystem,
    +      props: Props,
    +      name: String,
    +      storageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK_SER_2,
    +      supervisorStrategy: SupervisorStrategy = ActorSupervisorStrategy.defaultStrategy
    +      ): ReceiverInputDStream[T] = ssc.withNamedScope("actor stream") {
    +    val cleanF = ssc.sc.clean(actorSystemCreator)
    +    ssc.receiverStream(
    +      new ActorReceiverSupervisor[T](cleanF, props, name, storageLevel, supervisorStrategy))
    +  }
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    +   *
    +   * @param jssc the StreamingContext instance
    +   * @param actorSystemFactory an ActorSystemFactory to create ActorSystem in executors
    +   * @param props Props object defining creation of the actor
    +   * @param name Name of the actor
    +   * @param storageLevel Storage level to use for storing the received objects
    +   * @param supervisorStrategy the supervisor strategy
    +   *
    +   * @note 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 parametrized type of data received and actorStream
    +   *       should be same.
    +   */
    +  def actorStream[T](
    +      jssc: JavaStreamingContext,
    +      actorSystemFactory: ActorSystemFactory,
    +      props: Props,
    --- End diff --
    
    lets rename "props" -> "propsForActor", to make it more intuitive.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172674522
  
    **[Test build #49631 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49631/consoleFull)** for PR 10744 at commit [`4e25229`](https://github.com/apache/spark/commit/4e252299231d0dbeddee319343ac08603af034ea).
     * This patch **fails Java style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50037692
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala ---
    @@ -108,9 +107,13 @@ object FeederActor {
         }
         val Seq(host, port) = args.toSeq
     
    -    val conf = new SparkConf
    -    val actorSystem = AkkaUtils.createActorSystem("test", host, port.toInt, conf = conf,
    -      securityManager = new SecurityManager(conf))._1
    +    val akkaConf = ConfigFactory.parseString(
    +      s"""akka.actor.provider = "akka.remote.RemoteActorRefProvider"
    +         |akka.remote.netty.tcp.transport-class = "akka.remote.transport.netty.NettyTransport"
    --- End diff --
    
    Please use the standard configurations that is recommended by Akka 2.3.0 for remoting. 
    http://doc.akka.io/docs/akka/2.3.0/scala/remoting.html


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173058131
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173372129
  
    **[Test build #49804 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49804/consoleFull)** for PR 10744 at commit [`c31be35`](https://github.com/apache/spark/commit/c31be3524f9de9b82d8ea475d7d67c38641a4e66).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50037820
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala ---
    @@ -150,16 +153,27 @@ object ActorWordCount {
          *
          * 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
    +     * to ensure the type safety, i.e type of data received and InputDStream
          * should be same.
          *
          * For example: Both actorStream and SampleActorReceiver are parameterized
          * to same type to ensure type safety.
          */
    +    def actorSystemCreator(): ActorSystem = {
    +      val uniqueSystemName = s"actor-wordcount-${TaskContext.get().taskAttemptId()}"
    +      val akkaConf = ConfigFactory.parseString(
    +        s"""akka.actor.provider = "akka.remote.RemoteActorRefProvider"
    +           |akka.remote.netty.tcp.transport-class = "akka.remote.transport.netty.NettyTransport"
    --- End diff --
    
    use standard confs


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173055771
  
    **[Test build #49742 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49742/consoleFull)** for PR 10744 at commit [`9e36df1`](https://github.com/apache/spark/commit/9e36df118ba21b4f45254f96ec6fdec02b1a5b2d).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172965162
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-171491380
  
    **[Test build #49345 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49345/consoleFull)** for PR 10744 at commit [`c20b51a`](https://github.com/apache/spark/commit/c20b51ac6ad57c34b0372fbfb6a7aa85319eae1a).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173036320
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50178908
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/AkkaUtils.scala ---
    @@ -0,0 +1,237 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.streaming.akka
    +
    +import scala.reflect.ClassTag
    +
    +import akka.actor.{ActorSystem, Props, SupervisorStrategy}
    +
    +import org.apache.spark.api.java.function.{Function0 => JFunction0}
    +import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.StreamingContext
    +import org.apache.spark.streaming.api.java.{JavaReceiverInputDStream, JavaStreamingContext}
    +import org.apache.spark.streaming.dstream.ReceiverInputDStream
    +
    +object AkkaUtils {
    +
    +  /**
    +   * Create an input stream with a user-defined actor. See [[ActorReceiver]] for more details.
    +   *
    +   * @param ssc The StreamingContext instance
    +   * @param propsForActor Props object defining creation of the actor
    +   * @param actorName Name of the actor
    +   * @param storageLevel RDD storage level (default: StorageLevel.MEMORY_AND_DISK_SER_2)
    +   * @param actorSystemCreator A function to create ActorSystem in executors. `ActorSystem` will
    +   *                           be shut down when the receiver is stopping (default:
    +   *                           ActorReceiver.defaultActorSystemCreator)
    +   * @param supervisorStrategy the supervisor strategy (default: ActorReceiver.defaultStrategy)
    +   *
    +   * @note 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. parametrized type of data received and createStream
    +   *       should be same.
    +   */
    +  def createStream[T: ClassTag](
    +      ssc: StreamingContext,
    +      propsForActor: Props,
    +      actorName: String,
    +      storageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK_SER_2,
    +      actorSystemCreator: () => ActorSystem = ActorReceiver.defaultActorSystemCreator,
    +      supervisorStrategy: SupervisorStrategy = ActorReceiver.defaultStrategy
    +    ): ReceiverInputDStream[T] = ssc.withNamedScope("actor stream") {
    +    val cleanF = ssc.sc.clean(actorSystemCreator)
    +    ssc.receiverStream(new ActorReceiverSupervisor[T](
    +      cleanF,
    +      propsForActor,
    +      actorName,
    +      storageLevel,
    +      supervisorStrategy))
    +  }
    +
    +  /**
    +   * Create an input stream with a user-defined actor. See [[JavaActorReceiver]] for more details.
    +   *
    +   * @param jssc The StreamingContext instance
    +   * @param propsForActor Props object defining creation of the actor
    +   * @param actorName Name of the actor
    +   * @param storageLevel Storage level to use for storing the received objects
    +   * @param supervisorStrategy the supervisor strategy
    +   *
    +   * @note 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. parametrized type of data received and createStream
    +   *       should be same.
    +   */
    +  def createStream[T](
    +      jssc: JavaStreamingContext,
    +      propsForActor: Props,
    +      actorName: String,
    +      storageLevel: StorageLevel,
    +      supervisorStrategy: SupervisorStrategy
    +    ): JavaReceiverInputDStream[T] = {
    +    implicit val cm: ClassTag[T] =
    +      implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[T]]
    +    createStream[T](
    +      jssc.ssc,
    +      propsForActor,
    +      actorName,
    +      storageLevel,
    +      supervisorStrategy = supervisorStrategy)
    +  }
    +
    +  /**
    +   * Create an input stream with a user-defined actor. See [[JavaActorReceiver]] for more details.
    +   *
    +   * @param jssc The StreamingContext instance
    +   * @param propsForActor Props object defining creation of the actor
    +   * @param actorName Name of the actor
    +   * @param storageLevel Storage level to use for storing the received objects
    +   * @param actorSystemCreator A function to create ActorSystem in executors. `ActorSystem` will
    +   *                           be shut down when the receiver is stopping.
    +   * @param supervisorStrategy the supervisor strategy
    +   *
    +   * @note 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. parametrized type of data received and createStream
    +   *       should be same.
    +   */
    +  def createStream[T](
    +      jssc: JavaStreamingContext,
    +      propsForActor: Props,
    +      actorName: String,
    +      storageLevel: StorageLevel,
    +      actorSystemCreator: JFunction0[ActorSystem],
    +      supervisorStrategy: SupervisorStrategy
    +    ): JavaReceiverInputDStream[T] = {
    +    implicit val cm: ClassTag[T] =
    +      implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[T]]
    +    createStream[T](
    +      jssc.ssc,
    +      propsForActor,
    +      actorName,
    +      storageLevel,
    +      () => actorSystemCreator.call(),
    +      supervisorStrategy)
    +  }
    +
    +  /**
    +   * Create an input stream with a user-defined actor. See [[JavaActorReceiver]] for more details.
    +   *
    +   * @param jssc The StreamingContext instance
    +   * @param propsForActor Props object defining creation of the actor
    +   * @param actorName Name of the actor
    +   * @param storageLevel Storage level to use for storing the received objects
    +   *
    +   * @note 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. parametrized type of data received and createStream
    +   *       should be same.
    +   */
    +  def createStream[T](
    +      jssc: JavaStreamingContext,
    +      propsForActor: Props,
    +      actorName: String,
    +      storageLevel: StorageLevel
    +    ): JavaReceiverInputDStream[T] = {
    +    implicit val cm: ClassTag[T] =
    +      implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[T]]
    +    createStream[T](jssc.ssc, propsForActor, actorName, storageLevel)
    +  }
    +
    +  /**
    +   * Create an input stream with a user-defined actor. See [[JavaActorReceiver]] for more details.
    +   *
    +   * @param jssc The StreamingContext instance
    +   * @param propsForActor Props object defining creation of the actor
    +   * @param actorName Name of the actor
    +   * @param storageLevel Storage level to use for storing the received objects
    +   * @param actorSystemCreator A function to create ActorSystem in executors. `ActorSystem` will
    +   *                           be shut down when the receiver is stopping.
    +   *
    +   * @note 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. parametrized type of data received and createStream
    +   *       should be same.
    +   */
    +  def createStream[T](
    +      jssc: JavaStreamingContext,
    +      propsForActor: Props,
    +      actorName: String,
    +      storageLevel: StorageLevel,
    +      actorSystemCreator: JFunction0[ActorSystem]
    +    ): JavaReceiverInputDStream[T] = {
    +    implicit val cm: ClassTag[T] =
    +      implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[T]]
    +    createStream[T](
    +      jssc.ssc, propsForActor, actorName, storageLevel, () => actorSystemCreator.call())
    +  }
    +
    +  /**
    +   * Create an input stream with a user-defined actor. Storage level of the data will be the default
    +   * StorageLevel.MEMORY_AND_DISK_SER_2. See [[JavaActorReceiver]] for more details.
    +   *
    +   * @param jssc The StreamingContext instance
    +   * @param propsForActor Props object defining creation of the actor
    +   * @param actorName Name of the actor
    +   *
    +   * @note 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. parametrized type of data received and createStream
    +   *       should be same.
    +   */
    +  def createStream[T](
    +      jssc: JavaStreamingContext,
    +      propsForActor: Props,
    +      actorName: String
    +    ): JavaReceiverInputDStream[T] = {
    +    implicit val cm: ClassTag[T] =
    +      implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[T]]
    +    createStream[T](jssc.ssc, propsForActor, actorName)
    +  }
    +
    +  /**
    +   * Create an input stream with a user-defined actor. Storage level of the data will be the default
    +   * StorageLevel.MEMORY_AND_DISK_SER_2. See [[JavaActorReceiver]] for more details.
    +   *
    +   * @param jssc The StreamingContext instance
    +   * @param propsForActor Props object defining creation of the actor
    +   * @param actorName Name of the actor
    +   * @param actorSystemCreator A function to create ActorSystem in executors. `ActorSystem` will
    +   *                           be shut down when the receiver is stopping.
    +   *
    +   * @note 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. parametrized type of data received and createStream
    +   *       should be same.
    +   */
    +  def createStream[T](
    +      jssc: JavaStreamingContext,
    +      propsForActor: Props,
    +      actorName: String,
    +      actorSystemCreator: JFunction0[ActorSystem]
    --- End diff --
    
    Too many variations for the Java one. Let's just have 3. 
    1>  props, name
    2>  1 + storage level          // for Advanced Spark users
    3>  2 + actorSystemCreator + supervisorStrategy  // for advanced Spark and Akka users


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172677275
  
    `lint-java` doesn't support to add a new project :(


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50037837
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/streaming/ZeroMQWordCount.scala ---
    @@ -89,8 +90,22 @@ object ZeroMQWordCount {
     
         def bytesToStringIterator(x: Seq[ByteString]): Iterator[String] = x.map(_.utf8String).iterator
     
    +    def actorSystemCreator(): ActorSystem = {
    +      val uniqueSystemName = s"actor-wordcount-${TaskContext.get().taskAttemptId()}"
    +      val akkaConf = ConfigFactory.parseString(
    +        s"""akka.actor.provider = "akka.remote.RemoteActorRefProvider"
    +           |akka.remote.netty.tcp.transport-class = "akka.remote.transport.netty.NettyTransport"
    --- End diff --
    
    use standard confs


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172720320
  
    **[Test build #49645 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49645/consoleFull)** for PR 10744 at commit [`4e25229`](https://github.com/apache/spark/commit/4e252299231d0dbeddee319343ac08603af034ea).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173345104
  
    LGTM. Will merge when tests pass. Thank @zsxwing !


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172723102
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49645/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172670601
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49626/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50063082
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/ActorReceiver.scala ---
    @@ -58,13 +59,13 @@ object ActorSupervisorStrategy {
      *      }
      *  }
      *
    - *  // Can be used with an actorStream as follows
    - *  ssc.actorStream[String](Props(new MyActor),"MyActorReceiver")
    + *  // Can be used with AkkaUtils.createStream as follows
    + *  AkkaUtils.createStream[String](Props[MyActor](),"MyActorReceiver")
      *
      * }}}
    --- End diff --
    
    Can you add Java example too here. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-171722086
  
    > I'm probably late to the party here, but I thought Akka was simply going away? does this need to stay around in 2.x?
    
    Yes. This PR removed `actorStream` so that core and streaming won't depend on Akka. However, we still want to support `actorStream` in an external project like Kafka and Flume.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173079278
  
    **[Test build #49748 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49748/consoleFull)** for PR 10744 at commit [`5e2ac50`](https://github.com/apache/spark/commit/5e2ac50a9971401312e22a3ddbd683a3d5735862).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-171491565
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50063155
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/ActorReceiver.scala ---
    @@ -108,13 +109,13 @@ abstract class ActorReceiver extends Actor {
      *      }
      *  }
      *
    - *  // Can be used with an actorStream as follows
    - *  ssc.actorStream[String](Props(new MyActor),"MyActorReceiver")
    + *  // Can be used with AkkaUtils.createStream as follows
    --- End diff --
    
    Remove this line.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50038368
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/AkkaUtils.scala ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.streaming.akka
    +
    +import scala.reflect.ClassTag
    +
    +import akka.actor.{ActorSystem, Props, SupervisorStrategy}
    +
    +import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.StreamingContext
    +import org.apache.spark.streaming.api.java.{JavaReceiverInputDStream, JavaStreamingContext}
    +import org.apache.spark.streaming.dstream.ReceiverInputDStream
    +
    +/**
    + * Factory interface for creating a new ActorSystem in executors.
    + */
    +trait ActorSystemFactory extends Serializable {
    +  def create(): ActorSystem
    +}
    +
    +object AkkaUtils {
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    +   * Find more details at: http://spark.apache.org/docs/latest/streaming-custom-receivers.html
    +   *
    +   * @param ssc the StreamingContext instance
    +   * @param actorSystemCreator a function to create ActorSystem in executors
    +   * @param props Props object defining creation of the actor
    +   * @param name Name of the actor
    +   * @param storageLevel RDD storage level (default: StorageLevel.MEMORY_AND_DISK_SER_2)
    +   * @param supervisorStrategy the supervisor strategy (default:
    +   *                           ActorSupervisorStrategy.defaultStrategy)
    +   *
    +   * @note 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 parametrized type of data received and actorStream
    --- End diff --
    
    nit: i.e -> i.e.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-171599618
  
    I'm probably late to the party here, but I thought Akka was simply going away? does this need to stay around in 2.x?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173036321
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49733/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173372506
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173061545
  
    **[Test build #49748 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49748/consoleFull)** for PR 10744 at commit [`5e2ac50`](https://github.com/apache/spark/commit/5e2ac50a9971401312e22a3ddbd683a3d5735862).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-171491567
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49345/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172693649
  
    **[Test build #49645 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49645/consoleFull)** for PR 10744 at commit [`4e25229`](https://github.com/apache/spark/commit/4e252299231d0dbeddee319343ac08603af034ea).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50038083
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/AkkaUtils.scala ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.streaming.akka
    +
    +import scala.reflect.ClassTag
    +
    +import akka.actor.{ActorSystem, Props, SupervisorStrategy}
    +
    +import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.StreamingContext
    +import org.apache.spark.streaming.api.java.{JavaReceiverInputDStream, JavaStreamingContext}
    +import org.apache.spark.streaming.dstream.ReceiverInputDStream
    +
    +/**
    + * Factory interface for creating a new ActorSystem in executors.
    + */
    +trait ActorSystemFactory extends Serializable {
    +  def create(): ActorSystem
    +}
    +
    +object AkkaUtils {
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    +   * Find more details at: http://spark.apache.org/docs/latest/streaming-custom-receivers.html
    +   *
    +   * @param ssc the StreamingContext instance
    +   * @param actorSystemCreator a function to create ActorSystem in executors
    +   * @param props Props object defining creation of the actor
    +   * @param name Name of the actor
    +   * @param storageLevel RDD storage level (default: StorageLevel.MEMORY_AND_DISK_SER_2)
    +   * @param supervisorStrategy the supervisor strategy (default:
    +   *                           ActorSupervisorStrategy.defaultStrategy)
    +   *
    +   * @note 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 parametrized type of data received and actorStream
    +   *       should be same.
    +   */
    +  def actorStream[T: ClassTag](
    --- End diff --
    
    This should be named AkkaUtils.createstream, similar to FlumeUtils.createStream


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/10744


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172674526
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172965165
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49695/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by tdas <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50039679
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala ---
    @@ -108,9 +107,13 @@ object FeederActor {
         }
         val Seq(host, port) = args.toSeq
     
    -    val conf = new SparkConf
    -    val actorSystem = AkkaUtils.createActorSystem("test", host, port.toInt, conf = conf,
    -      securityManager = new SecurityManager(conf))._1
    +    val akkaConf = ConfigFactory.parseString(
    +      s"""akka.actor.provider = "akka.remote.RemoteActorRefProvider"
    --- End diff --
    
    @zsxwing Could you also tag that JIRA in this PR and resolve it when this is closed. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50038282
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/AkkaUtils.scala ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.streaming.akka
    +
    +import scala.reflect.ClassTag
    +
    +import akka.actor.{ActorSystem, Props, SupervisorStrategy}
    +
    +import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.StreamingContext
    +import org.apache.spark.streaming.api.java.{JavaReceiverInputDStream, JavaStreamingContext}
    +import org.apache.spark.streaming.dstream.ReceiverInputDStream
    +
    +/**
    + * Factory interface for creating a new ActorSystem in executors.
    + */
    +trait ActorSystemFactory extends Serializable {
    --- End diff --
    
    Isnt it better to make this Java function? Similar to how StreamingContextFactory was deprecated for Function0?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50182291
  
    --- Diff: external/zeromq/src/main/scala/org/apache/spark/streaming/zeromq/ZeroMQUtils.scala ---
    @@ -128,6 +221,42 @@ object ZeroMQUtils {
           implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[T]]
         val fn =
           (x: Seq[ByteString]) => bytesToObjects.call(x.map(_.toArray).toArray).iterator().asScala
    -    createStream[T](jssc.ssc, publisherUrl, subscribe, fn)
    +    createStream[T](
    +      jssc.ssc,
    +      publisherUrl,
    +      subscribe,
    +      fn)
    +  }
    +
    +  /**
    +   * Create an input stream that receives messages pushed by a zeromq publisher.
    --- End diff --
    
    Here too please reduce the number of createStream versions. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172700891
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49650/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172965486
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50182904
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/ActorReceiver.scala ---
    @@ -26,23 +26,34 @@ import scala.reflect.ClassTag
     
     import akka.actor._
     import akka.actor.SupervisorStrategy.{Escalate, Restart}
    +import com.typesafe.config.ConfigFactory
     
    -import org.apache.spark.{Logging, SparkEnv}
    +import org.apache.spark.{Logging, TaskContext}
     import org.apache.spark.annotation.DeveloperApi
     import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.receiver.Receiver
     
     /**
      * :: DeveloperApi ::
      * A helper with set of defaults for supervisor strategy
      */
     @DeveloperApi
    -object ActorSupervisorStrategy {
    +object ActorReceiver {
     
       val defaultStrategy = OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange =
    --- End diff --
    
    Add scala docs on what the strategy does. 
    And `defaultSupervisorStrategy`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-171467397
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49340/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172673179
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172997091
  
    **[Test build #49700 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49700/consoleFull)** for PR 10744 at commit [`0c8bd04`](https://github.com/apache/spark/commit/0c8bd0409e760e4a6e7b52fd662d0d77928650e2).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `class SampleActorReceiver[T](urlOfPublisher: String) extends ActorReceiver `


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173079397
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49748/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173058119
  
    **[Test build #49742 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49742/consoleFull)** for PR 10744 at commit [`9e36df1`](https://github.com/apache/spark/commit/9e36df118ba21b4f45254f96ec6fdec02b1a5b2d).
     * This patch **fails to build**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50182827
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/ActorReceiver.scala ---
    @@ -26,23 +26,34 @@ import scala.reflect.ClassTag
     
     import akka.actor._
     import akka.actor.SupervisorStrategy.{Escalate, Restart}
    +import com.typesafe.config.ConfigFactory
     
    -import org.apache.spark.{Logging, SparkEnv}
    +import org.apache.spark.{Logging, TaskContext}
     import org.apache.spark.annotation.DeveloperApi
     import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.receiver.Receiver
     
     /**
      * :: DeveloperApi ::
      * A helper with set of defaults for supervisor strategy
      */
     @DeveloperApi
    -object ActorSupervisorStrategy {
    +object ActorReceiver {
     
       val defaultStrategy = OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange =
         15 millis) {
         case _: RuntimeException => Restart
         case _: Exception => Escalate
       }
    +
    +  def defaultActorSystemCreator(): ActorSystem = {
    --- End diff --
    
    Add scala docs. This is public.
    And make this a val that return () => ActorSystem, so that people can write directly use this as createStream(...., ActorReceiver.defaultActorSystemCreator).



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50062568
  
    --- Diff: docs/streaming-custom-receivers.md ---
    @@ -257,25 +257,52 @@ The following table summarizes the characteristics of both types of receivers
     
     ## Implementing and Using a Custom Actor-based Receiver
     
    +<div class="codetabs">
    +<div data-lang="scala"  markdown="1" >
    +
     Custom [Akka Actors](http://doc.akka.io/docs/akka/2.3.11/scala/actors.html) can also be used to
    --- End diff --
    
    Can you also make sure to add this is not supported in Python?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by BrianLondon <gi...@git.apache.org>.
Github user BrianLondon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r49864860
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala ---
    @@ -108,9 +107,13 @@ object FeederActor {
         }
         val Seq(host, port) = args.toSeq
     
    -    val conf = new SparkConf
    -    val actorSystem = AkkaUtils.createActorSystem("test", host, port.toInt, conf = conf,
    -      securityManager = new SecurityManager(conf))._1
    +    val akkaConf = ConfigFactory.parseString(
    +      s"""akka.actor.provider = "akka.remote.RemoteActorRefProvider"
    --- End diff --
    
    I believe this change will resolve SPARK-12786.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173054234
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-171463291
  
    **[Test build #49340 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49340/consoleFull)** for PR 10744 at commit [`a5ec644`](https://github.com/apache/spark/commit/a5ec6444ba8c7824de949d478d9c888e8939248b).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172669887
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173003723
  
    - Add unit tests for scala and java signatures for AkkaUtils.createStream


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50038791
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/AkkaUtils.scala ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.streaming.akka
    +
    +import scala.reflect.ClassTag
    +
    +import akka.actor.{ActorSystem, Props, SupervisorStrategy}
    +
    +import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.StreamingContext
    +import org.apache.spark.streaming.api.java.{JavaReceiverInputDStream, JavaStreamingContext}
    +import org.apache.spark.streaming.dstream.ReceiverInputDStream
    +
    +/**
    + * Factory interface for creating a new ActorSystem in executors.
    + */
    +trait ActorSystemFactory extends Serializable {
    +  def create(): ActorSystem
    +}
    +
    +object AkkaUtils {
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    +   * Find more details at: http://spark.apache.org/docs/latest/streaming-custom-receivers.html
    +   *
    +   * @param ssc the StreamingContext instance
    +   * @param actorSystemCreator a function to create ActorSystem in executors
    +   * @param props Props object defining creation of the actor
    +   * @param name Name of the actor
    +   * @param storageLevel RDD storage level (default: StorageLevel.MEMORY_AND_DISK_SER_2)
    +   * @param supervisorStrategy the supervisor strategy (default:
    +   *                           ActorSupervisorStrategy.defaultStrategy)
    +   *
    +   * @note 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 parametrized type of data received and actorStream
    +   *       should be same.
    +   */
    +  def actorStream[T: ClassTag](
    +      ssc: StreamingContext,
    +      actorSystemCreator: () => ActorSystem,
    +      props: Props,
    +      name: String,
    +      storageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK_SER_2,
    +      supervisorStrategy: SupervisorStrategy = ActorSupervisorStrategy.defaultStrategy
    +      ): ReceiverInputDStream[T] = ssc.withNamedScope("actor stream") {
    +    val cleanF = ssc.sc.clean(actorSystemCreator)
    +    ssc.receiverStream(
    +      new ActorReceiverSupervisor[T](cleanF, props, name, storageLevel, supervisorStrategy))
    +  }
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    +   *
    +   * @param jssc the StreamingContext instance
    +   * @param actorSystemFactory an ActorSystemFactory to create ActorSystem in executors
    +   * @param props Props object defining creation of the actor
    +   * @param name Name of the actor
    +   * @param storageLevel Storage level to use for storing the received objects
    +   * @param supervisorStrategy the supervisor strategy
    +   *
    +   * @note 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 parametrized type of data received and actorStream
    +   *       should be same.
    +   */
    +  def actorStream[T](
    +      jssc: JavaStreamingContext,
    +      actorSystemFactory: ActorSystemFactory,
    +      props: Props,
    +      name: String,
    +      storageLevel: StorageLevel,
    +      supervisorStrategy: SupervisorStrategy
    +    ): JavaReceiverInputDStream[T] = {
    +    implicit val cm: ClassTag[T] =
    +      implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[T]]
    +    actorStream[T](
    +      jssc.ssc, () => actorSystemFactory.create(), props, name, storageLevel, supervisorStrategy)
    +  }
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    +   *
    +   * @param jssc the StreamingContext instance
    +   * @param actorSystemFactory an ActorSystemFactory to create ActorSystem in executors
    +   * @param props Props object defining creation of the actor
    +   * @param name Name of the actor
    +   * @param storageLevel Storage level to use for storing the received objects
    +   *
    +   * @note 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 parametrized type of data received and actorStream
    +   *       should be same.
    +   */
    +  def actorStream[T](
    +      jssc: JavaStreamingContext,
    +      actorSystemFactory: ActorSystemFactory,
    +      props: Props,
    +      name: String,
    +      storageLevel: StorageLevel
    +    ): JavaReceiverInputDStream[T] = {
    +    implicit val cm: ClassTag[T] =
    +      implicitly[ClassTag[AnyRef]].asInstanceOf[ClassTag[T]]
    +    actorStream[T](jssc.ssc, () => actorSystemFactory.create(), props, name, storageLevel)
    +  }
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    --- End diff --
    
    `with a user-defined actor. See [[ActorReceiver]] for more details.` 
    
    And then in ActorReceiver docs please make sure there is sufficient example code.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172670599
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50063116
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/ActorReceiver.scala ---
    @@ -58,13 +59,13 @@ object ActorSupervisorStrategy {
      *      }
      *  }
      *
    - *  // Can be used with an actorStream as follows
    - *  ssc.actorStream[String](Props(new MyActor),"MyActorReceiver")
    + *  // Can be used with AkkaUtils.createStream as follows
    --- End diff --
    
    nit: Remove this comment.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-171470406
  
    **[Test build #49345 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49345/consoleFull)** for PR 10744 at commit [`c20b51a`](https://github.com/apache/spark/commit/c20b51ac6ad57c34b0372fbfb6a7aa85319eae1a).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172674528
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49631/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50038022
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/AkkaUtils.scala ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.streaming.akka
    +
    +import scala.reflect.ClassTag
    +
    +import akka.actor.{ActorSystem, Props, SupervisorStrategy}
    +
    +import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.StreamingContext
    +import org.apache.spark.streaming.api.java.{JavaReceiverInputDStream, JavaStreamingContext}
    +import org.apache.spark.streaming.dstream.ReceiverInputDStream
    +
    +/**
    + * Factory interface for creating a new ActorSystem in executors.
    + */
    +trait ActorSystemFactory extends Serializable {
    +  def create(): ActorSystem
    +}
    +
    +object AkkaUtils {
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    +   * Find more details at: http://spark.apache.org/docs/latest/streaming-custom-receivers.html
    +   *
    +   * @param ssc the StreamingContext instance
    --- End diff --
    
    nit: Can you make the docs consistent, that all of them start with caps `the` -> `The`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172667463
  
    @tdas addressed your comments and also updated `docs/streaming-custom-receivers.md`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172674248
  
    **[Test build #49631 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49631/consoleFull)** for PR 10744 at commit [`4e25229`](https://github.com/apache/spark/commit/4e252299231d0dbeddee319343ac08603af034ea).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172699869
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50049377
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/streaming/ActorWordCount.scala ---
    @@ -108,9 +107,13 @@ object FeederActor {
         }
         val Seq(host, port) = args.toSeq
     
    -    val conf = new SparkConf
    -    val actorSystem = AkkaUtils.createActorSystem("test", host, port.toInt, conf = conf,
    -      securityManager = new SecurityManager(conf))._1
    +    val akkaConf = ConfigFactory.parseString(
    +      s"""akka.actor.provider = "akka.remote.RemoteActorRefProvider"
    --- End diff --
    
    Updated the title


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172700887
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172966801
  
    **[Test build #49700 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49700/consoleFull)** for PR 10744 at commit [`0c8bd04`](https://github.com/apache/spark/commit/0c8bd0409e760e4a6e7b52fd662d0d77928650e2).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173079395
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172997408
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49700/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172723100
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172691734
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][Streaming]Add "streaming-akka" pr...

Posted by tdas <gi...@git.apache.org>.
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10744#discussion_r50038457
  
    --- Diff: external/akka/src/main/scala/org/apache/spark/streaming/akka/AkkaUtils.scala ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.streaming.akka
    +
    +import scala.reflect.ClassTag
    +
    +import akka.actor.{ActorSystem, Props, SupervisorStrategy}
    +
    +import org.apache.spark.storage.StorageLevel
    +import org.apache.spark.streaming.StreamingContext
    +import org.apache.spark.streaming.api.java.{JavaReceiverInputDStream, JavaStreamingContext}
    +import org.apache.spark.streaming.dstream.ReceiverInputDStream
    +
    +/**
    + * Factory interface for creating a new ActorSystem in executors.
    + */
    +trait ActorSystemFactory extends Serializable {
    +  def create(): ActorSystem
    +}
    +
    +object AkkaUtils {
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    +   * Find more details at: http://spark.apache.org/docs/latest/streaming-custom-receivers.html
    +   *
    +   * @param ssc the StreamingContext instance
    +   * @param actorSystemCreator a function to create ActorSystem in executors
    +   * @param props Props object defining creation of the actor
    +   * @param name Name of the actor
    +   * @param storageLevel RDD storage level (default: StorageLevel.MEMORY_AND_DISK_SER_2)
    +   * @param supervisorStrategy the supervisor strategy (default:
    +   *                           ActorSupervisorStrategy.defaultStrategy)
    +   *
    +   * @note 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 parametrized type of data received and actorStream
    +   *       should be same.
    +   */
    +  def actorStream[T: ClassTag](
    +      ssc: StreamingContext,
    +      actorSystemCreator: () => ActorSystem,
    +      props: Props,
    +      name: String,
    +      storageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK_SER_2,
    +      supervisorStrategy: SupervisorStrategy = ActorSupervisorStrategy.defaultStrategy
    +      ): ReceiverInputDStream[T] = ssc.withNamedScope("actor stream") {
    +    val cleanF = ssc.sc.clean(actorSystemCreator)
    +    ssc.receiverStream(
    +      new ActorReceiverSupervisor[T](cleanF, props, name, storageLevel, supervisorStrategy))
    +  }
    +
    +  /**
    +   * Create an input stream with any arbitrary user implemented actor receiver.
    +   *
    +   * @param jssc the StreamingContext instance
    +   * @param actorSystemFactory an ActorSystemFactory to create ActorSystem in executors
    +   * @param props Props object defining creation of the actor
    +   * @param name Name of the actor
    +   * @param storageLevel Storage level to use for storing the received objects
    +   * @param supervisorStrategy the supervisor strategy
    +   *
    +   * @note 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 parametrized type of data received and actorStream
    +   *       should be same.
    +   */
    +  def actorStream[T](
    +      jssc: JavaStreamingContext,
    +      actorSystemFactory: ActorSystemFactory,
    +      props: Props,
    +      name: String,
    --- End diff --
    
    lets rename "name" -> "actorName", to make it more intuitive.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-172669891
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49624/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173344605
  
    **[Test build #49804 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49804/consoleFull)** for PR 10744 at commit [`c31be35`](https://github.com/apache/spark/commit/c31be3524f9de9b82d8ea475d7d67c38641a4e66).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7799][SPARK-12786][Streaming]Add "strea...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/10744#issuecomment-173372509
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49804/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org