You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by liupc <gi...@git.apache.org> on 2017/06/01 03:50:52 UTC

[GitHub] spark pull request #18171: Fix tid key not found in TaskSchedulerImpl

GitHub user liupc opened a pull request:

    https://github.com/apache/spark/pull/18171

    Fix tid key not found in TaskSchedulerImpl

    ## What changes were proposed in this pull request?
    
    This pull request fix the TaskScheulerImpl bug in some condition.
    Detail see:
    https://issues.apache.org/jira/browse/SPARK-20945
    
    (Please fill in changes proposed in this fix)
    
    ## How was this patch tested?
    manual tests
    (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
    (If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
    
    Please review http://spark.apache.org/contributing.html before opening a pull request.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/liupc/spark Fix-tid-key-not-found-in-TaskSchedulerImpl

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18171.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18171
    
----
commit d6831fb0ea2b926715ed92c70c20f8c111a66e3e
Author: liupengcheng <li...@xiaomi.com>
Date:   2017-06-01T01:33:37Z

    Fix tid key not found in TaskSchedulerImpl

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18171: Fix tid key not found in TaskSchedulerImpl

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/18171
  
    Can one of the admins verify this patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18171: [SPARK-20945] Fix TID key not found in TaskSchedu...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/18171


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18171: [SPARK-20945] Fix TID key not found in TaskSchedulerImpl

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18171
  
    **[Test build #3775 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/3775/testReport)** for PR 18171 at commit [`c4fff63`](https://github.com/apache/spark/commit/c4fff63c8ad2f959c7a8168d051e3b8ebfc06abb).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18171: [SPARK-20945] Fix TID key not found in TaskSchedulerImpl

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/18171
  
    Merged to master


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18171: [SPARK-20945] Fix TID key not found in TaskSchedulerImpl

Posted by jinxing64 <gi...@git.apache.org>.
Github user jinxing64 commented on the issue:

    https://github.com/apache/spark/pull/18171
  
    Why this is not merged into 2.2 ?


---

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


[GitHub] spark issue #18171: Fix tid key not found in TaskSchedulerImpl

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the issue:

    https://github.com/apache/spark/pull/18171
  
    Hi @liupc,
    
    Thanks for the JIRA and PR. Could you edit the PR's title to incorporate the JIRA number? e.g.
    
    > [SPARK-20945] Fix TID key not found in TaskSchedulerImpl
    
    Also, could you re-target this PR to be against the `master` branch? It looks like you've opened it against `branch-2.1`. Our workflow for these kind of bugs is generally to open PRs against the master branch: committers will take care of backporting your fix to appropriate maintenance branches.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18171: [SPARK-20945] Fix TID key not found in TaskSchedu...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18171#discussion_r119569510
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala ---
    @@ -240,8 +240,10 @@ private[spark] class TaskSchedulerImpl private[scheduler](
             // 2. The task set manager has been created but no tasks has been scheduled. In this case,
             //    simply abort the stage.
             tsm.runningTasksSet.foreach { tid =>
    -          val execId = taskIdToExecutorId(tid)
    -          backend.killTask(tid, execId, interruptThread, reason = "stage cancelled")
    +          if (taskIdToExecutorId.contains(tid)) {
    +            val execId = taskIdToExecutorId(tid)
    +            backend.killTask(tid, execId, interruptThread)
    --- End diff --
    
    I think you lost the value of "reason" here.
    It's not a big deal but you could also write:
    ```
    taskIdToExecutorId.get(tid).foreach(execId => backend.killTask(tid, execId, interruptThread, reason = "stage cancelled"))


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18171: [SPARK-20945] Fix TID key not found in TaskSchedulerImpl

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/18171
  
    **[Test build #3775 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/3775/testReport)** for PR 18171 at commit [`c4fff63`](https://github.com/apache/spark/commit/c4fff63c8ad2f959c7a8168d051e3b8ebfc06abb).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18171: [SPARK-20945] Fix TID key not found in TaskSchedu...

Posted by liupc <gi...@git.apache.org>.
Github user liupc commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18171#discussion_r119763935
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala ---
    @@ -240,8 +240,10 @@ private[spark] class TaskSchedulerImpl private[scheduler](
             // 2. The task set manager has been created but no tasks has been scheduled. In this case,
             //    simply abort the stage.
             tsm.runningTasksSet.foreach { tid =>
    -          val execId = taskIdToExecutorId(tid)
    -          backend.killTask(tid, execId, interruptThread, reason = "stage cancelled")
    +          if (taskIdToExecutorId.contains(tid)) {
    +            val execId = taskIdToExecutorId(tid)
    +            backend.killTask(tid, execId, interruptThread)
    --- End diff --
    
    Looks good! I will update soon, thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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