You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2018/08/02 14:26:00 UTC

[jira] [Commented] (SPARK-24947) aggregateAsync and foldAsync for RDD

    [ https://issues.apache.org/jira/browse/SPARK-24947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16566867#comment-16566867 ] 

Apache Spark commented on SPARK-24947:
--------------------------------------

User 'ceedubs' has created a pull request for this issue:
https://github.com/apache/spark/pull/21971

> aggregateAsync and foldAsync for RDD
> ------------------------------------
>
>                 Key: SPARK-24947
>                 URL: https://issues.apache.org/jira/browse/SPARK-24947
>             Project: Spark
>          Issue Type: New Feature
>          Components: Spark Core
>    Affects Versions: 2.3.1
>            Reporter: Cody Allen
>            Priority: Minor
>
> {{AsyncRDDActions}} contains {{collectAsync}}, {{countAsync}}, {{foreachAsync}}, etc; but it doesn't provide general mechanisms for reducing datasets asynchronously. If I want to aggregate some statistics on a large dataset and it's going to take an hour, I shouldn't need to completely block a thread for the hour to wait for the result.
>  
> I propose the following methods be added to {{AsyncRDDActions}}:
>  
> {{def aggregateAsync[U](zeroValue: U)(seqOp: (U, T) => U, combOp: (U, U) => U): FutureAction[U]}}
> {{def foldAsync(zeroValue: T)(op: (T, T) => T): FutureAction[T]}}
>  
> Locally I have a version of {{aggregateAsync}} implemented based on {{submitJob}} (similar to how {{countAsync}} is implemented), and a {{foldAsync}} implementation that simply delegates through to {{aggregateAsync}}. I haven't yet written unit tests for these, but I can do so if this is a contribution that would be accepted. Please let me know.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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