spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Owen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-3384) Potential thread unsafe Breeze vector addition in KMeans
Date Fri, 23 Jan 2015 18:55:34 GMT

     [ https://issues.apache.org/jira/browse/SPARK-3384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sean Owen resolved SPARK-3384.
------------------------------
    Resolution: Not a Problem

Given the discussion, I do not see evidence that there is a problem in the code at this point.

> Potential thread unsafe Breeze vector addition in KMeans
> --------------------------------------------------------
>
>                 Key: SPARK-3384
>                 URL: https://issues.apache.org/jira/browse/SPARK-3384
>             Project: Spark
>          Issue Type: Bug
>          Components: MLlib
>            Reporter: RJ Nowling
>
> In the KMeans clustering implementation, the Breeze vectors are accumulated using +=.
 For example,
> https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala#L162
>  This is potentially a thread unsafe operation.  (This is what I observed in local testing.)
 I suggest changing the += to + -- a new object will be allocated but it will be thread safe
since it won't write to an old location accessed by multiple threads.
> Further testing is required to reproduce and verify.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message