File tree Expand file tree Collapse file tree
streaming/src/main/scala/org/apache/spark/streaming Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -565,14 +565,9 @@ class StreamingContext private[streaming] (
565565 }
566566 }
567567
568- if (Utils .isDynamicAllocationEnabled(sc.conf)) {
569- val maxExecutors = sc.conf.getInt(" spark.dynamicAllocation.maxExecutors" , 2 )
570- sc.conf.set(" spark.dynamicAllocation.enabled" , false .toString)
571- sc.conf.set(" spark.executor.instances" , maxExecutors.toString)
572- logWarning(" Dynamic allocation is not supported with Spark Streaming currently, since it " +
573- s " could lead to data loss in some cases. " +
574- s " The number of executors is being set to $maxExecutors" )
575- }
568+ require(! Utils .isDynamicAllocationEnabled(sc.conf),
569+ " Dynamic allocation is not supported with Spark Streaming currently, since it " +
570+ s " could lead to data loss in some cases. " )
576571 }
577572
578573 /**
You can’t perform that action at this time.
0 commit comments