Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-13164][CORE] Replace deprecated synchronized buffer in core #11059

Conversation

holdenk
Copy link
Contributor

@holdenk holdenk commented Feb 3, 2016

Building with scala 2.11 results in the warning trait SynchronizedBuffer in package mutable is deprecated: Synchronization via traits is deprecated as it is inherently unreliable. Consider java.util.concurrent.ConcurrentLinkedQueue as an alternative. Investigation shows we are already using ConcurrentLinkedQueue in other locations so switch our uses of SynchronizedBuffer to ConcurrentLinkedQueue.

@holdenk
Copy link
Contributor Author

holdenk commented Feb 3, 2016

Note that the explicit toSeq effectively takes a snapshot of the queue, whereas before the implicit conversion would allow elements to be added but since we only call toSeq in the test at the end this should be fine.

@SparkQA
Copy link

SparkQA commented Feb 3, 2016

Test build #50682 has finished for PR 11059 at commit 2ed2227.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@holdenk holdenk changed the title [SPARK-13164][CORE][WIP] Replace deprecated synchronized buffer in core [SPARK-13164][CORE] Replace deprecated synchronized buffer in core Feb 3, 2016
@holdenk
Copy link
Contributor Author

holdenk commented Feb 3, 2016

cc @srowen who expressed interest on the JIRA

@andrewor14
Copy link
Contributor

LGTM merged into master.

@asfgit asfgit closed this in 62a7c28 Feb 4, 2016
@tedyu
Copy link
Contributor

tedyu commented Feb 4, 2016

Should scalastyle rule be added to ban use of mutable.SynchronizedBuffer ?

@andrewor14
Copy link
Contributor

sounds like a good rule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants