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

Locality Level is ANY on "Details for Stage" WebUI page

Rank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Incomplete
    • 1.4.1
    • None
    • Spark Core, Web UI

    Description

      Locality Level is ANY on "Details for Stage" WebUI page

      When a sc.textFile(XX) program is running, Locality Level is ANY which should be NODE_LOCAL on stage 0.

      org.apache.spark.scheduler.TaskSetManager

      // Check for node-local tasks
      if (TaskLocality.isAllowed(locality, TaskLocality.NODE_LOCAL)) {
      for (index <- speculatableTasks if canRunOnHost(index)) {
      val locations = tasks(index).preferredLocations.map(_.host)
      if (locations.contains(host))

      Unknown macro: { speculatableTasks -= index return Some((index, TaskLocality.NODE_LOCAL)) }

      }
      }

      The variable "locations" is hostname of HDFS split, which is from InetAddress.getHostName.
      The variable "host" is ip of Executor, which is from InetAddress.getLocalHost.getHostAddress.

      org.apache.spark.deploy.worker.WorkerArguments

      var host = Utils.localHostName()

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            Yun Zhao Yun Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment