[ 
https://issues.apache.org/jira/browse/SPARK-6891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14507886#comment-14507886
 ] 

Ilya Ganelin commented on SPARK-6891:
-------------------------------------

[~meiyoula]
I'm running Spark 1.3 (from the released builds) and I tried your code in the 
spark shell on yarn as spark-shell --master. I'm able to run it without issue, 
I can successfully run multiple calls to runSparkPi. 

Were you seeing this issue when running the trunk?  

> ExecutorAllocationManager will request negative number executors
> ----------------------------------------------------------------
>
>                 Key: SPARK-6891
>                 URL: https://issues.apache.org/jira/browse/SPARK-6891
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>            Reporter: meiyoula
>            Priority: Critical
>         Attachments: DynamicExecutorTest.scala
>
>
> Below is the exception:
>        15/04/14 10:10:18 ERROR Utils: Uncaught exception in thread 
> spark-dynamic-executor-allocation-0
>         java.lang.IllegalArgumentException: Attempted to request a negative 
> number of executor(s) -1 from the cluster manager. Please specify a positive 
> number!
>              at 
> org.apache.spark.scheduler.cluster.CoarseGrainedSchedulerBackend.requestTotalExecutors(CoarseGrainedSchedulerBackend.scala:342)
>              at 
> org.apache.spark.SparkContext.requestTotalExecutors(SparkContext.scala:1170)
>              at 
> org.apache.spark.ExecutorAllocationManager.addExecutors(ExecutorAllocationManager.scala:294)
>              at 
> org.apache.spark.ExecutorAllocationManager.addOrCancelExecutorRequests(ExecutorAllocationManager.scala:263)
>              at 
> org.apache.spark.ExecutorAllocationManager.org$apache$spark$ExecutorAllocationManager$$schedule(ExecutorAllocationManager.scala:230)
>              at 
> org.apache.spark.ExecutorAllocationManager$$anon$1$$anonfun$run$1.apply$mcV$sp(ExecutorAllocationManager.scala:189)
>              at 
> org.apache.spark.ExecutorAllocationManager$$anon$1$$anonfun$run$1.apply(ExecutorAllocationManager.scala:189)
>              at 
> org.apache.spark.ExecutorAllocationManager$$anon$1$$anonfun$run$1.apply(ExecutorAllocationManager.scala:189)
>              at 
> org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1723)
>              at 
> org.apache.spark.ExecutorAllocationManager$$anon$1.run(ExecutorAllocationManager.scala:189)
>              at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>              at 
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
>              at 
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
>              at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
>              at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>              at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>             at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>             at java.lang.Thread.run(Thread.java:722)
> Below is the configurations I  setted:
>        spark.dynamicAllocation.enabled true
>        spark.dynamicAllocation.minExecutors   0
>        spark.dynamicAllocation.initialExecutors        3
>        spark.dynamicAllocation.maxExecutors    7
>        spark.dynamicAllocation.executorIdleTimeout     30
>        spark.shuffle.service.enabled   true



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

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

Reply via email to