You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/22 14:11:18 UTC

[GitHub] [spark] LuciferYang commented on a change in pull request #29836: [SPARK-32964][DSTREAMS] Pass all `streaming` module UTs in Scala 2.13

LuciferYang commented on a change in pull request #29836:
URL: https://github.com/apache/spark/pull/29836#discussion_r492766515



##########
File path: streaming/src/main/scala/org/apache/spark/streaming/DStreamGraph.scala
##########
@@ -29,8 +28,8 @@ import org.apache.spark.util.Utils
 
 final private[streaming] class DStreamGraph extends Serializable with Logging {
 
-  private val inputStreams = new ArrayBuffer[InputDStream[_]]()
-  private val outputStreams = new ArrayBuffer[DStream[_]]()
+  private var inputStreams = Array.empty[InputDStream[_]]

Review comment:
       - default implementation of `mutable.Seq` is `ArrayBuffer`, it can't work.
   
   - default implementation of `immutable.Seq` is `List`, it can't work also
   
   - `mutable.ArraySeq` and `immutable.ArraySeq` both work, but still need use `var` because  they are not `Growable`




----------------------------------------------------------------
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:
users@infra.apache.org



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