srowen commented on a change in pull request #24586:
[SPARK-27682][CORE][GRAPHX][MLLIB] Replace use of collections and methods that
will be removed in Scala 2.13 with work-alikes
URL: https://github.com/apache/spark/pull/24586#discussion_r283113973
##########
File path:
mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala
##########
@@ -505,11 +503,11 @@ class RandomForestSuite extends SparkFunSuite with
MLlibTestSparkContext {
val failString = s"Failed on test with:" +
s"numTrees=$numTrees, featureSubsetStrategy=$featureSubsetStrategy,"
+
s" numFeaturesPerNode=$numFeaturesPerNode, seed=$seed"
- val nodeStack = new mutable.ArrayStack[(Int, LearningNode)]
+ val nodeStack = new mutable.ListBuffer[(Int, LearningNode)]
val topNodes: Array[LearningNode] = new Array[LearningNode](numTrees)
Range(0, numTrees).foreach { treeIndex =>
topNodes(treeIndex) = LearningNode.emptyNode(nodeIndex = 1)
- nodeStack.push((treeIndex, topNodes(treeIndex)))
+ nodeStack.+=:((treeIndex, topNodes(treeIndex)))
Review comment:
Oops, my search and replace didn't quite work. Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]