Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/11176#discussion_r54137607
--- Diff:
external/akka/src/main/scala/org/apache/spark/streaming/akka/ActorReceiver.scala
---
@@ -105,13 +108,25 @@ abstract class ActorReceiver extends Actor {
}
/**
- * Store a single item of received data to Spark's memory.
+ * Store a single item of received data to Spark's memory asynchronously.
* These single items will be aggregated together into data blocks before
* being pushed into Spark's memory.
*/
def store[T](item: T) {
context.parent ! SingleItemData(item)
}
+
+ /**
+ * Store a single item of received data to Spark's memory synchronously.
+ * These single items will be aggregated together into data blocks before
+ * being pushed into Spark's memory.
+ *
+ * As opposed to [[ActorReceiver.store[T]: Unit]], this method allows
flow control
+ * (maxRate, backpressure) to block the input.
+ */
+ def store[T](item: T, timeout: Timeout): Future[Any] = {
--- End diff --
Don't return `Future[Any]`. Otherwise, we need to make `Ack` public.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]