You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (JIRA)" <ji...@apache.org> on 2017/11/06 23:48:00 UTC
[jira] [Resolved] (SPARK-22330) Linear containsKey operation for
serialized maps.
[ https://issues.apache.org/jira/browse/SPARK-22330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan resolved SPARK-22330.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.3.0
Issue resolved by pull request 19553
[https://github.com/apache/spark/pull/19553]
> Linear containsKey operation for serialized maps.
> -------------------------------------------------
>
> Key: SPARK-22330
> URL: https://issues.apache.org/jira/browse/SPARK-22330
> Project: Spark
> Issue Type: Bug
> Components: Spark Core
> Affects Versions: 1.2.1, 2.2.0
> Reporter: Alexander
> Labels: performance
> Fix For: 2.3.0
>
> Original Estimate: 5m
> Remaining Estimate: 5m
>
> One of our production application which aggressively uses cached spark RDDs degraded after increasing volumes of data though it shouldn't. Fast profiling session showed that the slowest part was SerializableMapWrapper#containsKey: it delegates get and remove to actual implementation, but containsKey is inherited from AbstractMap which is implemented in linear time via iteration over whole keySet. A workaround was simple: replacing all containsKey with get(key) != null solved the issue.
> Nevertheless, it would be much simpler for everyone if the issue will be fixed once and for all.
> A fix is straightforward, delegate containsKey to actual implementation.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org