[ https://issues.apache.org/jira/browse/SPARK-12958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15112843#comment-15112843 ]
Souri commented on SPARK-12958: ------------------------------- I should have been more specific.I wanted to have Map[String, Long] so that the values are commutative. I already have implemented it for my own purpose. If this makes sense with others, I can create a pull request. Here is my patch: https://github.com/sourind/spark/commit/ebe9342a2342a02df1ecdfb3a96c71b15939a63e > Map accumulator in spark > ------------------------ > > Key: SPARK-12958 > URL: https://issues.apache.org/jira/browse/SPARK-12958 > Project: Spark > Issue Type: Wish > Components: Spark Core > Reporter: Souri > Priority: Minor > > Spark by default supports accumulators of Int,Long,Double,Float. > It would be good if we can have a Map accumulator where each executor can > just add key->value pairs and driver can have access to the aggregated value > for each key in the map. > In this way, it would also be easier to use accumulators for various metrics. > We can define metrics at runtime as the map can take any string key. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org