Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-4403

Elastic allocation(spark.dynamicAllocation.enabled) results in task never being execued.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.1.1
    • None
    • Spark Core, YARN
    • None

    Description

      I execute ipython notebook + pyspark with spark.dynamicAllocation.enabled = true. Task never ends.

      Code:

      import sys
      from random import random
      from operator import add
      partitions = 10
      n = 100000 * partitions
      
      def f(_):
          x = random() * 2 - 1
          y = random() * 2 - 1
          return 1 if x ** 2 + y ** 2 < 1 else 0
      
      count = sc.parallelize(xrange(1, n + 1), partitions).map(f).reduce(add)
      print "Pi is roughly %f" % (4.0 * count / n)
      
      IPYTHON_ARGS="notebook --profile=ydf --port $IPYTHON_PORT --port-retries=0 --ip='*' --no-browser"
      pyspark \
              --verbose \
              --master yarn-client \
              --conf spark.driver.port=$((RANDOM_PORT + 2)) \
              --conf spark.broadcast.port=$((RANDOM_PORT + 3)) \
              --conf spark.replClassServer.port=$((RANDOM_PORT + 4)) \
              --conf spark.blockManager.port=$((RANDOM_PORT + 5)) \
              --conf spark.executor.port=$((RANDOM_PORT + 6)) \
              --conf spark.fileserver.port=$((RANDOM_PORT + 7)) \
              --conf spark.shuffle.service.enabled=true \
              --conf spark.dynamicAllocation.enabled=true \
              --conf spark.dynamicAllocation.minExecutors=1 \
              --conf spark.dynamicAllocation.maxExecutors=10 \
              --conf spark.ui.port=$SPARK_UI_PORT
      

      Attachments

        1. ipython_out
          16 kB
          Egor Pahomov

        Issue Links

          Activity

            People

              Unassigned Unassigned
              epahomov Egor Pahomov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: